diff --git a/.circleci/config.yml b/.circleci/config.yml index 804111b98..982fd07b4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -13,9 +13,12 @@ jobs: - run: name: Update apt-get command: apt-get update -qy + - run: + name: Set time zone + command: ln -fs /usr/share/zoneinfo/Europe/Paris /etc/localtime - run: name: Install python-dev with apt-get - command: apt-get install -y python3-dev + command: DEBIAN_FRONTEND="noninteractive" apt-get install -y python3-dev - run: name: Install pip with apt-get command: apt-get install -y python3-pip diff --git a/README.md b/README.md index 775ea7610..db677f07f 100644 --- a/README.md +++ b/README.md @@ -8,17 +8,19 @@ numbbo/coco: Comparing Continuous Optimizers > Nikolaus Hansen, Dimo Brockhoff, Olaf Mersmann, Tea Tusar, Dejan Tusar, Ouassim Ait ElHara, Phillipe R. Sampaio, Asma Atamna, Konstantinos Varelas, Umut Batu, Duc Manh Nguyen, Filip Matzner, Anne Auger. COmparing Continuous Optimizers: numbbo/COCO on Github. Zenodo, [DOI:10.5281/zenodo.2594848](https://doi.org/10.5281/zenodo.2594848), March 2019. --- -[This code](https://github.com/numbbo/coco) reimplements the original Comparing -Continous Optimizer platform, now rewritten fully in `ANSI C` and `Python` with -other languages calling the `C` code. As the name suggests, the code provides a -platform to benchmark and compare continuous optimizers, AKA non-linear solvers -for numerical optimization. Languages currently available are +[This code](https://github.com/numbbo/coco) provides a platform to +benchmark and compare continuous optimizers, AKA non-linear solvers +for numerical optimization. It is fully written in `ANSI C` and +`Python` (reimplementing the original Comparing Continous +Optimizer platform) with other languages calling the `C` code. +Languages currently available to connect a solver to the benchmarks are - `C/C++` - `Java` - `MATLAB/Octave` - `Python` +Code for others might be available in branched code. Contributions to link further languages (including a better example in `C++`) are more than welcome. @@ -30,12 +32,11 @@ from using the platform: ![General COCO Structure](coco.png) For more general information: -- read our [benchmarking guidelines introduction](https://arxiv.org/pdf/1603.08785.pdf) +- read our benchmarking guidelines introduction [COCO: A Platform for Comparing Continuous Optimizers in a Black-Box Setting (pdf)]((https://www.tandfonline.com/eprint/DQPF7YXFJVMTQBH8NKR8/pdf?target=10.1080/10556788.2020.1808977)) or at [arXiv](https://arxiv.org/abs/1603.08785). - read the [COCO experimental setup](http://numbbo.github.io/coco-doc/experimental-setup) description - see the [`bbob-biobj` and `bbob-biobj-ext` COCO multi-objective functions testbed](http://numbbo.github.io/coco-doc/bbob-biobj/functions) documentation and the [specificities of the performance assessment for the bi-objective testbeds](http://numbbo.github.io/coco-doc/bbob-biobj/perf-assessment). - consult the [BBOB workshops series](http://numbbo.github.io/workshops), -- consider to [register here](http://numbbo.github.io/register) for news, -- see the [previous COCO home page here](http://coco.gforge.inria.fr/) and +- consider to [register here](http://numbbo.github.io/register) for news, and - see the [links below](#Links) to learn more about the ideas behind CoCO. @@ -181,14 +182,15 @@ Getting Started containing a `*` and not ending with `!` or `*`. Otherwise, all matches are listed but none is processed with this call. For more information in how to obtain and display specific archived data, see - [`help(cocopp)`](http://coco.gforge.inria.fr/apidocs-cocopp/cocopp.html) or - [`help(cocopp.archives)`](https://coco.gforge.inria.fr/apidocs-cocopp/cocopp.archiving.OfficialArchives.html) + [`help(cocopp)`](https://numbbo.github.io/gforge/apidocs-cocopp/cocopp.html) or + [`help(cocopp.archives)`](https://numbbo.github.io/gforge/apidocs-cocopp/cocopp.archiving.OfficialArchives.html) or the class - [`COCODataArchive`](http://coco.gforge.inria.fr/apidocs-cocopp/cocopp.archiving.COCODataArchive.html). + [`COCODataArchive`](https://numbbo.github.io/gforge/apidocs-cocopp/cocopp.archiving.COCODataArchive.html). Data descriptions can be found for the `bbob` test suite at - [coco-algorithms](http://coco.gforge.inria.fr/doku.php?id=algorithms) and for the `bbob-biobj` - test suite at [coco-algorithms-biobj](http://coco.gforge.inria.fr/doku.php?id=algorithms-biobj). + [coco-algorithms](https://numbbo.github.io/data-archive/bbob/) and for the `bbob-biobj` + test suite at [coco-algorithms-biobj](https://numbbo.github.io/data-archive/bbob-biobj/). + For other test suites, please see the [COCO data archive](https://numbbo.github.io/data-archive/). Local and archived data can be freely mixed like @@ -220,7 +222,7 @@ Getting Started help(cocopp) ``` - provides the [documentation entry pointer](https://coco.gforge.inria.fr/apidocs-cocopp/cocopp.html). + provides the [documentation entry pointer](https://numbbo.github.io/gforge/apidocs-cocopp/cocopp.html). 7. Once your algorithm runs well, **increase the budget** in your experiment script, if necessary implement randomized independent restarts, and follow @@ -591,16 +593,19 @@ Citation -------- You may cite this work in a scientific context as -N. Hansen, A. Auger, R. Ros, O. Mersmann, T. Tušar, D. Brockhoff. [COCO: A Platform for Comparing Continuous Optimizers in a Black-Box Setting](https://doi.org/10.1080/10556788.2020.1808977), Optimization Methods and Software, 2020. [[arXiv version](https://arxiv.org/pdf/1603.08785.pdf)] -``` -@ARTICLE{hansen2020cocoplat, - author = {Hansen, N. and Auger, A. and Ros, R. and Mersmann, O. and - Tu{\v s}ar, T. and Brockhoff, D.}, - title = {{COCO}: A Platform for Comparing Continuous Optimizers - in a Black-Box Setting}, - journal = {Optimization Methods and Software}, - doi = {https://doi.org/10.1080/10556788.2020.1808977}, - year = 2020 +N. Hansen, A. Auger, R. Ros, O. Mersmann, T. Tušar, D. Brockhoff. [COCO: A Platform for Comparing Continuous Optimizers in a Black-Box Setting](https://doi.org/10.1080/10556788.2020.1808977), _Optimization Methods and Software_, 36(1), pp. 114-144, 2021. [[pdf](https://www.tandfonline.com/eprint/DQPF7YXFJVMTQBH8NKR8/pdf?target=10.1080/10556788.2020.1808977), [arXiv](https://arxiv.org/abs/1603.08785)] +``` +@ARTICLE{hansen2021coco, +author = {Hansen, N. and Auger, A. and Ros, R. and Mersmann, O. + and Tu{\v s}ar, T. and Brockhoff, D.}, +title = {{COCO}: A Platform for Comparing Continuous Optimizers + in a Black-Box Setting}, +journal = {Optimization Methods and Software}, +doi = {https://doi.org/10.1080/10556788.2020.1808977}, +pages = {114--144}, +issue = {1}, +volume = {36}, +year = 2021 } ``` @@ -610,27 +615,27 @@ Links and Documentation NumBBO/Coco framework extensively, can be tracked [here](http://numbbo.github.io/workshops "BBOB Workshops") * Data sets from previous experiments for many algorithms are available at - - http://coco.gforge.inria.fr/doku.php?id=algorithms-bbob for the `bbob` test suite - - http://coco.gforge.inria.fr/doku.php?id=algorithms-bbob-noisy for the `bbob-noisy` test suite - - http://coco.gforge.inria.fr/doku.php?id=algorithms-bbob-biobj for the `bbob-biobj` test suite, and at - - http://coco.gforge.inria.fr/doku.php?id=algorithms-bbob-largescale for the `bbob-largescale` test suite. + - https://numbbo.github.io/data-archive/bbob/ for the `bbob` test suite + - https://numbbo.github.io/data-archive/bbob-noisy/ for the `bbob-noisy` test suite + - https://numbbo.github.io/data-archive/bbob-biobj/ for the `bbob-biobj` test suite, and at + - https://numbbo.github.io/data-archive/bbob-largescale/ for the `bbob-largescale` test suite. * Postprocessed data for each year in which a BBOB workshop was taking place can be - found at http://coco.gforge.inria.fr/ppdata-archive + found at https://numbbo.github.io/ppdata-archive * Stay informed about the BBOB workshop series and releases of the NumBBO/Coco software - by registering at http://coco.gforge.inria.fr/register -* Read about the basic principles behind the Coco platform in [COCO: A Platform for Comparing Continuous Optimizers in a Black-Box Setting](https://arxiv.org/pdf/1603.08785.pdf). + by registering via [this form](https://docs.google.com/forms/d/1GS48SXGjapUu6WY6Zt-Ma5HCl2izq4ydT7sMa5ujUDI) +* Read about the basic principles behind the Coco platform in [COCO: A Platform for Comparing Continuous Optimizers in a Black-Box Setting (pdf)](https://www.tandfonline.com/eprint/DQPF7YXFJVMTQBH8NKR8/pdf?target=10.1080/10556788.2020.1808977) or at [arXiv](https://arxiv.org/abs/1603.08785). * For details on the experimental set-up to carry out the benchmarking please refer to http://numbbo.github.io/coco-doc/experimental-setup/. * More detailed documentation of the existing benchmark suites can be found here: - - for the **`bbob`** problem suite at http://coco.gforge.inria.fr/downloads/download16.00/bbobdocfunctions.pdf + - for the **`bbob`** problem suite at https://numbbo.github.io/gforge/downloads/download16.00/bbobdocfunctions.pdf with the experimental setup at http://coco.lri.fr/downloads/download15.03/bbobdocexperiment.pdf - for the **`bbob-biobj`** and **`bbob-biobj-ext`** problem suites at http://numbbo.github.io/coco-doc/bbob-biobj/functions - for the **`bbob-largescale`** problem suite - at http://numbbo.github.io/coco-doc/bbob-largescale/functions + at https://arxiv.org/pdf/1903.06396.pdf - for the **`bbob-mixint`** and **`bbob-biobj-mixint`** problem suites, we refer to https://hal.inria.fr/hal-02067932/document and to - http://coco.gforge.inria.fr/preliminary-bbob-mixint-documentation/bbob-mixint-doc.pdf + https://numbbo.github.io/gforge/preliminary-bbob-mixint-documentation/bbob-mixint-doc.pdf * Online documentation of the NumBBO/Coco API (i.e. for the ANSI C code) is available at http://numbbo.github.io/coco-doc/C * More detailed documentation on how the performance assessement is done can @@ -642,16 +647,16 @@ Links and Documentation Comprehensive List of Documentations -------------------------------------------- -* General introduction: [COCO: A Platform for Comparing Continuous Optimizers in a Black-Box Setting](https://arxiv.org/pdf/1603.08785.pdf) +* General introduction: [COCO: A Platform for Comparing Continuous Optimizers in a Black-Box Setting (pdf)](https://www.tandfonline.com/eprint/DQPF7YXFJVMTQBH8NKR8/pdf?target=10.1080/10556788.2020.1808977) or at [arXiv](https://arxiv.org/abs/1603.08785) * Experimental setup: http://numbbo.github.io/coco-doc/experimental-setup/ * Testbeds - - bbob: http://coco.gforge.inria.fr/downloads/download16.00/bbobdocfunctions.pdf + - bbob: https://numbbo.github.io/gforge/downloads/download16.00/bbobdocfunctions.pdf - bbob-biobj: http://numbbo.github.io/coco-doc/bbob-biobj/functions/ - bbob-biobj-ext: http://numbbo.github.io/coco-doc/bbob-biobj/functions/ - bbob-noisy (only in old code basis): http://coco.lri.fr/downloads/download15.03/bbobdocnoisyfunctions.pdf - - bbob-largescale: http://numbbo.github.io/coco-doc/bbob-largescale/functions/ + - bbob-largescale: https://arxiv.org/pdf/1903.06396.pdf - bbob-mixint and bbob-biobj-mixint: https://hal.inria.fr/hal-02067932/document and - http://coco.gforge.inria.fr/preliminary-bbob-mixint-documentation/bbob-mixint-doc.pdf + https://numbbo.github.io/gforge/preliminary-bbob-mixint-documentation/bbob-mixint-doc.pdf - bbob-constrained (in progress): http://numbbo.github.io/coco-doc/bbob-constrained/functions/ @@ -660,10 +665,10 @@ Comprehensive List of Documentations * APIs - ``C`` experiments code: http://numbbo.github.io/coco-doc/C - - Python experiments code (module `cocoex`): http://coco.gforge.inria.fr/apidocs-cocoex/cocoex.html + - Python experiments code (module `cocoex`): https://numbbo.github.io/gforge/apidocs-cocoex/cocoex.html - Python short [beginners example experiment](code-experiments/build/python/example_experiment_for_beginners.py) - - Python `example_experiment2.py`: http://coco.gforge.inria.fr/apidocs-example_experiment/example_experiment2.html - - Postprocessing code (module `cocopp`): http://coco.gforge.inria.fr/apidocs-cocopp/cocopp.html + - Python `example_experiment2.py`: https://numbbo.github.io/gforge/apidocs-example_experiment/example_experiment2.html + - Postprocessing code (module `cocopp`): https://numbbo.github.io/gforge/apidocs-cocopp/cocopp.html * Somewhat outdated documents: - Full description of the platform: http://coco.lri.fr/COCOdoc/ diff --git a/code-experiments/build/python/cython/interface.c b/code-experiments/build/python/cython/interface.c index 6fbdda9c1..e76a82b6e 100644 --- a/code-experiments/build/python/cython/interface.c +++ b/code-experiments/build/python/cython/interface.c @@ -1,14 +1,16 @@ -/* Generated by Cython 0.29.6 */ +/* Generated by Cython 0.29.24 */ +#ifndef PY_SSIZE_T_CLEAN #define PY_SSIZE_T_CLEAN +#endif /* PY_SSIZE_T_CLEAN */ #include "Python.h" #ifndef Py_PYTHON_H #error Python headers needed to compile C extensions, please install development version of Python. #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) #error Cython requires Python 2.6+ or Python 3.3+. #else -#define CYTHON_ABI "0_29_6" -#define CYTHON_HEX_VERSION 0x001D06F0 +#define CYTHON_ABI "0_29_24" +#define CYTHON_HEX_VERSION 0x001D18F0 #define CYTHON_FUTURE_DIVISION 1 #include #ifndef offsetof @@ -310,8 +312,13 @@ #define __Pyx_DefaultClassType PyClass_Type #else #define __Pyx_BUILTIN_MODULE_NAME "builtins" +#if PY_VERSION_HEX >= 0x030800A4 && PY_VERSION_HEX < 0x030800B2 + #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ + PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) +#else #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 #define __Pyx_DefaultClassType PyType_Type #endif #ifndef Py_TPFLAGS_CHECKTYPES @@ -421,8 +428,12 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { #endif #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) #define CYTHON_PEP393_ENABLED 1 + #if defined(PyUnicode_IS_READY) #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ 0 : _PyUnicode_Ready((PyObject *)(op))) + #else + #define __Pyx_PyUnicode_READY(op) (0) + #endif #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) @@ -430,7 +441,15 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch) + #if defined(PyUnicode_IS_READY) && defined(PyUnicode_GET_SIZE) + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000 + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length)) + #else #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) + #endif + #else + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) + #endif #else #define CYTHON_PEP393_ENABLED 0 #define PyUnicode_1BYTE_KIND 1 @@ -479,8 +498,10 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { #define PyString_Type PyUnicode_Type #define PyString_Check PyUnicode_Check #define PyString_CheckExact PyUnicode_CheckExact +#ifndef PyObject_Unicode #define PyObject_Unicode PyObject_Str #endif +#endif #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj) #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj) @@ -491,6 +512,13 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { #ifndef PySet_CheckExact #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type) #endif +#if PY_VERSION_HEX >= 0x030900A4 + #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size) +#else + #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size) +#endif #if CYTHON_ASSUME_SAFE_MACROS #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) #else @@ -530,7 +558,7 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t #endif #if PY_MAJOR_VERSION >= 3 - #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : (Py_INCREF(func), func)) + #define __Pyx_PyMethod_New(func, self, klass) ((self) ? ((void)(klass), PyMethod_New(func, self)) : __Pyx_NewRef(func)) #else #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass) #endif @@ -571,11 +599,10 @@ static CYTHON_INLINE float __PYX_NAN() { #define __Pyx_truncl truncl #endif - +#define __PYX_MARK_ERR_POS(f_index, lineno) \ + { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; } #define __PYX_ERR(f_index, lineno, Ln_error) \ -{ \ - __pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \ -} + { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; } #ifndef __PYX_EXTERN_C #ifdef __cplusplus @@ -592,6 +619,9 @@ static CYTHON_INLINE float __PYX_NAN() { #include #include "numpy/arrayobject.h" #include "numpy/ufuncobject.h" + + /* NumPy API declarations from "numpy/__init__.pxd" */ + #include "coco.h" #ifdef _OPENMP #include @@ -865,7 +895,7 @@ typedef struct { } __Pyx_BufFmt_Context; -/* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":776 +/* "C:/Anaconda3/envs/py36coco/lib/site-packages/numpy/__init__.pxd":689 * # in Cython to enable them only on the right systems. * * ctypedef npy_int8 int8_t # <<<<<<<<<<<<<< @@ -874,7 +904,7 @@ typedef struct { */ typedef npy_int8 __pyx_t_5numpy_int8_t; -/* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":777 +/* "C:/Anaconda3/envs/py36coco/lib/site-packages/numpy/__init__.pxd":690 * * ctypedef npy_int8 int8_t * ctypedef npy_int16 int16_t # <<<<<<<<<<<<<< @@ -883,7 +913,7 @@ typedef npy_int8 __pyx_t_5numpy_int8_t; */ typedef npy_int16 __pyx_t_5numpy_int16_t; -/* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":778 +/* "C:/Anaconda3/envs/py36coco/lib/site-packages/numpy/__init__.pxd":691 * ctypedef npy_int8 int8_t * ctypedef npy_int16 int16_t * ctypedef npy_int32 int32_t # <<<<<<<<<<<<<< @@ -892,7 +922,7 @@ typedef npy_int16 __pyx_t_5numpy_int16_t; */ typedef npy_int32 __pyx_t_5numpy_int32_t; -/* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":779 +/* "C:/Anaconda3/envs/py36coco/lib/site-packages/numpy/__init__.pxd":692 * ctypedef npy_int16 int16_t * ctypedef npy_int32 int32_t * ctypedef npy_int64 int64_t # <<<<<<<<<<<<<< @@ -901,7 +931,7 @@ typedef npy_int32 __pyx_t_5numpy_int32_t; */ typedef npy_int64 __pyx_t_5numpy_int64_t; -/* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":783 +/* "C:/Anaconda3/envs/py36coco/lib/site-packages/numpy/__init__.pxd":696 * #ctypedef npy_int128 int128_t * * ctypedef npy_uint8 uint8_t # <<<<<<<<<<<<<< @@ -910,7 +940,7 @@ typedef npy_int64 __pyx_t_5numpy_int64_t; */ typedef npy_uint8 __pyx_t_5numpy_uint8_t; -/* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":784 +/* "C:/Anaconda3/envs/py36coco/lib/site-packages/numpy/__init__.pxd":697 * * ctypedef npy_uint8 uint8_t * ctypedef npy_uint16 uint16_t # <<<<<<<<<<<<<< @@ -919,7 +949,7 @@ typedef npy_uint8 __pyx_t_5numpy_uint8_t; */ typedef npy_uint16 __pyx_t_5numpy_uint16_t; -/* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":785 +/* "C:/Anaconda3/envs/py36coco/lib/site-packages/numpy/__init__.pxd":698 * ctypedef npy_uint8 uint8_t * ctypedef npy_uint16 uint16_t * ctypedef npy_uint32 uint32_t # <<<<<<<<<<<<<< @@ -928,7 +958,7 @@ typedef npy_uint16 __pyx_t_5numpy_uint16_t; */ typedef npy_uint32 __pyx_t_5numpy_uint32_t; -/* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":786 +/* "C:/Anaconda3/envs/py36coco/lib/site-packages/numpy/__init__.pxd":699 * ctypedef npy_uint16 uint16_t * ctypedef npy_uint32 uint32_t * ctypedef npy_uint64 uint64_t # <<<<<<<<<<<<<< @@ -937,7 +967,7 @@ typedef npy_uint32 __pyx_t_5numpy_uint32_t; */ typedef npy_uint64 __pyx_t_5numpy_uint64_t; -/* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":790 +/* "C:/Anaconda3/envs/py36coco/lib/site-packages/numpy/__init__.pxd":703 * #ctypedef npy_uint128 uint128_t * * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<< @@ -946,7 +976,7 @@ typedef npy_uint64 __pyx_t_5numpy_uint64_t; */ typedef npy_float32 __pyx_t_5numpy_float32_t; -/* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":791 +/* "C:/Anaconda3/envs/py36coco/lib/site-packages/numpy/__init__.pxd":704 * * ctypedef npy_float32 float32_t * ctypedef npy_float64 float64_t # <<<<<<<<<<<<<< @@ -955,7 +985,7 @@ typedef npy_float32 __pyx_t_5numpy_float32_t; */ typedef npy_float64 __pyx_t_5numpy_float64_t; -/* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":800 +/* "C:/Anaconda3/envs/py36coco/lib/site-packages/numpy/__init__.pxd":713 * # The int types are mapped a bit surprising -- * # numpy.int corresponds to 'l' and numpy.long to 'q' * ctypedef npy_long int_t # <<<<<<<<<<<<<< @@ -964,7 +994,7 @@ typedef npy_float64 __pyx_t_5numpy_float64_t; */ typedef npy_long __pyx_t_5numpy_int_t; -/* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":801 +/* "C:/Anaconda3/envs/py36coco/lib/site-packages/numpy/__init__.pxd":714 * # numpy.int corresponds to 'l' and numpy.long to 'q' * ctypedef npy_long int_t * ctypedef npy_longlong long_t # <<<<<<<<<<<<<< @@ -973,7 +1003,7 @@ typedef npy_long __pyx_t_5numpy_int_t; */ typedef npy_longlong __pyx_t_5numpy_long_t; -/* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":802 +/* "C:/Anaconda3/envs/py36coco/lib/site-packages/numpy/__init__.pxd":715 * ctypedef npy_long int_t * ctypedef npy_longlong long_t * ctypedef npy_longlong longlong_t # <<<<<<<<<<<<<< @@ -982,7 +1012,7 @@ typedef npy_longlong __pyx_t_5numpy_long_t; */ typedef npy_longlong __pyx_t_5numpy_longlong_t; -/* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":804 +/* "C:/Anaconda3/envs/py36coco/lib/site-packages/numpy/__init__.pxd":717 * ctypedef npy_longlong longlong_t * * ctypedef npy_ulong uint_t # <<<<<<<<<<<<<< @@ -991,7 +1021,7 @@ typedef npy_longlong __pyx_t_5numpy_longlong_t; */ typedef npy_ulong __pyx_t_5numpy_uint_t; -/* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":805 +/* "C:/Anaconda3/envs/py36coco/lib/site-packages/numpy/__init__.pxd":718 * * ctypedef npy_ulong uint_t * ctypedef npy_ulonglong ulong_t # <<<<<<<<<<<<<< @@ -1000,7 +1030,7 @@ typedef npy_ulong __pyx_t_5numpy_uint_t; */ typedef npy_ulonglong __pyx_t_5numpy_ulong_t; -/* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":806 +/* "C:/Anaconda3/envs/py36coco/lib/site-packages/numpy/__init__.pxd":719 * ctypedef npy_ulong uint_t * ctypedef npy_ulonglong ulong_t * ctypedef npy_ulonglong ulonglong_t # <<<<<<<<<<<<<< @@ -1009,7 +1039,7 @@ typedef npy_ulonglong __pyx_t_5numpy_ulong_t; */ typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t; -/* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":808 +/* "C:/Anaconda3/envs/py36coco/lib/site-packages/numpy/__init__.pxd":721 * ctypedef npy_ulonglong ulonglong_t * * ctypedef npy_intp intp_t # <<<<<<<<<<<<<< @@ -1018,7 +1048,7 @@ typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t; */ typedef npy_intp __pyx_t_5numpy_intp_t; -/* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":809 +/* "C:/Anaconda3/envs/py36coco/lib/site-packages/numpy/__init__.pxd":722 * * ctypedef npy_intp intp_t * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<< @@ -1027,7 +1057,7 @@ typedef npy_intp __pyx_t_5numpy_intp_t; */ typedef npy_uintp __pyx_t_5numpy_uintp_t; -/* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":811 +/* "C:/Anaconda3/envs/py36coco/lib/site-packages/numpy/__init__.pxd":724 * ctypedef npy_uintp uintp_t * * ctypedef npy_double float_t # <<<<<<<<<<<<<< @@ -1036,7 +1066,7 @@ typedef npy_uintp __pyx_t_5numpy_uintp_t; */ typedef npy_double __pyx_t_5numpy_float_t; -/* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":812 +/* "C:/Anaconda3/envs/py36coco/lib/site-packages/numpy/__init__.pxd":725 * * ctypedef npy_double float_t * ctypedef npy_double double_t # <<<<<<<<<<<<<< @@ -1045,7 +1075,7 @@ typedef npy_double __pyx_t_5numpy_float_t; */ typedef npy_double __pyx_t_5numpy_double_t; -/* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":813 +/* "C:/Anaconda3/envs/py36coco/lib/site-packages/numpy/__init__.pxd":726 * ctypedef npy_double float_t * ctypedef npy_double double_t * ctypedef npy_longdouble longdouble_t # <<<<<<<<<<<<<< @@ -1084,7 +1114,7 @@ struct __pyx_obj_6cocoex_9interface_Observer; struct __pyx_obj_6cocoex_9interface_Problem; struct __pyx_obj_6cocoex_9interface___pyx_scope_struct____iter__; -/* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":815 +/* "C:/Anaconda3/envs/py36coco/lib/site-packages/numpy/__init__.pxd":728 * ctypedef npy_longdouble longdouble_t * * ctypedef npy_cfloat cfloat_t # <<<<<<<<<<<<<< @@ -1093,7 +1123,7 @@ struct __pyx_obj_6cocoex_9interface___pyx_scope_struct____iter__; */ typedef npy_cfloat __pyx_t_5numpy_cfloat_t; -/* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":816 +/* "C:/Anaconda3/envs/py36coco/lib/site-packages/numpy/__init__.pxd":729 * * ctypedef npy_cfloat cfloat_t * ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<< @@ -1102,7 +1132,7 @@ typedef npy_cfloat __pyx_t_5numpy_cfloat_t; */ typedef npy_cdouble __pyx_t_5numpy_cdouble_t; -/* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":817 +/* "C:/Anaconda3/envs/py36coco/lib/site-packages/numpy/__init__.pxd":730 * ctypedef npy_cfloat cfloat_t * ctypedef npy_cdouble cdouble_t * ctypedef npy_clongdouble clongdouble_t # <<<<<<<<<<<<<< @@ -1111,7 +1141,7 @@ typedef npy_cdouble __pyx_t_5numpy_cdouble_t; */ typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t; -/* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":819 +/* "C:/Anaconda3/envs/py36coco/lib/site-packages/numpy/__init__.pxd":732 * ctypedef npy_clongdouble clongdouble_t * * ctypedef npy_cdouble complex_t # <<<<<<<<<<<<<< @@ -1351,7 +1381,7 @@ static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObje #define __Pyx_PyFunction_FastCall(func, args, nargs)\ __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL) #if 1 || PY_VERSION_HEX < 0x030600B1 -static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, int nargs, PyObject *kwargs); +static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs); #else #define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs) #endif @@ -1500,7 +1530,7 @@ static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) { if (likely(L->allocated > len)) { Py_INCREF(x); PyList_SET_ITEM(list, len, x); - Py_SIZE(list) = len+1; + __Pyx_SET_SIZE(list, len + 1); return 0; } return PyList_Append(list, x); @@ -1558,7 +1588,7 @@ static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) { if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) { Py_INCREF(x); PyList_SET_ITEM(list, len, x); - Py_SIZE(list) = len+1; + __Pyx_SET_SIZE(list, len + 1); return 0; } return PyList_Append(list, x); @@ -1616,11 +1646,9 @@ static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* k /* KeywordStringCheck.proto */ static int __Pyx_CheckKeywordStrings(PyObject *kwdict, const char* function_name, int kw_allowed); -/* PyObjectFormat.proto */ -#if CYTHON_USE_UNICODE_WRITER -static PyObject* __Pyx_PyObject_Format(PyObject* s, PyObject* f); -#else -#define __Pyx_PyObject_Format(s, f) PyObject_Format(s, f) +/* GCCDiagnostics.proto */ +#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) +#define __Pyx_HAS_GCC_DIAGNOSTIC #endif /* BuildPyUnicode.proto */ @@ -1763,26 +1791,6 @@ static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction * /* PyIntCompare.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, long intval, long inplace); -/* DictGetItem.proto */ -#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY -static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key); -#define __Pyx_PyObject_Dict_GetItem(obj, name)\ - (likely(PyDict_CheckExact(obj)) ?\ - __Pyx_PyDict_GetItem(obj, name) : PyObject_GetItem(obj, name)) -#else -#define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key) -#define __Pyx_PyObject_Dict_GetItem(obj, name) PyObject_GetItem(obj, name) -#endif - -/* RaiseTooManyValuesToUnpack.proto */ -static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); - -/* RaiseNeedMoreValuesToUnpack.proto */ -static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); - -/* RaiseNoneIterError.proto */ -static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void); - /* PyObject_GenericGetAttrNoDict.proto */ #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name); @@ -1800,6 +1808,9 @@ static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_nam /* SetVTable.proto */ static int __Pyx_SetVtable(PyObject *dict, void *vtable); +/* PyObjectGetAttrStrNoError.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name); + /* SetupReduce.proto */ static int __Pyx_setup_reduce(PyObject* type_obj); @@ -1869,12 +1880,6 @@ typedef struct { #endif -/* CIntToPy.proto */ -static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); - -/* CIntToPy.proto */ -static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); - /* RealImag.proto */ #if CYTHON_CCOMPLEX #ifdef __cplusplus @@ -1973,18 +1978,21 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); #endif #endif -/* CIntToPy.proto */ -static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value); - /* CIntFromPy.proto */ static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *); -/* CIntFromPy.proto */ -static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); /* CIntFromPy.proto */ static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *); +/* CIntFromPy.proto */ +static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); + /* FetchCommonType.proto */ static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type); @@ -2011,6 +2019,7 @@ typedef struct { PyObject *gi_qualname; PyObject *gi_modulename; PyObject *gi_code; + PyObject *gi_frame; int resume_label; char is_running; } __pyx_CoroutineObject; @@ -2099,7 +2108,6 @@ static PyTypeObject *__pyx_ptype_5numpy_flatiter = 0; static PyTypeObject *__pyx_ptype_5numpy_broadcast = 0; static PyTypeObject *__pyx_ptype_5numpy_ndarray = 0; static PyTypeObject *__pyx_ptype_5numpy_ufunc = 0; -static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *, char *, char *, int *); /*proto*/ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void); /*proto*/ /* Module declarations from 'cocoex.interface' */ @@ -2297,7 +2305,6 @@ static const char __pyx_k_Problem_already_initialized[] = "Problem already initi static const char __pyx_k_Unkown_benchmark_suite_name[] = "\nUnkown benchmark suite name "; static const char __pyx_k_finalized_invalid_problem_2[] = ""; static const char __pyx_k_function_dimension_instance[] = "function: {}, dimension: {}, instance: {}"; -static const char __pyx_k_ndarray_is_not_C_contiguous[] = "ndarray is not C contiguous"; static const char __pyx_k_number_of_integer_variables[] = "number_of_integer_variables"; static const char __pyx_k_update_current_observer_global[] = "_update_current_observer_global"; static const char __pyx_k_was_not_a_typo_you_can_add_the[] = " was not a typo, you can add the desired name to `known_suite_names`::\n\n >> import cocoex as ex\n >> ex.known_suite_names.append(b\"my_name\") # must be a byte string\n >> suite = ex.Suite(\"my_name\", \"\", \"\")\n COCO FATAL ERROR: coco_suite(): unknow problem suite\n\nThis will crash Python, if the suite \"my_name\" does in fact not exist. You might\nalso report back a missing name to https://github.com/numbbo/coco/issues\n"; @@ -2307,11 +2314,8 @@ static const char __pyx_k_has_never_been_tested_incomment[] = "has never been te static const char __pyx_k_ids_id_snippets_get_problem_Fal[] = "`ids(*id_snippets, get_problem=False, verbose=False)`\n return all problem IDs that contain all of the `id_snippets`.\n\n An ID can be used for indexing, that is, when calling the method\n `get_problem(id)`.\n\n If `get_problem is True`, the problem for the first matching ID is\n returned.\n\n >>> import cocoex as ex\n >>> s = ex.Suite(\"bbob\", \"\", \"\")\n >>> s.ids(\"f001\", \"d10\", \"i01\")\n ['bbob_f001_i01_d10']\n\n We can sweep through all instances of the ellipsoidal function f10\n in 20-D of the BBOB suite like this::\n\n >>> import cocoex as ex\n >>> suite = ex.Suite(\"bbob\", \"\", \"\")\n >>> ids = suite.ids(\"f010\", \"d20\")\n >>> used_indices = []\n >>> for p in suite:\n ... if p.id in ids:\n ... # work work work with problem `p`\n ... used_indices.append(p.index)\n >>> print(used_indices)\n [1575, 1576, 1577, 1578, 1579, 1580, 1581, 1582, 1583, 1584, 1585, 1586, 1587, 1588, 1589]\n\n A desired problem can also be filtered out during creation::\n\n >>> import cocoex as ex\n >>> f9 = ex.Suite(\"bbob\", \"\",\n ... \"function_indices:9 dimensions:20 instance_indices:1-5\")[0]\n >>> print(f9.id)\n bbob_f009_i01_d20\n\n "; static const char __pyx_k_not_match_the_problem_dimension[] = "not match the problem dimension `number_of_variables==%d`."; static const char __pyx_k_numpy_core_multiarray_failed_to[] = "numpy.core.multiarray failed to import"; -static const char __pyx_k_unknown_dtype_code_in_numpy_pxd[] = "unknown dtype code in numpy.pxd (%d)"; static const char __pyx_k_Dimension_np_size_x_d_of_input_x[] = "Dimension, `np.size(x)==%d`, of input `x` does "; static const char __pyx_k_Dimension_np_size_y_d_of_input_y[] = "Dimension, `np.size(y)==%d`, of input `y` does "; -static const char __pyx_k_Format_string_allocated_too_shor[] = "Format string allocated too short, see comment in numpy.pxd"; -static const char __pyx_k_Non_native_byte_order_not_suppor[] = "Non-native byte order not supported"; static const char __pyx_k_Suite_current_index___get___line[] = "Suite.current_index.__get__ (line 352)"; static const char __pyx_k_Suite_get_problem_by_function_di[] = "Suite.get_problem_by_function_dimension_instance (line 239)"; static const char __pyx_k_Suite_has_been_finalized_free_ed[] = "Suite has been finalized/free'ed"; @@ -2319,18 +2323,14 @@ static const char __pyx_k_cannot_deduce_function_id_from_s[] = "cannot deduce fu static const char __pyx_k_cannot_deduce_instance_id_from_s[] = "cannot deduce instance id from '%s'"; static const char __pyx_k_in_Problem__initialize_problem_p[] = "in Problem._initialize(problem,...): problem is NULL"; static const char __pyx_k_index_in_the_enumerator_of_all_p[] = "index in the enumerator of all problems in this suite.\n\n Details: To get the index in the underlying C implementation, which\n usually matches `current_index` one-to-one, use::\n\n >>> import cocoex as ex\n >>> suite = ex.Suite(\"bbob\", \"\", \"\")\n >>> suite.current_index is None\n True\n >>> suite.next_problem().id[-17:].lower()\n 'bbob_f001_i01_d02'\n >>> suite.current_index, suite.indices[suite.current_index]\n (0, 0)\n\n "; -static const char __pyx_k_ndarray_is_not_Fortran_contiguou[] = "ndarray is not Fortran contiguous"; static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__"; static const char __pyx_k_not_match_the_number_of_objectiv[] = "not match the number of objectives `number_of_objectives==%d`."; static const char __pyx_k_numpy_core_umath_failed_to_impor[] = "numpy.core.umath failed to import"; static const char __pyx_k_returns_a_Problem_instance_by_de[] = "returns a `Problem` instance, by default unobserved, using function,\n dimension and instance to identify the desired problem.\n\n If a suite contains multiple problems with the same function, dimension\n and instance, the first corresponding problem is returned.\n\n >>> import cocoex as ex\n >>> suite = ex.Suite(\"bbob-biobj\", \"\", \"\")\n >>> problem = suite.get_problem_by_function_dimension_instance(1, 2, 3)\n >>> # work work work using problem\n >>> problem.free()\n\n Details:\n - Function, dimension and instance are integer values from 1 on.\n\n - This call does not affect the state of the `current_problem` and\n `current_index` attributes.\n\n - For some suites and/or observers, the `free()` method of the problem\n must be called before the next call of\n `get_problem_by_function_dimension_instance`. Otherwise Python might\n just silently die, which is e.g. a known issue of the \"bbob\" observer.\n "; -static const char __pyx_k_Format_string_allocated_too_shor_2[] = "Format string allocated too short."; static PyObject *__pyx_kp_u_; static PyObject *__pyx_n_u_C; static PyObject *__pyx_kp_u_Dimension_np_size_x_d_of_input_x; static PyObject *__pyx_kp_u_Dimension_np_size_y_d_of_input_y; -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_u_If; static PyObject *__pyx_n_s_ImportError; static PyObject *__pyx_n_s_InvalidProblemException; @@ -2338,7 +2338,6 @@ static PyObject *__pyx_kp_u_Known_suite_names_are; static PyObject *__pyx_n_s_NoSuchProblemException; static PyObject *__pyx_n_s_NoSuchSuiteException; static PyObject *__pyx_kp_u_No_suite_with_name_s_found; -static PyObject *__pyx_kp_u_Non_native_byte_order_not_suppor; static PyObject *__pyx_kp_u_None; static PyObject *__pyx_n_s_NotImplementedError; static PyObject *__pyx_n_s_Observer; @@ -2456,8 +2455,6 @@ static PyObject *__pyx_n_s_max; static PyObject *__pyx_n_s_min; static PyObject *__pyx_n_s_name; static PyObject *__pyx_n_s_name_2; -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_next_problem; static PyObject *__pyx_kp_s_no_default___reduce___due_to_non; static PyObject *__pyx_kp_u_not_match_the_number_of_objectiv; @@ -2510,7 +2507,6 @@ static PyObject *__pyx_n_s_throw; static PyObject *__pyx_n_s_traceback; static PyObject *__pyx_kp_u_u; static PyObject *__pyx_kp_u_u_2; -static PyObject *__pyx_kp_u_unknown_dtype_code_in_numpy_pxd; static PyObject *__pyx_n_s_update_current_observer_global; static PyObject *__pyx_n_s_upper_bounds; static PyObject *__pyx_n_s_verbose; @@ -2603,8 +2599,6 @@ static PyObject *__pyx_pf_6cocoex_9interface_7Problem_32__exit__(struct __pyx_ob static PyObject *__pyx_pf_6cocoex_9interface_7Problem_34__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6cocoex_9interface_Problem *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6cocoex_9interface_7Problem_36__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6cocoex_9interface_Problem *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_6cocoex_9interface_log_level(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_level); /* 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_6cocoex_9interface_Suite(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6cocoex_9interface_Observer(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6cocoex_9interface_Problem(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ @@ -2633,12 +2627,7 @@ 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__34; -static PyObject *__pyx_tuple__35; -static PyObject *__pyx_tuple__36; -static PyObject *__pyx_tuple__37; -static PyObject *__pyx_codeobj__38; +static PyObject *__pyx_codeobj__33; /* Late includes */ /* "cython/interface.pyx":73 @@ -2658,6 +2647,9 @@ static PyObject *__pyx_f_6cocoex_9interface__bstring(PyObject *__pyx_v_s) { 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("_bstring", 0); /* "cython/interface.pyx":74 @@ -2808,6 +2800,9 @@ static int __pyx_pw_6cocoex_9interface_5Suite_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_v_suite_name = 0; PyObject *__pyx_v_suite_instance = 0; PyObject *__pyx_v_suite_options = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); @@ -2880,6 +2875,9 @@ static int __pyx_pf_6cocoex_9interface_5Suite___cinit__(struct __pyx_obj_6cocoex 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("__cinit__", 0); /* "cython/interface.pyx":101 @@ -3076,6 +3074,9 @@ static PyObject *__pyx_f_6cocoex_9interface_5Suite__initialize(struct __pyx_obj_ PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; int __pyx_t_19; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_initialize", 0); /* "cython/interface.pyx":118 @@ -3812,6 +3813,9 @@ static PyObject *__pyx_pf_6cocoex_9interface_5Suite_2reset(struct __pyx_obj_6coc 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("reset", 0); /* "cython/interface.pyx":163 @@ -3930,6 +3934,9 @@ static PyObject *__pyx_pw_6cocoex_9interface_5Suite_5next_problem(PyObject *__py static char __pyx_doc_6cocoex_9interface_5Suite_4next_problem[] = "`next_problem(observer=None)` returns the \"next\" problem in the\n `Suite`, on the first call or after `reset()` the first problem.\n\n `next_problem` serves to sweep through the `Suite` smoothly.\n "; static PyObject *__pyx_pw_6cocoex_9interface_5Suite_5next_problem(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_observer = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("next_problem (wrapper)", 0); @@ -3994,6 +4001,9 @@ static PyObject *__pyx_pf_6cocoex_9interface_5Suite_4next_problem(struct __pyx_o Py_ssize_t __pyx_t_6; size_t __pyx_t_7; struct __pyx_opt_args_6cocoex_9interface_Problem_init __pyx_t_8; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("next_problem", 0); /* "cython/interface.pyx":176 @@ -4300,6 +4310,9 @@ static char __pyx_doc_6cocoex_9interface_5Suite_6get_problem[] = "`get_problem(s static PyObject *__pyx_pw_6cocoex_9interface_5Suite_7get_problem(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_id = 0; PyObject *__pyx_v_observer = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_problem (wrapper)", 0); @@ -4381,6 +4394,9 @@ static PyObject *__pyx_pf_6cocoex_9interface_5Suite_6get_problem(struct __pyx_ob PyObject *__pyx_t_15 = NULL; int __pyx_t_16; PyObject *__pyx_t_17 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_problem", 0); /* "cython/interface.pyx":226 @@ -4801,6 +4817,9 @@ static PyObject *__pyx_pw_6cocoex_9interface_5Suite_9get_problem_by_function_dim PyObject *__pyx_v_dimension = 0; PyObject *__pyx_v_instance = 0; PyObject *__pyx_v_observer = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_problem_by_function_dimension_instance (wrapper)", 0); @@ -4905,6 +4924,9 @@ static PyObject *__pyx_pf_6cocoex_9interface_5Suite_8get_problem_by_function_dim PyObject *__pyx_t_16 = NULL; int __pyx_t_17; PyObject *__pyx_t_18 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_problem_by_function_dimension_instance", 0); /* "cython/interface.pyx":263 @@ -5278,6 +5300,9 @@ static PyObject *__pyx_pf_6cocoex_9interface_5Suite_10__getitem__(struct __pyx_o 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("__getitem__", 0); /* "cython/interface.pyx":281 @@ -5520,6 +5545,9 @@ static PyObject *__pyx_pf_6cocoex_9interface_5Suite_16find_problem_ids(CYTHON_UN PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("find_problem_ids", 0); /* "cython/interface.pyx":295 @@ -5568,6 +5596,9 @@ static PyObject *__pyx_pw_6cocoex_9interface_5Suite_19ids(PyObject *__pyx_v_self PyObject *__pyx_v_get_problem = 0; PyObject *__pyx_v_verbose = 0; PyObject *__pyx_v_id_snippets = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("ids (wrapper)", 0); @@ -5648,6 +5679,9 @@ static PyObject *__pyx_pf_6cocoex_9interface_5Suite_18ids(struct __pyx_obj_6coco int __pyx_t_11; Py_UCS4 __pyx_t_12; int __pyx_t_13; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("ids", 0); /* "cython/interface.pyx":337 @@ -5806,7 +5840,7 @@ static PyObject *__pyx_pf_6cocoex_9interface_5Suite_18ids(struct __pyx_obj_6coco __pyx_t_7 += 8; __Pyx_GIVEREF(__pyx_kp_u_index_2); PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_kp_u_index_2); - __pyx_t_5 = __Pyx_PyObject_Format(__pyx_v_idx, __pyx_n_u_d); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 341, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_FormatAndDecref(__Pyx_PyNumber_IntOrLong(__pyx_v_idx), __pyx_n_u_d); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 341, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_12 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_12) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_12; __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5); @@ -6082,6 +6116,9 @@ static PyObject *__pyx_pf_6cocoex_9interface_5Suite_13problem_names___get__(stru PyObject *__pyx_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); /* "cython/interface.pyx":372 @@ -6145,6 +6182,9 @@ static PyObject *__pyx_pf_6cocoex_9interface_5Suite_10dimensions___get__(struct 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__", 0); /* "cython/interface.pyx":376 @@ -6216,6 +6256,9 @@ static PyObject *__pyx_pf_6cocoex_9interface_5Suite_20number_of_objectives___get 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__", 0); /* "cython/interface.pyx":380 @@ -6284,6 +6327,9 @@ static PyObject *__pyx_pf_6cocoex_9interface_5Suite_7indices___get__(struct __py PyObject *__pyx_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); /* "cython/interface.pyx":388 @@ -6503,6 +6549,9 @@ static PyObject *__pyx_pf_6cocoex_9interface_5Suite_4info___get__(struct __pyx_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("__get__", 0); /* "cython/interface.pyx":406 @@ -6567,6 +6616,9 @@ static PyObject *__pyx_pf_6cocoex_9interface_5Suite_20__repr__(struct __pyx_obj_ Py_UCS4 __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("__repr__", 0); /* "cython/interface.pyx":408 @@ -6687,6 +6739,9 @@ static PyObject *__pyx_pf_6cocoex_9interface_5Suite_22__str__(struct __pyx_obj_6 Py_ssize_t __pyx_t_6; Py_UCS4 __pyx_t_7; PyObject *__pyx_t_8 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__str__", 0); /* "cython/interface.pyx":410 @@ -6842,7 +6897,7 @@ static PyObject *__pyx_pf_6cocoex_9interface_5Suite_22__str__(struct __pyx_obj_6 __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_min, __pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 414, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_Format(__pyx_t_8, __pyx_n_u_d); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 414, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_FormatAndDecref(__Pyx_PyNumber_IntOrLong(__pyx_t_8), __pyx_n_u_d); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 414, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_7 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_7) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_7; @@ -6859,7 +6914,7 @@ static PyObject *__pyx_pf_6cocoex_9interface_5Suite_22__str__(struct __pyx_obj_6 __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_max, __pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 414, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_Format(__pyx_t_8, __pyx_n_u_d); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 414, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_FormatAndDecref(__Pyx_PyNumber_IntOrLong(__pyx_t_8), __pyx_n_u_d); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 414, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_7 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_7) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_7; @@ -6938,6 +6993,9 @@ static Py_ssize_t __pyx_pf_6cocoex_9interface_5Suite_24__len__(struct __pyx_obj_ __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__len__", 0); /* "cython/interface.pyx":416 @@ -7002,6 +7060,9 @@ static PyObject *__pyx_pf_6cocoex_9interface_5Suite_26__iter__(struct __pyx_obj_ struct __pyx_obj_6cocoex_9interface___pyx_scope_struct____iter__ *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__iter__", 0); __pyx_cur_scope = (struct __pyx_obj_6cocoex_9interface___pyx_scope_struct____iter__ *)__pyx_tp_new_6cocoex_9interface___pyx_scope_struct____iter__(__pyx_ptype_6cocoex_9interface___pyx_scope_struct____iter__, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { @@ -7051,6 +7112,9 @@ static PyObject *__pyx_gb_6cocoex_9interface_5Suite_28generator(__pyx_CoroutineO int __pyx_t_14; char const *__pyx_t_15; PyObject *__pyx_t_16 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__iter__", 0); switch (__pyx_generator->resume_label) { @@ -7616,6 +7680,9 @@ static PyObject *__pyx_pf_6cocoex_9interface_5Suite_29__reduce_cython__(CYTHON_U PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 0); /* "(tree fragment)":2 @@ -7670,6 +7737,9 @@ static PyObject *__pyx_pf_6cocoex_9interface_5Suite_31__setstate_cython__(CYTHON PyObject *__pyx_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_cython__", 0); /* "(tree fragment)":4 @@ -7713,6 +7783,9 @@ static int __pyx_pw_6cocoex_9interface_8Observer_1__cinit__(PyObject *__pyx_v_se static int __pyx_pw_6cocoex_9interface_8Observer_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_name = 0; PyObject *__pyx_v_options = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); @@ -7785,6 +7858,9 @@ static int __pyx_pf_6cocoex_9interface_8Observer___cinit__(struct __pyx_obj_6coc PyObject *__pyx_t_9 = NULL; char const *__pyx_t_10; char const *__pyx_t_11; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__cinit__", 0); __Pyx_INCREF(__pyx_v_options); @@ -8101,6 +8177,9 @@ static PyObject *__pyx_pf_6cocoex_9interface_8Observer_4observe(struct __pyx_obj 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("observe", 0); /* "cython/interface.pyx":473 @@ -8346,6 +8425,9 @@ static PyObject *__pyx_pf_6cocoex_9interface_8Observer_13result_folder___get__(s PyObject *__pyx_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); /* "cython/interface.pyx":490 @@ -8408,6 +8490,9 @@ static PyObject *__pyx_pf_6cocoex_9interface_8Observer_6free(struct __pyx_obj_6c 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("free", 0); /* "cython/interface.pyx":493 @@ -8568,6 +8653,9 @@ static PyObject *__pyx_pf_6cocoex_9interface_8Observer_10__reduce_cython__(CYTHO PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 0); /* "(tree fragment)":2 @@ -8622,6 +8710,9 @@ static PyObject *__pyx_pf_6cocoex_9interface_8Observer_12__setstate_cython__(CYT PyObject *__pyx_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_cython__", 0); /* "(tree fragment)":4 @@ -8668,6 +8759,9 @@ static PyObject *__pyx_f_6cocoex_9interface_Problem_init(coco_problem_t *__pyx_v __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; struct __pyx_opt_args_6cocoex_9interface_7Problem__initialize __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("Problem_init", 0); if (__pyx_optional_args) { if (__pyx_optional_args->__pyx_n > 0) { @@ -8817,6 +8911,9 @@ static PyObject *__pyx_f_6cocoex_9interface_7Problem__initialize(struct __pyx_ob size_t __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("_initialize", 0); if (__pyx_optional_args) { if (__pyx_optional_args->__pyx_n > 0) { @@ -9369,6 +9466,9 @@ static PyObject *__pyx_pf_6cocoex_9interface_7Problem_2constraint(struct __pyx_o 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("constraint", 0); __Pyx_INCREF(__pyx_v_x); __pyx_pybuffer__x.pybuffer.buf = NULL; @@ -9749,6 +9849,9 @@ static PyObject *__pyx_pf_6cocoex_9interface_7Problem_4recommend(CYTHON_UNUSED s PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("recommend", 0); /* "cython/interface.pyx":592 @@ -9796,6 +9899,9 @@ static char __pyx_doc_6cocoex_9interface_7Problem_6logger_biobj_feed_solution[] static PyObject *__pyx_pw_6cocoex_9interface_7Problem_7logger_biobj_feed_solution(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_evaluation = 0; PyObject *__pyx_v_y = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("logger_biobj_feed_solution (wrapper)", 0); @@ -9870,6 +9976,9 @@ static PyObject *__pyx_pf_6cocoex_9interface_7Problem_6logger_biobj_feed_solutio 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("logger_biobj_feed_solution", 0); __Pyx_INCREF(__pyx_v_y); __pyx_pybuffer__y.pybuffer.buf = NULL; @@ -10191,6 +10300,9 @@ static PyObject *__pyx_pf_6cocoex_9interface_7Problem_8add_observer(struct __pyx 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("add_observer", 0); /* "cython/interface.pyx":631 @@ -10273,6 +10385,9 @@ static PyObject *__pyx_pf_6cocoex_9interface_7Problem_10observe_with(struct __py 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("observe_with", 0); /* "cython/interface.pyx":645 @@ -10415,6 +10530,9 @@ static PyObject *__pyx_pf_6cocoex_9interface_7Problem_12_f0(struct __pyx_obj_6co 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("_f0", 0); /* "cython/interface.pyx":654 @@ -10485,6 +10603,9 @@ static PyObject *__pyx_pw_6cocoex_9interface_7Problem_15initial_solution_proposa static char __pyx_doc_6cocoex_9interface_7Problem_14initial_solution_proposal[] = "return feasible initial solution proposals.\n\n For unconstrained problems, the proposal is different for each\n consecutive call without argument and for each `restart_number`\n and may be different under repeated calls with the same\n `restart_number`. ``self.initial_solution_proposal(0)`` is the\n same as ``self.initial_solution``.\n\n Conceptual example::\n\n # given: a suite instance, a budget, and fmin\n for problem in suite:\n # restart until budget is (over-)exhausted\n while problem.evaluations < budget and not problem.final_target_hit:\n fmin(problem, problem.initial_solution_proposal())\n\n Details: by default, the first proposal is the domain middle or\n the (only) known feasible solution.\n Subsequent proposals are coordinate-wise sampled as the sum\n of two iid random variates uniformly distributed within the\n domain boundaries. On the ``'bbob'`` suite their density is\n 0.2 * (x / 5 + 1) for x in [-5, 0] and\n 0.2 * (1 - x / 5) for x in [0, 5] and zero otherwise.\n\n "; static PyObject *__pyx_pw_6cocoex_9interface_7Problem_15initial_solution_proposal(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_restart_number = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("initial_solution_proposal (wrapper)", 0); @@ -10548,6 +10669,9 @@ static PyObject *__pyx_pf_6cocoex_9interface_7Problem_14initial_solution_proposa 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("initial_solution_proposal", 0); __Pyx_INCREF(__pyx_v_restart_number); @@ -10863,6 +10987,9 @@ static PyObject *__pyx_pf_6cocoex_9interface_7Problem_16initial_solution___get__ 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__", 0); /* "cython/interface.pyx":696 @@ -11016,6 +11143,9 @@ static PyObject *__pyx_pf_6cocoex_9interface_7Problem_11is_observed___get__(stru __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "cython/interface.pyx":708 @@ -11080,6 +11210,9 @@ static PyObject *__pyx_pf_6cocoex_9interface_7Problem_19number_of_variables___ge PyObject *__pyx_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); /* "cython/interface.pyx":714 @@ -11140,6 +11273,9 @@ static PyObject *__pyx_pf_6cocoex_9interface_7Problem_9dimension___get__(struct PyObject *__pyx_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); /* "cython/interface.pyx":718 @@ -11200,6 +11336,9 @@ static PyObject *__pyx_pf_6cocoex_9interface_7Problem_20number_of_objectives___g PyObject *__pyx_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); /* "cython/interface.pyx":722 @@ -11260,6 +11399,9 @@ static PyObject *__pyx_pf_6cocoex_9interface_7Problem_21number_of_constraints___ PyObject *__pyx_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); /* "cython/interface.pyx":726 @@ -11320,6 +11462,9 @@ static PyObject *__pyx_pf_6cocoex_9interface_7Problem_27number_of_integer_variab PyObject *__pyx_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); /* "cython/interface.pyx":730 @@ -11486,6 +11631,9 @@ static PyObject *__pyx_pf_6cocoex_9interface_7Problem_11evaluations___get__(stru PyObject *__pyx_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); /* "cython/interface.pyx":743 @@ -11546,6 +11694,9 @@ static PyObject *__pyx_pf_6cocoex_9interface_7Problem_23evaluations_constraints_ PyObject *__pyx_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); /* "cython/interface.pyx":746 @@ -11606,6 +11757,9 @@ static PyObject *__pyx_pf_6cocoex_9interface_7Problem_16final_target_hit___get__ PyObject *__pyx_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); /* "cython/interface.pyx":751 @@ -11682,6 +11836,9 @@ static PyObject *__pyx_pf_6cocoex_9interface_7Problem_21best_observed_fvalue1___ PyObject *__pyx_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); /* "cython/interface.pyx":759 @@ -11767,6 +11924,9 @@ static PyObject *__pyx_pf_6cocoex_9interface_7Problem_27largest_fvalues_of_inter size_t __pyx_t_7; size_t __pyx_t_8; PyObject *__pyx_t_9 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "cython/interface.pyx":764 @@ -11920,6 +12080,9 @@ static PyObject *__pyx_pf_6cocoex_9interface_7Problem_27largest_fvalues_of_inter static PyObject *__pyx_pw_6cocoex_9interface_7Problem_17_best_parameter(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6cocoex_9interface_7Problem_17_best_parameter(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_what = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_best_parameter (wrapper)", 0); @@ -11976,6 +12139,9 @@ static PyObject *__pyx_pf_6cocoex_9interface_7Problem_16_best_parameter(struct _ 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("_best_parameter", 0); /* "cython/interface.pyx":771 @@ -12071,6 +12237,9 @@ static PyObject *__pyx_pw_6cocoex_9interface_7Problem_19free(PyObject *__pyx_v_s static char __pyx_doc_6cocoex_9interface_7Problem_18free[] = "Free the given test problem.\n\n Not strictly necessary (unless, possibly, for the observer). `free`\n ensures that all files associated with the problem are closed as\n soon as possible and any memory is freed. After free()ing the\n problem, all other operations are invalid and will raise an\n exception.\n "; static PyObject *__pyx_pw_6cocoex_9interface_7Problem_19free(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_force = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("free (wrapper)", 0); @@ -12128,6 +12297,9 @@ static PyObject *__pyx_pf_6cocoex_9interface_7Problem_18free(struct __pyx_obj_6c __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("free", 0); /* "cython/interface.pyx":786 @@ -12224,6 +12396,9 @@ static void __pyx_pf_6cocoex_9interface_7Problem_20__dealloc__(struct __pyx_obj_ __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__dealloc__", 0); /* "cython/interface.pyx":794 @@ -12294,6 +12469,9 @@ struct wrapperbase __pyx_wrapperbase_6cocoex_9interface_7Problem_22__call__; #endif static PyObject *__pyx_pw_6cocoex_9interface_7Problem_23__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_x = 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); @@ -12356,6 +12534,9 @@ static PyObject *__pyx_pf_6cocoex_9interface_7Problem_22__call__(struct __pyx_ob 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("__call__", 0); __Pyx_INCREF(__pyx_v_x); __pyx_pybuffer__x.pybuffer.buf = NULL; @@ -12751,6 +12932,9 @@ static PyObject *__pyx_pf_6cocoex_9interface_7Problem_2id___get__(struct __pyx_o __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); /* "cython/interface.pyx":821 @@ -12839,6 +13023,9 @@ static PyObject *__pyx_pf_6cocoex_9interface_7Problem_24_parse_id(struct __pyx_o PyObject *__pyx_t_4 = NULL; 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("_parse_id", 0); /* "cython/interface.pyx":826 @@ -13039,6 +13226,9 @@ static PyObject *__pyx_pf_6cocoex_9interface_7Problem_11id_function___get__(stru 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__", 0); /* "cython/interface.pyx":836 @@ -13212,6 +13402,9 @@ static PyObject *__pyx_pf_6cocoex_9interface_7Problem_11id_instance___get__(stru 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__", 0); /* "cython/interface.pyx":844 @@ -13378,6 +13571,9 @@ static PyObject *__pyx_pf_6cocoex_9interface_7Problem_4name___get__(struct __pyx __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); /* "cython/interface.pyx":851 @@ -13565,6 +13761,9 @@ static PyObject *__pyx_pf_6cocoex_9interface_7Problem_4info___get__(struct __pyx PyObject *__pyx_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); /* "cython/interface.pyx":867 @@ -13637,6 +13836,9 @@ static PyObject *__pyx_pf_6cocoex_9interface_7Problem_26__str__(struct __pyx_obj Py_UCS4 __pyx_t_7; PyObject *__pyx_t_8 = NULL; int __pyx_t_9; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__str__", 0); /* "cython/interface.pyx":870 @@ -13761,7 +13963,7 @@ static PyObject *__pyx_pf_6cocoex_9interface_7Problem_26__str__(struct __pyx_obj PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_with_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_number_of_constraints); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 877, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = __Pyx_PyObject_Format(__pyx_t_4, __pyx_n_u_d); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 877, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_FormatAndDecref(__Pyx_PyNumber_IntOrLong(__pyx_t_4), __pyx_n_u_d); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 877, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_7 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) > __pyx_t_7) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) : __pyx_t_7; @@ -13883,7 +14085,7 @@ static PyObject *__pyx_pf_6cocoex_9interface_7Problem_26__str__(struct __pyx_obj */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_number_of_integer_variables); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 882, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_8 = __Pyx_PyObject_Format(__pyx_t_3, __pyx_n_u_d); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 882, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_FormatAndDecref(__Pyx_PyNumber_IntOrLong(__pyx_t_3), __pyx_n_u_d); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 882, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) > __pyx_t_7) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) : __pyx_t_7; @@ -14013,7 +14215,7 @@ static PyObject *__pyx_pf_6cocoex_9interface_7Problem_26__str__(struct __pyx_obj PyTuple_SET_ITEM(__pyx_t_5, 8, __pyx_kp_u_problem_2); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 886, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyObject_Format(__pyx_t_2, __pyx_n_u_d); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 886, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_FormatAndDecref(__Pyx_PyNumber_IntOrLong(__pyx_t_2), __pyx_n_u_d); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 886, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_7) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_7; @@ -14157,6 +14359,9 @@ static PyObject *__pyx_pf_6cocoex_9interface_7Problem_28__repr__(struct __pyx_ob 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("__repr__", 0); /* "cython/interface.pyx":895 @@ -14384,6 +14589,9 @@ static PyObject *__pyx_pw_6cocoex_9interface_7Problem_33__exit__(PyObject *__pyx CYTHON_UNUSED PyObject *__pyx_v_exception_type = 0; CYTHON_UNUSED PyObject *__pyx_v_exception_value = 0; CYTHON_UNUSED PyObject *__pyx_v_traceback = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__exit__ (wrapper)", 0); @@ -14459,6 +14667,9 @@ static PyObject *__pyx_pf_6cocoex_9interface_7Problem_32__exit__(struct __pyx_ob 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("__exit__", 0); /* "cython/interface.pyx":908 @@ -14577,6 +14788,9 @@ static PyObject *__pyx_pf_6cocoex_9interface_7Problem_34__reduce_cython__(CYTHON PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 0); /* "(tree fragment)":2 @@ -14631,6 +14845,9 @@ static PyObject *__pyx_pf_6cocoex_9interface_7Problem_36__setstate_cython__(CYTH PyObject *__pyx_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_cython__", 0); /* "(tree fragment)":4 @@ -14675,6 +14892,9 @@ static char __pyx_doc_6cocoex_9interface_log_level[] = "`log_level(level=None)` static PyMethodDef __pyx_mdef_6cocoex_9interface_1log_level = {"log_level", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6cocoex_9interface_1log_level, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6cocoex_9interface_log_level}; static PyObject *__pyx_pw_6cocoex_9interface_1log_level(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_level = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("log_level (wrapper)", 0); @@ -14735,6 +14955,9 @@ static PyObject *__pyx_pf_6cocoex_9interface_log_level(CYTHON_UNUSED PyObject *_ int __pyx_t_2; PyObject *__pyx_t_3 = NULL; char const *__pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("log_level", 0); /* "cython/interface.pyx":920 @@ -14795,2046 +15018,459 @@ static PyObject *__pyx_pf_6cocoex_9interface_log_level(CYTHON_UNUSED PyObject *_ return __pyx_r; } -/* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":258 - * # experimental exception made for __getbuffer__ and __releasebuffer__ - * # -- the details of this may change. - * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<< - * # This implementation of getbuffer is geared towards Cython - * # requirements, and does not yet fulfill the PEP. +/* "C:/Anaconda3/envs/py36coco/lib/site-packages/numpy/__init__.pxd":734 + * ctypedef npy_cdouble complex_t + * + * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(1, a) + * */ -/* Python wrapper */ -static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/ -static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { - int __pyx_r; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0); - __pyx_r = __pyx_pf_5numpy_7ndarray___getbuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags)); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { - int __pyx_v_i; - int __pyx_v_ndim; - int __pyx_v_endian_detector; - int __pyx_v_little_endian; - int __pyx_v_t; - char *__pyx_v_f; - PyArray_Descr *__pyx_v_descr = 0; - int __pyx_v_offset; - int __pyx_r; +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) { + 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_t_5; - int __pyx_t_6; - PyArray_Descr *__pyx_t_7; - PyObject *__pyx_t_8 = NULL; - char *__pyx_t_9; - if (__pyx_v_info == NULL) { - PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete"); - return -1; - } - __Pyx_RefNannySetupContext("__getbuffer__", 0); - __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None); - __Pyx_GIVEREF(__pyx_v_info->obj); + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0); - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":265 - * - * cdef int i, ndim - * cdef int endian_detector = 1 # <<<<<<<<<<<<<< - * cdef bint little_endian = ((&endian_detector)[0] != 0) + /* "C:/Anaconda3/envs/py36coco/lib/site-packages/numpy/__init__.pxd":735 * - */ - __pyx_v_endian_detector = 1; - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":266 - * cdef int i, ndim - * cdef int endian_detector = 1 - * cdef bint little_endian = ((&endian_detector)[0] != 0) # <<<<<<<<<<<<<< + * cdef inline object PyArray_MultiIterNew1(a): + * return PyArray_MultiIterNew(1, a) # <<<<<<<<<<<<<< * - * ndim = PyArray_NDIM(self) + * cdef inline object PyArray_MultiIterNew2(a, b): */ - __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 735, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":268 - * cdef bint little_endian = ((&endian_detector)[0] != 0) + /* "C:/Anaconda3/envs/py36coco/lib/site-packages/numpy/__init__.pxd":734 + * ctypedef npy_cdouble complex_t * - * ndim = PyArray_NDIM(self) # <<<<<<<<<<<<<< + * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(1, a) * - * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) */ - __pyx_v_ndim = PyArray_NDIM(__pyx_v_self); - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":270 - * ndim = PyArray_NDIM(self) - * - * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< - * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): - * raise ValueError(u"ndarray is not C contiguous") - */ - __pyx_t_2 = (((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS) != 0); - if (__pyx_t_2) { - } else { - __pyx_t_1 = __pyx_t_2; - goto __pyx_L4_bool_binop_done; - } + /* 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; +} - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":271 +/* "C:/Anaconda3/envs/py36coco/lib/site-packages/numpy/__init__.pxd":737 + * return PyArray_MultiIterNew(1, a) * - * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) - * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): # <<<<<<<<<<<<<< - * raise ValueError(u"ndarray is not C contiguous") + * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(2, a, b) * */ - __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_ARRAY_C_CONTIGUOUS) != 0)) != 0); - __pyx_t_1 = __pyx_t_2; - __pyx_L4_bool_binop_done:; - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":270 - * ndim = PyArray_NDIM(self) - * - * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< - * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): - * raise ValueError(u"ndarray is not C contiguous") - */ - if (unlikely(__pyx_t_1)) { +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); - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":272 - * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) - * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): - * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<< + /* "C:/Anaconda3/envs/py36coco/lib/site-packages/numpy/__init__.pxd":738 * - * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) - */ - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__30, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 272, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_Raise(__pyx_t_3, 0, 0, 0); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(2, 272, __pyx_L1_error) - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":270 - * ndim = PyArray_NDIM(self) + * cdef inline object PyArray_MultiIterNew2(a, b): + * return PyArray_MultiIterNew(2, a, b) # <<<<<<<<<<<<<< * - * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< - * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): - * raise ValueError(u"ndarray is not C contiguous") + * cdef inline object PyArray_MultiIterNew3(a, b, c): */ - } + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 738, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":274 - * raise ValueError(u"ndarray is not C contiguous") + /* "C:/Anaconda3/envs/py36coco/lib/site-packages/numpy/__init__.pxd":737 + * return PyArray_MultiIterNew(1, a) + * + * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(2, a, b) * - * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< - * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): - * raise ValueError(u"ndarray is not Fortran contiguous") */ - __pyx_t_2 = (((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS) != 0); - if (__pyx_t_2) { - } else { - __pyx_t_1 = __pyx_t_2; - goto __pyx_L7_bool_binop_done; - } - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":275 + /* 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; +} + +/* "C:/Anaconda3/envs/py36coco/lib/site-packages/numpy/__init__.pxd":740 + * return PyArray_MultiIterNew(2, a, b) * - * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) - * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): # <<<<<<<<<<<<<< - * raise ValueError(u"ndarray is not Fortran contiguous") + * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(3, a, b, c) * */ - __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_ARRAY_F_CONTIGUOUS) != 0)) != 0); - __pyx_t_1 = __pyx_t_2; - __pyx_L7_bool_binop_done:; - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":274 - * raise ValueError(u"ndarray is not C contiguous") - * - * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< - * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): - * raise ValueError(u"ndarray is not Fortran contiguous") - */ - if (unlikely(__pyx_t_1)) { +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); - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":276 - * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) - * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): - * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<< + /* "C:/Anaconda3/envs/py36coco/lib/site-packages/numpy/__init__.pxd":741 * - * info.buf = PyArray_DATA(self) - */ - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__31, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 276, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_Raise(__pyx_t_3, 0, 0, 0); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(2, 276, __pyx_L1_error) - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":274 - * raise ValueError(u"ndarray is not C contiguous") + * cdef inline object PyArray_MultiIterNew3(a, b, c): + * return PyArray_MultiIterNew(3, a, b, c) # <<<<<<<<<<<<<< * - * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< - * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): - * raise ValueError(u"ndarray is not Fortran contiguous") + * cdef inline object PyArray_MultiIterNew4(a, b, c, d): */ - } + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 741, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":278 - * raise ValueError(u"ndarray is not Fortran contiguous") + /* "C:/Anaconda3/envs/py36coco/lib/site-packages/numpy/__init__.pxd":740 + * return PyArray_MultiIterNew(2, a, b) * - * info.buf = PyArray_DATA(self) # <<<<<<<<<<<<<< - * info.ndim = ndim - * if sizeof(npy_intp) != sizeof(Py_ssize_t): - */ - __pyx_v_info->buf = PyArray_DATA(__pyx_v_self); - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":279 + * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(3, a, b, c) * - * info.buf = PyArray_DATA(self) - * info.ndim = ndim # <<<<<<<<<<<<<< - * if sizeof(npy_intp) != sizeof(Py_ssize_t): - * # Allocate new buffer for strides and shape info. - */ - __pyx_v_info->ndim = __pyx_v_ndim; - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":280 - * info.buf = PyArray_DATA(self) - * info.ndim = ndim - * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< - * # Allocate new buffer for strides and shape info. - * # This is allocated as one block, strides first. - */ - __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0); - if (__pyx_t_1) { - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":283 - * # Allocate new buffer for strides and shape info. - * # This is allocated as one block, strides first. - * info.strides = PyObject_Malloc(sizeof(Py_ssize_t) * 2 * ndim) # <<<<<<<<<<<<<< - * info.shape = info.strides + ndim - * for i in range(ndim): - */ - __pyx_v_info->strides = ((Py_ssize_t *)PyObject_Malloc((((sizeof(Py_ssize_t)) * 2) * ((size_t)__pyx_v_ndim)))); - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":284 - * # This is allocated as one block, strides first. - * info.strides = PyObject_Malloc(sizeof(Py_ssize_t) * 2 * ndim) - * info.shape = info.strides + ndim # <<<<<<<<<<<<<< - * for i in range(ndim): - * info.strides[i] = PyArray_STRIDES(self)[i] - */ - __pyx_v_info->shape = (__pyx_v_info->strides + __pyx_v_ndim); - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":285 - * info.strides = PyObject_Malloc(sizeof(Py_ssize_t) * 2 * ndim) - * info.shape = info.strides + ndim - * for i in range(ndim): # <<<<<<<<<<<<<< - * info.strides[i] = PyArray_STRIDES(self)[i] - * info.shape[i] = PyArray_DIMS(self)[i] - */ - __pyx_t_4 = __pyx_v_ndim; - __pyx_t_5 = __pyx_t_4; - for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { - __pyx_v_i = __pyx_t_6; - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":286 - * 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]); - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":287 - * 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]); - } - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":280 - * info.buf = PyArray_DATA(self) - * info.ndim = ndim - * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< - * # Allocate new buffer for strides and shape info. - * # This is allocated as one block, strides first. - */ - goto __pyx_L9; - } - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":289 - * info.shape[i] = PyArray_DIMS(self)[i] - * else: - * info.strides = PyArray_STRIDES(self) # <<<<<<<<<<<<<< - * info.shape = PyArray_DIMS(self) - * info.suboffsets = NULL - */ - /*else*/ { - __pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(__pyx_v_self)); - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":290 - * else: - * info.strides = PyArray_STRIDES(self) - * info.shape = PyArray_DIMS(self) # <<<<<<<<<<<<<< - * info.suboffsets = NULL - * info.itemsize = PyArray_ITEMSIZE(self) */ - __pyx_v_info->shape = ((Py_ssize_t *)PyArray_DIMS(__pyx_v_self)); - } - __pyx_L9:; - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":291 - * 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; + /* 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; +} - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":292 - * info.shape = PyArray_DIMS(self) - * info.suboffsets = NULL - * info.itemsize = PyArray_ITEMSIZE(self) # <<<<<<<<<<<<<< - * info.readonly = not PyArray_ISWRITEABLE(self) +/* "C:/Anaconda3/envs/py36coco/lib/site-packages/numpy/__init__.pxd":743 + * return PyArray_MultiIterNew(3, a, b, c) * - */ - __pyx_v_info->itemsize = PyArray_ITEMSIZE(__pyx_v_self); - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":293 - * info.suboffsets = NULL - * info.itemsize = PyArray_ITEMSIZE(self) - * info.readonly = not PyArray_ISWRITEABLE(self) # <<<<<<<<<<<<<< + * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(4, a, b, c, d) * - * cdef int t */ - __pyx_v_info->readonly = (!(PyArray_ISWRITEABLE(__pyx_v_self) != 0)); - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":296 - * - * cdef int t - * cdef char* f = NULL # <<<<<<<<<<<<<< - * cdef dtype descr = PyArray_DESCR(self) - * cdef int offset - */ - __pyx_v_f = NULL; +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); - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":297 - * cdef int t - * cdef char* f = NULL - * cdef dtype descr = PyArray_DESCR(self) # <<<<<<<<<<<<<< - * cdef int offset + /* "C:/Anaconda3/envs/py36coco/lib/site-packages/numpy/__init__.pxd":744 + * + * 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_t_7 = PyArray_DESCR(__pyx_v_self); - __pyx_t_3 = ((PyObject *)__pyx_t_7); - __Pyx_INCREF(__pyx_t_3); - __pyx_v_descr = ((PyArray_Descr *)__pyx_t_3); - __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 744, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":300 - * cdef int offset + /* "C:/Anaconda3/envs/py36coco/lib/site-packages/numpy/__init__.pxd":743 + * return PyArray_MultiIterNew(3, a, b, c) * - * info.obj = self # <<<<<<<<<<<<<< + * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(4, a, b, c, d) * - * if not PyDataType_HASFIELDS(descr): */ - __Pyx_INCREF(((PyObject *)__pyx_v_self)); - __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); - __Pyx_GOTREF(__pyx_v_info->obj); - __Pyx_DECREF(__pyx_v_info->obj); - __pyx_v_info->obj = ((PyObject *)__pyx_v_self); - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":302 - * info.obj = self - * - * if not PyDataType_HASFIELDS(descr): # <<<<<<<<<<<<<< - * t = descr.type_num - * if ((descr.byteorder == c'>' and little_endian) or - */ - __pyx_t_1 = ((!(PyDataType_HASFIELDS(__pyx_v_descr) != 0)) != 0); - if (__pyx_t_1) { + /* 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; +} - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":303 +/* "C:/Anaconda3/envs/py36coco/lib/site-packages/numpy/__init__.pxd":746 + * 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) * - * if not PyDataType_HASFIELDS(descr): - * t = descr.type_num # <<<<<<<<<<<<<< - * if ((descr.byteorder == c'>' and little_endian) or - * (descr.byteorder == c'<' and not little_endian)): */ - __pyx_t_4 = __pyx_v_descr->type_num; - __pyx_v_t = __pyx_t_4; - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":304 - * if not PyDataType_HASFIELDS(descr): - * t = descr.type_num - * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< - * (descr.byteorder == c'<' and not little_endian)): - * raise ValueError(u"Non-native byte order not supported") - */ - __pyx_t_2 = ((__pyx_v_descr->byteorder == '>') != 0); - if (!__pyx_t_2) { - goto __pyx_L15_next_or; - } else { - } - __pyx_t_2 = (__pyx_v_little_endian != 0); - if (!__pyx_t_2) { - } else { - __pyx_t_1 = __pyx_t_2; - goto __pyx_L14_bool_binop_done; - } - __pyx_L15_next_or:; - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":305 - * t = descr.type_num - * if ((descr.byteorder == c'>' and little_endian) or - * (descr.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<< - * raise ValueError(u"Non-native byte order not supported") - * if t == NPY_BYTE: f = "b" - */ - __pyx_t_2 = ((__pyx_v_descr->byteorder == '<') != 0); - if (__pyx_t_2) { - } else { - __pyx_t_1 = __pyx_t_2; - goto __pyx_L14_bool_binop_done; - } - __pyx_t_2 = ((!(__pyx_v_little_endian != 0)) != 0); - __pyx_t_1 = __pyx_t_2; - __pyx_L14_bool_binop_done:; - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":304 - * if not PyDataType_HASFIELDS(descr): - * t = descr.type_num - * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< - * (descr.byteorder == c'<' and not little_endian)): - * raise ValueError(u"Non-native byte order not supported") - */ - if (unlikely(__pyx_t_1)) { - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":306 - * if ((descr.byteorder == c'>' and little_endian) or - * (descr.byteorder == c'<' and not little_endian)): - * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< - * if t == NPY_BYTE: f = "b" - * elif t == NPY_UBYTE: f = "B" - */ - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__32, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 306, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_Raise(__pyx_t_3, 0, 0, 0); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(2, 306, __pyx_L1_error) - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":304 - * if not PyDataType_HASFIELDS(descr): - * t = descr.type_num - * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< - * (descr.byteorder == c'<' and not little_endian)): - * raise ValueError(u"Non-native byte order not supported") - */ - } - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":307 - * (descr.byteorder == c'<' and not little_endian)): - * raise ValueError(u"Non-native byte order not supported") - * if t == NPY_BYTE: f = "b" # <<<<<<<<<<<<<< - * elif t == NPY_UBYTE: f = "B" - * elif t == NPY_SHORT: f = "h" - */ - switch (__pyx_v_t) { - case NPY_BYTE: - __pyx_v_f = ((char *)"b"); - break; - case NPY_UBYTE: - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":308 - * 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" - */ - __pyx_v_f = ((char *)"B"); - break; - case NPY_SHORT: - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":309 - * 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" - */ - __pyx_v_f = ((char *)"h"); - break; - case NPY_USHORT: - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":310 - * 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" - */ - __pyx_v_f = ((char *)"H"); - break; - case NPY_INT: - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":311 - * 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" - */ - __pyx_v_f = ((char *)"i"); - break; - case NPY_UINT: - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":312 - * 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" - */ - __pyx_v_f = ((char *)"I"); - break; - case NPY_LONG: - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":313 - * 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" - */ - __pyx_v_f = ((char *)"l"); - break; - case NPY_ULONG: - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":314 - * 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" - */ - __pyx_v_f = ((char *)"L"); - break; - case NPY_LONGLONG: - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":315 - * 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" - */ - __pyx_v_f = ((char *)"q"); - break; - case NPY_ULONGLONG: - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":316 - * 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" - */ - __pyx_v_f = ((char *)"Q"); - break; - case NPY_FLOAT: - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":317 - * 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" - */ - __pyx_v_f = ((char *)"f"); - break; - case NPY_DOUBLE: - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":318 - * 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" - */ - __pyx_v_f = ((char *)"d"); - break; - case NPY_LONGDOUBLE: - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":319 - * 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" - */ - __pyx_v_f = ((char *)"g"); - break; - case NPY_CFLOAT: - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":320 - * 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" - */ - __pyx_v_f = ((char *)"Zf"); - break; - case NPY_CDOUBLE: - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":321 - * 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" - */ - __pyx_v_f = ((char *)"Zd"); - break; - case NPY_CLONGDOUBLE: - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":322 - * 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: - */ - __pyx_v_f = ((char *)"Zg"); - break; - case NPY_OBJECT: - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":323 - * 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) - */ - __pyx_v_f = ((char *)"O"); - break; - default: - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":325 - * elif t == NPY_OBJECT: f = "O" - * else: - * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< - * info.format = f - * return - */ - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 325, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_8 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 325, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 325, __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_ERR(2, 325, __pyx_L1_error) - break; - } - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":326 - * else: - * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) - * info.format = f # <<<<<<<<<<<<<< - * return - * else: - */ - __pyx_v_info->format = __pyx_v_f; - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":327 - * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) - * info.format = f - * return # <<<<<<<<<<<<<< - * else: - * info.format = PyObject_Malloc(_buffer_format_string_len) - */ - __pyx_r = 0; - goto __pyx_L0; +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); - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":302 - * info.obj = self + /* "C:/Anaconda3/envs/py36coco/lib/site-packages/numpy/__init__.pxd":747 * - * if not PyDataType_HASFIELDS(descr): # <<<<<<<<<<<<<< - * t = descr.type_num - * if ((descr.byteorder == c'>' and little_endian) or - */ - } - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":329 - * return - * else: - * info.format = PyObject_Malloc(_buffer_format_string_len) # <<<<<<<<<<<<<< - * info.format[0] = c'^' # Native data types, manual alignment - * offset = 0 - */ - /*else*/ { - __pyx_v_info->format = ((char *)PyObject_Malloc(0xFF)); - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":330 - * else: - * info.format = PyObject_Malloc(_buffer_format_string_len) - * info.format[0] = c'^' # Native data types, manual alignment # <<<<<<<<<<<<<< - * offset = 0 - * f = _util_dtypestring(descr, info.format + 1, - */ - (__pyx_v_info->format[0]) = '^'; - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":331 - * info.format = PyObject_Malloc(_buffer_format_string_len) - * info.format[0] = c'^' # Native data types, manual alignment - * offset = 0 # <<<<<<<<<<<<<< - * f = _util_dtypestring(descr, info.format + 1, - * info.format + _buffer_format_string_len, - */ - __pyx_v_offset = 0; - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":332 - * info.format[0] = c'^' # Native data types, manual alignment - * offset = 0 - * f = _util_dtypestring(descr, info.format + 1, # <<<<<<<<<<<<<< - * info.format + _buffer_format_string_len, - * &offset) - */ - __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 0xFF), (&__pyx_v_offset)); if (unlikely(__pyx_t_9 == ((char *)NULL))) __PYX_ERR(2, 332, __pyx_L1_error) - __pyx_v_f = __pyx_t_9; - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":335 - * info.format + _buffer_format_string_len, - * &offset) - * f[0] = c'\0' # Terminate format string # <<<<<<<<<<<<<< + * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): + * return PyArray_MultiIterNew(5, a, b, c, d, e) # <<<<<<<<<<<<<< * - * def __releasebuffer__(ndarray self, Py_buffer* info): + * cdef inline tuple PyDataType_SHAPE(dtype d): */ - (__pyx_v_f[0]) = '\x00'; - } + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 747, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":258 - * # experimental exception made for __getbuffer__ and __releasebuffer__ - * # -- the details of this may change. - * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<< - * # This implementation of getbuffer is geared towards Cython - * # requirements, and does not yet fulfill the PEP. + /* "C:/Anaconda3/envs/py36coco/lib/site-packages/numpy/__init__.pxd":746 + * 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_r = 0; - goto __pyx_L0; __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_8); - __Pyx_AddTraceback("numpy.ndarray.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = -1; - if (__pyx_v_info->obj != NULL) { - __Pyx_GOTREF(__pyx_v_info->obj); - __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0; - } - goto __pyx_L2; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("numpy.PyArray_MultiIterNew5", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; __pyx_L0:; - if (__pyx_v_info->obj == Py_None) { - __Pyx_GOTREF(__pyx_v_info->obj); - __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0; - } - __pyx_L2:; - __Pyx_XDECREF((PyObject *)__pyx_v_descr); + __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":337 - * f[0] = c'\0' # Terminate format string +/* "C:/Anaconda3/envs/py36coco/lib/site-packages/numpy/__init__.pxd":749 + * return PyArray_MultiIterNew(5, a, b, c, d, e) * - * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< - * if PyArray_HASFIELDS(self): - * PyObject_Free(info.format) + * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< + * if PyDataType_HASSUBARRAY(d): + * return d.subarray.shape */ -/* 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) { +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__pyx_v_d) { + PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; - __Pyx_RefNannySetupContext("__releasebuffer__", 0); + __Pyx_RefNannySetupContext("PyDataType_SHAPE", 0); - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":338 + /* "C:/Anaconda3/envs/py36coco/lib/site-packages/numpy/__init__.pxd":750 * - * def __releasebuffer__(ndarray self, Py_buffer* info): - * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<< - * PyObject_Free(info.format) - * if sizeof(npy_intp) != sizeof(Py_ssize_t): + * cdef inline tuple PyDataType_SHAPE(dtype d): + * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< + * return d.subarray.shape + * else: */ - __pyx_t_1 = (PyArray_HASFIELDS(__pyx_v_self) != 0); + __pyx_t_1 = (PyDataType_HASSUBARRAY(__pyx_v_d) != 0); if (__pyx_t_1) { - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":339 - * def __releasebuffer__(ndarray self, Py_buffer* info): - * if PyArray_HASFIELDS(self): - * PyObject_Free(info.format) # <<<<<<<<<<<<<< - * if sizeof(npy_intp) != sizeof(Py_ssize_t): - * PyObject_Free(info.strides) + /* "C:/Anaconda3/envs/py36coco/lib/site-packages/numpy/__init__.pxd":751 + * cdef inline tuple PyDataType_SHAPE(dtype d): + * if PyDataType_HASSUBARRAY(d): + * return d.subarray.shape # <<<<<<<<<<<<<< + * else: + * return () */ - PyObject_Free(__pyx_v_info->format); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject*)__pyx_v_d->subarray->shape)); + __pyx_r = ((PyObject*)__pyx_v_d->subarray->shape); + goto __pyx_L0; - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":338 + /* "C:/Anaconda3/envs/py36coco/lib/site-packages/numpy/__init__.pxd":750 * - * def __releasebuffer__(ndarray self, Py_buffer* info): - * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<< - * PyObject_Free(info.format) - * if sizeof(npy_intp) != sizeof(Py_ssize_t): + * cdef inline tuple PyDataType_SHAPE(dtype d): + * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< + * return d.subarray.shape + * else: */ } - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":340 - * if PyArray_HASFIELDS(self): - * PyObject_Free(info.format) - * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< - * PyObject_Free(info.strides) - * # info.shape was stored after info.strides in the same block - */ - __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0); - if (__pyx_t_1) { - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":341 - * PyObject_Free(info.format) - * if sizeof(npy_intp) != sizeof(Py_ssize_t): - * PyObject_Free(info.strides) # <<<<<<<<<<<<<< - * # info.shape was stored after info.strides in the same block + /* "C:/Anaconda3/envs/py36coco/lib/site-packages/numpy/__init__.pxd":753 + * return d.subarray.shape + * else: + * return () # <<<<<<<<<<<<<< + * * */ - PyObject_Free(__pyx_v_info->strides); - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":340 - * if PyArray_HASFIELDS(self): - * PyObject_Free(info.format) - * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< - * PyObject_Free(info.strides) - * # info.shape was stored after info.strides in the same block - */ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_empty_tuple); + __pyx_r = __pyx_empty_tuple; + goto __pyx_L0; } - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":337 - * f[0] = c'\0' # Terminate format string + /* "C:/Anaconda3/envs/py36coco/lib/site-packages/numpy/__init__.pxd":749 + * return PyArray_MultiIterNew(5, a, b, c, d, e) * - * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< - * if PyArray_HASFIELDS(self): - * PyObject_Free(info.format) + * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< + * if PyDataType_HASSUBARRAY(d): + * return d.subarray.shape */ /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); + return __pyx_r; } -/* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":821 - * ctypedef npy_cdouble complex_t - * - * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< - * return PyArray_MultiIterNew(1, a) +/* "C:/Anaconda3/envs/py36coco/lib/site-packages/numpy/__init__.pxd":868 + * int _import_umath() except -1 * + * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< + * Py_INCREF(base) # important to do this before stealing the reference below! + * PyArray_SetBaseObject(arr, base) */ -static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) { - PyObject *__pyx_r = NULL; +static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) { __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0); + __Pyx_RefNannySetupContext("set_array_base", 0); - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":822 + /* "C:/Anaconda3/envs/py36coco/lib/site-packages/numpy/__init__.pxd":869 * - * cdef inline object PyArray_MultiIterNew1(a): - * return PyArray_MultiIterNew(1, a) # <<<<<<<<<<<<<< + * cdef inline void set_array_base(ndarray arr, object base): + * Py_INCREF(base) # important to do this before stealing the reference below! # <<<<<<<<<<<<<< + * PyArray_SetBaseObject(arr, base) * - * cdef inline object PyArray_MultiIterNew2(a, b): */ - __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 822, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; + Py_INCREF(__pyx_v_base); - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":821 - * ctypedef npy_cdouble complex_t + /* "C:/Anaconda3/envs/py36coco/lib/site-packages/numpy/__init__.pxd":870 + * cdef inline void set_array_base(ndarray arr, object base): + * Py_INCREF(base) # important to do this before stealing the reference below! + * PyArray_SetBaseObject(arr, base) # <<<<<<<<<<<<<< * - * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< - * return PyArray_MultiIterNew(1, a) + * cdef inline object get_array_base(ndarray arr): + */ + (void)(PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base)); + + /* "C:/Anaconda3/envs/py36coco/lib/site-packages/numpy/__init__.pxd":868 + * int _import_umath() except -1 * + * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< + * Py_INCREF(base) # important to do this before stealing the reference below! + * PyArray_SetBaseObject(arr, base) */ /* 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; } -/* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":824 - * return PyArray_MultiIterNew(1, a) - * - * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< - * return PyArray_MultiIterNew(2, a, b) +/* "C:/Anaconda3/envs/py36coco/lib/site-packages/numpy/__init__.pxd":872 + * PyArray_SetBaseObject(arr, base) * + * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< + * base = PyArray_BASE(arr) + * if base is NULL: */ -static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) { +static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__pyx_v_arr) { + PyObject *__pyx_v_base; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0); + int __pyx_t_1; + __Pyx_RefNannySetupContext("get_array_base", 0); - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":825 + /* "C:/Anaconda3/envs/py36coco/lib/site-packages/numpy/__init__.pxd":873 * - * cdef inline object PyArray_MultiIterNew2(a, b): - * return PyArray_MultiIterNew(2, a, b) # <<<<<<<<<<<<<< + * cdef inline object get_array_base(ndarray arr): + * base = PyArray_BASE(arr) # <<<<<<<<<<<<<< + * if base is NULL: + * return None + */ + __pyx_v_base = PyArray_BASE(__pyx_v_arr); + + /* "C:/Anaconda3/envs/py36coco/lib/site-packages/numpy/__init__.pxd":874 + * cdef inline object get_array_base(ndarray arr): + * base = PyArray_BASE(arr) + * if base is NULL: # <<<<<<<<<<<<<< + * return None + * return base + */ + __pyx_t_1 = ((__pyx_v_base == NULL) != 0); + if (__pyx_t_1) { + + /* "C:/Anaconda3/envs/py36coco/lib/site-packages/numpy/__init__.pxd":875 + * base = PyArray_BASE(arr) + * if base is NULL: + * return None # <<<<<<<<<<<<<< + * return base * - * cdef inline object PyArray_MultiIterNew3(a, b, c): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "C:/Anaconda3/envs/py36coco/lib/site-packages/numpy/__init__.pxd":874 + * cdef inline object get_array_base(ndarray arr): + * base = PyArray_BASE(arr) + * if base is NULL: # <<<<<<<<<<<<<< + * return None + * return base + */ + } + + /* "C:/Anaconda3/envs/py36coco/lib/site-packages/numpy/__init__.pxd":876 + * if base is NULL: + * return None + * return base # <<<<<<<<<<<<<< + * + * # Versions of the import_* functions which are more suitable for */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 825, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; + __Pyx_INCREF(((PyObject *)__pyx_v_base)); + __pyx_r = ((PyObject *)__pyx_v_base); goto __pyx_L0; - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":824 - * return PyArray_MultiIterNew(1, a) - * - * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< - * return PyArray_MultiIterNew(2, a, b) + /* "C:/Anaconda3/envs/py36coco/lib/site-packages/numpy/__init__.pxd":872 + * PyArray_SetBaseObject(arr, base) * + * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< + * base = PyArray_BASE(arr) + * if base is NULL: */ /* 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; } -/* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":827 - * return PyArray_MultiIterNew(2, a, b) - * - * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< - * return PyArray_MultiIterNew(3, a, b, c) - * - */ - -static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) { - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0); - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":828 - * - * cdef inline object PyArray_MultiIterNew3(a, b, c): - * return PyArray_MultiIterNew(3, a, b, c) # <<<<<<<<<<<<<< - * - * cdef inline object PyArray_MultiIterNew4(a, b, c, d): - */ - __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 828, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":827 - * 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; -} - -/* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":830 - * return PyArray_MultiIterNew(3, a, b, c) - * - * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< - * return PyArray_MultiIterNew(4, a, b, c, d) - * - */ - -static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) { - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0); - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":831 - * - * cdef inline object PyArray_MultiIterNew4(a, b, c, d): - * return PyArray_MultiIterNew(4, a, b, c, d) # <<<<<<<<<<<<<< - * - * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): - */ - __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 831, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":830 - * 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; -} - -/* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":833 - * return PyArray_MultiIterNew(4, a, b, c, d) - * - * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< - * return PyArray_MultiIterNew(5, a, b, c, d, e) - * - */ - -static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d, PyObject *__pyx_v_e) { - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0); - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":834 - * - * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): - * return PyArray_MultiIterNew(5, a, b, c, d, e) # <<<<<<<<<<<<<< - * - * cdef inline tuple PyDataType_SHAPE(dtype d): - */ - __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 834, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":833 - * 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; -} - -/* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":836 - * return PyArray_MultiIterNew(5, a, b, c, d, e) - * - * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< - * if PyDataType_HASSUBARRAY(d): - * return d.subarray.shape - */ - -static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__pyx_v_d) { - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - int __pyx_t_1; - __Pyx_RefNannySetupContext("PyDataType_SHAPE", 0); - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":837 - * - * cdef inline tuple PyDataType_SHAPE(dtype d): - * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< - * return d.subarray.shape - * else: - */ - __pyx_t_1 = (PyDataType_HASSUBARRAY(__pyx_v_d) != 0); - if (__pyx_t_1) { - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":838 - * cdef inline tuple PyDataType_SHAPE(dtype d): - * if PyDataType_HASSUBARRAY(d): - * return d.subarray.shape # <<<<<<<<<<<<<< - * else: - * return () - */ - __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(((PyObject*)__pyx_v_d->subarray->shape)); - __pyx_r = ((PyObject*)__pyx_v_d->subarray->shape); - goto __pyx_L0; - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":837 - * - * cdef inline tuple PyDataType_SHAPE(dtype d): - * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< - * return d.subarray.shape - * else: - */ - } - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":840 - * return d.subarray.shape - * else: - * return () # <<<<<<<<<<<<<< - * - * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: - */ - /*else*/ { - __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(__pyx_empty_tuple); - __pyx_r = __pyx_empty_tuple; - goto __pyx_L0; - } - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":836 - * return PyArray_MultiIterNew(5, a, b, c, d, e) - * - * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< - * if PyDataType_HASSUBARRAY(d): - * return d.subarray.shape - */ - - /* function exit code */ - __pyx_L0:; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":842 - * return () - * - * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<< - * # Recursive utility function used in __getbuffer__ to get format - * # string. The new location in the format string is returned. - */ - -static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_descr, char *__pyx_v_f, char *__pyx_v_end, int *__pyx_v_offset) { - PyArray_Descr *__pyx_v_child = 0; - int __pyx_v_endian_detector; - int __pyx_v_little_endian; - PyObject *__pyx_v_fields = 0; - PyObject *__pyx_v_childname = NULL; - PyObject *__pyx_v_new_offset = NULL; - PyObject *__pyx_v_t = NULL; - char *__pyx_r; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - Py_ssize_t __pyx_t_2; - PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; - int __pyx_t_5; - int __pyx_t_6; - int __pyx_t_7; - long __pyx_t_8; - char *__pyx_t_9; - __Pyx_RefNannySetupContext("_util_dtypestring", 0); - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":847 - * - * cdef dtype child - * cdef int endian_detector = 1 # <<<<<<<<<<<<<< - * cdef bint little_endian = ((&endian_detector)[0] != 0) - * cdef tuple fields - */ - __pyx_v_endian_detector = 1; - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":848 - * cdef dtype child - * cdef int endian_detector = 1 - * cdef bint little_endian = ((&endian_detector)[0] != 0) # <<<<<<<<<<<<<< - * cdef tuple fields - * - */ - __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0); - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":851 - * cdef tuple fields - * - * for childname in descr.names: # <<<<<<<<<<<<<< - * fields = descr.fields[childname] - * child, new_offset = fields - */ - if (unlikely(__pyx_v_descr->names == Py_None)) { - PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(2, 851, __pyx_L1_error) - } - __pyx_t_1 = __pyx_v_descr->names; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; - for (;;) { - if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; - #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(2, 851, __pyx_L1_error) - #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 851, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - #endif - __Pyx_XDECREF_SET(__pyx_v_childname, __pyx_t_3); - __pyx_t_3 = 0; - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":852 - * - * for childname in descr.names: - * fields = descr.fields[childname] # <<<<<<<<<<<<<< - * child, new_offset = fields - * - */ - if (unlikely(__pyx_v_descr->fields == Py_None)) { - PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 852, __pyx_L1_error) - } - __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 852, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - if (!(likely(PyTuple_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(2, 852, __pyx_L1_error) - __Pyx_XDECREF_SET(__pyx_v_fields, ((PyObject*)__pyx_t_3)); - __pyx_t_3 = 0; - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":853 - * for childname in descr.names: - * fields = descr.fields[childname] - * child, new_offset = fields # <<<<<<<<<<<<<< - * - * if (end - f) - (new_offset - offset[0]) < 15: - */ - if (likely(__pyx_v_fields != Py_None)) { - PyObject* sequence = __pyx_v_fields; - Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); - if (unlikely(size != 2)) { - if (size > 2) __Pyx_RaiseTooManyValuesError(2); - else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(2, 853, __pyx_L1_error) - } - #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); - __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); - __Pyx_INCREF(__pyx_t_3); - __Pyx_INCREF(__pyx_t_4); - #else - __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 853, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 853, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - #endif - } else { - __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(2, 853, __pyx_L1_error) - } - if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) __PYX_ERR(2, 853, __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; - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":855 - * child, new_offset = fields - * - * if (end - f) - (new_offset - offset[0]) < 15: # <<<<<<<<<<<<<< - * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") - * - */ - __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 855, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 855, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 855, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_6 = ((((__pyx_v_end - __pyx_v_f) - ((int)__pyx_t_5)) < 15) != 0); - if (unlikely(__pyx_t_6)) { - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":856 - * - * if (end - f) - (new_offset - offset[0]) < 15: - * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< - * - * if ((child.byteorder == c'>' and little_endian) or - */ - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__33, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 856, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_Raise(__pyx_t_3, 0, 0, 0); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(2, 856, __pyx_L1_error) - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":855 - * 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") - * - */ - } - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":858 - * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") - * - * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< - * (child.byteorder == c'<' and not little_endian)): - * raise ValueError(u"Non-native byte order not supported") - */ - __pyx_t_7 = ((__pyx_v_child->byteorder == '>') != 0); - if (!__pyx_t_7) { - goto __pyx_L8_next_or; - } else { - } - __pyx_t_7 = (__pyx_v_little_endian != 0); - if (!__pyx_t_7) { - } else { - __pyx_t_6 = __pyx_t_7; - goto __pyx_L7_bool_binop_done; - } - __pyx_L8_next_or:; - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":859 - * - * if ((child.byteorder == c'>' and little_endian) or - * (child.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<< - * raise ValueError(u"Non-native byte order not supported") - * # One could encode it in the format string and have Cython - */ - __pyx_t_7 = ((__pyx_v_child->byteorder == '<') != 0); - if (__pyx_t_7) { - } else { - __pyx_t_6 = __pyx_t_7; - goto __pyx_L7_bool_binop_done; - } - __pyx_t_7 = ((!(__pyx_v_little_endian != 0)) != 0); - __pyx_t_6 = __pyx_t_7; - __pyx_L7_bool_binop_done:; - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":858 - * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") - * - * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< - * (child.byteorder == c'<' and not little_endian)): - * raise ValueError(u"Non-native byte order not supported") - */ - if (unlikely(__pyx_t_6)) { - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":860 - * if ((child.byteorder == c'>' and little_endian) or - * (child.byteorder == c'<' and not little_endian)): - * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< - * # One could encode it in the format string and have Cython - * # complain instead, BUT: < and > in format strings also imply - */ - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__32, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 860, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_Raise(__pyx_t_3, 0, 0, 0); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(2, 860, __pyx_L1_error) - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":858 - * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") - * - * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< - * (child.byteorder == c'<' and not little_endian)): - * raise ValueError(u"Non-native byte order not supported") - */ - } - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":870 - * - * # Output padding bytes - * while offset[0] < new_offset: # <<<<<<<<<<<<<< - * f[0] = 120 # "x"; pad byte - * f += 1 - */ - while (1) { - __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 870, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_v_new_offset, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 870, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 870, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (!__pyx_t_6) break; - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":871 - * # Output padding bytes - * while offset[0] < new_offset: - * f[0] = 120 # "x"; pad byte # <<<<<<<<<<<<<< - * f += 1 - * offset[0] += 1 - */ - (__pyx_v_f[0]) = 0x78; - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":872 - * while offset[0] < new_offset: - * f[0] = 120 # "x"; pad byte - * f += 1 # <<<<<<<<<<<<<< - * offset[0] += 1 - * - */ - __pyx_v_f = (__pyx_v_f + 1); - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":873 - * f[0] = 120 # "x"; pad byte - * f += 1 - * offset[0] += 1 # <<<<<<<<<<<<<< - * - * offset[0] += child.itemsize - */ - __pyx_t_8 = 0; - (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + 1); - } - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":875 - * offset[0] += 1 - * - * offset[0] += child.itemsize # <<<<<<<<<<<<<< - * - * if not PyDataType_HASFIELDS(child): - */ - __pyx_t_8 = 0; - (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + __pyx_v_child->elsize); - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":877 - * 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) { - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":878 - * - * if not PyDataType_HASFIELDS(child): - * t = child.type_num # <<<<<<<<<<<<<< - * if end - f < 5: - * raise RuntimeError(u"Format string allocated too short.") - */ - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_child->type_num); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 878, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_4); - __pyx_t_4 = 0; - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":879 - * if not PyDataType_HASFIELDS(child): - * t = child.type_num - * if end - f < 5: # <<<<<<<<<<<<<< - * raise RuntimeError(u"Format string allocated too short.") - * - */ - __pyx_t_6 = (((__pyx_v_end - __pyx_v_f) < 5) != 0); - if (unlikely(__pyx_t_6)) { - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":880 - * t = child.type_num - * if end - f < 5: - * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<< - * - * # Until ticket #99 is fixed, use integers to avoid warnings - */ - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__34, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 880, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_Raise(__pyx_t_4, 0, 0, 0); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __PYX_ERR(2, 880, __pyx_L1_error) - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":879 - * if not PyDataType_HASFIELDS(child): - * t = child.type_num - * if end - f < 5: # <<<<<<<<<<<<<< - * raise RuntimeError(u"Format string allocated too short.") - * - */ - } - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":883 - * - * # Until ticket #99 is fixed, use integers to avoid warnings - * if t == NPY_BYTE: f[0] = 98 #"b" # <<<<<<<<<<<<<< - * elif t == NPY_UBYTE: f[0] = 66 #"B" - * elif t == NPY_SHORT: f[0] = 104 #"h" - */ - __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_BYTE); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 883, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 883, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 883, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (__pyx_t_6) { - (__pyx_v_f[0]) = 98; - goto __pyx_L15; - } - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":884 - * # Until ticket #99 is fixed, use integers to avoid warnings - * if t == NPY_BYTE: f[0] = 98 #"b" - * elif t == NPY_UBYTE: f[0] = 66 #"B" # <<<<<<<<<<<<<< - * elif t == NPY_SHORT: f[0] = 104 #"h" - * elif t == NPY_USHORT: f[0] = 72 #"H" - */ - __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UBYTE); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 884, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 884, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 884, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (__pyx_t_6) { - (__pyx_v_f[0]) = 66; - goto __pyx_L15; - } - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":885 - * if t == NPY_BYTE: f[0] = 98 #"b" - * elif t == NPY_UBYTE: f[0] = 66 #"B" - * elif t == NPY_SHORT: f[0] = 104 #"h" # <<<<<<<<<<<<<< - * elif t == NPY_USHORT: f[0] = 72 #"H" - * elif t == NPY_INT: f[0] = 105 #"i" - */ - __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_SHORT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 885, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 885, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 885, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (__pyx_t_6) { - (__pyx_v_f[0]) = 0x68; - goto __pyx_L15; - } - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":886 - * elif t == NPY_UBYTE: f[0] = 66 #"B" - * elif t == NPY_SHORT: f[0] = 104 #"h" - * elif t == NPY_USHORT: f[0] = 72 #"H" # <<<<<<<<<<<<<< - * elif t == NPY_INT: f[0] = 105 #"i" - * elif t == NPY_UINT: f[0] = 73 #"I" - */ - __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_USHORT); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 886, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 886, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 886, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (__pyx_t_6) { - (__pyx_v_f[0]) = 72; - goto __pyx_L15; - } - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":887 - * elif t == NPY_SHORT: f[0] = 104 #"h" - * elif t == NPY_USHORT: f[0] = 72 #"H" - * elif t == NPY_INT: f[0] = 105 #"i" # <<<<<<<<<<<<<< - * elif t == NPY_UINT: f[0] = 73 #"I" - * elif t == NPY_LONG: f[0] = 108 #"l" - */ - __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_INT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 887, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 887, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 887, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (__pyx_t_6) { - (__pyx_v_f[0]) = 0x69; - goto __pyx_L15; - } - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":888 - * elif t == NPY_USHORT: f[0] = 72 #"H" - * elif t == NPY_INT: f[0] = 105 #"i" - * elif t == NPY_UINT: f[0] = 73 #"I" # <<<<<<<<<<<<<< - * elif t == NPY_LONG: f[0] = 108 #"l" - * elif t == NPY_ULONG: f[0] = 76 #"L" - */ - __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UINT); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 888, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 888, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 888, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (__pyx_t_6) { - (__pyx_v_f[0]) = 73; - goto __pyx_L15; - } - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":889 - * elif t == NPY_INT: f[0] = 105 #"i" - * elif t == NPY_UINT: f[0] = 73 #"I" - * elif t == NPY_LONG: f[0] = 108 #"l" # <<<<<<<<<<<<<< - * elif t == NPY_ULONG: f[0] = 76 #"L" - * elif t == NPY_LONGLONG: f[0] = 113 #"q" - */ - __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 889, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 889, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 889, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (__pyx_t_6) { - (__pyx_v_f[0]) = 0x6C; - goto __pyx_L15; - } - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":890 - * elif t == NPY_UINT: f[0] = 73 #"I" - * elif t == NPY_LONG: f[0] = 108 #"l" - * elif t == NPY_ULONG: f[0] = 76 #"L" # <<<<<<<<<<<<<< - * elif t == NPY_LONGLONG: f[0] = 113 #"q" - * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" - */ - __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 890, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 890, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 890, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (__pyx_t_6) { - (__pyx_v_f[0]) = 76; - goto __pyx_L15; - } - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":891 - * elif t == NPY_LONG: f[0] = 108 #"l" - * elif t == NPY_ULONG: f[0] = 76 #"L" - * elif t == NPY_LONGLONG: f[0] = 113 #"q" # <<<<<<<<<<<<<< - * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" - * elif t == NPY_FLOAT: f[0] = 102 #"f" - */ - __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGLONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 891, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 891, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 891, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (__pyx_t_6) { - (__pyx_v_f[0]) = 0x71; - goto __pyx_L15; - } - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":892 - * elif t == NPY_ULONG: f[0] = 76 #"L" - * elif t == NPY_LONGLONG: f[0] = 113 #"q" - * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" # <<<<<<<<<<<<<< - * elif t == NPY_FLOAT: f[0] = 102 #"f" - * elif t == NPY_DOUBLE: f[0] = 100 #"d" - */ - __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONGLONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 892, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 892, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 892, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (__pyx_t_6) { - (__pyx_v_f[0]) = 81; - goto __pyx_L15; - } - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":893 - * elif t == NPY_LONGLONG: f[0] = 113 #"q" - * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" - * elif t == NPY_FLOAT: f[0] = 102 #"f" # <<<<<<<<<<<<<< - * elif t == NPY_DOUBLE: f[0] = 100 #"d" - * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" - */ - __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_FLOAT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 893, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 893, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 893, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (__pyx_t_6) { - (__pyx_v_f[0]) = 0x66; - goto __pyx_L15; - } - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":894 - * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" - * elif t == NPY_FLOAT: f[0] = 102 #"f" - * elif t == NPY_DOUBLE: f[0] = 100 #"d" # <<<<<<<<<<<<<< - * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" - * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf - */ - __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_DOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 894, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 894, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 894, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (__pyx_t_6) { - (__pyx_v_f[0]) = 0x64; - goto __pyx_L15; - } - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":895 - * elif t == NPY_FLOAT: f[0] = 102 #"f" - * elif t == NPY_DOUBLE: f[0] = 100 #"d" - * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" # <<<<<<<<<<<<<< - * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf - * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd - */ - __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 895, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 895, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 895, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (__pyx_t_6) { - (__pyx_v_f[0]) = 0x67; - goto __pyx_L15; - } - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":896 - * elif t == NPY_DOUBLE: f[0] = 100 #"d" - * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" - * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf # <<<<<<<<<<<<<< - * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd - * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg - */ - __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CFLOAT); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 896, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 896, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 896, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (__pyx_t_6) { - (__pyx_v_f[0]) = 90; - (__pyx_v_f[1]) = 0x66; - __pyx_v_f = (__pyx_v_f + 1); - goto __pyx_L15; - } - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":897 - * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" - * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf - * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd # <<<<<<<<<<<<<< - * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg - * elif t == NPY_OBJECT: f[0] = 79 #"O" - */ - __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 897, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 897, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 897, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (__pyx_t_6) { - (__pyx_v_f[0]) = 90; - (__pyx_v_f[1]) = 0x64; - __pyx_v_f = (__pyx_v_f + 1); - goto __pyx_L15; - } - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":898 - * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf - * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd - * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg # <<<<<<<<<<<<<< - * elif t == NPY_OBJECT: f[0] = 79 #"O" - * else: - */ - __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 898, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 898, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 898, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (__pyx_t_6) { - (__pyx_v_f[0]) = 90; - (__pyx_v_f[1]) = 0x67; - __pyx_v_f = (__pyx_v_f + 1); - goto __pyx_L15; - } - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":899 - * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd - * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg - * elif t == NPY_OBJECT: f[0] = 79 #"O" # <<<<<<<<<<<<<< - * else: - * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) - */ - __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_OBJECT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 899, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 899, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 899, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (likely(__pyx_t_6)) { - (__pyx_v_f[0]) = 79; - goto __pyx_L15; - } - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":901 - * elif t == NPY_OBJECT: f[0] = 79 #"O" - * else: - * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< - * f += 1 - * else: - */ - /*else*/ { - __pyx_t_3 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 901, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 901, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_Raise(__pyx_t_4, 0, 0, 0); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __PYX_ERR(2, 901, __pyx_L1_error) - } - __pyx_L15:; - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":902 - * 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); - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":877 - * offset[0] += child.itemsize - * - * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<< - * t = child.type_num - * if end - f < 5: - */ - goto __pyx_L13; - } - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":906 - * # Cython ignores struct boundary information ("T{...}"), - * # so don't output it - * f = _util_dtypestring(child, f, end, offset) # <<<<<<<<<<<<<< - * return f - * - */ - /*else*/ { - __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_9 == ((char *)NULL))) __PYX_ERR(2, 906, __pyx_L1_error) - __pyx_v_f = __pyx_t_9; - } - __pyx_L13:; - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":851 - * cdef tuple fields - * - * for childname in descr.names: # <<<<<<<<<<<<<< - * fields = descr.fields[childname] - * child, new_offset = fields - */ - } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":907 - * # so don't output it - * f = _util_dtypestring(child, f, end, offset) - * return f # <<<<<<<<<<<<<< - * - * - */ - __pyx_r = __pyx_v_f; - goto __pyx_L0; - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":842 - * return () - * - * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<< - * # Recursive utility function used in __getbuffer__ to get format - * # string. The new location in the format string is returned. - */ - - /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); - __Pyx_AddTraceback("numpy._util_dtypestring", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XDECREF((PyObject *)__pyx_v_child); - __Pyx_XDECREF(__pyx_v_fields); - __Pyx_XDECREF(__pyx_v_childname); - __Pyx_XDECREF(__pyx_v_new_offset); - __Pyx_XDECREF(__pyx_v_t); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1022 - * int _import_umath() except -1 - * - * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< - * Py_INCREF(base) # important to do this before stealing the reference below! - * PyArray_SetBaseObject(arr, base) - */ - -static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) { - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("set_array_base", 0); - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1023 - * - * cdef inline void set_array_base(ndarray arr, object base): - * Py_INCREF(base) # important to do this before stealing the reference below! # <<<<<<<<<<<<<< - * PyArray_SetBaseObject(arr, base) - * - */ - Py_INCREF(__pyx_v_base); - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1024 - * cdef inline void set_array_base(ndarray arr, object base): - * Py_INCREF(base) # important to do this before stealing the reference below! - * PyArray_SetBaseObject(arr, base) # <<<<<<<<<<<<<< - * - * cdef inline object get_array_base(ndarray arr): - */ - (void)(PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base)); - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1022 - * int _import_umath() except -1 - * - * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< - * Py_INCREF(base) # important to do this before stealing the reference below! - * PyArray_SetBaseObject(arr, base) - */ - - /* function exit code */ - __Pyx_RefNannyFinishContext(); -} - -/* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1026 - * PyArray_SetBaseObject(arr, base) - * - * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< - * base = PyArray_BASE(arr) - * if base is NULL: - */ - -static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__pyx_v_arr) { - PyObject *__pyx_v_base; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - int __pyx_t_1; - __Pyx_RefNannySetupContext("get_array_base", 0); - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1027 - * - * cdef inline object get_array_base(ndarray arr): - * base = PyArray_BASE(arr) # <<<<<<<<<<<<<< - * if base is NULL: - * return None - */ - __pyx_v_base = PyArray_BASE(__pyx_v_arr); - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1028 - * cdef inline object get_array_base(ndarray arr): - * base = PyArray_BASE(arr) - * if base is NULL: # <<<<<<<<<<<<<< - * return None - * return base - */ - __pyx_t_1 = ((__pyx_v_base == NULL) != 0); - if (__pyx_t_1) { - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1029 - * base = PyArray_BASE(arr) - * if base is NULL: - * return None # <<<<<<<<<<<<<< - * return base - * - */ - __Pyx_XDECREF(__pyx_r); - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1028 - * cdef inline object get_array_base(ndarray arr): - * base = PyArray_BASE(arr) - * if base is NULL: # <<<<<<<<<<<<<< - * return None - * return base - */ - } - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1030 - * if base is NULL: - * return None - * return base # <<<<<<<<<<<<<< - * - * # Versions of the import_* functions which are more suitable for - */ - __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(((PyObject *)__pyx_v_base)); - __pyx_r = ((PyObject *)__pyx_v_base); - goto __pyx_L0; - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1026 - * PyArray_SetBaseObject(arr, base) - * - * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< - * base = PyArray_BASE(arr) - * if base is NULL: - */ - - /* function exit code */ - __pyx_L0:; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1034 +/* "C:/Anaconda3/envs/py36coco/lib/site-packages/numpy/__init__.pxd":880 * # Versions of the import_* functions which are more suitable for * # Cython code. * cdef inline int import_array() except -1: # <<<<<<<<<<<<<< * try: - * _import_array() + * __pyx_import_array() */ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { @@ -16848,13 +15484,16 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { 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("import_array", 0); - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1035 + /* "C:/Anaconda3/envs/py36coco/lib/site-packages/numpy/__init__.pxd":881 * # Cython code. * cdef inline int import_array() except -1: * try: # <<<<<<<<<<<<<< - * _import_array() + * __pyx_import_array() * except Exception: */ { @@ -16866,20 +15505,20 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1036 + /* "C:/Anaconda3/envs/py36coco/lib/site-packages/numpy/__init__.pxd":882 * cdef inline int import_array() except -1: * try: - * _import_array() # <<<<<<<<<<<<<< + * __pyx_import_array() # <<<<<<<<<<<<<< * except Exception: * raise ImportError("numpy.core.multiarray failed to import") */ - __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1036, __pyx_L3_error) + __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 882, __pyx_L3_error) - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1035 + /* "C:/Anaconda3/envs/py36coco/lib/site-packages/numpy/__init__.pxd":881 * # Cython code. * cdef inline int import_array() except -1: * try: # <<<<<<<<<<<<<< - * _import_array() + * __pyx_import_array() * except Exception: */ } @@ -16889,9 +15528,9 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { goto __pyx_L8_try_end; __pyx_L3_error:; - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1037 + /* "C:/Anaconda3/envs/py36coco/lib/site-packages/numpy/__init__.pxd":883 * try: - * _import_array() + * __pyx_import_array() * except Exception: # <<<<<<<<<<<<<< * raise ImportError("numpy.core.multiarray failed to import") * @@ -16899,32 +15538,32 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); if (__pyx_t_4) { __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1037, __pyx_L5_except_error) + if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 883, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_7); - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1038 - * _import_array() + /* "C:/Anaconda3/envs/py36coco/lib/site-packages/numpy/__init__.pxd":884 + * __pyx_import_array() * except Exception: * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<< * * cdef inline int import_umath() except -1: */ - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__35, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1038, __pyx_L5_except_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__30, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 884, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __PYX_ERR(2, 1038, __pyx_L5_except_error) + __PYX_ERR(2, 884, __pyx_L5_except_error) } goto __pyx_L5_except_error; __pyx_L5_except_error:; - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1035 + /* "C:/Anaconda3/envs/py36coco/lib/site-packages/numpy/__init__.pxd":881 * # Cython code. * cdef inline int import_array() except -1: * try: # <<<<<<<<<<<<<< - * _import_array() + * __pyx_import_array() * except Exception: */ __Pyx_XGIVEREF(__pyx_t_1); @@ -16935,12 +15574,12 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { __pyx_L8_try_end:; } - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1034 + /* "C:/Anaconda3/envs/py36coco/lib/site-packages/numpy/__init__.pxd":880 * # Versions of the import_* functions which are more suitable for * # Cython code. * cdef inline int import_array() except -1: # <<<<<<<<<<<<<< * try: - * _import_array() + * __pyx_import_array() */ /* function exit code */ @@ -16958,7 +15597,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { return __pyx_r; } -/* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1040 +/* "C:/Anaconda3/envs/py36coco/lib/site-packages/numpy/__init__.pxd":886 * raise ImportError("numpy.core.multiarray failed to import") * * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<< @@ -16977,9 +15616,12 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { 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("import_umath", 0); - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1041 + /* "C:/Anaconda3/envs/py36coco/lib/site-packages/numpy/__init__.pxd":887 * * cdef inline int import_umath() except -1: * try: # <<<<<<<<<<<<<< @@ -16995,16 +15637,16 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1042 + /* "C:/Anaconda3/envs/py36coco/lib/site-packages/numpy/__init__.pxd":888 * cdef inline int import_umath() except -1: * try: * _import_umath() # <<<<<<<<<<<<<< * except Exception: * raise ImportError("numpy.core.umath failed to import") */ - __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1042, __pyx_L3_error) + __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 888, __pyx_L3_error) - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1041 + /* "C:/Anaconda3/envs/py36coco/lib/site-packages/numpy/__init__.pxd":887 * * cdef inline int import_umath() except -1: * try: # <<<<<<<<<<<<<< @@ -17018,7 +15660,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { goto __pyx_L8_try_end; __pyx_L3_error:; - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1043 + /* "C:/Anaconda3/envs/py36coco/lib/site-packages/numpy/__init__.pxd":889 * try: * _import_umath() * except Exception: # <<<<<<<<<<<<<< @@ -17028,28 +15670,28 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); if (__pyx_t_4) { __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1043, __pyx_L5_except_error) + if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 889, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_7); - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1044 + /* "C:/Anaconda3/envs/py36coco/lib/site-packages/numpy/__init__.pxd":890 * _import_umath() * except Exception: * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< * * cdef inline int import_ufunc() except -1: */ - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__36, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1044, __pyx_L5_except_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__31, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 890, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __PYX_ERR(2, 1044, __pyx_L5_except_error) + __PYX_ERR(2, 890, __pyx_L5_except_error) } goto __pyx_L5_except_error; __pyx_L5_except_error:; - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1041 + /* "C:/Anaconda3/envs/py36coco/lib/site-packages/numpy/__init__.pxd":887 * * cdef inline int import_umath() except -1: * try: # <<<<<<<<<<<<<< @@ -17064,7 +15706,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { __pyx_L8_try_end:; } - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1040 + /* "C:/Anaconda3/envs/py36coco/lib/site-packages/numpy/__init__.pxd":886 * raise ImportError("numpy.core.multiarray failed to import") * * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<< @@ -17087,7 +15729,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { return __pyx_r; } -/* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1046 +/* "C:/Anaconda3/envs/py36coco/lib/site-packages/numpy/__init__.pxd":892 * raise ImportError("numpy.core.umath failed to import") * * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< @@ -17106,9 +15748,12 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { 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("import_ufunc", 0); - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1047 + /* "C:/Anaconda3/envs/py36coco/lib/site-packages/numpy/__init__.pxd":893 * * cdef inline int import_ufunc() except -1: * try: # <<<<<<<<<<<<<< @@ -17124,16 +15769,16 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1048 + /* "C:/Anaconda3/envs/py36coco/lib/site-packages/numpy/__init__.pxd":894 * cdef inline int import_ufunc() except -1: * try: * _import_umath() # <<<<<<<<<<<<<< * except Exception: * raise ImportError("numpy.core.umath failed to import") */ - __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1048, __pyx_L3_error) + __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 894, __pyx_L3_error) - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1047 + /* "C:/Anaconda3/envs/py36coco/lib/site-packages/numpy/__init__.pxd":893 * * cdef inline int import_ufunc() except -1: * try: # <<<<<<<<<<<<<< @@ -17147,35 +15792,38 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { goto __pyx_L8_try_end; __pyx_L3_error:; - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1049 + /* "C:/Anaconda3/envs/py36coco/lib/site-packages/numpy/__init__.pxd":895 * try: * _import_umath() * except Exception: # <<<<<<<<<<<<<< * raise ImportError("numpy.core.umath failed to import") + * */ __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); if (__pyx_t_4) { __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1049, __pyx_L5_except_error) + if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 895, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_7); - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1050 + /* "C:/Anaconda3/envs/py36coco/lib/site-packages/numpy/__init__.pxd":896 * _import_umath() * except Exception: * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< + * + * cdef extern from *: */ - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__36, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1050, __pyx_L5_except_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__31, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 896, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __PYX_ERR(2, 1050, __pyx_L5_except_error) + __PYX_ERR(2, 896, __pyx_L5_except_error) } goto __pyx_L5_except_error; __pyx_L5_except_error:; - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1047 + /* "C:/Anaconda3/envs/py36coco/lib/site-packages/numpy/__init__.pxd":893 * * cdef inline int import_ufunc() except -1: * try: # <<<<<<<<<<<<<< @@ -17190,7 +15838,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { __pyx_L8_try_end:; } - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1046 + /* "C:/Anaconda3/envs/py36coco/lib/site-packages/numpy/__init__.pxd":892 * raise ImportError("numpy.core.umath failed to import") * * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< @@ -17254,9 +15902,9 @@ static void __pyx_tp_dealloc_6cocoex_9interface_Suite(PyObject *o) { { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); - ++Py_REFCNT(o); + __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1); __pyx_pw_6cocoex_9interface_5Suite_15__dealloc__(o); - --Py_REFCNT(o); + __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1); PyErr_Restore(etype, eval, etb); } Py_CLEAR(p->_name); @@ -17432,7 +16080,12 @@ static PyTypeObject __pyx_type_6cocoex_9interface_Suite = { sizeof(struct __pyx_obj_6cocoex_9interface_Suite), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6cocoex_9interface_Suite, /*tp_dealloc*/ + #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 + 0, /*tp_vectorcall_offset*/ + #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 @@ -17482,6 +16135,12 @@ static PyTypeObject __pyx_type_6cocoex_9interface_Suite = { #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif + #if PY_VERSION_HEX >= 0x030800b1 + 0, /*tp_vectorcall*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 + 0, /*tp_print*/ + #endif }; static PyObject *__pyx_tp_new_6cocoex_9interface_Observer(PyTypeObject *t, PyObject *a, PyObject *k) { @@ -17515,9 +16174,9 @@ static void __pyx_tp_dealloc_6cocoex_9interface_Observer(PyObject *o) { { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); - ++Py_REFCNT(o); + __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1); __pyx_pw_6cocoex_9interface_8Observer_9__dealloc__(o); - --Py_REFCNT(o); + __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1); PyErr_Restore(etype, eval, etb); } Py_CLEAR(p->_name); @@ -17583,7 +16242,12 @@ static PyTypeObject __pyx_type_6cocoex_9interface_Observer = { sizeof(struct __pyx_obj_6cocoex_9interface_Observer), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6cocoex_9interface_Observer, /*tp_dealloc*/ + #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 + 0, /*tp_vectorcall_offset*/ + #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 @@ -17633,6 +16297,12 @@ static PyTypeObject __pyx_type_6cocoex_9interface_Observer = { #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif + #if PY_VERSION_HEX >= 0x030800b1 + 0, /*tp_vectorcall*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 + 0, /*tp_print*/ + #endif }; static struct __pyx_vtabstruct_6cocoex_9interface_Problem __pyx_vtable_6cocoex_9interface_Problem; @@ -17677,9 +16347,9 @@ static void __pyx_tp_dealloc_6cocoex_9interface_Problem(PyObject *o) { { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); - ++Py_REFCNT(o); + __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1); __pyx_pw_6cocoex_9interface_7Problem_21__dealloc__(o); - --Py_REFCNT(o); + __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1); PyErr_Restore(etype, eval, etb); } Py_CLEAR(p->y_values); @@ -17919,7 +16589,12 @@ static PyTypeObject __pyx_type_6cocoex_9interface_Problem = { sizeof(struct __pyx_obj_6cocoex_9interface_Problem), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6cocoex_9interface_Problem, /*tp_dealloc*/ + #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 + 0, /*tp_vectorcall_offset*/ + #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 @@ -17969,6 +16644,12 @@ static PyTypeObject __pyx_type_6cocoex_9interface_Problem = { #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif + #if PY_VERSION_HEX >= 0x030800b1 + 0, /*tp_vectorcall*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 + 0, /*tp_print*/ + #endif }; static struct __pyx_obj_6cocoex_9interface___pyx_scope_struct____iter__ *__pyx_freelist_6cocoex_9interface___pyx_scope_struct____iter__[8]; @@ -18034,7 +16715,12 @@ static PyTypeObject __pyx_type_6cocoex_9interface___pyx_scope_struct____iter__ = sizeof(struct __pyx_obj_6cocoex_9interface___pyx_scope_struct____iter__), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6cocoex_9interface___pyx_scope_struct____iter__, /*tp_dealloc*/ + #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 + 0, /*tp_vectorcall_offset*/ + #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 @@ -18084,6 +16770,12 @@ static PyTypeObject __pyx_type_6cocoex_9interface___pyx_scope_struct____iter__ = #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif + #if PY_VERSION_HEX >= 0x030800b1 + 0, /*tp_vectorcall*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 + 0, /*tp_print*/ + #endif }; static PyMethodDef __pyx_methods[] = { @@ -18136,8 +16828,6 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_u_C, __pyx_k_C, sizeof(__pyx_k_C), 0, 1, 0, 1}, {&__pyx_kp_u_Dimension_np_size_x_d_of_input_x, __pyx_k_Dimension_np_size_x_d_of_input_x, sizeof(__pyx_k_Dimension_np_size_x_d_of_input_x), 0, 1, 0, 0}, {&__pyx_kp_u_Dimension_np_size_y_d_of_input_y, __pyx_k_Dimension_np_size_y_d_of_input_y, sizeof(__pyx_k_Dimension_np_size_y_d_of_input_y), 0, 1, 0, 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_u_If, __pyx_k_If, sizeof(__pyx_k_If), 0, 1, 0, 0}, {&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1}, {&__pyx_n_s_InvalidProblemException, __pyx_k_InvalidProblemException, sizeof(__pyx_k_InvalidProblemException), 0, 0, 1, 1}, @@ -18145,7 +16835,6 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_NoSuchProblemException, __pyx_k_NoSuchProblemException, sizeof(__pyx_k_NoSuchProblemException), 0, 0, 1, 1}, {&__pyx_n_s_NoSuchSuiteException, __pyx_k_NoSuchSuiteException, sizeof(__pyx_k_NoSuchSuiteException), 0, 0, 1, 1}, {&__pyx_kp_u_No_suite_with_name_s_found, __pyx_k_No_suite_with_name_s_found, sizeof(__pyx_k_No_suite_with_name_s_found), 0, 1, 0, 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_kp_u_None, __pyx_k_None, sizeof(__pyx_k_None), 0, 1, 0, 0}, {&__pyx_n_s_NotImplementedError, __pyx_k_NotImplementedError, sizeof(__pyx_k_NotImplementedError), 0, 0, 1, 1}, {&__pyx_n_s_Observer, __pyx_k_Observer, sizeof(__pyx_k_Observer), 0, 0, 1, 1}, @@ -18263,8 +16952,6 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_min, __pyx_k_min, sizeof(__pyx_k_min), 0, 0, 1, 1}, {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1}, {&__pyx_n_s_name_2, __pyx_k_name_2, sizeof(__pyx_k_name_2), 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_next_problem, __pyx_k_next_problem, sizeof(__pyx_k_next_problem), 0, 0, 1, 1}, {&__pyx_kp_s_no_default___reduce___due_to_non, __pyx_k_no_default___reduce___due_to_non, sizeof(__pyx_k_no_default___reduce___due_to_non), 0, 0, 1, 0}, {&__pyx_kp_u_not_match_the_number_of_objectiv, __pyx_k_not_match_the_number_of_objectiv, sizeof(__pyx_k_not_match_the_number_of_objectiv), 0, 1, 0, 0}, @@ -18317,7 +17004,6 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_traceback, __pyx_k_traceback, sizeof(__pyx_k_traceback), 0, 0, 1, 1}, {&__pyx_kp_u_u, __pyx_k_u, sizeof(__pyx_k_u), 0, 1, 0, 0}, {&__pyx_kp_u_u_2, __pyx_k_u_2, sizeof(__pyx_k_u_2), 0, 1, 0, 0}, - {&__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_k_unknown_dtype_code_in_numpy_pxd, sizeof(__pyx_k_unknown_dtype_code_in_numpy_pxd), 0, 1, 0, 0}, {&__pyx_n_s_update_current_observer_global, __pyx_k_update_current_observer_global, sizeof(__pyx_k_update_current_observer_global), 0, 0, 1, 1}, {&__pyx_n_s_upper_bounds, __pyx_k_upper_bounds, sizeof(__pyx_k_upper_bounds), 0, 0, 1, 1}, {&__pyx_n_s_verbose, __pyx_k_verbose, sizeof(__pyx_k_verbose), 0, 0, 1, 1}, @@ -18344,7 +17030,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { __pyx_builtin_max = __Pyx_GetBuiltinName(__pyx_n_s_max); if (!__pyx_builtin_max) __PYX_ERR(0, 414, __pyx_L1_error) __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(0, 534, __pyx_L1_error) __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 558, __pyx_L1_error) - __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(2, 1038, __pyx_L1_error) + __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(2, 884, __pyx_L1_error) return 0; __pyx_L1_error:; return -1; @@ -18499,82 +17185,27 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__29); __Pyx_GIVEREF(__pyx_tuple__29); - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":272 - * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) - * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): - * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<< - * - * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) - */ - __pyx_tuple__30 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_C_contiguous); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(2, 272, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__30); - __Pyx_GIVEREF(__pyx_tuple__30); - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":276 - * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) - * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): - * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<< - * - * info.buf = PyArray_DATA(self) - */ - __pyx_tuple__31 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_Fortran_contiguou); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(2, 276, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__31); - __Pyx_GIVEREF(__pyx_tuple__31); - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":306 - * if ((descr.byteorder == c'>' and little_endian) or - * (descr.byteorder == c'<' and not little_endian)): - * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< - * if t == NPY_BYTE: f = "b" - * elif t == NPY_UBYTE: f = "B" - */ - __pyx_tuple__32 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(2, 306, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__32); - __Pyx_GIVEREF(__pyx_tuple__32); - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":856 - * - * if (end - f) - (new_offset - offset[0]) < 15: - * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< - * - * if ((child.byteorder == c'>' and little_endian) or - */ - __pyx_tuple__33 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(2, 856, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__33); - __Pyx_GIVEREF(__pyx_tuple__33); - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":880 - * 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__34 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor_2); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(2, 880, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__34); - __Pyx_GIVEREF(__pyx_tuple__34); - - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1038 - * _import_array() + /* "C:/Anaconda3/envs/py36coco/lib/site-packages/numpy/__init__.pxd":884 + * __pyx_import_array() * except Exception: * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<< * * cdef inline int import_umath() except -1: */ - __pyx_tuple__35 = PyTuple_Pack(1, __pyx_kp_u_numpy_core_multiarray_failed_to); if (unlikely(!__pyx_tuple__35)) __PYX_ERR(2, 1038, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__35); - __Pyx_GIVEREF(__pyx_tuple__35); + __pyx_tuple__30 = PyTuple_Pack(1, __pyx_kp_u_numpy_core_multiarray_failed_to); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(2, 884, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__30); + __Pyx_GIVEREF(__pyx_tuple__30); - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1044 + /* "C:/Anaconda3/envs/py36coco/lib/site-packages/numpy/__init__.pxd":890 * _import_umath() * except Exception: * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< * * cdef inline int import_ufunc() except -1: */ - __pyx_tuple__36 = PyTuple_Pack(1, __pyx_kp_u_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(2, 1044, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__36); - __Pyx_GIVEREF(__pyx_tuple__36); + __pyx_tuple__31 = PyTuple_Pack(1, __pyx_kp_u_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(2, 890, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__31); + __Pyx_GIVEREF(__pyx_tuple__31); /* "cython/interface.pyx":913 * pass @@ -18583,10 +17214,10 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * """`log_level(level=None)` return current log level and * set new log level if `level is not None and level`. */ - __pyx_tuple__37 = PyTuple_Pack(2, __pyx_n_s_level, __pyx_n_s_level_2); if (unlikely(!__pyx_tuple__37)) __PYX_ERR(0, 913, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__37); - __Pyx_GIVEREF(__pyx_tuple__37); - __pyx_codeobj__38 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__37, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_interface_pyx, __pyx_n_s_log_level, 913, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__38)) __PYX_ERR(0, 913, __pyx_L1_error) + __pyx_tuple__32 = PyTuple_Pack(2, __pyx_n_s_level, __pyx_n_s_level_2); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(0, 913, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__32); + __Pyx_GIVEREF(__pyx_tuple__32); + __pyx_codeobj__33 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__32, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_interface_pyx, __pyx_n_s_log_level, 913, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__33)) __PYX_ERR(0, 913, __pyx_L1_error) __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; @@ -18642,12 +17273,17 @@ static int __Pyx_modinit_function_export_code(void) { static int __Pyx_modinit_type_init_code(void) { __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); /*--- Type init code ---*/ __pyx_vtabptr_6cocoex_9interface_Suite = &__pyx_vtable_6cocoex_9interface_Suite; __pyx_vtable_6cocoex_9interface_Suite._initialize = (PyObject *(*)(struct __pyx_obj_6cocoex_9interface_Suite *))__pyx_f_6cocoex_9interface_5Suite__initialize; if (PyType_Ready(&__pyx_type_6cocoex_9interface_Suite) < 0) __PYX_ERR(0, 83, __pyx_L1_error) + #if PY_VERSION_HEX < 0x030800B1 __pyx_type_6cocoex_9interface_Suite.tp_print = 0; + #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6cocoex_9interface_Suite.tp_dictoffset && __pyx_type_6cocoex_9interface_Suite.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_6cocoex_9interface_Suite.tp_getattro = __Pyx_PyObject_GenericGetAttr; } @@ -18676,7 +17312,9 @@ static int __Pyx_modinit_type_init_code(void) { if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6cocoex_9interface_Suite) < 0) __PYX_ERR(0, 83, __pyx_L1_error) __pyx_ptype_6cocoex_9interface_Suite = &__pyx_type_6cocoex_9interface_Suite; if (PyType_Ready(&__pyx_type_6cocoex_9interface_Observer) < 0) __PYX_ERR(0, 445, __pyx_L1_error) + #if PY_VERSION_HEX < 0x030800B1 __pyx_type_6cocoex_9interface_Observer.tp_print = 0; + #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6cocoex_9interface_Observer.tp_dictoffset && __pyx_type_6cocoex_9interface_Observer.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_6cocoex_9interface_Observer.tp_getattro = __Pyx_PyObject_GenericGetAttr; } @@ -18686,7 +17324,9 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_vtabptr_6cocoex_9interface_Problem = &__pyx_vtable_6cocoex_9interface_Problem; __pyx_vtable_6cocoex_9interface_Problem._initialize = (PyObject *(*)(struct __pyx_obj_6cocoex_9interface_Problem *, coco_problem_t *, struct __pyx_opt_args_6cocoex_9interface_7Problem__initialize *__pyx_optional_args))__pyx_f_6cocoex_9interface_7Problem__initialize; if (PyType_Ready(&__pyx_type_6cocoex_9interface_Problem) < 0) __PYX_ERR(0, 509, __pyx_L1_error) + #if PY_VERSION_HEX < 0x030800B1 __pyx_type_6cocoex_9interface_Problem.tp_print = 0; + #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6cocoex_9interface_Problem.tp_dictoffset && __pyx_type_6cocoex_9interface_Problem.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_6cocoex_9interface_Problem.tp_getattro = __Pyx_PyObject_GenericGetAttr; } @@ -18705,7 +17345,9 @@ static int __Pyx_modinit_type_init_code(void) { if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6cocoex_9interface_Problem) < 0) __PYX_ERR(0, 509, __pyx_L1_error) __pyx_ptype_6cocoex_9interface_Problem = &__pyx_type_6cocoex_9interface_Problem; if (PyType_Ready(&__pyx_type_6cocoex_9interface___pyx_scope_struct____iter__) < 0) __PYX_ERR(0, 418, __pyx_L1_error) + #if PY_VERSION_HEX < 0x030800B1 __pyx_type_6cocoex_9interface___pyx_scope_struct____iter__.tp_print = 0; + #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6cocoex_9interface___pyx_scope_struct____iter__.tp_dictoffset && __pyx_type_6cocoex_9interface___pyx_scope_struct____iter__.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_6cocoex_9interface___pyx_scope_struct____iter__.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } @@ -18720,6 +17362,9 @@ static int __Pyx_modinit_type_init_code(void) { static int __Pyx_modinit_type_import_code(void) { __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); /*--- Type import code ---*/ __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 9, __pyx_L1_error) @@ -18733,18 +17378,18 @@ static int __Pyx_modinit_type_import_code(void) { __Pyx_ImportType_CheckSize_Warn); if (!__pyx_ptype_7cpython_4type_type) __PYX_ERR(3, 9, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyImport_ImportModule("numpy"); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 206, __pyx_L1_error) + __pyx_t_1 = PyImport_ImportModule("numpy"); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 199, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_ptype_5numpy_dtype = __Pyx_ImportType(__pyx_t_1, "numpy", "dtype", sizeof(PyArray_Descr), __Pyx_ImportType_CheckSize_Ignore); - if (!__pyx_ptype_5numpy_dtype) __PYX_ERR(2, 206, __pyx_L1_error) - __pyx_ptype_5numpy_flatiter = __Pyx_ImportType(__pyx_t_1, "numpy", "flatiter", sizeof(PyArrayIterObject), __Pyx_ImportType_CheckSize_Warn); - if (!__pyx_ptype_5numpy_flatiter) __PYX_ERR(2, 229, __pyx_L1_error) - __pyx_ptype_5numpy_broadcast = __Pyx_ImportType(__pyx_t_1, "numpy", "broadcast", sizeof(PyArrayMultiIterObject), __Pyx_ImportType_CheckSize_Warn); - if (!__pyx_ptype_5numpy_broadcast) __PYX_ERR(2, 233, __pyx_L1_error) + if (!__pyx_ptype_5numpy_dtype) __PYX_ERR(2, 199, __pyx_L1_error) + __pyx_ptype_5numpy_flatiter = __Pyx_ImportType(__pyx_t_1, "numpy", "flatiter", sizeof(PyArrayIterObject), __Pyx_ImportType_CheckSize_Ignore); + if (!__pyx_ptype_5numpy_flatiter) __PYX_ERR(2, 222, __pyx_L1_error) + __pyx_ptype_5numpy_broadcast = __Pyx_ImportType(__pyx_t_1, "numpy", "broadcast", sizeof(PyArrayMultiIterObject), __Pyx_ImportType_CheckSize_Ignore); + if (!__pyx_ptype_5numpy_broadcast) __PYX_ERR(2, 226, __pyx_L1_error) __pyx_ptype_5numpy_ndarray = __Pyx_ImportType(__pyx_t_1, "numpy", "ndarray", sizeof(PyArrayObject), __Pyx_ImportType_CheckSize_Ignore); - if (!__pyx_ptype_5numpy_ndarray) __PYX_ERR(2, 242, __pyx_L1_error) - __pyx_ptype_5numpy_ufunc = __Pyx_ImportType(__pyx_t_1, "numpy", "ufunc", sizeof(PyUFuncObject), __Pyx_ImportType_CheckSize_Warn); - if (!__pyx_ptype_5numpy_ufunc) __PYX_ERR(2, 918, __pyx_L1_error) + if (!__pyx_ptype_5numpy_ndarray) __PYX_ERR(2, 238, __pyx_L1_error) + __pyx_ptype_5numpy_ufunc = __Pyx_ImportType(__pyx_t_1, "numpy", "ufunc", sizeof(PyUFuncObject), __Pyx_ImportType_CheckSize_Ignore); + if (!__pyx_ptype_5numpy_ufunc) __PYX_ERR(2, 764, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_RefNannyFinishContext(); return 0; @@ -18771,17 +17416,19 @@ static int __Pyx_modinit_function_import_code(void) { } -#if PY_MAJOR_VERSION < 3 -#ifdef CYTHON_NO_PYINIT_EXPORT -#define __Pyx_PyMODINIT_FUNC void -#else +#ifndef CYTHON_NO_PYINIT_EXPORT #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC +#elif PY_MAJOR_VERSION < 3 +#ifdef __cplusplus +#define __Pyx_PyMODINIT_FUNC extern "C" void +#else +#define __Pyx_PyMODINIT_FUNC void #endif #else -#ifdef CYTHON_NO_PYINIT_EXPORT -#define __Pyx_PyMODINIT_FUNC PyObject * +#ifdef __cplusplus +#define __Pyx_PyMODINIT_FUNC extern "C" PyObject * #else -#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC +#define __Pyx_PyMODINIT_FUNC PyObject * #endif #endif @@ -18865,6 +17512,9 @@ static CYTHON_SMALL_CODE int __pyx_pymod_exec_interface(PyObject *__pyx_pyinit_m 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_RefNannyDeclarations #if CYTHON_PEP489_MULTI_PHASE_INIT if (__pyx_m) { @@ -18912,11 +17562,9 @@ if (!__Pyx_RefNanny) { #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? */ + #if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 && defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS PyEval_InitThreads(); #endif - #endif /*--- Module creation code ---*/ #if CYTHON_PEP489_MULTI_PHASE_INIT __pyx_m = __pyx_pyinit_module; @@ -18932,10 +17580,9 @@ if (!__Pyx_RefNanny) { __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error) Py_INCREF(__pyx_d); __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error) - #if CYTHON_COMPILING_IN_PYPY Py_INCREF(__pyx_b); - #endif + __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error) + Py_INCREF(__pyx_cython_runtime); if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error); /*--- Initialize various global constants etc. ---*/ if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error) @@ -18961,8 +17608,8 @@ if (!__Pyx_RefNanny) { (void)__Pyx_modinit_global_init_code(); (void)__Pyx_modinit_variable_export_code(); (void)__Pyx_modinit_function_export_code(); - if (unlikely(__Pyx_modinit_type_init_code() != 0)) goto __pyx_L1_error; - if (unlikely(__Pyx_modinit_type_import_code() != 0)) goto __pyx_L1_error; + if (unlikely(__Pyx_modinit_type_init_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error) + if (unlikely(__Pyx_modinit_type_import_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error) (void)__Pyx_modinit_variable_import_code(); (void)__Pyx_modinit_function_import_code(); /*--- Execution code ---*/ @@ -18999,7 +17646,7 @@ if (!__Pyx_RefNanny) { * * from cocoex.exceptions import InvalidProblemException, NoSuchProblemException, NoSuchSuiteException # <<<<<<<<<<<<<< * - * known_suite_names = ["bbob", "bbob-biobj", "bbob-largescale", + * known_suite_names = ["bbob", "bbob-biobj", "bbob-largescale", "bbob-biobj-ext", */ __pyx_t_1 = PyList_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -19032,11 +17679,11 @@ if (!__Pyx_RefNanny) { /* "cython/interface.pyx":10 * from cocoex.exceptions import InvalidProblemException, NoSuchProblemException, NoSuchSuiteException * - * known_suite_names = ["bbob", "bbob-biobj", "bbob-largescale", # <<<<<<<<<<<<<< + * known_suite_names = ["bbob", "bbob-biobj", "bbob-largescale", "bbob-biobj-ext", # <<<<<<<<<<<<<< * "bbob-mixint", "bbob-biobj-mixint"] * _known_suite_names = ["bbob", "bbob-biobj", "bbob-biobj-ext", "bbob-constrained", "bbob-largescale", */ - __pyx_t_2 = PyList_New(5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10, __pyx_L1_error) + __pyx_t_2 = PyList_New(6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_u_bbob); __Pyx_GIVEREF(__pyx_n_u_bbob); @@ -19047,17 +17694,20 @@ if (!__Pyx_RefNanny) { __Pyx_INCREF(__pyx_kp_u_bbob_largescale); __Pyx_GIVEREF(__pyx_kp_u_bbob_largescale); PyList_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u_bbob_largescale); + __Pyx_INCREF(__pyx_kp_u_bbob_biobj_ext); + __Pyx_GIVEREF(__pyx_kp_u_bbob_biobj_ext); + PyList_SET_ITEM(__pyx_t_2, 3, __pyx_kp_u_bbob_biobj_ext); __Pyx_INCREF(__pyx_kp_u_bbob_mixint); __Pyx_GIVEREF(__pyx_kp_u_bbob_mixint); - PyList_SET_ITEM(__pyx_t_2, 3, __pyx_kp_u_bbob_mixint); + PyList_SET_ITEM(__pyx_t_2, 4, __pyx_kp_u_bbob_mixint); __Pyx_INCREF(__pyx_kp_u_bbob_biobj_mixint); __Pyx_GIVEREF(__pyx_kp_u_bbob_biobj_mixint); - PyList_SET_ITEM(__pyx_t_2, 4, __pyx_kp_u_bbob_biobj_mixint); + PyList_SET_ITEM(__pyx_t_2, 5, __pyx_kp_u_bbob_biobj_mixint); if (PyDict_SetItem(__pyx_d, __pyx_n_s_known_suite_names, __pyx_t_2) < 0) __PYX_ERR(0, 10, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cython/interface.pyx":12 - * known_suite_names = ["bbob", "bbob-biobj", "bbob-largescale", + * known_suite_names = ["bbob", "bbob-biobj", "bbob-largescale", "bbob-biobj-ext", * "bbob-mixint", "bbob-biobj-mixint"] * _known_suite_names = ["bbob", "bbob-biobj", "bbob-biobj-ext", "bbob-constrained", "bbob-largescale", # <<<<<<<<<<<<<< * "bbob-mixint", "bbob-biobj-mixint"] @@ -19124,7 +17774,7 @@ if (!__Pyx_RefNanny) { if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "../../../../../Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1046 + /* "C:/Anaconda3/envs/py36coco/lib/site-packages/numpy/__init__.pxd":892 * raise ImportError("numpy.core.umath failed to import") * * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< @@ -19257,7 +17907,7 @@ static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args return result; } #if 1 || PY_VERSION_HEX < 0x030600B1 -static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, int nargs, PyObject *kwargs) { +static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) { PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func); PyObject *globals = PyFunction_GET_GLOBALS(func); PyObject *argdefs = PyFunction_GET_DEFAULTS(func); @@ -19328,12 +17978,12 @@ static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, } #if PY_MAJOR_VERSION >= 3 result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL, - args, nargs, + args, (int)nargs, k, (int)nk, d, (int)nd, kwdefs, closure); #else result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL, - args, nargs, + args, (int)nargs, k, (int)nk, d, (int)nd, closure); #endif @@ -19349,7 +17999,7 @@ static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { PyObject *result; - ternaryfunc call = func->ob_type->tp_call; + ternaryfunc call = Py_TYPE(func)->tp_call; if (unlikely(!call)) return PyObject_Call(func, arg, kw); if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) @@ -19436,7 +18086,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObjec if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) { return __Pyx_PyObject_CallMethO(func, arg); #if CYTHON_FAST_PYCCALL - } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) { + } else if (__Pyx_PyFastCFunction_Check(func)) { return __Pyx_PyCFunction_FastCall(func, &arg, 1); #endif } @@ -19699,7 +18349,7 @@ static int __Pyx_ParseOptionalKeywords( } name = first_kw_arg; #if PY_MAJOR_VERSION < 3 - if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) { + if (likely(PyString_Check(key))) { while (*name) { if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key)) && _PyString_Eq(**name, key)) { @@ -19726,7 +18376,7 @@ static int __Pyx_ParseOptionalKeywords( 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 : + (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 : #endif PyUnicode_Compare(**name, key); if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; @@ -19742,7 +18392,7 @@ static int __Pyx_ParseOptionalKeywords( 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 : + (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 : #endif PyUnicode_Compare(**argname, key); if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; @@ -20475,46 +19125,10 @@ static int __Pyx_CheckKeywordStrings( function_name, PyString_AsString(key)); #else "%s() got an unexpected keyword argument '%U'", - function_name, key); - #endif - return 0; -} - -/* PyObjectFormat */ -#if CYTHON_USE_UNICODE_WRITER -static PyObject* __Pyx_PyObject_Format(PyObject* obj, PyObject* format_spec) { - int ret; - _PyUnicodeWriter writer; - if (likely(PyFloat_CheckExact(obj))) { -#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x03040000 - _PyUnicodeWriter_Init(&writer, 0); -#else - _PyUnicodeWriter_Init(&writer); -#endif - ret = _PyFloat_FormatAdvancedWriter( - &writer, - obj, - format_spec, 0, PyUnicode_GET_LENGTH(format_spec)); - } else if (likely(PyLong_CheckExact(obj))) { -#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x03040000 - _PyUnicodeWriter_Init(&writer, 0); -#else - _PyUnicodeWriter_Init(&writer); -#endif - ret = _PyLong_FormatAdvancedWriter( - &writer, - obj, - format_spec, 0, PyUnicode_GET_LENGTH(format_spec)); - } else { - return PyObject_Format(obj, format_spec); - } - if (unlikely(ret == -1)) { - _PyUnicodeWriter_Dealloc(&writer); - return NULL; - } - return _PyUnicodeWriter_Finish(&writer); + function_name, key); + #endif + return 0; } -#endif /* CIntToDigits */ static const char DIGIT_PAIRS_10[2*10*10+1] = { @@ -20630,9 +19244,6 @@ static PyObject* __Pyx_PyUnicode_BuildFromAscii(Py_ssize_t ulength, char* chars, #else #include #endif -#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) -#define GCC_DIAGNOSTIC -#endif static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_Py_ssize_t(Py_ssize_t value, Py_ssize_t width, char padding_char, char format_char) { char digits[sizeof(Py_ssize_t)*3+2]; char *dpos, *end = digits + sizeof(Py_ssize_t)*3+2; @@ -20640,12 +19251,12 @@ static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_Py_ssize_t(Py_ssize_t value, Py_ssize_t length, ulength; int prepend_sign, last_one_off; Py_ssize_t remaining; -#ifdef GCC_DIAGNOSTIC +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const Py_ssize_t neg_one = (Py_ssize_t) -1, const_zero = (Py_ssize_t) 0; -#ifdef GCC_DIAGNOSTIC +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; @@ -20978,6 +19589,7 @@ static void __Pyx_BufFmt_RaiseUnexpectedChar(char ch) { } static const char* __Pyx_BufFmt_DescribeTypeChar(char ch, int is_complex) { switch (ch) { + case '?': return "'bool'"; case 'c': return "'char'"; case 'b': return "'signed char'"; case 'B': return "'unsigned char'"; @@ -21020,7 +19632,7 @@ static size_t __Pyx_BufFmt_TypeCharToStandardSize(char ch, int is_complex) { } 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 '?': 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); @@ -21104,7 +19716,7 @@ static char __Pyx_BufFmt_TypeCharToGroup(char ch, int is_complex) { 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': + case '?': case 'B': case 'H': case 'I': case 'L': case 'Q': return 'U'; case 'f': case 'd': case 'g': return (is_complex ? 'C' : 'R'); @@ -21248,9 +19860,7 @@ static PyObject * __pyx_buffmt_parse_array(__Pyx_BufFmt_Context* ctx, const char** tsp) { const char *ts = *tsp; - int i = 0, number; - int ndim = ctx->head->field->type->ndim; -; + int i = 0, number, ndim; ++ts; if (ctx->new_count != 1) { PyErr_SetString(PyExc_ValueError, @@ -21258,6 +19868,7 @@ __pyx_buffmt_parse_array(__Pyx_BufFmt_Context* ctx, const char** tsp) return NULL; } if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; + ndim = ctx->head->field->type->ndim; while (*ts && *ts != ')') { switch (*ts) { case ' ': case '\f': case '\r': case '\n': case '\t': case '\v': continue; @@ -21383,12 +19994,12 @@ static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const cha return NULL; } CYTHON_FALLTHROUGH; - case 'c': case 'b': case 'B': case 'h': case 'H': case 'i': case 'I': + case '?': case 'c': case 'b': case 'B': case 'h': case 'H': case 'i': case 'I': case 'l': case 'L': case 'q': case 'Q': case 'f': case 'd': case 'g': case 'O': case 'p': - if (ctx->enc_type == *ts && got_Z == ctx->is_complex && - ctx->enc_packmode == ctx->new_packmode) { + if ((ctx->enc_type == *ts) && (got_Z == ctx->is_complex) && + (ctx->enc_packmode == ctx->new_packmode) && (!ctx->is_valid_array)) { ctx->enc_count += ctx->new_count; ctx->new_count = 1; got_Z = 0; @@ -22239,48 +20850,6 @@ static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObje PyObject_RichCompare(op1, op2, Py_EQ)); } -/* DictGetItem */ - #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY -static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) { - PyObject *value; - value = PyDict_GetItemWithError(d, key); - if (unlikely(!value)) { - if (!PyErr_Occurred()) { - if (unlikely(PyTuple_Check(key))) { - PyObject* args = PyTuple_Pack(1, key); - if (likely(args)) { - PyErr_SetObject(PyExc_KeyError, args); - Py_DECREF(args); - } - } else { - PyErr_SetObject(PyExc_KeyError, key); - } - } - return NULL; - } - Py_INCREF(value); - return value; -} -#endif - -/* RaiseTooManyValuesToUnpack */ - static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) { - PyErr_Format(PyExc_ValueError, - "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected); -} - -/* RaiseNeedMoreValuesToUnpack */ - static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { - PyErr_Format(PyExc_ValueError, - "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack", - index, (index == 1) ? "" : "s"); -} - -/* RaiseNoneIterError */ - static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { - PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); -} - /* PyObject_GenericGetAttrNoDict */ #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) { @@ -22349,6 +20918,28 @@ static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_nam return -1; } +/* PyObjectGetAttrStrNoError */ + static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) + __Pyx_PyErr_Clear(); +} +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) { + PyObject *result; +#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1 + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) { + return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1); + } +#endif + result = __Pyx_PyObject_GetAttrStr(obj, attr_name); + if (unlikely(!result)) { + __Pyx_PyObject_GetAttrStr_ClearAttributeError(); + } + return result; +} + /* SetupReduce */ static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) { int ret; @@ -22376,43 +20967,51 @@ static int __Pyx_setup_reduce(PyObject* type_obj) { PyObject *setstate = NULL; PyObject *setstate_cython = NULL; #if CYTHON_USE_PYTYPE_LOOKUP - if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto GOOD; + if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD; #else - if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto GOOD; + if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD; #endif #if CYTHON_USE_PYTYPE_LOOKUP - object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD; + object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; #else - object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD; + object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; #endif - reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto BAD; + reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD; if (reduce_ex == object_reduce_ex) { #if CYTHON_USE_PYTYPE_LOOKUP - object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD; + object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD; #else - object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD; + object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD; #endif - reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto BAD; + reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto __PYX_BAD; if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) { - reduce_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_cython); if (unlikely(!reduce_cython)) goto BAD; - ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto BAD; - ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto BAD; + reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_reduce_cython); + if (likely(reduce_cython)) { + ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + } else if (reduce == object_reduce || PyErr_Occurred()) { + goto __PYX_BAD; + } setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate); if (!setstate) PyErr_Clear(); if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) { - setstate_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate_cython); if (unlikely(!setstate_cython)) goto BAD; - ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto BAD; - ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto BAD; + setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate_cython); + if (likely(setstate_cython)) { + ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + } else if (!setstate || PyErr_Occurred()) { + goto __PYX_BAD; + } } PyType_Modified((PyTypeObject*)type_obj); } } - goto GOOD; -BAD: + goto __PYX_GOOD; +__PYX_BAD: if (!PyErr_Occurred()) PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name); ret = -1; -GOOD: +__PYX_GOOD: #if !CYTHON_USE_PYTYPE_LOOKUP Py_XDECREF(object_reduce); Py_XDECREF(object_reduce_ex); @@ -22516,7 +21115,7 @@ static PyTypeObject *__Pyx_ImportType(PyObject *module, const char *module_name, { #if PY_MAJOR_VERSION >= 3 if (level == -1) { - if (strchr(__Pyx_MODULE_NAME, '.')) { + if ((1) && (strchr(__Pyx_MODULE_NAME, '.'))) { module = PyImport_ImportModuleLevelObject( name, global_dict, empty_dict, list, 1); if (!module) { @@ -22567,7 +21166,7 @@ static PyTypeObject *__Pyx_ImportType(PyObject *module, const char *module_name, /* CLineInTraceback */ #ifndef CYTHON_CLINE_IN_TRACEBACK -static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { +static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tstate, int c_line) { PyObject *use_cline; PyObject *ptype, *pvalue, *ptraceback; #if CYTHON_COMPILING_IN_CPYTHON @@ -22671,7 +21270,7 @@ static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { if (__pyx_code_cache.count == __pyx_code_cache.max_count) { int new_max = __pyx_code_cache.max_count + 64; entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( - __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry)); + __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry)); if (unlikely(!entries)) { return; } @@ -22775,7 +21374,6 @@ static void __Pyx_AddTraceback(const char *funcname, int c_line, #if PY_MAJOR_VERSION < 3 static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags) { if (PyObject_CheckBuffer(obj)) return PyObject_GetBuffer(obj, view, flags); - if (__Pyx_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) return __pyx_pw_5numpy_7ndarray_1__getbuffer__(obj, view, flags); PyErr_Format(PyExc_TypeError, "'%.200s' does not have the buffer interface", Py_TYPE(obj)->tp_name); return -1; } @@ -22787,7 +21385,6 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) { return; } if ((0)) {} - else if (__Pyx_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) __pyx_pw_5numpy_7ndarray_3__releasebuffer__(obj, view); view->obj = NULL; Py_DECREF(obj); } @@ -22816,68 +21413,6 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) { return (target_type) value;\ } -/* CIntToPy */ - static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { - const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0; - const int is_unsigned = neg_one > const_zero; - if (is_unsigned) { - if (sizeof(long) < sizeof(long)) { - return PyInt_FromLong((long) value); - } else if (sizeof(long) <= sizeof(unsigned long)) { - return PyLong_FromUnsignedLong((unsigned long) value); -#ifdef HAVE_LONG_LONG - } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { - return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); -#endif - } - } else { - if (sizeof(long) <= sizeof(long)) { - return PyInt_FromLong((long) value); -#ifdef HAVE_LONG_LONG - } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { - return PyLong_FromLongLong((PY_LONG_LONG) value); -#endif - } - } - { - int one = 1; int little = (int)*(unsigned char *)&one; - unsigned char *bytes = (unsigned char *)&value; - return _PyLong_FromByteArray(bytes, sizeof(long), - little, !is_unsigned); - } -} - -/* CIntToPy */ - static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { - const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0; - const int is_unsigned = neg_one > const_zero; - if (is_unsigned) { - if (sizeof(int) < sizeof(long)) { - return PyInt_FromLong((long) value); - } else if (sizeof(int) <= sizeof(unsigned long)) { - return PyLong_FromUnsignedLong((unsigned long) value); -#ifdef HAVE_LONG_LONG - } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { - return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); -#endif - } - } else { - if (sizeof(int) <= sizeof(long)) { - return PyInt_FromLong((long) value); -#ifdef HAVE_LONG_LONG - } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { - return PyLong_FromLongLong((PY_LONG_LONG) value); -#endif - } - } - { - int one = 1; int little = (int)*(unsigned char *)&one; - unsigned char *bytes = (unsigned char *)&value; - return _PyLong_FromByteArray(bytes, sizeof(int), - little, !is_unsigned); - } -} - /* Declarations */ #if CYTHON_CCOMPLEX #ifdef __cplusplus @@ -22960,29 +21495,183 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) { z.imag = -a.imag; return z; } - static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex a) { + static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex a) { + return (a.real == 0) && (a.imag == 0); + } + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex a) { + __pyx_t_float_complex z; + z.real = a.real; + z.imag = -a.imag; + return z; + } + #if 1 + static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex z) { + #if !defined(HAVE_HYPOT) || defined(_MSC_VER) + return sqrtf(z.real*z.real + z.imag*z.imag); + #else + return hypotf(z.real, z.imag); + #endif + } + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex a, __pyx_t_float_complex b) { + __pyx_t_float_complex z; + float r, lnr, theta, z_r, z_theta; + if (b.imag == 0 && b.real == (int)b.real) { + if (b.real < 0) { + float denom = a.real * a.real + a.imag * a.imag; + a.real = a.real / denom; + a.imag = -a.imag / denom; + b.real = -b.real; + } + switch ((int)b.real) { + case 0: + z.real = 1; + z.imag = 0; + return z; + case 1: + return a; + case 2: + return __Pyx_c_prod_float(a, a); + case 3: + z = __Pyx_c_prod_float(a, a); + return __Pyx_c_prod_float(z, a); + case 4: + z = __Pyx_c_prod_float(a, a); + return __Pyx_c_prod_float(z, z); + } + } + if (a.imag == 0) { + if (a.real == 0) { + return a; + } else if (b.imag == 0) { + z.real = powf(a.real, b.real); + z.imag = 0; + return z; + } else if (a.real > 0) { + r = a.real; + theta = 0; + } else { + r = -a.real; + theta = atan2f(0.0, -1.0); + } + } else { + r = __Pyx_c_abs_float(a); + theta = atan2f(a.imag, a.real); + } + lnr = logf(r); + z_r = expf(lnr * b.real - theta * b.imag); + z_theta = theta * b.real + lnr * b.imag; + z.real = z_r * cosf(z_theta); + z.imag = z_r * sinf(z_theta); + return z; + } + #endif +#endif + +/* Declarations */ + #if CYTHON_CCOMPLEX + #ifdef __cplusplus + static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) { + return ::std::complex< double >(x, y); + } + #else + static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) { + return x + y*(__pyx_t_double_complex)_Complex_I; + } + #endif +#else + static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) { + __pyx_t_double_complex z; + z.real = x; + z.imag = y; + return z; + } +#endif + +/* Arithmetic */ + #if CYTHON_CCOMPLEX +#else + static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { + return (a.real == b.real) && (a.imag == b.imag); + } + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { + __pyx_t_double_complex z; + z.real = a.real + b.real; + z.imag = a.imag + b.imag; + return z; + } + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { + __pyx_t_double_complex z; + z.real = a.real - b.real; + z.imag = a.imag - b.imag; + return z; + } + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { + __pyx_t_double_complex z; + z.real = a.real * b.real - a.imag * b.imag; + z.imag = a.real * b.imag + a.imag * b.real; + return z; + } + #if 1 + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { + if (b.imag == 0) { + return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real); + } else if (fabs(b.real) >= fabs(b.imag)) { + if (b.real == 0 && b.imag == 0) { + return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.imag); + } else { + double r = b.imag / b.real; + double s = (double)(1.0) / (b.real + b.imag * r); + return __pyx_t_double_complex_from_parts( + (a.real + a.imag * r) * s, (a.imag - a.real * r) * s); + } + } else { + double r = b.real / b.imag; + double s = (double)(1.0) / (b.imag + b.real * r); + return __pyx_t_double_complex_from_parts( + (a.real * r + a.imag) * s, (a.imag * r - a.real) * s); + } + } + #else + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { + if (b.imag == 0) { + return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real); + } else { + double denom = b.real * b.real + b.imag * b.imag; + return __pyx_t_double_complex_from_parts( + (a.real * b.real + a.imag * b.imag) / denom, + (a.imag * b.real - a.real * b.imag) / denom); + } + } + #endif + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex a) { + __pyx_t_double_complex z; + z.real = -a.real; + z.imag = -a.imag; + return z; + } + static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex a) { return (a.real == 0) && (a.imag == 0); } - static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex a) { - __pyx_t_float_complex z; + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex a) { + __pyx_t_double_complex z; z.real = a.real; z.imag = -a.imag; return z; } #if 1 - static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex z) { + static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex z) { #if !defined(HAVE_HYPOT) || defined(_MSC_VER) - return sqrtf(z.real*z.real + z.imag*z.imag); + return sqrt(z.real*z.real + z.imag*z.imag); #else - return hypotf(z.real, z.imag); + return hypot(z.real, z.imag); #endif } - static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex a, __pyx_t_float_complex b) { - __pyx_t_float_complex z; - float r, lnr, theta, z_r, z_theta; + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { + __pyx_t_double_complex z; + double r, lnr, theta, z_r, z_theta; if (b.imag == 0 && b.real == (int)b.real) { if (b.real < 0) { - float denom = a.real * a.real + a.imag * a.imag; + double denom = a.real * a.real + a.imag * a.imag; a.real = a.real / denom; a.imag = -a.imag / denom; b.real = -b.real; @@ -22995,21 +21684,20 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) { case 1: return a; case 2: - z = __Pyx_c_prod_float(a, a); - return __Pyx_c_prod_float(a, a); + return __Pyx_c_prod_double(a, a); case 3: - z = __Pyx_c_prod_float(a, a); - return __Pyx_c_prod_float(z, a); + z = __Pyx_c_prod_double(a, a); + return __Pyx_c_prod_double(z, a); case 4: - z = __Pyx_c_prod_float(a, a); - return __Pyx_c_prod_float(z, z); + z = __Pyx_c_prod_double(a, a); + return __Pyx_c_prod_double(z, z); } } if (a.imag == 0) { if (a.real == 0) { return a; } else if (b.imag == 0) { - z.real = powf(a.real, b.real); + z.real = pow(a.real, b.real); z.imag = 0; return z; } else if (a.real > 0) { @@ -23017,196 +21705,282 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) { theta = 0; } else { r = -a.real; - theta = atan2f(0.0, -1.0); + theta = atan2(0.0, -1.0); } } else { - r = __Pyx_c_abs_float(a); - theta = atan2f(a.imag, a.real); + r = __Pyx_c_abs_double(a); + theta = atan2(a.imag, a.real); } - lnr = logf(r); - z_r = expf(lnr * b.real - theta * b.imag); + lnr = log(r); + z_r = exp(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); + z.real = z_r * cos(z_theta); + z.imag = z_r * sin(z_theta); return z; } #endif #endif -/* Declarations */ - #if CYTHON_CCOMPLEX - #ifdef __cplusplus - static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) { - return ::std::complex< double >(x, y); - } - #else - static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) { - return x + y*(__pyx_t_double_complex)_Complex_I; - } - #endif +/* CIntFromPy */ + static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const size_t neg_one = (size_t) -1, const_zero = (size_t) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_Check(x))) { + if (sizeof(size_t) < sizeof(long)) { + __PYX_VERIFY_RETURN_INT(size_t, long, PyInt_AS_LONG(x)) + } else { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + goto raise_neg_overflow; + } + return (size_t) val; + } + } else +#endif + if (likely(PyLong_Check(x))) { + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (size_t) 0; + case 1: __PYX_VERIFY_RETURN_INT(size_t, digit, digits[0]) + case 2: + if (8 * sizeof(size_t) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(size_t) >= 2 * PyLong_SHIFT) { + return (size_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + } + break; + case 3: + if (8 * sizeof(size_t) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(size_t) >= 3 * PyLong_SHIFT) { + return (size_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + } + break; + case 4: + if (8 * sizeof(size_t) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(size_t) >= 4 * PyLong_SHIFT) { + return (size_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + } + break; + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } #else - 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; - } + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (size_t) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } #endif - -/* Arithmetic */ - #if CYTHON_CCOMPLEX + if (sizeof(size_t) <= sizeof(unsigned long)) { + __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(size_t) <= sizeof(unsigned PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (size_t) 0; + case -1: __PYX_VERIFY_RETURN_INT(size_t, sdigit, (sdigit) (-(sdigit)digits[0])) + case 1: __PYX_VERIFY_RETURN_INT(size_t, digit, +digits[0]) + case -2: + if (8 * sizeof(size_t) - 1 > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT) { + return (size_t) (((size_t)-1)*(((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + } + } + break; + case 2: + if (8 * sizeof(size_t) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT) { + return (size_t) ((((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + } + } + break; + case -3: + if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT) { + return (size_t) (((size_t)-1)*(((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + } + } + break; + case 3: + if (8 * sizeof(size_t) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT) { + return (size_t) ((((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + } + } + break; + case -4: + if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(size_t) - 1 > 4 * PyLong_SHIFT) { + return (size_t) (((size_t)-1)*(((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + } + } + break; + case 4: + if (8 * sizeof(size_t) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(size_t) - 1 > 4 * PyLong_SHIFT) { + return (size_t) ((((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + } + } + break; + } +#endif + if (sizeof(size_t) <= sizeof(long)) { + __PYX_VERIFY_RETURN_INT_EXC(size_t, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(size_t) <= sizeof(PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(size_t, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { +#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else - static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { - return (a.real == b.real) && (a.imag == b.imag); - } - static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { - __pyx_t_double_complex z; - z.real = a.real + b.real; - z.imag = a.imag + b.imag; - return z; - } - static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { - __pyx_t_double_complex z; - z.real = a.real - b.real; - z.imag = a.imag - b.imag; - return z; - } - static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { - __pyx_t_double_complex z; - z.real = a.real * b.real - a.imag * b.imag; - z.imag = a.real * b.imag + a.imag * b.real; - return z; - } - #if 1 - static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { - if (b.imag == 0) { - return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real); - } else if (fabs(b.real) >= fabs(b.imag)) { - if (b.real == 0 && b.imag == 0) { - return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.imag); - } else { - double r = b.imag / b.real; - double s = (double)(1.0) / (b.real + b.imag * r); - return __pyx_t_double_complex_from_parts( - (a.real + a.imag * r) * s, (a.imag - a.real * r) * s); + size_t val; + PyObject *v = __Pyx_PyNumber_IntOrLong(x); + #if PY_MAJOR_VERSION < 3 + if (likely(v) && !PyLong_Check(v)) { + PyObject *tmp = v; + v = PyNumber_Long(tmp); + Py_DECREF(tmp); } - } else { - double r = b.real / b.imag; - double s = (double)(1.0) / (b.imag + b.real * r); - return __pyx_t_double_complex_from_parts( - (a.real * r + a.imag) * s, (a.imag * r - a.real) * s); + #endif + if (likely(v)) { + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + int ret = _PyLong_AsByteArray((PyLongObject *)v, + bytes, sizeof(val), + is_little, !is_unsigned); + Py_DECREF(v); + if (likely(!ret)) + return val; + } +#endif + return (size_t) -1; } + } else { + size_t val; + PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); + if (!tmp) return (size_t) -1; + val = __Pyx_PyInt_As_size_t(tmp); + Py_DECREF(tmp); + return val; } - #else - static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { - if (b.imag == 0) { - return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real); - } else { - double denom = b.real * b.real + b.imag * b.imag; - return __pyx_t_double_complex_from_parts( - (a.real * b.real + a.imag * b.imag) / denom, - (a.imag * b.real - a.real * b.imag) / denom); +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to size_t"); + return (size_t) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to size_t"); + return (size_t) -1; +} + +/* CIntToPy */ + static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const long neg_one = (long) -1, const_zero = (long) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(long) < sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(long) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(long) <= sizeof(long)) { + return PyInt_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif } } - #endif - static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex a) { - __pyx_t_double_complex z; - z.real = -a.real; - z.imag = -a.imag; - return z; - } - static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex a) { - return (a.real == 0) && (a.imag == 0); - } - static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex a) { - __pyx_t_double_complex z; - z.real = a.real; - z.imag = -a.imag; - return z; + { + 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 1 - static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex z) { - #if !defined(HAVE_HYPOT) || defined(_MSC_VER) - return sqrt(z.real*z.real + z.imag*z.imag); - #else - return hypot(z.real, z.imag); - #endif - } - static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { - __pyx_t_double_complex z; - double r, lnr, theta, z_r, z_theta; - if (b.imag == 0 && b.real == (int)b.real) { - if (b.real < 0) { - double denom = a.real * a.real + a.imag * a.imag; - a.real = a.real / denom; - a.imag = -a.imag / denom; - b.real = -b.real; - } - switch ((int)b.real) { - case 0: - z.real = 1; - z.imag = 0; - return z; - case 1: - return a; - case 2: - z = __Pyx_c_prod_double(a, a); - return __Pyx_c_prod_double(a, a); - case 3: - z = __Pyx_c_prod_double(a, a); - return __Pyx_c_prod_double(z, a); - case 4: - z = __Pyx_c_prod_double(a, a); - return __Pyx_c_prod_double(z, z); - } - } - if (a.imag == 0) { - if (a.real == 0) { - return a; - } else if (b.imag == 0) { - z.real = pow(a.real, b.real); - z.imag = 0; - return z; - } else if (a.real > 0) { - r = a.real; - theta = 0; - } else { - r = -a.real; - theta = atan2(0.0, -1.0); - } - } else { - r = __Pyx_c_abs_double(a); - theta = atan2(a.imag, a.real); - } - lnr = log(r); - z_r = exp(lnr * b.real - theta * b.imag); - z_theta = theta * b.real + lnr * b.imag; - z.real = z_r * cos(z_theta); - z.imag = z_r * sin(z_theta); - return z; - } - #endif -#endif +} /* CIntToPy */ - static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value) { - const enum NPY_TYPES neg_one = (enum NPY_TYPES) ((enum NPY_TYPES) 0 - (enum NPY_TYPES) 1), const_zero = (enum NPY_TYPES) 0; + static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int neg_one = (int) -1, const_zero = (int) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif const int is_unsigned = neg_one > const_zero; if (is_unsigned) { - if (sizeof(enum NPY_TYPES) < sizeof(long)) { + if (sizeof(int) < sizeof(long)) { return PyInt_FromLong((long) value); - } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned long)) { + } else if (sizeof(int) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #ifdef HAVE_LONG_LONG - } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned PY_LONG_LONG)) { + } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { - if (sizeof(enum NPY_TYPES) <= sizeof(long)) { + if (sizeof(int) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG - } else if (sizeof(enum NPY_TYPES) <= sizeof(PY_LONG_LONG)) { + } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } @@ -23214,25 +21988,32 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) { { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; - return _PyLong_FromByteArray(bytes, sizeof(enum NPY_TYPES), + return _PyLong_FromByteArray(bytes, sizeof(int), little, !is_unsigned); } } /* CIntFromPy */ - static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *x) { - const size_t neg_one = (size_t) ((size_t) 0 - (size_t) 1), const_zero = (size_t) 0; + static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const long neg_one = (long) -1, const_zero = (long) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { - if (sizeof(size_t) < sizeof(long)) { - __PYX_VERIFY_RETURN_INT(size_t, long, PyInt_AS_LONG(x)) + if (sizeof(long) < sizeof(long)) { + __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } - return (size_t) val; + return (long) val; } } else #endif @@ -23241,32 +22022,32 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { - case 0: return (size_t) 0; - case 1: __PYX_VERIFY_RETURN_INT(size_t, digit, digits[0]) + case 0: return (long) 0; + case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0]) case 2: - if (8 * sizeof(size_t) > 1 * PyLong_SHIFT) { + if (8 * sizeof(long) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(size_t) >= 2 * PyLong_SHIFT) { - return (size_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) { + return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); } } break; case 3: - if (8 * sizeof(size_t) > 2 * PyLong_SHIFT) { + if (8 * sizeof(long) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(size_t) >= 3 * PyLong_SHIFT) { - return (size_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) { + return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); } } break; case 4: - if (8 * sizeof(size_t) > 3 * PyLong_SHIFT) { + if (8 * sizeof(long) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(size_t) >= 4 * PyLong_SHIFT) { - return (size_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) { + return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); } } break; @@ -23280,86 +22061,86 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) { { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) - return (size_t) -1; + return (long) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif - if (sizeof(size_t) <= sizeof(unsigned long)) { - __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned long, PyLong_AsUnsignedLong(x)) + if (sizeof(long) <= sizeof(unsigned long)) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) #ifdef HAVE_LONG_LONG - } else if (sizeof(size_t) <= sizeof(unsigned PY_LONG_LONG)) { - __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) + } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { - case 0: return (size_t) 0; - case -1: __PYX_VERIFY_RETURN_INT(size_t, sdigit, (sdigit) (-(sdigit)digits[0])) - case 1: __PYX_VERIFY_RETURN_INT(size_t, digit, +digits[0]) + case 0: return (long) 0; + case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0])) + case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0]) case -2: - if (8 * sizeof(size_t) - 1 > 1 * PyLong_SHIFT) { + if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT) { - return (size_t) (((size_t)-1)*(((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { + return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case 2: - if (8 * sizeof(size_t) > 1 * PyLong_SHIFT) { + if (8 * sizeof(long) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT) { - return (size_t) ((((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { + return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case -3: - if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT) { + if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT) { - return (size_t) (((size_t)-1)*(((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { + return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case 3: - if (8 * sizeof(size_t) > 2 * PyLong_SHIFT) { + if (8 * sizeof(long) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT) { - return (size_t) ((((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { + return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case -4: - if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT) { + if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(size_t) - 1 > 4 * PyLong_SHIFT) { - return (size_t) (((size_t)-1)*(((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { + return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case 4: - if (8 * sizeof(size_t) > 3 * PyLong_SHIFT) { + if (8 * sizeof(long) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(size_t) - 1 > 4 * PyLong_SHIFT) { - return (size_t) ((((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { + return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; } #endif - if (sizeof(size_t) <= sizeof(long)) { - __PYX_VERIFY_RETURN_INT_EXC(size_t, long, PyLong_AsLong(x)) + if (sizeof(long) <= sizeof(long)) { + __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) #ifdef HAVE_LONG_LONG - } else if (sizeof(size_t) <= sizeof(PY_LONG_LONG)) { - __PYX_VERIFY_RETURN_INT_EXC(size_t, PY_LONG_LONG, PyLong_AsLongLong(x)) + } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } @@ -23368,7 +22149,7 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) { PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else - size_t val; + long val; PyObject *v = __Pyx_PyNumber_IntOrLong(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { @@ -23388,29 +22169,36 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) { return val; } #endif - return (size_t) -1; + return (long) -1; } } else { - size_t val; + long val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); - if (!tmp) return (size_t) -1; - val = __Pyx_PyInt_As_size_t(tmp); + if (!tmp) return (long) -1; + val = __Pyx_PyInt_As_long(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, - "value too large to convert to size_t"); - return (size_t) -1; + "value too large to convert to long"); + return (long) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, - "can't convert negative value to size_t"); - return (size_t) -1; + "can't convert negative value to long"); + return (long) -1; } /* CIntFromPy */ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { - const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int neg_one = (int) -1, const_zero = (int) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { @@ -23597,195 +22385,6 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) { return (int) -1; } -/* CIntFromPy */ - static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { - const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0; - const int is_unsigned = neg_one > const_zero; -#if PY_MAJOR_VERSION < 3 - if (likely(PyInt_Check(x))) { - if (sizeof(long) < sizeof(long)) { - __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x)) - } else { - long val = PyInt_AS_LONG(x); - if (is_unsigned && unlikely(val < 0)) { - goto raise_neg_overflow; - } - return (long) val; - } - } else -#endif - if (likely(PyLong_Check(x))) { - if (is_unsigned) { -#if CYTHON_USE_PYLONG_INTERNALS - const digit* digits = ((PyLongObject*)x)->ob_digit; - switch (Py_SIZE(x)) { - case 0: return (long) 0; - case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0]) - case 2: - if (8 * sizeof(long) > 1 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) { - return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); - } - } - break; - case 3: - if (8 * sizeof(long) > 2 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) { - return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); - } - } - break; - case 4: - if (8 * sizeof(long) > 3 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) { - return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); - } - } - break; - } -#endif -#if CYTHON_COMPILING_IN_CPYTHON - if (unlikely(Py_SIZE(x) < 0)) { - goto raise_neg_overflow; - } -#else - { - int result = PyObject_RichCompareBool(x, Py_False, Py_LT); - if (unlikely(result < 0)) - return (long) -1; - if (unlikely(result == 1)) - goto raise_neg_overflow; - } -#endif - if (sizeof(long) <= sizeof(unsigned long)) { - __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) -#ifdef HAVE_LONG_LONG - } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { - __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) -#endif - } - } else { -#if CYTHON_USE_PYLONG_INTERNALS - const digit* digits = ((PyLongObject*)x)->ob_digit; - switch (Py_SIZE(x)) { - case 0: return (long) 0; - case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0])) - case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0]) - case -2: - if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { - return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); - } - } - break; - case 2: - if (8 * sizeof(long) > 1 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { - return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); - } - } - break; - case -3: - if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { - return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); - } - } - break; - case 3: - if (8 * sizeof(long) > 2 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { - return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); - } - } - break; - case -4: - if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { - return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); - } - } - break; - case 4: - if (8 * sizeof(long) > 3 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { - return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); - } - } - break; - } -#endif - if (sizeof(long) <= sizeof(long)) { - __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) -#ifdef HAVE_LONG_LONG - } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { - __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) -#endif - } - } - { -#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) - PyErr_SetString(PyExc_RuntimeError, - "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); -#else - long val; - PyObject *v = __Pyx_PyNumber_IntOrLong(x); - #if PY_MAJOR_VERSION < 3 - if (likely(v) && !PyLong_Check(v)) { - PyObject *tmp = v; - v = PyNumber_Long(tmp); - Py_DECREF(tmp); - } - #endif - if (likely(v)) { - int one = 1; int is_little = (int)*(unsigned char *)&one; - unsigned char *bytes = (unsigned char *)&val; - int ret = _PyLong_AsByteArray((PyLongObject *)v, - bytes, sizeof(val), - is_little, !is_unsigned); - Py_DECREF(v); - if (likely(!ret)) - return val; - } -#endif - return (long) -1; - } - } else { - long val; - PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); - if (!tmp) return (long) -1; - val = __Pyx_PyInt_As_long(tmp); - Py_DECREF(tmp); - return val; - } -raise_overflow: - PyErr_SetString(PyExc_OverflowError, - "value too large to convert to long"); - return (long) -1; -raise_neg_overflow: - PyErr_SetString(PyExc_OverflowError, - "can't convert negative value to long"); - return (long) -1; -} - /* FetchCommonType */ static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) { PyObject* fake_module; @@ -24054,6 +22653,30 @@ PyObject *__Pyx_Coroutine_MethodReturn(CYTHON_UNUSED PyObject* gen, PyObject *re } return retval; } +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3) +static CYTHON_INLINE +PyObject *__Pyx_PyGen_Send(PyGenObject *gen, PyObject *arg) { +#if PY_VERSION_HEX <= 0x030A00A1 + return _PyGen_Send(gen, arg); +#else + PyObject *result; + if (PyIter_Send((PyObject*)gen, arg ? arg : Py_None, &result) == PYGEN_RETURN) { + if (PyAsyncGen_CheckExact(gen)) { + assert(result == Py_None); + PyErr_SetNone(PyExc_StopAsyncIteration); + } + else if (result == Py_None) { + PyErr_SetNone(PyExc_StopIteration); + } + else { + _PyGen_SetStopIterationValue(result); + } + Py_CLEAR(result); + } + return result; +#endif +} +#endif static CYTHON_INLINE PyObject *__Pyx_Coroutine_FinishDelegation(__pyx_CoroutineObject *gen) { PyObject *ret; @@ -24090,12 +22713,12 @@ static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value) { #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3) if (PyGen_CheckExact(yf)) { - ret = _PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value); + ret = __Pyx_PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value); } else #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03050000 && defined(PyCoro_CheckExact) && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3) if (PyCoro_CheckExact(yf)) { - ret = _PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value); + ret = __Pyx_PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value); } else #endif { @@ -24179,7 +22802,7 @@ static PyObject *__Pyx_Generator_Next(PyObject *self) { #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3) if (PyGen_CheckExact(yf)) { - ret = _PyGen_Send((PyGenObject*)yf, NULL); + ret = __Pyx_PyGen_Send((PyGenObject*)yf, NULL); } else #endif #ifdef __Pyx_Coroutine_USED @@ -24339,6 +22962,7 @@ static int __Pyx_Coroutine_clear(PyObject *self) { } #endif Py_CLEAR(gen->gi_code); + Py_CLEAR(gen->gi_frame); Py_CLEAR(gen->gi_name); Py_CLEAR(gen->gi_qualname); Py_CLEAR(gen->gi_modulename); @@ -24355,7 +22979,7 @@ static void __Pyx_Coroutine_dealloc(PyObject *self) { if (PyObject_CallFinalizerFromDealloc(self)) #else Py_TYPE(gen)->tp_del(self); - if (self->ob_refcnt > 0) + if (Py_REFCNT(self) > 0) #endif { return; @@ -24382,7 +23006,7 @@ static void __Pyx_Coroutine_del(PyObject *self) { } #if !CYTHON_USE_TP_FINALIZE assert(self->ob_refcnt == 0); - self->ob_refcnt = 1; + __Pyx_SET_REFCNT(self, 1); #endif __Pyx_PyThreadState_assign __Pyx_ErrFetch(&error_type, &error_value, &error_traceback); @@ -24449,17 +23073,17 @@ static void __Pyx_Coroutine_del(PyObject *self) { } __Pyx_ErrRestore(error_type, error_value, error_traceback); #if !CYTHON_USE_TP_FINALIZE - assert(self->ob_refcnt > 0); + assert(Py_REFCNT(self) > 0); if (--self->ob_refcnt == 0) { return; } { - Py_ssize_t refcnt = self->ob_refcnt; + Py_ssize_t refcnt = Py_REFCNT(self); _Py_NewReference(self); - self->ob_refcnt = refcnt; + __Pyx_SET_REFCNT(self, refcnt); } #if CYTHON_COMPILING_IN_CPYTHON - assert(PyType_IS_GC(self->ob_type) && + assert(PyType_IS_GC(Py_TYPE(self)) && _Py_AS_GC(self)->gc.gc_refs != _PyGC_REFS_UNTRACKED); _Py_DEC_REFTOTAL; #endif @@ -24525,6 +23149,27 @@ __Pyx_Coroutine_set_qualname(__pyx_CoroutineObject *self, PyObject *value, CYTHO Py_XDECREF(tmp); return 0; } +static PyObject * +__Pyx_Coroutine_get_frame(__pyx_CoroutineObject *self, CYTHON_UNUSED void *context) +{ + PyObject *frame = self->gi_frame; + if (!frame) { + if (unlikely(!self->gi_code)) { + Py_RETURN_NONE; + } + frame = (PyObject *) PyFrame_New( + PyThreadState_Get(), /*PyThreadState *tstate,*/ + (PyCodeObject*) self->gi_code, /*PyCodeObject *code,*/ + __pyx_d, /*PyObject *globals,*/ + 0 /*PyObject *locals*/ + ); + if (unlikely(!frame)) + return NULL; + self->gi_frame = frame; + } + Py_INCREF(frame); + return frame; +} static __pyx_CoroutineObject *__Pyx__Coroutine_New( PyTypeObject* type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure, PyObject *name, PyObject *qualname, PyObject *module_name) { @@ -24558,6 +23203,7 @@ static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit( gen->gi_modulename = module_name; Py_XINCREF(code); gen->gi_code = code; + gen->gi_frame = NULL; PyObject_GC_Track(gen); return gen; } @@ -24681,6 +23327,8 @@ static PyGetSetDef __pyx_Generator_getsets[] = { (char*) PyDoc_STR("name of the generator"), 0}, {(char *) "__qualname__", (getter)__Pyx_Coroutine_get_qualname, (setter)__Pyx_Coroutine_set_qualname, (char*) PyDoc_STR("qualified name of the generator"), 0}, + {(char *) "gi_frame", (getter)__Pyx_Coroutine_get_frame, NULL, + (char*) PyDoc_STR("Frame of the generator"), 0}, {0, 0, 0, 0, 0} }; static PyTypeObject __pyx_GeneratorType_type = { @@ -24740,6 +23388,12 @@ static PyTypeObject __pyx_GeneratorType_type = { #elif PY_VERSION_HEX >= 0x030400a1 0, #endif +#if PY_VERSION_HEX >= 0x030800b1 + 0, +#endif +#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 + 0, +#endif }; static int __pyx_Generator_init(void) { __pyx_GeneratorType_type.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; diff --git a/code-experiments/build/python/cython/interface.pyx b/code-experiments/build/python/cython/interface.pyx index 5f78e7017..b352831c3 100755 --- a/code-experiments/build/python/cython/interface.pyx +++ b/code-experiments/build/python/cython/interface.pyx @@ -7,7 +7,7 @@ cimport numpy as np from cocoex.exceptions import InvalidProblemException, NoSuchProblemException, NoSuchSuiteException -known_suite_names = ["bbob", "bbob-biobj", "bbob-largescale", +known_suite_names = ["bbob", "bbob-biobj", "bbob-largescale", "bbob-biobj-ext", "bbob-mixint", "bbob-biobj-mixint"] _known_suite_names = ["bbob", "bbob-biobj", "bbob-biobj-ext", "bbob-constrained", "bbob-largescale", "bbob-mixint", "bbob-biobj-mixint"] diff --git a/code-experiments/build/python/example_experiment2.py b/code-experiments/build/python/example_experiment2.py index 85531da27..0779dd074 100755 --- a/code-experiments/build/python/example_experiment2.py +++ b/code-experiments/build/python/example_experiment2.py @@ -79,9 +79,9 @@ def random_search(f, lbounds, ubounds, evals): ### input (to be modified if necessary/desired) # fmin = scipy.optimize.fmin -fmin = scipy.optimize.fmin_slsqp +#fmin = scipy.optimize.fmin_slsqp # fmin = scipy.optimize.fmin_cobyla -# fmin = cocoex.solvers.random_search +fmin = cocoex.solvers.random_search # fmin = cma.fmin2 suite_name = "bbob" # see cocoex.known_suite_names @@ -153,7 +153,7 @@ def random_search(f, lbounds, ubounds, evals): # print(problem.dimension, problem.evaluations) stoppings[problem.index].append(output[3:]) elif fmin in (cocoex.solvers.random_search, random_search): - fmin(problem, problem.dimension * [-5], problem.dimension * [5], evalsleft()) + fmin(problem, problem.lower_bounds, problem.upper_bounds, evalsleft()) elif fmin.__name__ == 'fmin2' and 'cma' in fmin.__module__: # cma.fmin2: xopt, es = fmin(problem, propose_x0, 2, {'maxfevals':evalsleft(), 'verbose':-9}, restarts=9) diff --git a/code-experiments/build/python/python/__init__.py b/code-experiments/build/python/python/__init__.py index 73193e799..6ebab58e3 100644 --- a/code-experiments/build/python/python/__init__.py +++ b/code-experiments/build/python/python/__init__.py @@ -31,6 +31,10 @@ # from .utilities import about_equal # from .exceptions import NoSuchProblemException, InvalidProblemException +import pkg_resources +__version__ = pkg_resources.require('cocoex')[0].version +del pkg_resources + __all__ = ['Observer', 'Suite', 'known_suite_names', 'default_observers'] def default_observers(update=None): diff --git a/code-experiments/build/python/setup.py.in b/code-experiments/build/python/setup.py.in index 022d3d70c..bcabe1290 100644 --- a/code-experiments/build/python/setup.py.in +++ b/code-experiments/build/python/setup.py.in @@ -37,12 +37,12 @@ else: if True or 'darwin' in sys.platform or 'linux' in sys.platform: extensions.append(Extension('cocoex.interface', sources=[interface_file, 'cython/coco.c'], - include_dirs=[np.get_include()] + include_dirs=[np.get_include()], )) if 'linux' in sys.platform: extensions.append(Extension('cocoex._interface', sources=[interface_file, 'cython/coco.c'], - include_dirs=[np.get_include()] + include_dirs=[np.get_include()], )) setup( diff --git a/code-experiments/src/coco.h b/code-experiments/src/coco.h index 1abdb1a8a..ff023ea3d 100644 --- a/code-experiments/src/coco.h +++ b/code-experiments/src/coco.h @@ -565,6 +565,9 @@ char *coco_strdupf(const char *str, ...); /***********************************************************************************************************/ +void bbob_problem_best_parameter_print(const coco_problem_t *problem); +void bbob_biobj_problem_best_parameter_print(const coco_problem_t *problem); + #ifdef __cplusplus } #endif diff --git a/code-experiments/src/coco_archive.c b/code-experiments/src/coco_archive.c index 50ea388de..d0c40906f 100644 --- a/code-experiments/src/coco_archive.c +++ b/code-experiments/src/coco_archive.c @@ -80,14 +80,13 @@ static void coco_archive_node_item_free(coco_archive_avl_item_t *item, void *use static int coco_archive_compare_by_last_objective(const coco_archive_avl_item_t *item1, const coco_archive_avl_item_t *item2, void *userdata) { + (void) userdata; /* To silence the compiler */ if (coco_double_almost_equal(item1->normalized_y[1], item2->normalized_y[1], mo_precision)) return 0; else if (item1->normalized_y[1] < item2->normalized_y[1]) return -1; else return 1; - - (void) userdata; /* To silence the compiler */ } /** diff --git a/code-experiments/src/coco_internal.h b/code-experiments/src/coco_internal.h index 91c6d17c3..b43da82c1 100644 --- a/code-experiments/src/coco_internal.h +++ b/code-experiments/src/coco_internal.h @@ -236,9 +236,6 @@ struct coco_suite_s { static void bbob_evaluate_gradient(coco_problem_t *problem, const double *x, double *y); -void bbob_problem_best_parameter_print(const coco_problem_t *problem); -void bbob_biobj_problem_best_parameter_print(const coco_problem_t *problem); - #ifdef __cplusplus } #endif diff --git a/code-experiments/src/logger_biobj.c b/code-experiments/src/logger_biobj.c index efd83fb7f..ff7f10919 100644 --- a/code-experiments/src/logger_biobj.c +++ b/code-experiments/src/logger_biobj.c @@ -208,14 +208,13 @@ static void logger_biobj_node_free(logger_biobj_avl_item_t *item, void *userdata static int avl_tree_compare_by_last_objective(const logger_biobj_avl_item_t *item1, const logger_biobj_avl_item_t *item2, void *userdata) { + (void) userdata; /* To silence the compiler */ if (coco_double_almost_equal(item1->normalized_y[1], item2->normalized_y[1], mo_precision)) return 0; else if (item1->normalized_y[1] < item2->normalized_y[1]) return -1; else return 1; - - (void) userdata; /* To silence the compiler */ } /** @@ -227,14 +226,13 @@ static int avl_tree_compare_by_last_objective(const logger_biobj_avl_item_t *ite static int avl_tree_compare_by_eval_number(const logger_biobj_avl_item_t *item1, const logger_biobj_avl_item_t *item2, void *userdata) { + (void) userdata; /* To silence the compiler */ if (item1->evaluation_number < item2->evaluation_number) return -1; else if (item1->evaluation_number > item2->evaluation_number) return 1; else return 0; - - (void) userdata; /* To silence the compiler */ } /** diff --git a/code-experiments/src/suite_bbob.c b/code-experiments/src/suite_bbob.c index 374409640..9ba7c431a 100644 --- a/code-experiments/src/suite_bbob.c +++ b/code-experiments/src/suite_bbob.c @@ -43,7 +43,7 @@ static coco_suite_t *suite_bbob_initialize(void) { const size_t num_dimensions = sizeof(dimensions) / sizeof(dimensions[0]); /* IMPORTANT: Make sure to change the default instance for every new workshop! */ - suite = coco_suite_allocate("bbob", 24, num_dimensions, dimensions, "year: 2018"); + suite = coco_suite_allocate("bbob", 24, num_dimensions, dimensions, "year: 2021"); return suite; } @@ -77,6 +77,9 @@ static const char *suite_bbob_get_instances_by_year(const int year) { else if (year == 2018) { return "1-5,71-80"; } + else if (year == 2021) { + return "1-5,91-100"; + } else { coco_error("suite_bbob_get_instances_by_year(): year %d not defined for suite_bbob", year); diff --git a/code-experiments/src/suite_biobj_utilities.c b/code-experiments/src/suite_biobj_utilities.c index f937cbf5c..33f86cd5a 100644 --- a/code-experiments/src/suite_biobj_utilities.c +++ b/code-experiments/src/suite_biobj_utilities.c @@ -512,7 +512,8 @@ static double suite_biobj_get_best_hyp_value(const char *suite_name, const char double best_value = 0; char *curr_key; - if (strcmp(suite_name, "bbob-biobj") == 0) { + if ((strcmp(suite_name, "bbob-biobj") == 0) || + (strcmp(suite_name, "bbob-biobj-ext") == 0)) { curr_key = coco_allocate_string(COCO_PATH_MAX + 1); count = sizeof(suite_biobj_best_values_hyp) / sizeof(char *); for (i = 0; i < count; i++) { @@ -542,7 +543,4 @@ static double suite_biobj_get_best_hyp_value(const char *suite_name, const char coco_free_memory(curr_key); coco_warning("suite_biobj_get_best_hyp_value(): best value of %s could not be found; set to 1.0", key); return 1.0; - - coco_error("suite_biobj_get_best_hyp_value(): unexpected exception"); - return 0; /* Never reached */ } diff --git a/code-experiments/test/regression-test/test_suites.py b/code-experiments/test/regression-test/test_suites.py index 6dc23538f..4171a7b4d 100755 --- a/code-experiments/test/regression-test/test_suites.py +++ b/code-experiments/test/regression-test/test_suites.py @@ -98,7 +98,7 @@ def regression_test_a_suite(suite_name, filename): data_file_path = ("data/regression_test_%ddata_for_suite_" % ndata) + name + ".py" if not os.path.exists(data_file_path): - remote_data_path = 'https://coco.gforge.inria.fr/regression-tests/' + remote_data_path = 'http://numbbo.github.io/regression-tests/' # download data from remote_data_path: if not os.path.exists(os.path.split(data_file_path)[0]): try: diff --git a/code-postprocessing/cocopp/__init__.py b/code-postprocessing/cocopp/__init__.py index 3fceae2b5..6afe3928b 100644 --- a/code-postprocessing/cocopp/__init__.py +++ b/code-postprocessing/cocopp/__init__.py @@ -72,7 +72,7 @@ >>> cocopp.main('bbob/2009/*') # doctest:+SKIP -can be browsed at http://coco.gforge.inria.fr/ppdata-archive/bbob/2009-all. +can be browsed at http://numbbo.github.io/ppdata-archive/bbob/2009 (or 2009-all). To display algorithms in the background, the ``genericsettings.background`` variable needs to be set: @@ -122,9 +122,10 @@ bbob_biobj = archives.bbob_biobj else: archives = archiving.official_archives # just an alias - data_archive = archives.all # another alias, only for historical reasons - archives.link_as_attributes_in(_sys.modules['cocopp'], # more individual aliases - except_for=['all', 'test']) + if archives is not None: + data_archive = archives.all # another alias, only for historical reasons + archives.link_as_attributes_in(_sys.modules['cocopp'], # more individual aliases + except_for=['all', 'test']) # data_archive = 'use `archives.all` instead' # bbob = 'use `archives.bbob` instead' diff --git a/code-postprocessing/cocopp/archiving.py b/code-postprocessing/cocopp/archiving.py index 7a50c0187..cc6511a06 100644 --- a/code-postprocessing/cocopp/archiving.py +++ b/code-postprocessing/cocopp/archiving.py @@ -83,11 +83,15 @@ except ImportError: from urllib import urlretrieve as _urlretrieve -coco_url = "https://coco.gforge.inria.fr" +coco_urls = ["https://coco.gforge.inria.fr/data-archive", # original location + "https://numbbo.github.io/gforge/data-archive", # new backup location + "https://numbbo.github.io/data-archive/data-archive", # new location + ] +coco_url = coco_urls[-1] # may be reassigned if it doesn't work out cocopp_home = os.path.abspath(os.path.expanduser(os.path.join("~", ".cocopp"))) -cocopp_home_archives = os.path.join(cocopp_home, "data-archives") default_archive_location = os.path.join(cocopp_home, 'data-archives') default_definition_filename = 'coco_archive_definition.txt' +cocopp_home_archives = default_archive_location listing_file_start = 'list_' listing_file_extension = '.txt' backup_last_filename = '' # global variable to see whether and where a backup was made @@ -184,12 +188,12 @@ def _str_to_list(str_or_list): return [str_or_list] raise ValueError(str_or_list) -def _move_official_local_data(): +def _old_move_official_local_data(): """move "official" archives folder to the generic standardized location once and for all""" src = os.path.join(cocopp_home, 'data-archive') dest = _url_to_folder_name(coco_url) if os.path.exists(src): - if not os.path.exists(os.path.join(dest, 'data-archive')): + if not os.path.exists(os.path.join(dest, 'data-archive')): # obsolete _makedirs(dest) print("moving %s to %s" % (src, dest)) _shutil.move(src, dest) @@ -239,8 +243,8 @@ def _get_remote(url, target_folder=None, redownload=False): key = url url = official_archives.url(url) or url.rstrip('/') target_folder = target_folder or _url_to_folder_name(url) - if key in official_archives.names: - _move_official_local_data() # once and for all + # if key in official_archives.names: # old code + # _move_official_local_data() # once and for all if redownload or not os.path.exists(_definition_file_to_read(target_folder)): _makedirs(target_folder) _download_definitions(url, target_folder) @@ -287,11 +291,11 @@ def get(url_or_folder=None): and ``cocopp.archiving.ArchivesKnown()`` will show a list. >>> import cocopp - >>> url = 'http://lq-cma.gforge.inria.fr/data-archives/lq-gecco2019' + >>> url = 'https://cma-es.github.io/lq-cma/data-archives/lq-gecco2019' >>> arch = cocopp.archiving.get(url).update() # downloads a 0.4KB definition file >>> len(arch) 4 - >>> assert arch.remote_data_path == url + >>> assert arch.remote_data_path.split('//', 1)[1] == url.split('//', 1)[1], (arch.remote_data_path, url) See `cocopp.archives` for "officially" available archives. """ @@ -373,7 +377,7 @@ def create(local_path): and not fnlower.startswith('.') and not default_definition_filename in filename and not fnlower == 'readme' - and not fnlower.endswith(('.dat', '.rdat', '.tdat', '.info', + and not fnlower.endswith(('.git', '.dat', '.rdat', '.tdat', '.info', '.txt', '.md', '.py', '.ipynb', '.pdf')) and not '.txt' in fnlower ): @@ -854,7 +858,7 @@ def update(self): As remote archives may grow or change, a common usecase may be >>> import cocopp.archiving as ac - >>> url = 'http://lq-cma.gforge.inria.fr/data-archives/lq-gecco2019' + >>> url = 'https://cma-es.github.io/lq-cma/data-archives/lq-gecco2019' >>> arch = ac.get(url).update() # doctest:+SKIP For updating a local archive use:: @@ -1101,7 +1105,7 @@ def save(self): f.write(_repr_definitions(self)) def remote_update(self, name=None): - """join in the respective list from ``http://coco.gforge.inria.fr/data-archives``. + """join in the respective list from ``coco_url.rsplit('/')[0] + '/data-archives'``. Use `save` to save the joined entries. """ @@ -1250,15 +1254,15 @@ class OfficialArchives(object): Post-processing (2+) Using: - /.../.cocopp/data-archive/bbob/2009/BIPOP-CMA-ES_hansen_noiseless.tgz - /.../.cocopp/data-archive/bbob/2012/DE-AUTO_voglis_noiseless.tgz - /.../.cocopp/data-archive/bbob/2012/DE-BFGS_voglis_noiseless.tgz - /.../.cocopp/data-archive/bbob/2012/DE-ROLL_voglis_noiseless.tgz - /.../.cocopp/data-archive/bbob/2012/DE-SIMPLEX_voglis_noiseless.tgz - /.../.cocopp/data-archive/bbob/2012/DE_posik_noiseless.tgz - /.../.cocopp/data-archive/bbob/2012/DEAE_posik_noiseless.tgz - /.../.cocopp/data-archive/bbob/2012/DEb_posik_noiseless.tgz - /.../.cocopp/data-archive/bbob/2012/DEctpb_posik_noiseless.tgz + /.../.cocopp/data-.../bbob/2009/BIPOP-CMA-ES_hansen_noiseless.tgz + /.../.cocopp/data-.../bbob/2012/DE-AUTO_voglis_noiseless.tgz + /.../.cocopp/data-.../bbob/2012/DE-BFGS_voglis_noiseless.tgz + /.../.cocopp/data-.../bbob/2012/DE-ROLL_voglis_noiseless.tgz + /.../.cocopp/data-.../bbob/2012/DE-SIMPLEX_voglis_noiseless.tgz + /.../.cocopp/data-.../bbob/2012/DE_posik_noiseless.tgz + /.../.cocopp/data-.../bbob/2012/DEAE_posik_noiseless.tgz + /.../.cocopp/data-.../bbob/2012/DEb_posik_noiseless.tgz + /.../.cocopp/data-.../bbob/2012/DEctpb_posik_noiseless.tgz Post-processing (2+) loading data... @@ -1275,14 +1279,17 @@ class OfficialArchives(object): >>> cocopp.main('-o myoutputfolder BIPOP! 2012/DE*') # doctest:+SKIP """ - def __init__(self): + def __init__(self, url=None): """all URLs and classes (optional) in one place. The archive names are identical with the last part of the URL. The only exception is made for `'all'`, which is removed to get the URL. """ self.all = None # only to prevent lint error in cocopp/__init__.py - self._base = coco_url + '/data-archive/' + if url is None: + url = coco_url + self._base = url.rstrip('/') + '/' + # self._base = coco_url + '/data-archive/' # old way # TODO-decide: should this list better be initialized by a ListOfArchives file? # (the same transition as before with the _all attribute in COCODataArchive) # The code then only "hardcodes" the class name mapping? @@ -1299,8 +1306,7 @@ def __init__(self): def add_archive(self, name): """Allow to use a new official archive. - The archive must exist as a subfolder of - https://coco.gforge.inria.fr/data-archive + The archive must exist as a subfolder of ``coco_url``. """ self._list += [(self._base + name, None),] self.set_as_attributes_in() @@ -1377,11 +1383,23 @@ def update_all(self): if name != 'test': raise -official_archives = OfficialArchives() -# TODO-decide: when should we (try to) update these? -official_archives.set_as_attributes_in() # set "official" archives as attributes by suite name - -class _ArchivesOfficial(ListOfArchives): +# official_archives = OfficialArchives() +for url in coco_urls[-1::-1]: # loop over possible URLs until successful + try: + official_archives = OfficialArchives(url) # lazy init, does kinda nothing + # TODO-decide: when should we (try to) update/check these? + # The following `set_as_attributes_in` calls `cocopp.archiving.get(url)` and works if the + # connection was successful at least once (before or now) + official_archives.set_as_attributes_in() # set "official" archives as attributes by suite name + coco_url = url + break + except: # (HTTPError, TimeoutError, URLError) + warnings.warn("failed to connect to " + url) +else: + warnings.warn("failed fo find workable URL or local folder for official archives") + official_archives = None + +class _old_ArchivesOfficial(ListOfArchives): """superseded by `OfficialArchives` Official COCO data archives. @@ -1392,7 +1410,7 @@ class _ArchivesOfficial(ListOfArchives): __doc__ += ListOfArchives.__doc__ listing_file = ListOfArchives._fullfile("official_archives") - search_folder = _abs_path(cocopp_home, "data-archive") + search_folder = _abs_path(cocopp_home, "data-archive") # obsolete class ArchivesLocal(ListOfArchives): """COCO data archives somewhere local on this machine. @@ -1415,13 +1433,18 @@ class ArchivesKnown(ListOfArchives): search_folder = default_archive_location class RemoteListOfArchives(_td.StrList): - """Elements of this list can be used directly in `cocopp.archiving.get`. + """Elements of this list can be used directly with `cocopp.archiving.get`. The only purpose of this list is to propose (or remind) known archive - locations to the user. For this purpose, the current listing file is + remote locations to the user. For this purpose, the current listing file is downloaded. """ - location = coco_url + '/data-archives/' # + 'list_known_archives.txt' + # was: location = coco_url + '/data-archives/' # + 'list_known_archives.txt' + # a hack: remove deepest folder name in coco_url + location = coco_url.rstrip('/').rsplit('/', 1)[0] # remove lowest folder name + if '//' not in location: + location = coco_url.rstrip('/') + location += '/data-archives/' # + 'list_known_archives.txt' def __init__(self, name='known_archives'): super(RemoteListOfArchives, self).__init__(self._download(name)) diff --git a/code-postprocessing/cocopp/bestalg.py b/code-postprocessing/cocopp/bestalg.py index fc36ab318..098dfe3a5 100644 --- a/code-postprocessing/cocopp/bestalg.py +++ b/code-postprocessing/cocopp/bestalg.py @@ -227,7 +227,7 @@ def __init__(self, dict_alg, algId='Virtual Best Algorithm'): self.comment = dict_alg[sortedAlgs[0]].comment.lstrip('%% ') self.ert = np.array(reserts) self.target = res[:, 0] - self.suite = getattr(dict_alg[sortedAlgs[0]], 'suite', None) + self.suite = dict_alg[sortedAlgs[0]].suite_name self.used_algorithms = sortedAlgs bestfinalfunvals = np.array([np.inf]) for alg in sortedAlgs: @@ -549,7 +549,13 @@ def custom_generate(args=algs2009, algId='bestCustomAlg', suite=None): def create_data_files(output_dir, result, suite): - info_filename = 'bbob-bestalg' + if not suite: + suite = result[list(result.keys())[0]].suite_name + + print('create_data_files: %s ' % suite) + + + info_filename = '%s-bestalg' % suite filename_template = info_filename + '_f%02d_d%02d.%s' info_lines = [] all_instances_used = [] @@ -584,19 +590,15 @@ def create_data_files(output_dir, result, suite): all_instances_used.extend(instances_used) instances_list = get_used_instance_list(instances_used) - test_suite = getattr(value, 'suite', None) - if test_suite is None: - test_suite = suite - algorithm_id = value.algId - if result[list(result.keys())[0]].suite_name == testbedsettings.default_testbed_bi: + if suite in ['bbob-biobj', 'bbob-biobj-ext', testbedsettings.default_suite_bi]: info_lines.append("function = %d, dim = %d, %s, %s" % (key[1], key[0], filename_template % (key[1], key[0], 'dat'), instance_data)) else: header = "funcId = %d, DIM = %d, Precision = %10.15e, algId = '%s'" \ % (key[1], key[0], value.precision, algorithm_id) - if test_suite is not None: - header += ", suite = '%s'" % test_suite + if suite is not None: + header += ", suite = '%s'" % suite info_lines.append(header) info_lines.append("%% %s; instance_numbers: %s" % (value.comment, instances_list)) info_lines.append("%s, %s" % (filename_template % (key[1], key[0], 'dat'), instance_data)) @@ -612,8 +614,8 @@ def create_data_files(output_dir, result, suite): if result[list(result.keys())[0]].suite_name == testbedsettings.default_testbed_bi: header = "algorithm = '%s', indicator = 'hyp'" % algorithm_id - if test_suite is not None: - header += ", suite = '%s'" % test_suite + if suite is not None: + header += ", suite = '%s'" % suite reference_values = testbedsettings.get_first_reference_values() if reference_values is not None: header += ", reference_values_hash = '%s'" % reference_values diff --git a/code-postprocessing/cocopp/compall/ppfigs.py b/code-postprocessing/cocopp/compall/ppfigs.py index c29c0d051..bde5ea8d7 100644 --- a/code-postprocessing/cocopp/compall/ppfigs.py +++ b/code-postprocessing/cocopp/compall/ppfigs.py @@ -602,7 +602,13 @@ def main(dictAlg, html_file_prefix, sorted_algorithms=None, output_dir='ppdata', num_of_instances = [] for alg in algorithms_with_data: try: - num_of_instances.append(len((dictFunc[f][alg])[0].instancenumbers)) + # display number of instances in data and used targets type: + if all(d.instancenumbers == (dictFunc[f][alg])[0].instancenumbers + for d in dictFunc[f][alg]): # all the same? + num_of_instances.append(len((dictFunc[f][alg])[0].instancenumbers)) + else: + for d in dictFunc[f][alg]: + num_of_instances.append(len(d.instancenumbers)) except IndexError: pass # issue a warning if number of instances is inconsistant, otherwise diff --git a/code-postprocessing/cocopp/compall/pptables.py b/code-postprocessing/cocopp/compall/pptables.py index d19060515..d60202094 100644 --- a/code-postprocessing/cocopp/compall/pptables.py +++ b/code-postprocessing/cocopp/compall/pptables.py @@ -63,7 +63,7 @@ def get_table_caption(): testbedsettings.suite_name_mixint, testbedsettings.suite_name_bi_mixint)) else "") + r"""Best results are printed in bold. - """ + r"""\cocoversion""") + """) table_caption = None if testbedsettings.current_testbed.name in [testbedsettings.suite_name_bi_ext, @@ -717,7 +717,7 @@ def main(dict_alg, sorted_algs, output_dir='.', function_targets_line=True, late if len(additional_commands) > 0: for command in additional_commands: prepend_to_file(latex_commands_file, [command]) - if len(tables_header) > 0 and df[0] == testbedsettings.current_testbed.tabDimsOfInterest[0]: + if len(tables_header) > 0 and df[0] == min(df): extraeol = [r'\hline'] res = tableXLaTeX([tables_header], spec=spec, extra_eol=extraeol, add_end_tabular=False) prepend_to_file(latex_commands_file, ['\\providecommand{\\pptablesheader}{', res, '}']) diff --git a/code-postprocessing/cocopp/firstsession.py b/code-postprocessing/cocopp/firstsession.py index d53e8ab71..0d9488ef8 100644 --- a/code-postprocessing/cocopp/firstsession.py +++ b/code-postprocessing/cocopp/firstsession.py @@ -30,7 +30,7 @@ import cocopp # Collect and unarchive data (~20MB) -dataurl = 'https://coco.gforge.inria.fr/data-archive/2009/BIPOP-CMA-ES_hansen_noiseless.tgz' +dataurl = 'https://numbbo.github.io/data-archive/data-archive/bbob/2009/BIPOP-CMA-ES_hansen_noiseless.tgz' filename, headers = urlretrieve(dataurl) archivefile = tarfile.open(filename) archivefile.extractall() diff --git a/code-postprocessing/cocopp/latex_commands_for_html.html b/code-postprocessing/cocopp/latex_commands_for_html.html index ef62f0f28..0c0b03408 100644 --- a/code-postprocessing/cocopp/latex_commands_for_html.html +++ b/code-postprocessing/cocopp/latex_commands_for_html.html @@ -108,7 +108,7 @@ the rank-sum test) compared to the best algorithm from BBOB 2009, with p = 0.05 or p = 10−k when the number k > 1 is following the ↓ symbol, with Bonferroni correction by the number of - functions (24).??COCOVERSION?? + functions (24).
##bbobpptablesmanylegendrlbased## @@ -126,7 +126,6 @@ the rank-sum test) when compared to all other algorithms of the table, with p = 0.05 or p = 10−k when the number k following the star is larger than 1, with Bonferroni correction by the number of functions (24). A ↓ indicates the same tested against the best algorithm from BBOB 2009. Best results are printed in bold. - ??COCOVERSION??
##bbobppscatterlegendrlbased## @@ -161,7 +160,7 @@ (box), 10-90%-ile (caps), and minimum and maximum ERT loss ratio (points). The vertical line gives the maximal number of function evaluations in a single trial in this function subset. See also - the following figure for results on each function subgroup.??COCOVERSION?? + the following figure for results on each function subgroup.
##bbobloglossfigurecaptionrlbased## @@ -254,7 +253,7 @@ the rank-sum test) compared to the best algorithm from BBOB 2009, with p = 0.05 or p = 10−k when the number k > 1 is following the ↓ symbol, with Bonferroni correction by the number of - functions (24).??COCOVERSION?? + functions (24).
##bbobpptablesmanylegendfixed## @@ -273,7 +272,6 @@ the rank-sum test) when compared to all other algorithms of the table, with p = 0.05 or p = 10−k when the number k following the star is larger than 1, with Bonferroni correction by the number of functions (24). A ↓ indicates the same tested against the best algorithm from BBOB 2009. Best results are printed in bold. - ??COCOVERSION??
##bbobppscatterlegendfixed## @@ -305,7 +303,7 @@ (box), 10-90%-ile (caps), and minimum and maximum ERT loss ratio (points). The vertical line gives the maximal number of function evaluations in a single trial in this function subset. See also - the following figure for results on each function subgroup.??COCOVERSION?? + the following figure for results on each function subgroup.
##bbobloglossfigurecaptionfixed## @@ -396,7 +394,7 @@ the rank-sum test) compared to the best algorithm from BBOB 2016, with p = 0.05 or p = 10−k when the number k > 1 is following the ↓ symbol, with Bonferroni correction by the number of - functions (55).??COCOVERSION?? + functions (55).
##bbobpptablesmanylegendbiobjfixed## @@ -415,7 +413,6 @@ the rank-sum test) when compared to all other algorithms of the table, with p = 0.05 or p = 10−k when the number k following the star is larger than 1, with Bonferroni correction by the number of functions (55). A ↓ indicates the same tested against the best algorithm from BBOB 2016. Best results are printed in bold. - ??COCOVERSION??
##bbobppscatterlegendbiobjfixed## @@ -447,7 +444,7 @@ (box), 10-90%-ile (caps), and minimum and maximum ERT loss ratio (points). The vertical line gives the maximal number of function evaluations in a single trial in this function subset. See also - the following figure for results on each function subgroup.??COCOVERSION?? + the following figure for results on each function subgroup.
##bbobloglossfigurecaptionbiobjfixed## @@ -541,7 +538,7 @@ the rank-sum test) compared to the best algorithm from BBOB 2016, with p = 0.05 or p = 10−k when the number k > 1 is following the ↓ symbol, with Bonferroni correction by the number of - functions (55).??COCOVERSION?? + functions (55).
##bbobpptablesmanylegendbiobjrlbased## @@ -559,7 +556,6 @@ the rank-sum test) when compared to all other algorithms of the table, with p = 0.05 or p = 10−k when the number k following the star is larger than 1, with Bonferroni correction by the number of functions (55). A ↓ indicates the same tested against the best algorithm from BBOB 2016. Best results are printed in bold. - ??COCOVERSION??
##bbobppscatterlegendbiobjrlbased## @@ -594,7 +590,7 @@ (box), 10-90%-ile (caps), and minimum and maximum ERT loss ratio (points). The vertical line gives the maximal number of function evaluations in a single trial in this function subset. See also - the following figure for results on each function subgroup.??COCOVERSION?? + the following figure for results on each function subgroup.
##bbobloglossfigurecaptionbiobjrlbased## @@ -700,7 +696,6 @@ the rank-sum test) when compared to all other algorithms of the table, with p = 0.05 or p = 10−k when the number k following the star is larger than 1, with Bonferroni correction by the number of functions (92). Best results are printed in bold. - ??COCOVERSION??
##bbobppscatterlegendbiobjextfixed## @@ -732,7 +727,7 @@ (box), 10-90%-ile (caps), and minimum and maximum ERT loss ratio (points). The vertical line gives the maximal number of function evaluations in a single trial in this function subset. See also - the following figure for results on each function subgroup.??COCOVERSION?? + the following figure for results on each function subgroup.
##bbobloglossfigurecaptionbiobjextfixed## @@ -838,7 +833,6 @@ the rank-sum test) when compared to all other algorithms of the table, with p = 0.05 or p = 10−k when the number k following the star is larger than 1, with Bonferroni correction by the number of functions (48). A ↓ indicates the same tested against . Best results are printed in bold. - ??COCOVERSION??
##bbobppscatterlegendconstrainedfixed## @@ -870,7 +864,7 @@ (box), 10-90%-ile (caps), and minimum and maximum ERT loss ratio (points). The vertical line gives the maximal number of function evaluations in a single trial in this function subset. See also - the following figure for results on each function subgroup.??COCOVERSION?? + the following figure for results on each function subgroup.
##bbobloglossfigurecaptionconstrainedfixed## @@ -973,7 +967,6 @@ the rank-sum test) when compared to all other algorithms of the table, with p = 0.05 or p = 10−k when the number k following the star is larger than 1, with Bonferroni correction by the number of functions (24). Best results are printed in bold. - ??COCOVERSION??
##bbobppscatterlegendlargescalefixed## @@ -1005,7 +998,7 @@ (box), 10-90%-ile (caps), and minimum and maximum ERT loss ratio (points). The vertical line gives the maximal number of function evaluations in a single trial in this function subset. See also - the following figure for results on each function subgroup.??COCOVERSION?? + the following figure for results on each function subgroup.
##bbobloglossfigurecaptionlargescalefixed## @@ -1108,7 +1101,6 @@ the rank-sum test) when compared to all other algorithms of the table, with p = 0.05 or p = 10−k when the number k following the star is larger than 1, with Bonferroni correction by the number of functions (24). Best results are printed in bold. - ??COCOVERSION??
##bbobppscatterlegendmixintfixed## @@ -1140,7 +1132,7 @@ (box), 10-90%-ile (caps), and minimum and maximum ERT loss ratio (points). The vertical line gives the maximal number of function evaluations in a single trial in this function subset. See also - the following figure for results on each function subgroup.??COCOVERSION?? + the following figure for results on each function subgroup.
##bbobloglossfigurecaptionmixintfixed## @@ -1243,7 +1235,6 @@ the rank-sum test) when compared to all other algorithms of the table, with p = 0.05 or p = 10−k when the number k following the star is larger than 1, with Bonferroni correction by the number of functions (24). Best results are printed in bold. - ??COCOVERSION??
##bbobppscatterlegendbiobjmixintfixed## @@ -1275,7 +1266,7 @@ (box), 10-90%-ile (caps), and minimum and maximum ERT loss ratio (points). The vertical line gives the maximal number of function evaluations in a single trial in this function subset. See also - the following figure for results on each function subgroup.??COCOVERSION?? + the following figure for results on each function subgroup.
##bbobloglossfigurecaptionbiobjmixintfixed## @@ -1293,5 +1284,5 @@ TEX by TTH, -version 4.08.
On 30 Jan 2020, 13:26. +version 4.08.
On 21 Jan 2021, 23:35. diff --git a/code-postprocessing/cocopp/old_ranksumtest.py b/code-postprocessing/cocopp/old_ranksumtest.py deleted file mode 100644 index 15162e3e5..000000000 --- a/code-postprocessing/cocopp/old_ranksumtest.py +++ /dev/null @@ -1,100 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- - -"""Stats including rank-sum test for small sample and correct tied ranks. -Author: Sturla Molden -http://mail.scipy.org/pipermail/scipy-user/2009-February/019759.html -""" - -import numpy as np - -import scipy -import scipy.special -zprob = scipy.special.ndtr - -def ranksumtest(x, y): - """ - Wilcoxon rank sum test - - Returns: - W-statistic - Z-statistic - one-tailed p-value, asymptotic approximation - one-tailed p-value, Monte Carlo approximation - - Corrected for ties. - """ - - x,y = map(np.asarray, (x, y)) - n1 = len(x) - n2 = len(y) - alldata = np.concatenate((x,y)) - ranked = rankdata(alldata) - x = ranked[:n1] - y = ranked[n1:] - w = np.sum(x,axis=0) - - def montecarlo(): - shuffle = np.random.shuffle - a = np.zeros(1000) - shuffle(ranked) # bug in numpy: the first shuffle doesn't work - for i in range(1000): - shuffle(ranked) - a[i] = np.sum(ranked[:n1],axis=0) - return np.sum(a >= w) / 1000.0 - - def aymptotic_p(): - expected = n1*(n1+n2+1) / 2.0 - z = (w - expected) / np.sqrt(n1*n2*(n1+n2+1)/12.0) - return 1.0 - zprob(z), z - - def aymptotic_p_ties(): - t = [] - _t = 0 - for r in ranked: - if r % 1: - _t += 1 - else: - if _t: - t.append(_t) - _t = 0 - if _t: t.append(_t) - t = np.asarray(t) - expected = n1*(n1+n2+1) / 2.0 - tcorr = np.sum((t-1)*t*(t+1))/float((n1+n2)*(n1+n2-1)) - z = (w - expected) / np.sqrt(n1*n2*(n1+n2+1-tcorr)/12.0) - return 1.0 - zprob(z), z - - p_mc = montecarlo() - if np.any(ranked % 1): - p, z = aymptotic_p_ties() - else: - p, z = aymptotic_p() - return w, z, p, p_mc - - - -def rankdata(a): - a = np.ravel(a) - n = len(a) - svec, ivec = fastsort(a) - sumranks = 0 - dupcount = 0 - newarray = np.zeros(n, float) - for i in range(n): - sumranks += i - dupcount += 1 - if i==n-1 or svec[i] != svec[i+1]: - averank = sumranks / float(dupcount) + 1 - for j in range(i-dupcount+1,i+1): - newarray[ivec[j]] = averank - sumranks = 0 - dupcount = 0 - return newarray - - - -def fastsort(a): - it = np.argsort(a) - as_ = a[it] - return as_, it diff --git a/code-postprocessing/cocopp/ppfig.py b/code-postprocessing/cocopp/ppfig.py index 6e0c7ac30..c7c67d6e5 100644 --- a/code-postprocessing/cocopp/ppfig.py +++ b/code-postprocessing/cocopp/ppfig.py @@ -457,7 +457,7 @@ def write_dimension_links(dimension, dimensions, index): def write_tables(f, caption_string_format, best_alg_exists, html_key, legend_key, dimensions): - current_header = 'Table showing the ERT in number of function evaluations' + current_header = 'Table showing the ERT in number of evaluations' if best_alg_exists: current_header += ' divided by the best ERT measured during BBOB-2009' diff --git a/code-postprocessing/cocopp/ppfigdim.py b/code-postprocessing/cocopp/ppfigdim.py index b9b6804db..c64a59caf 100644 --- a/code-postprocessing/cocopp/ppfigdim.py +++ b/code-postprocessing/cocopp/ppfigdim.py @@ -567,7 +567,11 @@ def main(dsList, _valuesOfInterest, outputdir): beautify(axesLabel=False) # display number of instances in data and used targets type: - display_text = '%d instances\n' % len(((dictFunc[func][0]).instancenumbers)) + if all(d.instancenumbers == dictFunc[func][0].instancenumbers + for d in dictFunc[func]): # all the same? + display_text = '%d instances\n' % len(((dictFunc[func][0]).instancenumbers)) + else: + display_text = 'instances %s' % [d.instancenumbers for d in dictFunc[func]] display_text += _valuesOfInterest.short_info plt.text(plt.xlim()[0], plt.ylim()[0], display_text, fontsize=14, horizontalalignment="left", diff --git a/code-postprocessing/cocopp/pplogloss.py b/code-postprocessing/cocopp/pplogloss.py index 32c72c1a2..9f0ceb5e6 100644 --- a/code-postprocessing/cocopp/pplogloss.py +++ b/code-postprocessing/cocopp/pplogloss.py @@ -138,7 +138,7 @@ def table_caption(): (box), 10-90\%-ile (caps), and minimum and maximum \ERT\ loss ratio (points). The vertical line gives the maximal number of function evaluations in a single trial in this function subset. See also - Figure~\ref{fig:ERTlogloss} for results on each function subgroup.\cocoversion + Figure~\ref{fig:ERTlogloss} for results on each function subgroup. """ table_caption = captions.replace(table_caption) diff --git a/code-postprocessing/cocopp/pptable.py b/code-postprocessing/cocopp/pptable.py index cb75a147b..12e445ddc 100644 --- a/code-postprocessing/cocopp/pptable.py +++ b/code-postprocessing/cocopp/pptable.py @@ -77,7 +77,7 @@ def get_table_caption(): the rank-sum test) compared to !!THE-REF-ALG!!, with $p = 0.05$ or $p = 10^{-k}$ when the number $k > 1$ is following the $\downarrow$ symbol, with Bonferroni correction by the number of - functions (!!TOTAL-NUM-OF-FUNCTIONS!!).\cocoversion + functions (!!TOTAL-NUM-OF-FUNCTIONS!!). """ table_caption_no_reference_algorithm = r"""% Expected runtime (\ERT) to reach given targets, measured diff --git a/code-postprocessing/cocopp/rungeneric.py b/code-postprocessing/cocopp/rungeneric.py index fcd47a1a7..8f88faf29 100644 --- a/code-postprocessing/cocopp/rungeneric.py +++ b/code-postprocessing/cocopp/rungeneric.py @@ -28,6 +28,8 @@ from .compall import ppfigs import matplotlib.pyplot as plt +matplotlib.rcParams['pdf.fonttype'] = 42 +matplotlib.rcParams['ps.fonttype'] = 42 matplotlib.use('Agg') # To avoid window popup and use without X forwarding __all__ = ['main'] @@ -307,6 +309,9 @@ def main(argv=None): raise Usage('Expect a valid float for flag crafting-effort.') elif o == "--include-fonts": plt.rc('pdf', fonttype=42) + plt.rcParams['pdf.fonttype'] = 42 + matplotlib.rcParams['pdf.fonttype'] = 42 + matplotlib.rcParams['ps.fonttype'] = 42 elif o == "--tab-only": genericsettings.isFig = False genericsettings.isRLDistr = False @@ -407,8 +412,8 @@ def main(argv=None): ['\\providecommand{\\numofalgs}{%d}' % len(args)] ) toolsdivers.prepend_to_file(latex_commands_filename, - ['\\providecommand{\\cocoversion}{\\hspace{\\textwidth}\\scriptsize\\sffamily{}' + - '\\color{Gray}Data produced with COCO %s}' % (toolsdivers.get_version_label(None))] + ['\\providecommand{\\cocoversion}{{\\scriptsize\\sffamily{}' + + '\\color{Gray}Data produced with COCO %s}}' % (toolsdivers.get_version_label(None))] ) toolsdivers.prepend_to_file(latex_commands_filename, ['\\providecommand{\\bbobecdfcaptionsinglefunctionssingledim}[1]{', diff --git a/code-postprocessing/cocopp/test.py b/code-postprocessing/cocopp/test.py index 562b63ab8..b02d10a4b 100644 --- a/code-postprocessing/cocopp/test.py +++ b/code-postprocessing/cocopp/test.py @@ -139,7 +139,7 @@ def retrieve_algorithm(data_path, folder_name, algorithm_name, file_name=None): replaced by `cocopp.archiving.get` or `cocopp.archiving.official_archives` or `cocopp.archives.all`)""" algorithm_file = join_path(data_path, file_name if file_name else algorithm_name) if not os.path.exists(algorithm_file): - data_url = 'https://coco.gforge.inria.fr/data-archive/%s/%s' % (folder_name, algorithm_name) + data_url = 'https://numbbo.github.io/data-archive/data-archive/%s/%s' % (folder_name, algorithm_name) urlretrieve(data_url, algorithm_file) diff --git a/code-postprocessing/cocopp/testbedsettings.py b/code-postprocessing/cocopp/testbedsettings.py index 755aae55b..57d7ae750 100644 --- a/code-postprocessing/cocopp/testbedsettings.py +++ b/code-postprocessing/cocopp/testbedsettings.py @@ -762,6 +762,9 @@ class GECCOBBOBBiObjMixintTestbed(GECCOBiObjExtBBOBTestbed): instancesOfInterest={1: 1, 2: 1, 3: 1, 4: 1, 5: 1, 6: 1, 7: 1, 8: 1, 9: 1, 10: 1, 11: 1, 12: 1, 13: 1, 14: 1, 15: 1}, scenario=scenario_biobjmixintfixed, + plots_on_main_html_page=['pprldmany_05D_noiselessall.svg', 'pprldmany_10D_noiselessall.svg', + 'pprldmany_20D_noiselessall.svg', 'pprldmany_40D_noiselessall.svg', + 'pprldmany_80D_noiselessall.svg', 'pprldmany_160D_noiselessall.svg'], ) def __init__(self, targetValues): @@ -773,5 +776,19 @@ def __init__(self, targetValues): self.instantiate_attributes(targetValues, [key]) def filter(self, dsl): - ''' Does nothing on dsl (overriding the filter method of the superclass). ''' + """ Checks if only data from the bbob-biobj-mixint + suite is included in dsl. If also other test suite + data sets is detected, an error is given. + + Returns the filtered list as a flat list. + """ + + # find out whether we have to do something: + for ds in dsl: + if not (ds.suite_name == 'bbob-biobj-mixint'): + raise ValueError("Data from %s suite is not " + "compatible with data from " + "the bbob-biobj-mixint " + "suites" % str(ds.suite_name)) + return dsl diff --git a/code-postprocessing/latex-templates/bbob.bib b/code-postprocessing/latex-templates/bbob.bib index 670d58f7a..fedc5807a 100644 --- a/code-postprocessing/latex-templates/bbob.bib +++ b/code-postprocessing/latex-templates/bbob.bib @@ -58,7 +58,10 @@ @ARTICLE{hansen2020cocoplat in a Black-Box Setting}, journal = {Optimization Methods and Software}, doi = {https://doi.org/10.1080/10556788.2020.1808977}, - year = 2020 + pages = {114--144}, + issue = {1}, + volume = {36}, + year = 2021 } @article{hansen2016exp, @@ -1100,7 +1103,7 @@ @TECHREPORT{wp200902_2010 year = {2010}, number = {2009/21 }, country = {Austria}, - url = {http://coco.gforge.inria.fr/bbob2010-downloads} + url = {http://numbbo.github.io/gforge/bbob2010-downloads} } @TECHREPORT{wp200901, @@ -1150,7 +1153,7 @@ @TECHREPORT{finck2010sof {P}aris {S}ud - {P}aris {XI} }, keywords = {optimization, benchmarking, black-box, software}, language = {Anglais}, - url = {http://coco.gforge.inria.fr/bbob2010-downloads} + url = {http://numbbo.github.io/gforge/bbob2010-downloads} } @ARTICLE{fletcher1970bfgs, @@ -1202,7 +1205,7 @@ @TECHREPORT{hansen2012exp institution = {INRIA}, year = {2012}, country = {France}, - url = {http://coco.gforge.inria.fr/bbob2012-downloads} + url = {http://numbbo.github.io/gforge/bbob2012-downloads} } @TECHREPORT{hansen2010exp, @@ -1213,7 +1216,7 @@ @TECHREPORT{hansen2010exp year = {2010}, number = {RR-7215}, country = {France}, - url = {http://coco.gforge.inria.fr/bbob2010-downloads} + url = {http://numbbo.github.io/gforge/bbob2010-downloads} } @TECHREPORT{hansen2009exp, @@ -1297,7 +1300,7 @@ @TECHREPORT{hansen2010noi number = {RR-6869}, note = {Updated February 2010}, country = {France}, - url = {http://coco.gforge.inria.fr/bbob2010-downloads} + url = {http://numbbo.github.io/gforge/bbob2010-downloads} } @TECHREPORT{hansen2012fun, @@ -1309,7 +1312,7 @@ @TECHREPORT{hansen2012fun number = {RR-6829}, note = {Updated February 2010}, country = {France}, - url = {http://coco.gforge.inria.fr/bbob2012-downloads} + url = {http://numbbo.github.io/gforge/bbob2012-downloads} } @TECHREPORT{hansen2012noi, @@ -1321,7 +1324,7 @@ @TECHREPORT{hansen2012noi number = {RR-6869}, note = {Updated February 2010}, country = {France}, - url = {http://coco.gforge.inria.fr/bbob2012-downloads} + url = {http://numbbo.github.io/gforge/bbob2012-downloads} } @INPROCEEDINGS{1830768, @@ -1392,11 +1395,11 @@ @CONFERENCE{hoos1998eva @MISC{Hornby:2009, author = {Hornby, Gregory S.}, title = {The Age-Layered Population Structure ({ALPS}) Evolutionary Algorithm}, - howpublished = {\url{http://coco.gforge.inria.fr/doku.php?id=bbob-2009-results}}, + howpublished = {\url{https://numbbo.github.io/data-archive/bbob/}}, month = {July}, year = {2009}, note = {Noiseless testbed}, - url = {http://coco.gforge.inria.fr/doku.php?id=bbob-2009-results} + url = {https://numbbo.github.io/data-archive/bbob/} } @INPROCEEDINGS{Hornby:2009:steady, @@ -1416,11 +1419,11 @@ @INPROCEEDINGS{Hornby:2009:steady @MISC{Hornby:2009a, author = {Hornby, Gregory S.}, title = {The Age-Layered Population Structure ({ALPS}) Evolutionary Algorithm}, - howpublished = {\url{http://coco.gforge.inria.fr/doku.php?id=bbob-2009-results}}, + howpublished = {\url{https://numbbo.github.io/data-archive/bbob/}}, month = {July}, year = {2009}, note = {Noisy testbed}, - url = {http://coco.gforge.inria.fr/doku.php?id=bbob-2009-results} + url = {https://numbbo.github.io/data-archive/bbob/} } @MISC{Huyer:2009, diff --git a/code-postprocessing/latex-templates/templateBBOBLSarticle.tex b/code-postprocessing/latex-templates/templateBBOBLSarticle.tex index b6502ba53..80632b1df 100644 --- a/code-postprocessing/latex-templates/templateBBOBLSarticle.tex +++ b/code-postprocessing/latex-templates/templateBBOBLSarticle.tex @@ -1,41 +1,7 @@ \documentclass[sigconf]{acmart} -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Packages -\usepackage{booktabs} % For formal tables -\usepackage{graphicx} -\usepackage{rotating} -\usepackage{tabularx} -\usepackage{xspace} -\usepackage{float} -\usepackage{xstring} % for string operations -\usepackage{wasysym} % Table legend with symbols input from post-processing -\usepackage{MnSymbol} % Table legend with symbols input from post-processing -\usepackage{ifthen} - -% Copyright -%\setcopyright{none} -%\setcopyright{acmcopyright} -%\setcopyright{acmlicensed} -\setcopyright{rightsretained} -%\setcopyright{usgov} -%\setcopyright{usgovmixed} -%\setcopyright{cagov} -%\setcopyright{cagovmixed} - - -% DOI -\acmDOI{10.1145/123_4} - -% ISBN -\acmISBN{123-4567-24-567/18/07} - -%Conference -\acmConference[GECCO '19]{the Genetic and Evolutionary Computation Conference 2019}{July 13--17, 2019}{Prague, Czech Republic} -\acmYear{2019} -\copyrightyear{2019} - -\acmPrice{15.00} +% include preamble: +\include{templatepreamble.tex} @@ -73,44 +39,11 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -% pre-defined commands -\newcommand{\DIM}{\ensuremath{\mathrm{DIM}}} -\newcommand{\ERT}{\ensuremath{\mathrm{ERT}}} -\newcommand{\FEvals}{\ensuremath{\mathrm{FEvals}}} -\newcommand{\nruns}{\ensuremath{\mathrm{Nruns}}} -\newcommand{\Dfb}{\ensuremath{\Delta f_{\mathrm{best}}}} -\newcommand{\Df}{\ensuremath{\Delta f}} -\newcommand{\nbFEs}{\ensuremath{\mathrm{\#FEs}}} -\newcommand{\fopt}{\ensuremath{f_\mathrm{opt}}} -\newcommand{\ftarget}{\ensuremath{f_\mathrm{t}}} -\newcommand{\CrE}{\ensuremath{\mathrm{CrE}}} -\newcommand{\change}[1]{{\color{red} #1}} -\newcommand{\TODO}[1]{{\color{orange} !!! #1 !!!}} -\newcommand{\bbobls}{{\ttfamily bbob-largescale}\xspace} -\newcommand{\rot}[2][2.5]{ - \hspace*{-3.5\baselineskip}% - \begin{rotate}{90}\hspace{#1em}#2\vspace{0.5em} - \end{rotate}} -\newcommand{\includeperfprof}[1]{% include and annotate at the side - \input{\bbobdatapath\algsfolder #1}% - \includegraphics[height=0.24\textheight]{#1}% - %\raisebox{.12\textheight}{ - %\parbox[b][.24\textheight]{.0868\textwidth}{\begin{scriptsize} - % \perfprofsidepanel % this is "\algaperfprof \vfill \algbperfprof \vfill" etc - %\end{scriptsize}} - %} -} - -%%%%%%%%%%%%%%%%%%%%%% END OF PREAMBLE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - \begin{document} \title{Black-Box Optimization Benchmarking Template for the Comparison of Algorithms on the \bbobls Testbed} \renewcommand{\shorttitle}{Template to Compare Algorithms on the \bbobls Testbed} -\titlenote{Submission deadline: April 3rd.} -%Camera-ready paper due April 24th.}} \subtitle{Draft version} @@ -250,7 +183,7 @@ \section{Results} }{}}} %% The experiments were performed with COCO \cite{hansen2020cocoplat}, version -\change{2.4}, the plots were produced with version \change{2.4}. +\change{\version}, the plots were produced with version \change{\version}. The \textbf{expected runtime (ERT)}, used in the figures and tables, depends on a given target function value, $\ftarget=\fopt+\Df$, and is @@ -365,7 +298,7 @@ \section{Results} \pptablefooter \end{minipage}} -\caption[Table of ERTs]{\label{tab:ERTs80}\bbobpptablecaption{dimension $80$} +\caption[Table of ERTs]{\label{tab:ERTs80}\bbobpptablecaption{dimension $80$} \cocoversion } \end{table*} @@ -420,7 +353,7 @@ \section{Results} \end{minipage}} -\caption[Table of ERTs]{\label{tab:ERTs320}\bbobpptablecaption{dimension $320$} +\caption[Table of ERTs]{\label{tab:ERTs320}\bbobpptablecaption{dimension $320$} \cocoversion } \end{table*} @@ -709,7 +642,7 @@ \section{Results} \end{minipage}} \caption{\label{tab:ERTs80} -\bbobpptablesmanylegend{dimension $80$} +\bbobpptablesmanylegend{dimension $80$} \cocoversion } \end{table*} @@ -763,7 +696,7 @@ \section{Results} \end{minipage}} \caption{\label{tab:ERTs320} -\bbobpptablesmanylegend{dimension $320$} +\bbobpptablesmanylegend{dimension $320$} \cocoversion } \end{table*} diff --git a/code-postprocessing/latex-templates/templateBBOBarticle.tex b/code-postprocessing/latex-templates/templateBBOBarticle.tex index fe604150a..bd2fbcdb0 100644 --- a/code-postprocessing/latex-templates/templateBBOBarticle.tex +++ b/code-postprocessing/latex-templates/templateBBOBarticle.tex @@ -1,75 +1,55 @@ \documentclass[sigconf]{acmart} +% +% LaTeX template for visualizing the performance of +% optimization algorithms, that were run on the +% bbob test suite of COCO. Any number of +% algorithms should work with this template. -\usepackage{booktabs} % For formal tables -\usepackage{graphicx} -\usepackage{rotating} -\definecolor{Gray}{gray}{0.6} +% include preamble: +\include{templatepreamble.tex} -% Copyright -%\setcopyright{none} -%\setcopyright{acmcopyright} -%\setcopyright{acmlicensed} -\setcopyright{rightsretained} -%\setcopyright{usgov} -%\setcopyright{usgovmixed} -%\setcopyright{cagov} -%\setcopyright{cagovmixed} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%% TO BE EDITED %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% location of pictures files +\newcommand{\bbobdatapath}{ppdata-bbob-many/} % change default output folder of COCO if desired -% DOI -\acmDOI{10.1145/123_4} +% Algorithm names as they appear in the tables, uncomment and adapt if necessary +% \newcommand{\algAtables}{ALGO1} % first argument in the post-processing +% \newcommand{\algBtables}{ALGO2} % second argument in the post-processing +% \newcommand{\algCtables}{ALGO3} % third argument in the post-processing +% \newcommand{\algDtables}{ALGO4} % forth argument in the post-processing +% ... -% ISBN -\acmISBN{123-4567-24-567/18/07} -%Conference -\acmConference[GECCO '19]{the Genetic and Evolutionary Computation Conference 2019}{July 13--17, 2019}{Prague, Czech Republic} -\acmYear{2019} -\copyrightyear{2019} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% read in data and deal with the different number of algorithms: +\input{\bbobdatapath cocopp_commands.tex} -\acmPrice{15.00} +\ifthenelse{\equal{\numofalgs}{1}}{ + \graphicspath{{\bbobdatapath\algfolder}}}{ + \graphicspath{{\bbobdatapath\algsfolder}} +} +\ifthenelse{\isundefined{\algorithmA}}{\newcommand{\algorithmA}{\algname}}{} +%\ifthenelse{\isundefined{\algorithmA}{\newcommand{\algorithmA}{\change{MY-ALGORITHM-NAME}}}{} % better use the previous line? +%% -%%%%%%%%%%%%%%%%%%%%%% END OF PREAMBLE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%% TO BE EDITED %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% rungeneric.py writes data into a subfolder of ppdata -\newcommand{\bbobdatapath}{ppdata/} % change default output folder of COCO if desired -\input{\bbobdatapath cocopp_commands.tex} % provide default of algname and algfolder -% \renewcommand{\algname}{MYNAME} % name of algorithm as it should appear in the text -% \renewcommand{\algfolder}{ABC/} % subfolder of \bbobdatapath for processed algorithm %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\graphicspath{{\bbobdatapath\algfolder}} - -\newcommand{\DIM}{\ensuremath{\mathrm{DIM}}} -\newcommand{\ERT}{\ensuremath{\mathrm{ERT}}} -\newcommand{\FEvals}{\ensuremath{\mathrm{FEvals}}} -\newcommand{\nruns}{\ensuremath{\mathrm{Nruns}}} -\newcommand{\Dfb}{\ensuremath{\Delta f_{\mathrm{best}}}} -\newcommand{\Df}{\ensuremath{\Delta f}} -\newcommand{\nbFEs}{\ensuremath{\mathrm{\#FEs}}} -\newcommand{\fopt}{\ensuremath{f_\mathrm{opt}}} -\newcommand{\ftarget}{\ensuremath{f_\mathrm{t}}} -\newcommand{\CrE}{\ensuremath{\mathrm{CrE}}} -\newcommand{\change}[1]{{\color{red} #1}} \begin{document} - -\title{Black-Box Optimization Benchmarking Template for Noiseless Function -Testbed} -\titlenote{Submission deadline: April 3rd.} -%Camera-ready paper due April 24th.}} +\title{Black-Box Optimization Benchmarking Template for the Comparison of Algorithms on the \bbob Test Suite} +\renewcommand{\shorttitle}{Black-Box Optimization Benchmarking Template for \bbob Test Suite} \subtitle{Draft version} - \author{Firstname Lastname} %\authornote{tba if needed} %\orcid{1234-5678-9012} @@ -175,26 +155,63 @@ % \section{Algorithm Presentation} % % \section{Experimental Procedure} +% % \subsection{Parameter Tuning} % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{CPU Timing} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % note that the following text is just a proposal and can/should be changed to your needs: -In order to evaluate the CPU timing of the algorithm, we have run the \change{MY-ALGORITHM-NAME} on the \change{bbob test suite \cite{hansen2009fun}} with restarts for a maximum budget equal to \change{$400 (D + 2)$} function evaluations according to \cite{hansen2016exp}. The \change{C/Java/Python/Matlab/Octave} code was run on a \change{Mac Intel(R) Core(TM) i5-2400S CPU @ 2.50GHz} with \change{1} processor and \change{4} cores \change{and (compile) options xxx}. The time per function evaluation for dimensions 2, 3, 5, 10, 20\change{, 40} equals \change{$x.x$}, \change{$x.x$}, \change{$x.x$}, \change{$xx$}, \change{$xxx$}\change{, and $xxx$} seconds respectively. +In order to evaluate the CPU timing of the algorithm, we have run the \change{\algorithmA} with restarts on the entire \bbob test suite \cite{hansen2009fun} for \change{$100n$} function evaluations according to \cite{hansen2016exp}. +%\change{replace the previous sentence with ``on the function $f_{8}$ with restarts for at least 30 seconds and until a maximum budget equal to \change{$400 (n + 2)$} is reached.'' in case you use the old code base} + The \change{C/Java/Matlab/Octave/Python} code was run on a \change{Mac Intel(R) Core(TM) i5-2400S CPU @ 2.50GHz} with \change{1} processor and \change{4} cores \change{and (compile) options xxx}. The time per function evaluation for dimensions 2, 3, 5, 10, 20\change{, 40} equals \change{$x.x$}, \change{$x.x$}, \change{$x.x$}, \change{$xx$}, \change{$xxx$}\change{, and $xxx$} seconds respectively. +\ifthenelse{\equal{\numofalgs}{1}}{}{ +\change{repeat the above for any algorithm tested} +} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{Results} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -Results of \algname\ from experiments according to \cite{hansen2016exp} and \cite{hansen2016perfass} on the benchmark -functions given in \cite{wp200901_2010,hansen2012fun} are presented in -Figures~\ref{fig:ERTgraphs}, \ref{fig:RLDs}, \ref{tab:ERTloss}, and \ref{fig:ERTlogloss} and in -Tables~\ref{tab:ERTs}. The experiments were performed with COCO \cite{hansen2020cocoplat}, version \change{2.4}, the plots were produced with version \change{2.4}. +Results from experiments according to \cite{hansen2016exp} and +\cite{hansen2016perfass} on the benchmark functions given in +{\cite{wp200901_2010}} are presented in +%% +\ifthenelse{\equal{\numofalgs}{1}}{ +Figures~\ref{fig:ERTgraphs} and \ref{fig:ECDFsingleOne} and Tables~\ref{tab:ERTs05} and \ref{tab:ERTs20}. +%, \ref{tab:ERTloss}, and \ref{fig:ERTlogloss}. +}{\ifthenelse{\equal{\numofalgs}{2}}{ +Figures~\ref{fig:scaling}, \ref{fig:ECDFs05D}, \ref{fig:ECDFs20D}, \ref{fig:ECDFsingleOne}, and \ref{fig:scatterplots} and Tables~\ref{tab:ERTs05} and \ref{tab:ERTs20}. +}{\ifthenelse{\(\numofalgs > 2\)}{ +Figures~\ref{fig:scaling}, \ref{fig:ECDFs}, and \ref{fig:ECDFsingleOne} and Tables~\ref{tab:ERTs05} and \ref{tab:ERTs20}. +}}{}} +%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +The experiments were performed with COCO \cite{hansen2020cocoplat}, version +\change{\version}, the plots were produced with version \change{\version}. + +The \textbf{expected runtime (ERT)}, used in the %figures and +tables, +depends on a given target precision, $\Itarget=\fopt+\Df$, and is +computed over all relevant trials as the number of function +evaluations executed during each trial while the best function value +did not reach \ftarget, summed over all trials and divided by the +number of trials that actually reached \ftarget\ +\cite{hansen2016exp,price1997dev}. +\textbf{Statistical significance} is tested with the rank-sum test for a given +target $\Delta\ftarget$ using, for each trial, +either the number of needed function evaluations to reach +$\ftarget$ (inverted and multiplied by $-1$), or, if the target +was not reached, the best $\Df$-value achieved, measured only up to +the smallest number of overall function evaluations for any +unsuccessful trial under consideration. + + + +\ifthenelse{\equal{\numofalgs}{1}}{ + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Scaling of ERT with dimension @@ -233,7 +250,137 @@ \section{Results} } \end{figure*} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% ECDFs per group + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\begin{figure*} +\centering +\begin{tabular}{c@{\hspace*{0.01\textwidth}}c@{\hspace*{0.01\textwidth}}c} +{\sffamily separable fcts}\hspace{1cm} & {\sffamily moderate fcts}\hspace{1cm} & \hspace{-1cm}{\sffamily ill-conditioned fcts}\\ +\includegraphics[width=0.32\textwidth]{pprldmany-single-functions/pprldmany_separ}& +\includegraphics[width=0.32\textwidth]{pprldmany-single-functions/pprldmany_lcond}& +\includegraphics[width=0.32\textwidth]{pprldmany-single-functions/pprldmany_hcond}\\[-0.2em] +{\sffamily multi-modal fcts}\hspace{1cm} & {\sffamily weakly structured multi-modal fcts}\hspace{1cm} & \hspace{-1cm}{\sffamily all fcts}\\ +\includegraphics[width=0.32\textwidth]{pprldmany-single-functions/pprldmany_multi}& +\includegraphics[width=0.32\textwidth]{pprldmany-single-functions/pprldmany_mult2}& +\includegraphics[width=0.32\textwidth]{pprldmany-single-functions/pprldmany} +\vspace*{-1ex} +\end{tabular} + \caption{\label{fig:ECDFgroups} + \bbobecdfcaptionallgroups +} +\end{figure*} + + + + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% ECDFs per function + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\begin{figure*} +\centering +\begin{tabular}{l@{\hspace*{-0.00\textwidth}}l@{\hspace*{0.01\textwidth}}l@{\hspace*{-0.00\textwidth}}l} +\includegraphics[width=0.24\textwidth]{pprldmany-single-functions/pprldmany_f001}& +\includegraphics[width=0.24\textwidth]{pprldmany-single-functions/pprldmany_f002}& +\includegraphics[width=0.24\textwidth]{pprldmany-single-functions/pprldmany_f003}& +\includegraphics[width=0.24\textwidth]{pprldmany-single-functions/pprldmany_f004}\\[-0.2em] +\includegraphics[width=0.24\textwidth]{pprldmany-single-functions/pprldmany_f005}& +\includegraphics[width=0.24\textwidth]{pprldmany-single-functions/pprldmany_f006}& +\includegraphics[width=0.24\textwidth]{pprldmany-single-functions/pprldmany_f007}& +\includegraphics[width=0.24\textwidth]{pprldmany-single-functions/pprldmany_f008}\\[-0.2em] +\includegraphics[width=0.24\textwidth]{pprldmany-single-functions/pprldmany_f009}& +\includegraphics[width=0.24\textwidth]{pprldmany-single-functions/pprldmany_f010}& +\includegraphics[width=0.24\textwidth]{pprldmany-single-functions/pprldmany_f011}& +\includegraphics[width=0.24\textwidth]{pprldmany-single-functions/pprldmany_f012}\\[-0.2em] +\includegraphics[width=0.24\textwidth]{pprldmany-single-functions/pprldmany_f013}& +\includegraphics[width=0.24\textwidth]{pprldmany-single-functions/pprldmany_f014}& +\includegraphics[width=0.24\textwidth]{pprldmany-single-functions/pprldmany_f015}& +\includegraphics[width=0.24\textwidth]{pprldmany-single-functions/pprldmany_f016}\\[-0.2em] +\includegraphics[width=0.24\textwidth]{pprldmany-single-functions/pprldmany_f017}& +\includegraphics[width=0.24\textwidth]{pprldmany-single-functions/pprldmany_f018}& +\includegraphics[width=0.24\textwidth]{pprldmany-single-functions/pprldmany_f019}& +\includegraphics[width=0.24\textwidth]{pprldmany-single-functions/pprldmany_f020}\\[-0.2em] +\includegraphics[width=0.24\textwidth]{pprldmany-single-functions/pprldmany_f021}& +\includegraphics[width=0.24\textwidth]{pprldmany-single-functions/pprldmany_f022}& +\includegraphics[width=0.24\textwidth]{pprldmany-single-functions/pprldmany_f023}& +\includegraphics[width=0.24\textwidth]{pprldmany-single-functions/pprldmany_f024} +\vspace*{-1ex} +\end{tabular} + \caption{\label{fig:ECDFsingleOne} + \bbobecdfcaptionsinglefunctionssingledim{$\!\!$s 2 to 40} +} +\end{figure*} + + + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +%% ERT loss ratios (figure and table) +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\begin{figure} +\centering +\parbox{0.48\columnwidth}{\centering 5-D}\hfill +\parbox{0.48\columnwidth}{\centering 20-D}\\ +\includegraphics[width=0.48\columnwidth]{pplogloss_05D_noiselessall}\hfill +\includegraphics[width=0.48\columnwidth]{pplogloss_20D_noiselessall}\\[2ex] +% +\input{\bbobdatapath\algfolder pploglosstable_05D_noiselessall}\\ +\input{\bbobdatapath\algfolder pploglosstable_20D_noiselessall} +\caption{\label{tab:ERTloss}% +\bbobloglosstablecaption{} +\cocoversion +} +\end{figure} + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +%% ERT loss ratios per function group +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\begin{figure} +\begin{tabular}{@{}l@{}@{}l@{}} +\multicolumn{1}{c}{5-D} & \multicolumn{1}{c}{20-D}\\ +\rot[2.8]{separable fcts} +\hspace*{-1.4mm} +\includegraphics[width=0.24\textwidth]{pplogloss_05D_separ} & +\includegraphics[width=0.24\textwidth]{pplogloss_20D_separ}\\ +\rot[2.7]{moderate fcts} +\hspace*{-1.4mm} +\includegraphics[width=0.24\textwidth]{pplogloss_05D_lcond} & +\includegraphics[width=0.24\textwidth]{pplogloss_20D_lcond}\\ +\rot[1.9]{ill-conditioned fcts} +\hspace*{-1.35mm} +\includegraphics[width=0.24\textwidth]{pplogloss_05D_hcond} & +\includegraphics[width=0.24\textwidth]{pplogloss_20D_hcond}\\ +\rot[2.5]{multi-modal fcts} +\hspace*{-1.3mm} +\includegraphics[width=0.24\textwidth]{pplogloss_05D_multi} & +\includegraphics[width=0.24\textwidth]{pplogloss_20D_multi}\\ +\rot[1.6]{weak structure fcts} +\hspace*{-1.4mm} +\includegraphics[width=0.24\textwidth]{pplogloss_05D_mult2} & +\includegraphics[width=0.24\textwidth]{pplogloss_20D_mult2} +\vspace*{-0.5ex} +\end{tabular} + \caption{\label{fig:ERTlogloss}% +\bbobloglossfigurecaption{} +} +\end{figure} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Table showing the expected runtime (ERT in number of function @@ -243,7 +390,7 @@ \section{Results} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \begin{table*}\tiny -%\hfill5-D\hfill~\\[1ex] +%\hfill10-D\hfill~\\[1ex] {\normalsize \color{red} \ifthenelse{\isundefined{\algorithmG}}{}{more than 6 algorithms: please split the tables below by hand until it fits to the page limits} } @@ -312,21 +459,26 @@ \section{Results} \end{minipage}} -\caption[Table of ERTs]{\label{tab:ERTs5}\bbobpptablecaption{dimension $5$} +\caption[Table of ERTs]{\label{tab:ERTs05}\bbobpptablecaption{dimension $5$} +\cocoversion } \end{table*} - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % Table showing the expected runtime (ERT in number of function -% evaluations) divided by the best ERT measured during BBOB-2009 (given in the +% evaluations) [divided by the best ERT measured during BBOB-2009] (given in the % first row of each cell) for functions $f_1$--$f_{24} for dimension 20$. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + \begin{table*}\tiny %\hfill20-D\hfill~\\[1ex] +{\normalsize \color{red} +\ifthenelse{\isundefined{\algorithmG}}{}{more than 6 algorithms: please split the tables below by hand until it fits to the page limits} +} \mbox{\begin{minipage}[t]{0.499\textwidth}\tiny \centering \pptableheader @@ -361,6 +513,7 @@ \section{Results} \hspace{0.002\textwidth} \begin{minipage}[t]{0.499\textwidth}\tiny \centering + \pptableheader \input{\bbobdatapath\algfolder pptable_f013_20D} @@ -390,135 +543,327 @@ \section{Results} \pptablefooter \end{minipage}} - + \caption[Table of ERTs]{\label{tab:ERTs20}\bbobpptablecaption{dimension $20$} +\cocoversion } \end{table*} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +}{} % end of 1 algorithm template + + + +\ifthenelse{\numofalgs > 1}{ + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Empirical cumulative distribution functions (ECDFs) per function group. +% Scaling of ERT with dimension %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\newcommand{\rot}[2][2.5]{ - \hspace*{-3.5\baselineskip}% - \begin{rotate}{90}\hspace*{#1em}#2\vspace{0.5em} - \end{rotate}} + \begin{figure*} -\begin{tabular}{l@{\hspace*{-0.00\textwidth}}l@{\hspace*{0.01\textwidth}}|l@{\hspace*{-0.00\textwidth}}l} -\multicolumn{2}{c}{$D=5$} & \multicolumn{2}{c}{$D=20$}\\[-0.5ex] -\rot[3]{all functions} -\includegraphics[width=0.2362\textwidth]{pprldistr_05D_noiselessall} & -\includegraphics[width=0.2362\textwidth]{ppfvdistr_05D_noiselessall} & -\includegraphics[width=0.2362\textwidth]{pprldistr_20D_noiselessall} & -\includegraphics[width=0.2362\textwidth]{ppfvdistr_20D_noiselessall} \\[-0.2em] -\rot[2.9]{separable fcts} -\includegraphics[width=0.2362\textwidth]{pprldistr_05D_separ} & -\includegraphics[width=0.2362\textwidth]{ppfvdistr_05D_separ} & -\includegraphics[width=0.2362\textwidth]{pprldistr_20D_separ} & -\includegraphics[width=0.2362\textwidth]{ppfvdistr_20D_separ} \\[-0.2em] -\rot[1.45]{misc.\ moderate fcts} -\includegraphics[width=0.2362\textwidth]{pprldistr_05D_lcond} & -\includegraphics[width=0.2362\textwidth]{ppfvdistr_05D_lcond} & -\includegraphics[width=0.2362\textwidth]{pprldistr_20D_lcond} & -\includegraphics[width=0.2362\textwidth]{ppfvdistr_20D_lcond} \\[-0.2em] -\rot[1.5]{ill-conditioned fcts} -\includegraphics[width=0.2362\textwidth]{pprldistr_05D_hcond} & -\includegraphics[width=0.2362\textwidth]{ppfvdistr_05D_hcond} & -\includegraphics[width=0.2362\textwidth]{pprldistr_20D_hcond} & -\includegraphics[width=0.2362\textwidth]{ppfvdistr_20D_hcond} \\[-0.2em] -\rot[2.3]{multi-modal fcts} -\includegraphics[width=0.2362\textwidth]{pprldistr_05D_multi} & -\includegraphics[width=0.2362\textwidth]{ppfvdistr_05D_multi} & -\includegraphics[width=0.2362\textwidth]{pprldistr_20D_multi} & -\includegraphics[width=0.2362\textwidth]{ppfvdistr_20D_multi} \\[-0.2em] -\rot[1.7]{weak structure fcts} -\includegraphics[width=0.2362\textwidth]{pprldistr_05D_mult2} & -\includegraphics[width=0.2362\textwidth]{ppfvdistr_05D_mult2} & -\includegraphics[width=0.2362\textwidth]{pprldistr_20D_mult2} & -\includegraphics[width=0.2362\textwidth]{ppfvdistr_20D_mult2} -\vspace*{-1ex} +\centering +\begin{tabular}{@{}c@{}c@{}c@{}c@{}} +\includegraphics[width=0.24\textwidth]{ppfigs_f001}& +\includegraphics[width=0.24\textwidth]{ppfigs_f002}& +\includegraphics[width=0.24\textwidth]{ppfigs_f003}& +\includegraphics[width=0.24\textwidth]{ppfigs_f004}\\[-0.25em] +\includegraphics[width=0.24\textwidth]{ppfigs_f005}& +\includegraphics[width=0.24\textwidth]{ppfigs_f006}& +\includegraphics[width=0.24\textwidth]{ppfigs_f007}& +\includegraphics[width=0.24\textwidth]{ppfigs_f008}\\[-0.25em] +\includegraphics[width=0.24\textwidth]{ppfigs_f009}& +\includegraphics[width=0.24\textwidth]{ppfigs_f010}& +\includegraphics[width=0.24\textwidth]{ppfigs_f011}& +\includegraphics[width=0.24\textwidth]{ppfigs_f012}\\[-0.25em] +\includegraphics[width=0.24\textwidth]{ppfigs_f013}& +\includegraphics[width=0.24\textwidth]{ppfigs_f014}& +\includegraphics[width=0.24\textwidth]{ppfigs_f015}& +\includegraphics[width=0.24\textwidth]{ppfigs_f016}\\[-0.25em] +\includegraphics[width=0.24\textwidth]{ppfigs_f017}& +\includegraphics[width=0.24\textwidth]{ppfigs_f018}& +\includegraphics[width=0.24\textwidth]{ppfigs_f019}& +\includegraphics[width=0.24\textwidth]{ppfigs_f020}\\[-0.25em] +\includegraphics[width=0.24\textwidth]{ppfigs_f021}& +\includegraphics[width=0.24\textwidth]{ppfigs_f022}& +\includegraphics[width=0.24\textwidth]{ppfigs_f023}& +\includegraphics[width=0.24\textwidth]{ppfigs_f024} \end{tabular} - \caption{\label{fig:RLDs} - \bbobpprldistrlegend{} - } +\vspace*{-0.2cm} +\caption[Expected running time (\ERT) divided by dimension +versus dimension in log-log presentation]{ +\label{fig:scaling} +\bbobppfigslegend{$f_1$ and $f_{24}$}. +} +% \end{figure*} + + + + + + + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% Empirical cumulative distribution functions (ECDFs) per function group +% for dimensions 5 and 20 +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\begin{figure*} +\begin{tabular}{c@{\hspace*{0.01\textwidth}}c@{\hspace*{0.01\textwidth}}c} +{\sffamily separable fcts}\hspace{1cm} & {\sffamily moderate fcts}\hspace{1cm} & \hspace{-1cm}{\sffamily ill-conditioned fcts}\\ +\includegraphics[width=0.32\textwidth]{\bbobdatapath\algsfolder/pprldmany_05D_separ}& +\includegraphics[width=0.32\textwidth]{\bbobdatapath\algsfolder/pprldmany_05D_lcond}& +\includegraphics[width=0.32\textwidth]{\bbobdatapath\algsfolder/pprldmany_05D_hcond}\\[-0.2em] +{\sffamily multi-modal fcts}\hspace{1cm} & {\sffamily weakly structured multi-modal fcts}\hspace{1cm} & \hspace{-1cm}{\sffamily all fcts}\\ +\includegraphics[width=0.32\textwidth]{\bbobdatapath\algsfolder/pprldmany_05D_multi}& +\includegraphics[width=0.32\textwidth]{\bbobdatapath\algsfolder/pprldmany_05D_mult2}& +\includegraphics[width=0.32\textwidth]{\bbobdatapath\algsfolder/pprldmany_05D_noiselessall} +\vspace*{-1ex} +\end{tabular} +\caption{ +\label{fig:ECDFs05D} +\bbobECDFslegend{5} +} +\end{figure*} + + +\begin{figure*} +\begin{tabular}{c@{\hspace*{0.01\textwidth}}c@{\hspace*{0.01\textwidth}}c} +{\sffamily separable fcts}\hspace{1cm} & {\sffamily moderate fcts}\hspace{1cm} & \hspace{-1cm}{\sffamily ill-conditioned fcts}\\ +\includegraphics[width=0.32\textwidth]{\bbobdatapath\algsfolder/pprldmany_20D_separ}& +\includegraphics[width=0.32\textwidth]{\bbobdatapath\algsfolder/pprldmany_20D_lcond}& +\includegraphics[width=0.32\textwidth]{\bbobdatapath\algsfolder/pprldmany_20D_hcond}\\[-0.2em] +{\sffamily multi-modal fcts}\hspace{1cm} & {\sffamily weakly structured multi-modal fcts}\hspace{1cm} & \hspace{-1cm}{\sffamily all fcts}\\ +\includegraphics[width=0.32\textwidth]{\bbobdatapath\algsfolder/pprldmany_20D_multi}& +\includegraphics[width=0.32\textwidth]{\bbobdatapath\algsfolder/pprldmany_20D_mult2}& +\includegraphics[width=0.32\textwidth]{\bbobdatapath\algsfolder/pprldmany_20D_noiselessall} +\vspace*{-1ex} +\end{tabular} +\caption{ +\label{fig:ECDFs20D} +\bbobECDFslegend{20} +} +\end{figure*} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% ERT loss ratios (figure and table) +% ECDFs per function in dimension 5 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\begin{figure} +\begin{figure*} \centering -\parbox{0.48\columnwidth}{\centering 5-D}\hfill -\parbox{0.48\columnwidth}{\centering 20-D}\\ -\includegraphics[width=0.48\columnwidth]{pplogloss_05D_noiselessall}\hfill -\includegraphics[width=0.48\columnwidth]{pplogloss_20D_noiselessall}\\[2ex] -% -\input{\bbobdatapath\algfolder pploglosstable_05D_noiselessall}\\ -\input{\bbobdatapath\algfolder pploglosstable_20D_noiselessall} -\caption{\label{tab:ERTloss}% -\bbobloglosstablecaption{} +\begin{tabular}{@{}l@{}l@{}l@{}l@{}l@{}} +\includegraphics[width=0.2\textwidth]{pprldmany-single-functions/pprldmany_f001_05D}& +\includegraphics[width=0.2\textwidth]{pprldmany-single-functions/pprldmany_f002_05D}& +\includegraphics[width=0.2\textwidth]{pprldmany-single-functions/pprldmany_f003_05D}& +\includegraphics[width=0.2\textwidth]{pprldmany-single-functions/pprldmany_f004_05D}\\ +\includegraphics[width=0.2\textwidth]{pprldmany-single-functions/pprldmany_f005_05D}& +\includegraphics[width=0.2\textwidth]{pprldmany-single-functions/pprldmany_f006_05D}& +\includegraphics[width=0.2\textwidth]{pprldmany-single-functions/pprldmany_f007_05D}& +\includegraphics[width=0.2\textwidth]{pprldmany-single-functions/pprldmany_f008_05D}\\ +\includegraphics[width=0.2\textwidth]{pprldmany-single-functions/pprldmany_f009_05D}& +\includegraphics[width=0.2\textwidth]{pprldmany-single-functions/pprldmany_f010_05D}& +\includegraphics[width=0.2\textwidth]{pprldmany-single-functions/pprldmany_f011_05D}& +\includegraphics[width=0.2\textwidth]{pprldmany-single-functions/pprldmany_f012_05D}\\ +\includegraphics[width=0.2\textwidth]{pprldmany-single-functions/pprldmany_f013_05D}& +\includegraphics[width=0.2\textwidth]{pprldmany-single-functions/pprldmany_f014_05D}& +\includegraphics[width=0.2\textwidth]{pprldmany-single-functions/pprldmany_f015_05D}& +\includegraphics[width=0.2\textwidth]{pprldmany-single-functions/pprldmany_f016_05D}\\ +\includegraphics[width=0.2\textwidth]{pprldmany-single-functions/pprldmany_f017_05D}& +\includegraphics[width=0.2\textwidth]{pprldmany-single-functions/pprldmany_f018_05D}& +\includegraphics[width=0.2\textwidth]{pprldmany-single-functions/pprldmany_f019_05D}& +\includegraphics[width=0.2\textwidth]{pprldmany-single-functions/pprldmany_f020_05D}\\ +\includegraphics[width=0.2\textwidth]{pprldmany-single-functions/pprldmany_f021_05D}& +\includegraphics[width=0.2\textwidth]{pprldmany-single-functions/pprldmany_f022_05D}& +\includegraphics[width=0.2\textwidth]{pprldmany-single-functions/pprldmany_f023_05D}& +\includegraphics[width=0.2\textwidth]{pprldmany-single-functions/pprldmany_f024_05D} +\end{tabular} + \caption{\label{fig:ECDFsingleOne} + \bbobecdfcaptionsinglefunctionssingledim{5} } -\end{figure} +\end{figure*} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% Table showing the expected runtime (ERT in number of function +% evaluations) for functions $f_1$--$f_{24}$ for dimension 5. + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\begin{table*}\tiny +%\hfill 5-D\hfill~\\[1ex] +{\normalsize \color{red} +\ifthenelse{\isundefined{\algorithmG}}{}{more than 6 algorithms: please split the tables below by hand until it fits to the page limits} +} +\mbox{\begin{minipage}[t]{0.495\textwidth} +\centering +\pptablesheader +\input{\bbobdatapath\algsfolder pptables_f001_05D} +\input{\bbobdatapath\algsfolder pptables_f002_05D} +\input{\bbobdatapath\algsfolder pptables_f003_05D} +\input{\bbobdatapath\algsfolder pptables_f004_05D} +\input{\bbobdatapath\algsfolder pptables_f005_05D} +\input{\bbobdatapath\algsfolder pptables_f006_05D} +\input{\bbobdatapath\algsfolder pptables_f007_05D} +\input{\bbobdatapath\algsfolder pptables_f008_05D} +\input{\bbobdatapath\algsfolder pptables_f009_05D} +\input{\bbobdatapath\algsfolder pptables_f010_05D} +\input{\bbobdatapath\algsfolder pptables_f011_05D} +\input{\bbobdatapath\algsfolder pptables_f012_05D} +\end{tabularx} +\end{minipage} +\hspace{0.002\textwidth} +\begin{minipage}[t]{0.499\textwidth}\tiny +\centering +\pptablesheader +\input{\bbobdatapath\algsfolder pptables_f013_05D} +\input{\bbobdatapath\algsfolder pptables_f014_05D} +\input{\bbobdatapath\algsfolder pptables_f015_05D} +\input{\bbobdatapath\algsfolder pptables_f016_05D} +\input{\bbobdatapath\algsfolder pptables_f017_05D} +\input{\bbobdatapath\algsfolder pptables_f018_05D} +\input{\bbobdatapath\algsfolder pptables_f019_05D} +\input{\bbobdatapath\algsfolder pptables_f020_05D} +\input{\bbobdatapath\algsfolder pptables_f021_05D} +\input{\bbobdatapath\algsfolder pptables_f022_05D} +\input{\bbobdatapath\algsfolder pptables_f023_05D} +\input{\bbobdatapath\algsfolder pptables_f024_05D} +\end{tabularx} +\end{minipage}} -% ERT loss ratios per function group +\caption{\label{tab:ERTs05} +\bbobpptablesmanylegend{dimension $5$} +\cocoversion +} +\end{table*} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\begin{figure} -\begin{tabular}{@{}l@{}@{}l@{}} -\multicolumn{1}{c}{5-D} & \multicolumn{1}{c}{20-D}\\ -%\rot{all functions} -%\hspace*{-2mm} -\rot[2.8]{separable fcts} -\hspace*{-1.4mm} -\includegraphics[width=0.24\textwidth]{pplogloss_05D_separ} & -\includegraphics[width=0.24\textwidth]{pplogloss_20D_separ}\\ -\rot[2.7]{moderate fcts} -\hspace*{-1.4mm} -\includegraphics[width=0.24\textwidth]{pplogloss_05D_lcond} & -\includegraphics[width=0.24\textwidth]{pplogloss_20D_lcond}\\ -\rot[1.9]{ill-conditioned fcts} -\hspace*{-1.35mm} -\includegraphics[width=0.24\textwidth]{pplogloss_05D_hcond} & -\includegraphics[width=0.24\textwidth]{pplogloss_20D_hcond}\\ -\rot[2.5]{multi-modal fcts} -\hspace*{-1.3mm} -\includegraphics[width=0.24\textwidth]{pplogloss_05D_multi} & -\includegraphics[width=0.24\textwidth]{pplogloss_20D_multi}\\ -\rot[1.6]{weak structure fcts} -\hspace*{-1.4mm} -\includegraphics[width=0.24\textwidth]{pplogloss_05D_mult2} & -\includegraphics[width=0.24\textwidth]{pplogloss_20D_mult2} -\vspace*{-0.5ex} -\end{tabular} - \caption{\label{fig:ERTlogloss}% -\bbobloglossfigurecaption{} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% Table showing the expected runtime (ERT in number of function +% evaluations) for functions $f_1$--$f_{24}$ for dimension 20. + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\begin{table*}\tiny +%\hfill 20-D\hfill~\\[1ex] +{\normalsize \color{red} +\ifthenelse{\isundefined{\algorithmG}}{}{more than 6 algorithms: please split the tables below by hand until it fits to the page limits} } -\end{figure} +\mbox{\begin{minipage}[t]{0.495\textwidth} +\centering +\pptablesheader +\input{\bbobdatapath\algsfolder pptables_f001_20D} +\input{\bbobdatapath\algsfolder pptables_f002_20D} +\input{\bbobdatapath\algsfolder pptables_f003_20D} +\input{\bbobdatapath\algsfolder pptables_f004_20D} +\input{\bbobdatapath\algsfolder pptables_f005_20D} +\input{\bbobdatapath\algsfolder pptables_f006_20D} +\input{\bbobdatapath\algsfolder pptables_f007_20D} +\input{\bbobdatapath\algsfolder pptables_f008_20D} +\input{\bbobdatapath\algsfolder pptables_f009_20D} +\input{\bbobdatapath\algsfolder pptables_f010_20D} +\input{\bbobdatapath\algsfolder pptables_f011_20D} +\input{\bbobdatapath\algsfolder pptables_f012_20D} +\end{tabularx} +\end{minipage} +\hspace{0.002\textwidth} +\begin{minipage}[t]{0.499\textwidth}\tiny +\centering +\pptablesheader +\input{\bbobdatapath\algsfolder pptables_f013_20D} +\input{\bbobdatapath\algsfolder pptables_f014_20D} +\input{\bbobdatapath\algsfolder pptables_f015_20D} +\input{\bbobdatapath\algsfolder pptables_f016_20D} +\input{\bbobdatapath\algsfolder pptables_f017_20D} +\input{\bbobdatapath\algsfolder pptables_f018_20D} +\input{\bbobdatapath\algsfolder pptables_f019_20D} +\input{\bbobdatapath\algsfolder pptables_f020_20D} +\input{\bbobdatapath\algsfolder pptables_f021_20D} +\input{\bbobdatapath\algsfolder pptables_f022_20D} +\input{\bbobdatapath\algsfolder pptables_f023_20D} +\input{\bbobdatapath\algsfolder pptables_f024_20D} +\end{tabularx} +\end{minipage}} + +\caption{\label{tab:ERTs20} +\bbobpptablesmanylegend{dimension $20$} +\cocoversion +} +\end{table*} + + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +}{} % end of all that comes for 2 or 3+ algorithms + + + +\ifthenelse{\equal{\numofalgs}{2}}{ + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% Scatter plots per function. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\begin{figure*} +\begin{tabular}{*{4}{@{}c@{}}} + \includegraphics[height=0.2\textwidth]{ppscatter_f001}& + \includegraphics[height=0.2\textwidth]{ppscatter_f002}& + \includegraphics[height=0.2\textwidth]{ppscatter_f003}& + \includegraphics[height=0.2\textwidth]{ppscatter_f004}\\[-0.6em] + \includegraphics[height=0.2\textwidth]{ppscatter_f005}& + \includegraphics[height=0.2\textwidth]{ppscatter_f006}& + \includegraphics[height=0.2\textwidth]{ppscatter_f007}& + \includegraphics[height=0.2\textwidth]{ppscatter_f008}\\[-0.6em] + \includegraphics[height=0.2\textwidth]{ppscatter_f009}& + \includegraphics[height=0.2\textwidth]{ppscatter_f010}& + \includegraphics[height=0.2\textwidth]{ppscatter_f011}& + \includegraphics[height=0.2\textwidth]{ppscatter_f012}\\[-0.6em] + \includegraphics[height=0.2\textwidth]{ppscatter_f013}& + \includegraphics[height=0.2\textwidth]{ppscatter_f014}& + \includegraphics[height=0.2\textwidth]{ppscatter_f015}& + \includegraphics[height=0.2\textwidth]{ppscatter_f016}\\[-0.6em] + \includegraphics[height=0.2\textwidth]{ppscatter_f017}& + \includegraphics[height=0.2\textwidth]{ppscatter_f018}& + \includegraphics[height=0.2\textwidth]{ppscatter_f019}& + \includegraphics[height=0.2\textwidth]{ppscatter_f020}\\[-0.6em] + \includegraphics[height=0.2\textwidth]{ppscatter_f021}& + \includegraphics[height=0.2\textwidth]{ppscatter_f022}& + \includegraphics[height=0.2\textwidth]{ppscatter_f023}& + \includegraphics[height=0.2\textwidth]{ppscatter_f024} +\end{tabular} +\caption{\label{fig:scatterplots} +\bbobppscatterlegend{$f_1$--$f_{24}$} +} +\end{figure*} + + +}{} % end of 2 algorithms template + + + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%\section{Discussion} % and or conclusion, summary... %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \bibliographystyle{ACM-Reference-Format} \bibliography{bbob} % bbob.bib is the name of the Bibliography in this case -\clearpage % otherwise the last figure might be missing +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + \end{document} \ No newline at end of file diff --git a/code-postprocessing/latex-templates/templateBBOBcmp.tex b/code-postprocessing/latex-templates/templateBBOBcmp.tex deleted file mode 100644 index 1fd0a0222..000000000 --- a/code-postprocessing/latex-templates/templateBBOBcmp.tex +++ /dev/null @@ -1,516 +0,0 @@ -\documentclass[sigconf]{acmart} - -\usepackage{booktabs} % For formal tables -\usepackage{graphicx} -\usepackage{rotating} -\usepackage{tabularx} -\usepackage{xstring} % for string operations -\usepackage{wasysym} % Table legend with symbols input from post-processing -\usepackage{MnSymbol} % Table legend with symbols input from post-processing -\usepackage{float} - -% define some COCO/dvipsnames colors -\definecolor{Gray}{gray}{0.6} -\definecolor{NavyBlue}{rgb}{0.0, 0.0, 0.5} -\definecolor{Magenta}{rgb}{1.0, 0.0, 1.0} -\definecolor{Black}{rgb}{0.0, 0.0, 0.0} - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Packages -%\usepackage{graphicx} -%\usepackage[dvipsnames]{xcolor} -%\usepackage{float} -%\usepackage{xstring} % for string operations -%\usepackage{wasysym} % Table legend with symbols input from post-processing -%\usepackage{MnSymbol} % Table legend with symbols input from post-processing -%\usepackage[colorlinks=true, linkcolor=blue]{hyperref} % make COCO papers clickable - - - - -% Copyright -%\setcopyright{none} -%\setcopyright{acmcopyright} -%\setcopyright{acmlicensed} -\setcopyright{rightsretained} -%\setcopyright{usgov} -%\setcopyright{usgovmixed} -%\setcopyright{cagov} -%\setcopyright{cagovmixed} - - -% DOI -\acmDOI{10.1145/123_4} - -% ISBN -\acmISBN{123-4567-24-567/18/07} - -%Conference -\acmConference[GECCO '19]{the Genetic and Evolutionary Computation Conference 2019}{July 13--17, 2019}{Prague, Czech Republic} -\acmYear{2019} -\copyrightyear{2019} - -\acmPrice{15.00} - - - -%%%%%%%%%%%%%%%%%%%%%% END OF PREAMBLE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%% TO BE EDITED %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% specify acronyms for algorithm1 (1st arg. of post-processing) and algorithm2 (2nd arg.) -%\newcommand{\algorithmA}{algorithmB} % first argument in the post-processing -%\newcommand{\algorithmB}{algorithmB} % second argument in the post-processing -% for the short acronyms in the tables, adjust the following to lines if required. -%\newcommand{\algorithmAshort}{algA} % first argument in the post-processing -%\newcommand{\algorithmBshort}{algB} % second argument in the post-processing - -% rungeneric.py writes data into a subfolder of ppdata -\newcommand{\bbobdatapath}{ppdata/} % change default output folder of COCO if desired -\input{\bbobdatapath cocopp_commands.tex} % provide default of algname and algfolder -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\graphicspath{{\bbobdatapath\algsfolder}} - -% pre-defined commands -\newcommand{\DIM}{\ensuremath{\mathrm{DIM}}} -\newcommand{\ERT}{\ensuremath{\mathrm{ERT}}} -\newcommand{\FEvals}{\ensuremath{\mathrm{FEvals}}} -\newcommand{\nruns}{\ensuremath{\mathrm{Nruns}}} -\newcommand{\Dfb}{\ensuremath{\Delta f_{\mathrm{best}}}} -\newcommand{\Df}{\ensuremath{\Delta f}} -\newcommand{\nbFEs}{\ensuremath{\mathrm{\#FEs}}} -\newcommand{\fopt}{\ensuremath{f_\mathrm{opt}}} -\newcommand{\ftarget}{\ensuremath{f_\mathrm{t}}} -\newcommand{\CrE}{\ensuremath{\mathrm{CrE}}} -\newcommand{\change}[1]{{\color{red} #1}} - - -\begin{document} - -\title{Black-Box Optimization Benchmarking Template for the Comparison of Two Algorithms on the Noiseless Testbed} -\renewcommand{\shorttitle}{Black-Box Optimization Benchmarking Template for Two Algorithms} -\titlenote{Submission deadline: April 3rd.} -%Camera-ready paper due April 24th.}} -\subtitle{Draft version} - - - -\author{Firstname Lastname} -%\authornote{tba if needed} -%\orcid{1234-5678-9012} -%\affiliation{% -% \institution{Institute for Clarity in Documentation} -% \streetaddress{P.O. Box 1212} -% \city{Dublin} -% \state{Ohio} -% \postcode{43017-6221} -%} -%\email{trovato@corporation.com} -% -%\author{G.K.M. Tobin} -%\authornote{The secretary disavows any knowledge of this author's actions.} -%\affiliation{% -% \institution{Institute for Clarity in Documentation} -% \streetaddress{P.O. Box 1212} -% \city{Dublin} -% \state{Ohio} -% \postcode{43017-6221} -%} -%\email{webmaster@marysville-ohio.com} -% -%\author{Lars Th{\o}rv{\"a}ld} -%\authornote{This author is the -% one who did all the really hard work.} -%\affiliation{% -% \institution{The Th{\o}rv{\"a}ld Group} -% \streetaddress{1 Th{\o}rv{\"a}ld Circle} -% \city{Hekla} -% \country{Iceland}} -%\email{larst@affiliation.org} -% -%\author{Lawrence P. Leipuner} -%\affiliation{ -% \institution{Brookhaven Laboratories} -% \streetaddress{P.O. Box 5000}} -%\email{lleipuner@researchlabs.org} -% -%\author{Sean Fogarty} -%\affiliation{% -% \institution{NASA Ames Research Center} -% \city{Moffett Field} -% \state{California} -% \postcode{94035}} -%\email{fogartys@amesres.org} -% -%\author{Charles Palmer} -%\affiliation{% -% \institution{Palmer Research Laboratories} -% \streetaddress{8600 Datapoint Drive} -% \city{San Antonio} -% \state{Texas} -% \postcode{78229}} -%\email{cpalmer@prl.com} -% -%\author{John Smith} -%\affiliation{\institution{The Th{\o}rv{\"a}ld Group}} -%\email{jsmith@affiliation.org} -% -%\author{Julius P.~Kumquat} -%\affiliation{\institution{The Kumquat Consortium}} -%\email{jpkumquat@consortium.net} - -% The default list of authors is too long for headers} -\renewcommand{\shortauthors}{Firstname Lastname et. al.} - - -\begin{abstract} -to be written -\end{abstract} - - -% -% The code below should be generated by the tool at -% http://dl.acm.org/ccs.cfm -% Please copy and paste the code instead of the example below. -% - \begin{CCSXML} - - -10010147.10010178.10010205.10010208 -Computing methodologies~Continuous space search -500 - - -\end{CCSXML} - -\ccsdesc[500]{Computing methodologies~Continuous space search} - - -% We no longer use \terms command -%\terms{Algorithms} - -% Complete with anything that is needed -\keywords{Benchmarking, Black-box optimization} - -\maketitle - - -% \section{Introduction} -% -% \section{Algorithm Presentation} -% -% \section{Experimental Procedure} -% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\section{CPU Timing} -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% note that the following text is just a proposal and can/should be changed to your needs: -In order to evaluate the CPU timing of the algorithm, we have run the \change{MY-ALGORITHM-NAME} on the \change{bbob test suite \cite{hansen2010fun}} with restarts for a maximum budget equal to \change{$400 (D + 2)$} function evaluations according to \cite{hansen2016exp}. The \change{C/Java/Python/Matlab/Octave} code was run on a \change{Mac Intel(R) Core(TM) i5-2400S CPU @ 2.50GHz} with \change{1} processor and \change{4} cores \change{and (compile) options xxx}. The time per function evaluation for dimensions 2, 3, 5, 10, 20\change{, 40} equals \change{$x.x$}, \change{$x.x$}, \change{$x.x$}, \change{$xx$}, \change{$xxx$}\change{, and $xxx$} seconds respectively. - -\change{repeat the above for the second algorithm} - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\section{Results} -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -Results from experiments according to \cite{hansen2016exp} and \cite{hansen2016perfass} on the benchmark -functions given in \cite{wp200901_2010,hansen2010fun} are presented in -Figures~\ref{fig:scaling}, \ref{fig:scatterplots} and \ref{fig:RLDs} and -in Table~\ref{tab:ERTs}. The experiments were performed with COCO \cite{hansen2020cocoplat}, -version \change{2.4}, the plots were produced with version \change{2.4}. - -The \textbf{expected runtime (ERT)}, used in the figures and table, depends on a -given target function value, $\ftarget=\fopt+\Df$, and is computed over all relevant trials -as the number of function evaluations executed during each trial while the best -function value did not reach \ftarget, summed over all trials -and divided by the number of trials that actually reached \ftarget\ -\cite{hansen2010exp,price1997dev}. -\textbf{Statistical significance} is tested with the rank-sum test for a given -target $\Delta\ftarget$ ($10^{-8}$ as in Figure~\ref{fig:scaling}) using, -for each trial, either the number of needed function evaluations to reach -$\Delta\ftarget$ (inverted and multiplied by $-1$), or, if the target was not -reached, the best $\Df$-value achieved, measured only up to the smallest number -of overall function evaluations for any unsuccessful trial under consideration. - - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -% Scaling of ERT with dimension - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\begin{figure*} -\centering -\begin{tabular}{@{}c@{}c@{}c@{}c@{}} -\includegraphics[width=0.24\textwidth]{ppfigs_f001}& -\includegraphics[width=0.24\textwidth]{ppfigs_f002}& -\includegraphics[width=0.24\textwidth]{ppfigs_f003}& -\includegraphics[width=0.24\textwidth]{ppfigs_f004}\\[-0.25em] -\includegraphics[width=0.24\textwidth]{ppfigs_f005}& -\includegraphics[width=0.24\textwidth]{ppfigs_f006}& -\includegraphics[width=0.24\textwidth]{ppfigs_f007}& -\includegraphics[width=0.24\textwidth]{ppfigs_f008}\\[-0.25em] -\includegraphics[width=0.24\textwidth]{ppfigs_f009}& -\includegraphics[width=0.24\textwidth]{ppfigs_f010}& -\includegraphics[width=0.24\textwidth]{ppfigs_f011}& -\includegraphics[width=0.24\textwidth]{ppfigs_f012}\\[-0.25em] -\includegraphics[width=0.24\textwidth]{ppfigs_f013}& -\includegraphics[width=0.24\textwidth]{ppfigs_f014}& -\includegraphics[width=0.24\textwidth]{ppfigs_f015}& -\includegraphics[width=0.24\textwidth]{ppfigs_f016}\\[-0.25em] -\includegraphics[width=0.24\textwidth]{ppfigs_f017}& -\includegraphics[width=0.24\textwidth]{ppfigs_f018}& -\includegraphics[width=0.24\textwidth]{ppfigs_f019}& -\includegraphics[width=0.24\textwidth]{ppfigs_f020}\\[-0.25em] -\includegraphics[width=0.24\textwidth]{ppfigs_f021}& -\includegraphics[width=0.24\textwidth]{ppfigs_f022}& -\includegraphics[width=0.24\textwidth]{ppfigs_f023}& -\includegraphics[width=0.24\textwidth]{ppfigs_f024} -\end{tabular} -\vspace*{-0.3cm} -\caption[Expected running time divided by dimension versus dimension]{ -\label{fig:scaling} -\bbobppfigslegend{$f_1$ and $f_{24}$}. % note: \algorithmA and \algorithmB can be defined above -} -% -\end{figure*} - - - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -% Scatter plots per function. - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\newcommand{\rot}[2][2.5]{ - \hspace*{-3.5\baselineskip}% - \begin{rotate}{90}\hspace{#1em}#2 - \end{rotate}} -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -\begin{figure*} -\begin{tabular}{*{4}{@{}c@{}}} - \includegraphics[height=0.2\textwidth]{ppscatter_f001}& - \includegraphics[height=0.2\textwidth]{ppscatter_f002}& - \includegraphics[height=0.2\textwidth]{ppscatter_f003}& - \includegraphics[height=0.2\textwidth]{ppscatter_f004}\\[-0.6em] - \includegraphics[height=0.2\textwidth]{ppscatter_f005}& - \includegraphics[height=0.2\textwidth]{ppscatter_f006}& - \includegraphics[height=0.2\textwidth]{ppscatter_f007}& - \includegraphics[height=0.2\textwidth]{ppscatter_f008}\\[-0.6em] - \includegraphics[height=0.2\textwidth]{ppscatter_f009}& - \includegraphics[height=0.2\textwidth]{ppscatter_f010}& - \includegraphics[height=0.2\textwidth]{ppscatter_f011}& - \includegraphics[height=0.2\textwidth]{ppscatter_f012}\\[-0.6em] - \includegraphics[height=0.2\textwidth]{ppscatter_f013}& - \includegraphics[height=0.2\textwidth]{ppscatter_f014}& - \includegraphics[height=0.2\textwidth]{ppscatter_f015}& - \includegraphics[height=0.2\textwidth]{ppscatter_f016}\\[-0.6em] - \includegraphics[height=0.2\textwidth]{ppscatter_f017}& - \includegraphics[height=0.2\textwidth]{ppscatter_f018}& - \includegraphics[height=0.2\textwidth]{ppscatter_f019}& - \includegraphics[height=0.2\textwidth]{ppscatter_f020}\\[-0.6em] - \includegraphics[height=0.2\textwidth]{ppscatter_f021}& - \includegraphics[height=0.2\textwidth]{ppscatter_f022}& - \includegraphics[height=0.2\textwidth]{ppscatter_f023}& - \includegraphics[height=0.2\textwidth]{ppscatter_f024} -\end{tabular} -\caption{\label{fig:scatterplots} -\bbobppscatterlegend{$f_1$--$f_{24}$} -} -\end{figure*} - - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -% Empirical cumulative distribution functions (ECDFs) per function group. - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\begin{figure*} - \begin{tabular}{l@{\hspace*{-0.00\textwidth}}l@{\hspace*{0.01\textwidth}}|l@{\hspace*{-0.00\textwidth}}l} - \multicolumn{2}{c}{5-D} & \multicolumn{2}{c}{20-D} \\ - \rot[2.9]{all functions} - \includegraphics[height=0.14\textheight]{pprldistr_05D_noiselessall} & - \includegraphics[height=0.14\textheight]{pplogabs_05D_noiselessall} & - \includegraphics[height=0.14\textheight]{pprldistr_20D_noiselessall} & - \includegraphics[height=0.14\textheight]{pplogabs_20D_noiselessall}\\ - \rot[2.7]{separable fcts} - \includegraphics[height=0.14\textheight]{pprldistr_05D_separ} & - \includegraphics[height=0.14\textheight]{pplogabs_05D_separ} & - \includegraphics[height=0.14\textheight]{pprldistr_20D_separ} & - \includegraphics[height=0.14\textheight]{pplogabs_20D_separ} \\ - \rot[2.75]{moderate fcts} - \includegraphics[height=0.14\textheight]{pprldistr_05D_lcond} & - \includegraphics[height=0.14\textheight]{pplogabs_05D_lcond} & - \includegraphics[height=0.14\textheight]{pprldistr_20D_lcond} & - \includegraphics[height=0.14\textheight]{pplogabs_20D_lcond}\\ - \rot[1.4]{ill-conditioned fcts} - \includegraphics[height=0.14\textheight]{pprldistr_05D_hcond} & - \includegraphics[height=0.14\textheight]{pplogabs_05D_hcond} & - \includegraphics[height=0.14\textheight]{pprldistr_20D_hcond} & - \includegraphics[height=0.14\textheight]{pplogabs_20D_hcond} \\ - \rot[2.1]{multi-modal fcts} - \includegraphics[height=0.14\textheight]{pprldistr_05D_multi} & - \includegraphics[height=0.14\textheight]{pplogabs_05D_multi} & - \includegraphics[height=0.14\textheight]{pprldistr_20D_multi} & - \includegraphics[height=0.14\textheight]{pplogabs_20D_multi} \\ - \rot[1.4]{weak structure fcts} - \includegraphics[height=0.14\textheight]{pprldistr_05D_mult2} & - \includegraphics[height=0.14\textheight]{pplogabs_05D_mult2} & - \includegraphics[height=0.14\textheight]{pprldistr_20D_mult2} & - \includegraphics[height=0.14\textheight]{pplogabs_20D_mult2}\\ - \end{tabular} -\vspace*{-0.2cm} - \caption{\label{fig:RLDs} - \bbobpprldistrlegendtwo{} - } -\end{figure*} - - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -% Table showing the expected runtime (ERT in number of function -% evaluations) divided by the best ERT measured during BBOB-2009 (given in the -% first row of each cell) for functions $f_1$--$f_{24}$. - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\begin{table*} -\mbox{\begin{minipage}[t]{0.495\textwidth} -\centering -5-D\\[5pt] -\tiny -\pptablesheader -\input{\bbobdatapath\algsfolder pptables_f001_05D} - -\input{\bbobdatapath\algsfolder pptables_f002_05D} - -\input{\bbobdatapath\algsfolder pptables_f003_05D} - -\input{\bbobdatapath\algsfolder pptables_f004_05D} - -\input{\bbobdatapath\algsfolder pptables_f005_05D} - -\input{\bbobdatapath\algsfolder pptables_f006_05D} - -\input{\bbobdatapath\algsfolder pptables_f007_05D} - -\input{\bbobdatapath\algsfolder pptables_f008_05D} - -\input{\bbobdatapath\algsfolder pptables_f009_05D} - -\input{\bbobdatapath\algsfolder pptables_f010_05D} - -\input{\bbobdatapath\algsfolder pptables_f011_05D} - -\input{\bbobdatapath\algsfolder pptables_f012_05D} - -\input{\bbobdatapath\algsfolder pptables_f013_05D} - -\input{\bbobdatapath\algsfolder pptables_f014_05D} - -\input{\bbobdatapath\algsfolder pptables_f015_05D} - -\input{\bbobdatapath\algsfolder pptables_f016_05D} - -\input{\bbobdatapath\algsfolder pptables_f017_05D} - -\input{\bbobdatapath\algsfolder pptables_f018_05D} - -\input{\bbobdatapath\algsfolder pptables_f019_05D} - -\input{\bbobdatapath\algsfolder pptables_f020_05D} - -\input{\bbobdatapath\algsfolder pptables_f021_05D} - -\input{\bbobdatapath\algsfolder pptables_f022_05D} - -\input{\bbobdatapath\algsfolder pptables_f023_05D} - -\input{\bbobdatapath\algsfolder pptables_f024_05D} -\end{tabularx} -\end{minipage}} -\hspace{0.002\textwidth} -\mbox{\begin{minipage}[t]{0.495\textwidth} -\centering -20-D\\[5pt] -\tiny -\pptablesheader -\input{\bbobdatapath\algsfolder pptables_f001_20D} - -\input{\bbobdatapath\algsfolder pptables_f002_20D} - -\input{\bbobdatapath\algsfolder pptables_f003_20D} - -\input{\bbobdatapath\algsfolder pptables_f004_20D} - -\input{\bbobdatapath\algsfolder pptables_f005_20D} - -\input{\bbobdatapath\algsfolder pptables_f006_20D} - -\input{\bbobdatapath\algsfolder pptables_f007_20D} - -\input{\bbobdatapath\algsfolder pptables_f008_20D} - -\input{\bbobdatapath\algsfolder pptables_f009_20D} - -\input{\bbobdatapath\algsfolder pptables_f010_20D} - -\input{\bbobdatapath\algsfolder pptables_f011_20D} - -\input{\bbobdatapath\algsfolder pptables_f012_20D} - -\input{\bbobdatapath\algsfolder pptables_f013_20D} - -\input{\bbobdatapath\algsfolder pptables_f014_20D} - -\input{\bbobdatapath\algsfolder pptables_f015_20D} - -\input{\bbobdatapath\algsfolder pptables_f016_20D} - -\input{\bbobdatapath\algsfolder pptables_f017_20D} - -\input{\bbobdatapath\algsfolder pptables_f018_20D} - -\input{\bbobdatapath\algsfolder pptables_f019_20D} - -\input{\bbobdatapath\algsfolder pptables_f020_20D} - -\input{\bbobdatapath\algsfolder pptables_f021_20D} - -\input{\bbobdatapath\algsfolder pptables_f022_20D} - -\input{\bbobdatapath\algsfolder pptables_f023_20D} - -\input{\bbobdatapath\algsfolder pptables_f024_20D} -\end{tabularx} -\end{minipage}} - -\caption{\label{tab:ERTs} -\bbobpptablesmanylegend{dimensions $5$ (left) and $20$ (right)} -} -\end{table*} - - - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -\bibliographystyle{ACM-Reference-Format} -\bibliography{bbob} % bbob.bib is the name of the Bibliography in this case - -\clearpage % otherwise the last figure might be missing - - - -\end{document} - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/code-postprocessing/latex-templates/templateBBOBmany.tex b/code-postprocessing/latex-templates/templateBBOBmany.tex deleted file mode 100644 index 4fdbdc6b2..000000000 --- a/code-postprocessing/latex-templates/templateBBOBmany.tex +++ /dev/null @@ -1,519 +0,0 @@ -\documentclass[sigconf]{acmart} - -\usepackage{booktabs} % For formal tables -\usepackage{graphicx} -\usepackage{rotating} -\usepackage{tabularx} -\usepackage{xstring} % for string operations -\usepackage{wasysym} % Table legend with symbols input from post-processing -\usepackage{MnSymbol} % Table legend with symbols input from post-processing -\usepackage{float} -\usepackage{ifthen} - - -% define some COCO/dvipsnames colors because -% ACM style does not allow to use them directly -%\definecolor{NavyBlue}{HTML}{000080} -%\definecolor{Magenta}{HTML}{FF00FF} -%\definecolor{Orange}{HTML}{FFA500} -%\definecolor{CornflowerBlue}{HTML}{6495ED} -%\definecolor{YellowGreen}{HTML}{9ACD32} -%\definecolor{Gray}{HTML}{BEBEBE} -%\definecolor{Yellow}{HTML}{FFFF00} -%\definecolor{GreenYellow}{HTML}{ADFF2F} -%\definecolor{ForestGreen}{HTML}{228B22} -%\definecolor{Lavender}{HTML}{FFC0CB} -%\definecolor{SkyBlue}{HTML}{87CEEB} -%\definecolor{NavyBlue}{HTML}{000080} -%\definecolor{Goldenrod}{HTML}{DDF700} -%\definecolor{VioletRed}{HTML}{D02090} -%\definecolor{CornflowerBlue}{HTML}{6495ED} -%\definecolor{LimeGreen}{HTML}{32CD32} - - -% Copyright -%\setcopyright{none} -%\setcopyright{acmcopyright} -%\setcopyright{acmlicensed} -\setcopyright{rightsretained} -%\setcopyright{usgov} -%\setcopyright{usgovmixed} -%\setcopyright{cagov} -%\setcopyright{cagovmixed} - - -% DOI -\acmDOI{10.1145/123_4} - -% ISBN -\acmISBN{123-4567-24-567/18/07} - -%Conference -\acmConference[GECCO '19]{the Genetic and Evolutionary Computation Conference 2019}{July 13--17, 2019}{Prague, Czech Republic} -\acmYear{2019} -\copyrightyear{2019} - -\acmPrice{15.00} - - - -%%%%%%%%%%%%%%%%%%%%%% END OF PREAMBLE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%% TO BE EDITED %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% specify acronyms for algorithm1 (1st arg. of post-processing) and algorithm2 (2nd arg.) -%\newcommand{\algorithmA}{algorithmB} % first argument in the post-processing -%\newcommand{\algorithmB}{algorithmB} % second argument in the post-processing -% for the short acronyms in the tables, adjust the following to lines if required. -%\newcommand{\algorithmAshort}{algA} % first argument in the post-processing -%\newcommand{\algorithmBshort}{algB} % second argument in the post-processing - -% rungeneric.py writes data into a subfolder of ppdata -\newcommand{\bbobdatapath}{ppdata/mutations/} % change default output folder of COCO if desired -\input{\bbobdatapath cocopp_commands.tex} % provide default of algname and algfolder -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\graphicspath{{\bbobdatapath\algsfolder}} - -% pre-defined commands -\newcommand{\DIM}{\ensuremath{\mathrm{DIM}}} -\newcommand{\ERT}{\ensuremath{\mathrm{ERT}}} -\newcommand{\FEvals}{\ensuremath{\mathrm{FEvals}}} -\newcommand{\nruns}{\ensuremath{\mathrm{Nruns}}} -\newcommand{\Dfb}{\ensuremath{\Delta f_{\mathrm{best}}}} -\newcommand{\Df}{\ensuremath{\Delta f}} -\newcommand{\nbFEs}{\ensuremath{\mathrm{\#FEs}}} -\newcommand{\fopt}{\ensuremath{f_\mathrm{opt}}} -\newcommand{\ftarget}{\ensuremath{f_\mathrm{t}}} -\newcommand{\CrE}{\ensuremath{\mathrm{CrE}}} -\newcommand{\change}[1]{{\color{red} #1}} - - -\begin{document} - -\title{Black-Box Optimization Benchmarking Template for the Comparison of More than Two Algorithms on the Noiseless Testbed} -\renewcommand{\shorttitle}{Black-Box Optimization Benchmarking Template for More Than Two Algorithms} -\titlenote{Submission deadline: April 3rd.} -%Camera-ready paper due April 24th.}} -\subtitle{Draft version} - - - -\author{Firstname Lastname} -%\authornote{tba if needed} -%\orcid{1234-5678-9012} -%\affiliation{% -% \institution{Institute for Clarity in Documentation} -% \streetaddress{P.O. Box 1212} -% \city{Dublin} -% \state{Ohio} -% \postcode{43017-6221} -%} -%\email{trovato@corporation.com} -% -%\author{G.K.M. Tobin} -%\authornote{The secretary disavows any knowledge of this author's actions.} -%\affiliation{% -% \institution{Institute for Clarity in Documentation} -% \streetaddress{P.O. Box 1212} -% \city{Dublin} -% \state{Ohio} -% \postcode{43017-6221} -%} -%\email{webmaster@marysville-ohio.com} -% -%\author{Lars Th{\o}rv{\"a}ld} -%\authornote{This author is the -% one who did all the really hard work.} -%\affiliation{% -% \institution{The Th{\o}rv{\"a}ld Group} -% \streetaddress{1 Th{\o}rv{\"a}ld Circle} -% \city{Hekla} -% \country{Iceland}} -%\email{larst@affiliation.org} -% -%\author{Lawrence P. Leipuner} -%\affiliation{ -% \institution{Brookhaven Laboratories} -% \streetaddress{P.O. Box 5000}} -%\email{lleipuner@researchlabs.org} -% -%\author{Sean Fogarty} -%\affiliation{% -% \institution{NASA Ames Research Center} -% \city{Moffett Field} -% \state{California} -% \postcode{94035}} -%\email{fogartys@amesres.org} -% -%\author{Charles Palmer} -%\affiliation{% -% \institution{Palmer Research Laboratories} -% \streetaddress{8600 Datapoint Drive} -% \city{San Antonio} -% \state{Texas} -% \postcode{78229}} -%\email{cpalmer@prl.com} -% -%\author{John Smith} -%\affiliation{\institution{The Th{\o}rv{\"a}ld Group}} -%\email{jsmith@affiliation.org} -% -%\author{Julius P.~Kumquat} -%\affiliation{\institution{The Kumquat Consortium}} -%\email{jpkumquat@consortium.net} - -% The default list of authors is too long for headers} -\renewcommand{\shortauthors}{Firstname Lastname et. al.} - - -\begin{abstract} -to be written -\end{abstract} - - -% -% The code below should be generated by the tool at -% http://dl.acm.org/ccs.cfm -% Please copy and paste the code instead of the example below. -% - \begin{CCSXML} - - -10010147.10010178.10010205.10010208 -Computing methodologies~Continuous space search -500 - - -\end{CCSXML} - -\ccsdesc[500]{Computing methodologies~Continuous space search} - - -% We no longer use \terms command -%\terms{Algorithms} - -% Complete with anything that is needed -\keywords{Benchmarking, Black-box optimization} - -\maketitle - - -% \section{Introduction} -% -% \section{Algorithm Presentation} -% -% \section{Experimental Procedure} -% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\section{CPU Timing} -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% note that the following text is just a proposal and can/should be changed to your needs: -In order to evaluate the CPU timing of the algorithm, we have run the \change{MY-ALGORITHM-NAME} on the \change{bbob test suite \cite{hansen2010fun}} with restarts for a maximum budget equal to \change{$400 (D + 2)$} function evaluations according to \cite{hansen2016exp}. The \change{C/Java/Python/Matlab/Octave} code was run on a \change{Mac Intel(R) Core(TM) i5-2400S CPU @ 2.50GHz} with \change{1} processor and \change{4} cores \change{and (compile) options xxx}. The time per function evaluation for dimensions 2, 3, 5, 10, 20\change{, 40} equals \change{$x.x$}, \change{$x.x$}, \change{$x.x$}, \change{$xx$}, \change{$xxx$}\change{, and $xxx$} seconds respectively. - - -\change{repeat the above for any algorithm tested} - - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\section{Results} -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -Results from experiments according to \cite{hansen2016exp} and \cite{hansen2016perfass} on the -benchmark functions given in \cite{wp200901_2010,hansen2010fun} are -presented in Figures~\ref{fig:scaling}, \ref{fig:ECDFs05D} and -\ref{fig:ECDFs20D} and in Tables~\ref{tab:ERTs5} and~\ref{tab:ERTs20}. -The experiments were performed with COCO \cite{hansen2020cocoplat}, version -\change{2.4}, the plots were produced with version \change{2.4}. - -The \textbf{expected runtime (ERT)}, used in the figures and tables, -depends on a given target function value, $\ftarget=\fopt+\Df$, and is -computed over all relevant trials as the number of function -evaluations executed during each trial while the best function value -did not reach \ftarget, summed over all trials and divided by the -number of trials that actually reached \ftarget\ -\cite{hansen2012exp,price1997dev}. \textbf{Statistical significance} -is tested with the rank-sum test for a given target $\Delta\ftarget$ -%($10^{-8}$ as in Figure~\ref{fig:scaling}) -using, for each trial, -either the number of needed function evaluations to reach -$\Delta\ftarget$ (inverted and multiplied by $-1$), or, if the target -was not reached, the best $\Df$-value achieved, measured only up to -the smallest number of overall function evaluations for any -unsuccessful trial under consideration. - - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -% Scaling of ERT with dimension - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\begin{figure*} -\centering -\begin{tabular}{@{}c@{}c@{}c@{}c@{}} -\includegraphics[width=0.238\textwidth]{ppfigs_f001}& -\includegraphics[width=0.238\textwidth]{ppfigs_f002}& -\includegraphics[width=0.238\textwidth]{ppfigs_f003}& -\includegraphics[width=0.238\textwidth]{ppfigs_f004}\\ -\includegraphics[width=0.238\textwidth]{ppfigs_f005}& -\includegraphics[width=0.238\textwidth]{ppfigs_f006}& -\includegraphics[width=0.238\textwidth]{ppfigs_f007}& -\includegraphics[width=0.238\textwidth]{ppfigs_f008}\\ -\includegraphics[width=0.238\textwidth]{ppfigs_f009}& -\includegraphics[width=0.238\textwidth]{ppfigs_f010}& -\includegraphics[width=0.238\textwidth]{ppfigs_f011}& -\includegraphics[width=0.238\textwidth]{ppfigs_f012}\\ -\includegraphics[width=0.238\textwidth]{ppfigs_f013}& -\includegraphics[width=0.238\textwidth]{ppfigs_f014}& -\includegraphics[width=0.238\textwidth]{ppfigs_f015}& -\includegraphics[width=0.238\textwidth]{ppfigs_f016}\\ -\includegraphics[width=0.238\textwidth]{ppfigs_f017}& -\includegraphics[width=0.238\textwidth]{ppfigs_f018}& -\includegraphics[width=0.238\textwidth]{ppfigs_f019}& -\includegraphics[width=0.238\textwidth]{ppfigs_f020}\\ -\includegraphics[width=0.238\textwidth]{ppfigs_f021}& -\includegraphics[width=0.238\textwidth]{ppfigs_f022}& -\includegraphics[width=0.238\textwidth]{ppfigs_f023}& -\includegraphics[width=0.238\textwidth]{ppfigs_f024} -\end{tabular} -\vspace*{-0.2cm} -\caption[Expected running time divided by dimension -versus dimension]{ -\label{fig:scaling} -% command defined in cocopp_commands.tex: -\bbobppfigslegend{$f_1$ and $f_{24}$} % \algorithmA can be defined above, see above -} -% -\end{figure*} - - - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -% Empirical Cumulative Distribution Functions (ECDFs) per function group -% for dimension 5. - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\newcommand{\rot}[2][2.5]{ - \hspace*{-3.5\baselineskip}% - \begin{rotate}{90}\hspace{#1em}#2 - \end{rotate}} -\newcommand{\includeperfprof}[1]{% include and annotate at the side - \input{\bbobdatapath\algsfolder #1}% - \includegraphics[height=0.24\textheight]{#1}% - %\raisebox{.12\textheight}{ - %\parbox[b][.24\textheight]{.0868\textwidth}{\begin{scriptsize} - % \perfprofsidepanel % this is "\algaperfprof \vfill \algbperfprof \vfill" etc - %\end{scriptsize}} - %} -} -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\begin{figure*} -\begin{tabular}{@{}c@{\hspace*{0.05\textwidth}}c@{}} - separable fcts & moderate fcts \\ - \includeperfprof{pprldmany_05D_separ} & - \includeperfprof{pprldmany_05D_lcond} \\ -ill-conditioned fcts & multi-modal fcts \\ - \includeperfprof{pprldmany_05D_hcond} & - \includeperfprof{pprldmany_05D_multi} \\ - weakly structured multi-modal fcts & all functions\\ - \includeperfprof{pprldmany_05D_mult2} & - \includeperfprof{pprldmany_05D_noiselessall} - \end{tabular} -\caption{ -\label{fig:ECDFs05D} -\bbobECDFslegend{5} -} -\end{figure*} - - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -% Empirical Cumulative Distribution Functions (ECDFs) per function group -% for dimension 20. - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\begin{figure*} - \begin{tabular}{@{}c@{\hspace*{0.05\textwidth}}c@{}} - separable fcts & moderate fcts \\ - \includeperfprof{pprldmany_20D_separ} & - \includeperfprof{pprldmany_20D_lcond} \\ -ill-conditioned fcts & multi-modal fcts \\ - \includeperfprof{pprldmany_20D_hcond} & - \includeperfprof{pprldmany_20D_multi} \\ - weakly structured multi-modal fcts & all functions\\ - \includeperfprof{pprldmany_20D_mult2} & - \includeperfprof{pprldmany_20D_noiselessall} - \end{tabular} -\caption{ -\label{fig:ECDFs20D} -\bbobECDFslegend{20} -} -\end{figure*} - - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -% Expected runtime (ERT in number of function evaluations) -% divided by the best ERT measured during BBOB-2009 (given in the respective -% first row) for functions $f_1$--$f_{24}$ for dimension 5. - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\begin{table*}\tiny -%\hfill5-D\hfill~\\[1ex] -{\normalsize \color{red} -\ifthenelse{\isundefined{\algorithmG}}{}{more than 6 algorithms: please split the tables below by hand until it fits to the page limits} -} -\mbox{\begin{minipage}[t]{0.499\textwidth}\tiny -\centering -\pptablesheader -\input{\bbobdatapath\algsfolder pptables_f001_05D} - -\input{\bbobdatapath\algsfolder pptables_f002_05D} - -\input{\bbobdatapath\algsfolder pptables_f003_05D} - -\input{\bbobdatapath\algsfolder pptables_f004_05D} - -\input{\bbobdatapath\algsfolder pptables_f005_05D} - -\input{\bbobdatapath\algsfolder pptables_f006_05D} - -\input{\bbobdatapath\algsfolder pptables_f007_05D} - -\input{\bbobdatapath\algsfolder pptables_f008_05D} - -\input{\bbobdatapath\algsfolder pptables_f009_05D} - -\input{\bbobdatapath\algsfolder pptables_f010_05D} - -\input{\bbobdatapath\algsfolder pptables_f011_05D} - -\input{\bbobdatapath\algsfolder pptables_f012_05D} -\end{tabularx} - -\end{minipage} -\hspace{0.002\textwidth} -\begin{minipage}[t]{0.499\textwidth}\tiny -\centering -\pptablesheader -\input{\bbobdatapath\algsfolder pptables_f013_05D} - -\input{\bbobdatapath\algsfolder pptables_f014_05D} - -\input{\bbobdatapath\algsfolder pptables_f015_05D} - -\input{\bbobdatapath\algsfolder pptables_f016_05D} - -\input{\bbobdatapath\algsfolder pptables_f017_05D} - -\input{\bbobdatapath\algsfolder pptables_f018_05D} - -\input{\bbobdatapath\algsfolder pptables_f019_05D} - -\input{\bbobdatapath\algsfolder pptables_f020_05D} - -\input{\bbobdatapath\algsfolder pptables_f021_05D} - -\input{\bbobdatapath\algsfolder pptables_f022_05D} - -\input{\bbobdatapath\algsfolder pptables_f023_05D} - -\input{\bbobdatapath\algsfolder pptables_f024_05D} -\end{tabularx} -\end{minipage}} - - \caption{\label{tab:ERTs5} - \bbobpptablesmanylegend{dimension $5$} - } -\end{table*} - - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -% Expected runtime (ERT in number of function evaluations) -% divided by the best ERT measured during BBOB-2009 (given in the respective -% first row) for functions $f_1$--$f_{24}$ for dimension 20. - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\begin{table*}\tiny -%\hfill20-D\hfill~\\[1ex] -\mbox{\begin{minipage}[t]{0.499\textwidth}\tiny -\centering -\pptablesheader -\input{\bbobdatapath\algsfolder pptables_f001_20D} - -\input{\bbobdatapath\algsfolder pptables_f002_20D} - -\input{\bbobdatapath\algsfolder pptables_f003_20D} - -\input{\bbobdatapath\algsfolder pptables_f004_20D} - -\input{\bbobdatapath\algsfolder pptables_f005_20D} - -\input{\bbobdatapath\algsfolder pptables_f006_20D} - -\input{\bbobdatapath\algsfolder pptables_f007_20D} - -\input{\bbobdatapath\algsfolder pptables_f008_20D} - -\input{\bbobdatapath\algsfolder pptables_f009_20D} - -\input{\bbobdatapath\algsfolder pptables_f010_20D} - -\input{\bbobdatapath\algsfolder pptables_f011_20D} - -\input{\bbobdatapath\algsfolder pptables_f012_20D} -\end{tabularx} -\end{minipage} -\hspace{0.002\textwidth} -\begin{minipage}[t]{0.499\textwidth}\tiny -\centering -\pptablesheader -\input{\bbobdatapath\algsfolder pptables_f013_20D} - -\input{\bbobdatapath\algsfolder pptables_f014_20D} - -\input{\bbobdatapath\algsfolder pptables_f015_20D} - -\input{\bbobdatapath\algsfolder pptables_f016_20D} - -\input{\bbobdatapath\algsfolder pptables_f017_20D} - -\input{\bbobdatapath\algsfolder pptables_f018_20D} - -\input{\bbobdatapath\algsfolder pptables_f019_20D} - -\input{\bbobdatapath\algsfolder pptables_f020_20D} - -\input{\bbobdatapath\algsfolder pptables_f021_20D} - -\input{\bbobdatapath\algsfolder pptables_f022_20D} - -\input{\bbobdatapath\algsfolder pptables_f023_20D} - -\input{\bbobdatapath\algsfolder pptables_f024_20D} -\end{tabularx} -\end{minipage}} - \caption{\label{tab:ERTs20} - \bbobpptablesmanylegend{dimension $20$} -} -\end{table*} - - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -\bibliographystyle{ACM-Reference-Format} -\bibliography{./bbob} % bbob.bib is the name of the Bibliography in this case - -\clearpage % otherwise the last figure might be missing - - -\end{document} diff --git a/code-postprocessing/latex-templates/templateBIOBJarticle.tex b/code-postprocessing/latex-templates/templateBIOBJarticle.tex index f3062887a..aae49e386 100644 --- a/code-postprocessing/latex-templates/templateBIOBJarticle.tex +++ b/code-postprocessing/latex-templates/templateBIOBJarticle.tex @@ -1,38 +1,8 @@ \documentclass[sigconf]{acmart} -\usepackage{booktabs} % For formal tables -\usepackage{graphicx} -\usepackage{rotating} -\definecolor{Gray}{gray}{0.6} -\usepackage{xspace} +% include preamble: +\include{templatepreamble.tex} -% Copyright -%\setcopyright{none} -%\setcopyright{acmcopyright} -%\setcopyright{acmlicensed} -\setcopyright{rightsretained} -%\setcopyright{usgov} -%\setcopyright{usgovmixed} -%\setcopyright{cagov} -%\setcopyright{cagovmixed} - - -% DOI -\acmDOI{10.1145/123_4} - -% ISBN -\acmISBN{123-4567-24-567/18/07} - -%Conference -\acmConference[GECCO '19]{the Genetic and Evolutionary Computation Conference 2019}{July 13--17, 2019}{Prague, Czech Republic} -\acmYear{2019} -\copyrightyear{2019} - -\acmPrice{15.00} - - - -%%%%%%%%%%%%%%%%%%%%%% END OF PREAMBLE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%% TO BE EDITED %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -47,21 +17,8 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \graphicspath{{\bbobdatapath\algfolder}} -\newcommand{\DIM}{\ensuremath{\mathrm{DIM}}} -\newcommand{\ERT}{\ensuremath{\mathrm{ERT}}} -\newcommand{\FEvals}{\ensuremath{\mathrm{FEvals}}} -\newcommand{\nruns}{\ensuremath{\mathrm{Nruns}}} -\newcommand{\Dfb}{\ensuremath{\Delta f_{\mathrm{best}}}} -%\newcommand{\Df}{\ensuremath{\Delta f}} -\newcommand{\DI}{\ensuremath{\Delta I_{\mathrm{HV}}^{\mathrm{COCO}}}} -\newcommand{\nbFEs}{\ensuremath{\mathrm{\#FEs}}} -\newcommand{\ftarget}{\ensuremath{f_\mathrm{t}}} -\newcommand{\CrE}{\ensuremath{\mathrm{CrE}}} -\newcommand{\hvref}{\ensuremath{I_\mathrm{ref}}} -\newcommand{\fopt}{\hvref} -\newcommand{\change}[1]{{\color{red} #1}} -\newcommand{\TODO}[1]{{\color{orange} !!! #1 !!!}} -\newcommand{\bbobbiobj}{{\ttfamily bbob-biobj}\xspace} +% overwrite some definitions from single-objective case in preamble: +\renewcommand{\fopt}{\hvref} %%%%%%%%%%%%%%%%%%%%%% END OF PREAMBLE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -70,8 +27,6 @@ \title{Black-Box Optimization Benchmarking Template for the Bi-Objective \bbobbiobj Test Suite} \renewcommand{\shorttitle}{Template for Benchmarking Single Algorithms on the \bbobbiobj Testbed} -\titlenote{Submission deadline: April 3rd.} -%Camera-ready paper due April 24th.}} \subtitle{Draft version} @@ -197,7 +152,8 @@ \section{Results} Results of \algname\ from experiments according to \cite{hansen2016exp}, \cite{hansen2016perfass} and \cite{biobj2016perfass} on the benchmark functions given in \cite{biobj2016func} are presented in Figures~\ref{fig:ECDFsingleOne}, \ref{fig:ECDFsingleTwo}, \ref{fig:ECDFsingleThree}, and \ref{fig:ECDFsGroups}, and in -Tables~\ref{tab:ERTs5} and \ref{tab:ERTs20}. The experiments were performed with COCO \cite{hansen2020cocoplat}, version \change{2.4}, the plots were produced with version \change{2.4}. +Tables~\ref{tab:ERTs5} and \ref{tab:ERTs20}. The experiments were performed with COCO \cite{hansen2020cocoplat}, +version \change{\version}, the plots were produced with version \change{\version}. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -311,10 +267,6 @@ \section{Results} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\newcommand{\rot}[2][2.5]{ - \hspace*{-3.5\baselineskip}% - \begin{rotate}{90}\hspace{#1em}#2 - \end{rotate}} \begin{figure*} \begin{tabular}{c@{\hspace*{-0.00\textwidth}}c@{\hspace*{-0.00\textwidth}}c@{\hspace*{-0.00\textwidth}}c} separable-separable & separable-moderate & separable-ill-cond. & separable-multimodal\\ @@ -491,7 +443,7 @@ \section{Results} \end{minipage}} - \caption[Table of ERTs]{\label{tab:ERTs5}\bbobpptablecaption{dimension $5$} + \caption[Table of ERTs]{\label{tab:ERTs5}\bbobpptablecaption{dimension $5$} \cocoversion } \end{table*} %sideways @@ -643,7 +595,7 @@ \section{Results} \end{minipage}} - \caption[Table of ERTs]{\label{tab:ERTs20}\bbobpptablecaption{dimension $20$} + \caption[Table of ERTs]{\label{tab:ERTs20}\bbobpptablecaption{dimension $20$} \cocoversion } \end{table*} diff --git a/code-postprocessing/latex-templates/templateBIOBJmultiple.tex b/code-postprocessing/latex-templates/templateBIOBJmultiple.tex index 09eb05e68..43251ec3c 100644 --- a/code-postprocessing/latex-templates/templateBIOBJmultiple.tex +++ b/code-postprocessing/latex-templates/templateBIOBJmultiple.tex @@ -1,46 +1,9 @@ \documentclass[sigconf]{acmart} -\usepackage{booktabs} % For formal tables -\usepackage{graphicx} -\usepackage{rotating} -\definecolor{Gray}{gray}{0.6} -\usepackage{tabularx} -\usepackage{xspace} -\usepackage{float} -\usepackage{xstring} % for string operations -\usepackage{wasysym} % Table legend with symbols input from post-processing -\usepackage{MnSymbol} % Table legend with symbols input from post-processing -\usepackage{ifthen} +% include preamble: +\include{templatepreamble.tex} -% Copyright -%\setcopyright{none} -%\setcopyright{acmcopyright} -%\setcopyright{acmlicensed} -\setcopyright{rightsretained} -%\setcopyright{usgov} -%\setcopyright{usgovmixed} -%\setcopyright{cagov} -%\setcopyright{cagovmixed} - - -% DOI -\acmDOI{10.1145/123_4} - -% ISBN -\acmISBN{123-4567-24-567/18/07} - -%Conference -\acmConference[GECCO '19]{the Genetic and Evolutionary Computation Conference 2019}{July 13--17, 2019}{Prague, Czech Republic} -\acmYear{2019} -\copyrightyear{2019} - -\acmPrice{15.00} - - - -%%%%%%%%%%%%%%%%%%%%%% END OF PREAMBLE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%% TO BE EDITED %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -60,33 +23,15 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\newcommand{\DIM}{\ensuremath{\mathrm{DIM}}} -\newcommand{\ERT}{\ensuremath{\mathrm{ERT}}} -\newcommand{\FEvals}{\ensuremath{\mathrm{FEvals}}} -\newcommand{\nruns}{\ensuremath{\mathrm{Nruns}}} -\newcommand{\Dfb}{\ensuremath{\Delta f_{\mathrm{best}}}} -\newcommand{\Df}{\ensuremath{\Delta f}} -\newcommand{\DI}{\ensuremath{\Delta I_{\mathrm{HV}}^{\mathrm{COCO}}}} -\newcommand{\nbFEs}{\ensuremath{\mathrm{\#FEs}}} -\newcommand{\ftarget}{\ensuremath{f_\mathrm{t}}} -\newcommand{\Itarget}{\ensuremath{I_\mathrm{target}}} -\newcommand{\CrE}{\ensuremath{\mathrm{CrE}}} -\newcommand{\hvref}{\ensuremath{I_\mathrm{ref}}} -\newcommand{\fopt}{\hvref} -\newcommand{\change}[1]{{\color{red} #1}} -\newcommand{\TODO}[1]{{\color{orange} !!! #1 !!!}} -\newcommand{\bbobbiobj}{{\ttfamily bbob-biobj}\xspace} +% redefine some single-objective things for the multiobjective case: +\renewcommand{\fopt}{\hvref} -%%%%%%%%%%%%%%%%%%%%%% END OF PREAMBLE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - \begin{document} \title{Black-Box Optimization Benchmarking Template for the Comparison of Multiple Algorithms on the Biobjective \bbobbiobj Testbed} \renewcommand{\shorttitle}{Template to Compare Multiple Algorithms on the \bbobbiobj Testbed} -\titlenote{Submission deadline: April 3rd.} -%Camera-ready paper due April 24th.}} \subtitle{Draft version} @@ -216,7 +161,7 @@ \section{Results} Figures~\ref{fig:ECDFsingleOne}, \ref{fig:ECDFsingleTwo}, \ref{fig:ECDFsGroupsFive} and \ref{fig:ECDFsGroupsTwenty} and in Tables~\ref{tab:ERTs5} and~\ref{tab:ERTs20}. The experiments were performed with COCO \cite{hansen2020cocoplat}, version -\change{2.4}, the plots were produced with version \change{2.4}. +\change{\version}, the plots were produced with version \change{\version}. The \textbf{expected runtime (ERT)}, used in the %figures and tables, @@ -545,7 +490,7 @@ \section{Results} \end{minipage}} \caption{\label{tab:ERTs5} - \bbobpptablesmanylegend{dimension $5$} + \bbobpptablesmanylegend{dimension $5$} \cocoversion } \end{table*} %sideways @@ -699,7 +644,7 @@ \section{Results} \end{minipage}} \caption{\label{tab:ERTs20} - \bbobpptablesmanylegend{dimension $20$} + \bbobpptablesmanylegend{dimension $20$} \cocoversion } \end{table*} @@ -802,19 +747,13 @@ \section{Results} } \end{figure*} -\IfFileExists{\bbobdatapath\algsfolder ppfig2_f001.pdf}{}{\end{document}} +\IfFileExists{\bbobdatapath\algsfolder ppscatter_f001.pdf}{}{\end{document}} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Scatter plots per function. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\newcommand{\rot}[2][2.5]{ - \hspace*{-3.5\baselineskip}% - \begin{rotate}{90}\hspace{#1em}#2 - \end{rotate}} -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \begin{figure*} \centering \begin{tabular}{*{5}{@{}c@{}}} diff --git a/code-postprocessing/latex-templates/templateMIXINTarticle.tex b/code-postprocessing/latex-templates/templateMIXINTarticle.tex index d46652d00..562227062 100644 --- a/code-postprocessing/latex-templates/templateMIXINTarticle.tex +++ b/code-postprocessing/latex-templates/templateMIXINTarticle.tex @@ -4,57 +4,10 @@ % optimization algorithms, that were run on the % bbob-mmixint test suite of COCO. Any number of % algorithms should work with this template. -% - - -\usepackage{booktabs} % For formal tables -\usepackage{graphicx} -\usepackage{rotating} -\definecolor{Gray}{gray}{0.6} -\usepackage{tabularx} -\usepackage{xspace} -\usepackage{float} -\usepackage{xstring} % for string operations -\usepackage{wasysym} % Table legend with symbols input from post-processing -\usepackage{MnSymbol} % Table legend with symbols input from post-processing -\usepackage{ifthen} -\newcommand{\includeperfprof}[1]{% include and annotate at the side - \input{\bbobdatapath\algsfolder #1}% - \includegraphics[height=0.24\textheight]{#1}% - %\raisebox{.12\textheight}{ - %\parbox[b][.24\textheight]{.0868\textwidth}{\begin{scriptsize} - % \perfprofsidepanel % this is "\algaperfprof \vfill \algbperfprof \vfill" etc - %\end{scriptsize}} - %} -} - - - +% include preamble: +\include{templatepreamble.tex} -% Copyright -%\setcopyright{none} -%\setcopyright{acmcopyright} -%\setcopyright{acmlicensed} -\setcopyright{rightsretained} -%\setcopyright{usgov} -%\setcopyright{usgovmixed} -%\setcopyright{cagov} -%\setcopyright{cagovmixed} - - -% DOI -\acmDOI{10.1145/123_4} - -% ISBN -\acmISBN{123-4567-24-567/18/07} - -%Conference -\acmConference[GECCO '19]{the Genetic and Evolutionary Computation Conference 2019}{July 13--17, 2019}{Prague, Czech Republic} -\acmYear{2019} -\copyrightyear{2019} - -\acmPrice{15.00} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%% TO BE EDITED %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -90,38 +43,11 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\newcommand{\DIM}{\ensuremath{\mathrm{DIM}}} -\newcommand{\ERT}{\ensuremath{\mathrm{ERT}}} -\newcommand{\FEvals}{\ensuremath{\mathrm{FEvals}}} -\newcommand{\nruns}{\ensuremath{\mathrm{Nruns}}} -\newcommand{\Dfb}{\ensuremath{\Delta f_{\mathrm{best}}}} -\newcommand{\Df}{\ensuremath{\Delta f}} -\newcommand{\DI}{\ensuremath{\Delta I_{\mathrm{HV}}^{\mathrm{COCO}}}} -\newcommand{\nbFEs}{\ensuremath{\mathrm{\#FEs}}} -\newcommand{\ftarget}{\ensuremath{f_\mathrm{t}}} -\newcommand{\Itarget}{\ensuremath{I_\mathrm{target}}} -\newcommand{\CrE}{\ensuremath{\mathrm{CrE}}} -\newcommand{\hvref}{\ensuremath{I_\mathrm{ref}}} -\newcommand{\fopt}{\hvref} -\newcommand{\change}[1]{{\color{red} #1}} -\newcommand{\TODO}[1]{{\color{orange} !!! #1 !!!}} -\newcommand{\bbobbiobj}{{\ttfamily bbob-biobj}\xspace} -\newcommand{\bbobnoisy}{{\ttfamily bbob-noisy}\xspace} -\newcommand{\bbobmixint}{{\ttfamily bbob-mixint}\xspace} -\newcommand{\rot}[2][2.5]{ - \hspace*{-3.5\baselineskip}% - \begin{rotate}{90}\hspace{#1em}#2 - \end{rotate}} - -%%%%%%%%%%%%%%%%%%%%%% END OF PREAMBLE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - \begin{document} \title{Black-Box Optimization Benchmarking Template for the Comparison of Algorithms on the \bbobmixint Testbed} \renewcommand{\shorttitle}{Template to Compare Algorithms on the \bbobmixint Testbed} -\titlenote{Submission deadline: April 3rd.} -%Camera-ready paper due April 24th.}} \subtitle{Draft version} @@ -265,7 +191,7 @@ \section{Results} The experiments were performed with COCO \cite{hansen2020cocoplat}, version -\change{2.4}, the plots were produced with version \change{2.4}. +\change{\version}, the plots were produced with version \change{\version}. The \textbf{expected runtime (ERT)}, used in the %figures and tables, @@ -386,7 +312,7 @@ \section{Results} %\input{\bbobdatapath\algfolder pploglosstable_10D_noiselessall}\\ %\input{\bbobdatapath\algfolder pploglosstable_40D_noiselessall} %\caption{\label{tab:ERTloss}% -%\bbobloglosstablecaption{} +%\bbobloglosstablecaption{} \cocoversion %} %\end{figure} @@ -400,8 +326,6 @@ \section{Results} %\begin{figure} %\begin{tabular}{@{}l@{}@{}l@{}} %\multicolumn{1}{c}{10-D} & \multicolumn{1}{c}{40-D}\\ -%%\rot{all functions} -%%\hspace*{-2mm} %\rot[2.8]{separable fcts} %\hspace*{-1.4mm} %\includegraphics[width=0.24\textwidth]{pplogloss_10D_separ} & @@ -509,7 +433,7 @@ \section{Results} \end{minipage}} -\caption[Table of ERTs]{\label{tab:ERTs10}\bbobpptablecaption{dimension $10$} +\caption[Table of ERTs]{\label{tab:ERTs10}\bbobpptablecaption{dimension $10$} \cocoversion } \end{table*} @@ -593,7 +517,7 @@ \section{Results} \end{minipage}} -\caption[Table of ERTs]{\label{tab:ERTs40}\bbobpptablecaption{dimension $40$} +\caption[Table of ERTs]{\label{tab:ERTs40}\bbobpptablecaption{dimension $40$} \cocoversion } \end{table*} @@ -790,7 +714,7 @@ \section{Results} \end{minipage}} \caption{\label{tab:ERTs10} -\bbobpptablesmanylegend{dimension $10$} +\bbobpptablesmanylegend{dimension $10$} \cocoversion } \end{table*} @@ -844,7 +768,7 @@ \section{Results} \end{minipage}} \caption{\label{tab:ERTs40} -\bbobpptablesmanylegend{dimension $40$} +\bbobpptablesmanylegend{dimension $40$} \cocoversion } \end{table*} diff --git a/code-postprocessing/latex-templates/templateNOISYarticle.tex b/code-postprocessing/latex-templates/templateNOISYarticle.tex index 638e09f11..478dfd5a8 100644 --- a/code-postprocessing/latex-templates/templateNOISYarticle.tex +++ b/code-postprocessing/latex-templates/templateNOISYarticle.tex @@ -6,46 +6,9 @@ % algorithms should work with this template. % +% include preamble: +\include{templatepreamble.tex} -\usepackage{booktabs} % For formal tables -\usepackage{graphicx} -\usepackage{rotating} -\definecolor{Gray}{gray}{0.6} -\usepackage{tabularx} -\usepackage{xspace} -\usepackage{float} -\usepackage{xstring} % for string operations -\usepackage{wasysym} % Table legend with symbols input from post-processing -\usepackage{MnSymbol} % Table legend with symbols input from post-processing -\usepackage{ifthen} - - - - - -% Copyright -%\setcopyright{none} -%\setcopyright{acmcopyright} -%\setcopyright{acmlicensed} -\setcopyright{rightsretained} -%\setcopyright{usgov} -%\setcopyright{usgovmixed} -%\setcopyright{cagov} -%\setcopyright{cagovmixed} - - -% DOI -\acmDOI{10.1145/123_4} - -% ISBN -\acmISBN{123-4567-24-567/18/07} - -%Conference -\acmConference[GECCO '19]{the Genetic and Evolutionary Computation Conference 2019}{July 13--17, 2019}{Prague, Czech Republic} -\acmYear{2019} -\copyrightyear{2019} - -\acmPrice{15.00} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%% TO BE EDITED %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -94,37 +57,11 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\newcommand{\DIM}{\ensuremath{\mathrm{DIM}}} -\newcommand{\ERT}{\ensuremath{\mathrm{ERT}}} -\newcommand{\FEvals}{\ensuremath{\mathrm{FEvals}}} -\newcommand{\nruns}{\ensuremath{\mathrm{Nruns}}} -\newcommand{\Dfb}{\ensuremath{\Delta f_{\mathrm{best}}}} -\newcommand{\Df}{\ensuremath{\Delta f}} -\newcommand{\DI}{\ensuremath{\Delta I_{\mathrm{HV}}^{\mathrm{COCO}}}} -\newcommand{\nbFEs}{\ensuremath{\mathrm{\#FEs}}} -\newcommand{\ftarget}{\ensuremath{f_\mathrm{t}}} -\newcommand{\Itarget}{\ensuremath{I_\mathrm{target}}} -\newcommand{\CrE}{\ensuremath{\mathrm{CrE}}} -\newcommand{\hvref}{\ensuremath{I_\mathrm{ref}}} -\newcommand{\fopt}{\hvref} -\newcommand{\change}[1]{{\color{red} #1}} -\newcommand{\TODO}[1]{{\color{orange} !!! #1 !!!}} -\newcommand{\bbobbiobj}{{\ttfamily bbob-biobj}\xspace} -\newcommand{\bbobnoisy}{{\ttfamily bbob-noisy}\xspace} -\newcommand{\rot}[2][2.5]{ - \hspace*{-3.5\baselineskip}% - \begin{rotate}{90}\hspace{#1em}#2 - \end{rotate}} - -%%%%%%%%%%%%%%%%%%%%%% END OF PREAMBLE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - \begin{document} \title{Black-Box Optimization Benchmarking Template for the Comparison of Algorithms on the \bbobnoisy Testbed} \renewcommand{\shorttitle}{Template to Compare Algorithms on the \bbobnoisy Testbed} -\titlenote{Submission deadline: April 3rd.} -%Camera-ready paper due April 24th.}} \subtitle{Draft version} @@ -265,7 +202,7 @@ \section{Results} }{}}} %% The experiments were performed with COCO \cite{hansen2020cocoplat}, version -\change{2.4}, the plots were produced with version \change{2.4}. +\change{\version}, the plots were produced with version \change{\version}. The \textbf{expected runtime (ERT)}, used in the %figures and tables, @@ -491,7 +428,7 @@ \section{Results} \vspace{1em} \caption[Table of ERTs]{\label{tab:ERTs} -\bbobpptablecaption{dimensions $5$ (left) and $20$ (right)} +\bbobpptablecaption{dimensions $5$ (left) and $20$ (right)} \cocoversion } \end{table*} @@ -512,7 +449,7 @@ \section{Results} \input{\bbobdatapath\algfolder pploglosstable_05D_nzall}\\ \input{\bbobdatapath\algfolder pploglosstable_20D_nzall} \caption{\label{tab:ERTloss}% -\bbobloglosstablecaption{} +\bbobloglosstablecaption{} \cocoversion } \end{figure} @@ -731,7 +668,7 @@ \section{Results} \end{tabularx} \end{minipage}} \caption{\label{tab:ERTs5} -\bbobpptablesmanylegend{dimension $5$} +\bbobpptablesmanylegend{dimension $5$} \cocoversion } \end{table*} @@ -790,7 +727,7 @@ \section{Results} \end{tabularx} \end{minipage}} \caption{\label{tab:ERTs20} - \bbobpptablesmanylegend{dimension $20$} + \bbobpptablesmanylegend{dimension $20$} \cocoversion } \end{table*} @@ -814,48 +751,42 @@ \section{Results} \small \centering \begin{tabular}{@{}c@{}*{5}{@{}c@{}}} - & {\sf 101 Sphere (moderate)} & {\sf 104 Rosenbrock (moderate)} & {\sf 107 Sphere} & {\sf 110 Rosenbrock} & {\sf 113 Step-ellipsoid} \\ \begin{turn}{90}\parbox{0.175\textwidth}{\centering\sf Gauss noise\vspace{1em}}\end{turn} & - \includegraphics[height=0.175\textwidth, trim= 30mm 4mm 28mm 12mm, clip]{ppscatter_f101}& - \includegraphics[height=0.175\textwidth, trim= 30mm 4mm 28mm 12mm, clip]{ppscatter_f104}& - \includegraphics[height=0.175\textwidth, trim= 30mm 4mm 28mm 12mm, clip]{ppscatter_f107}& - \includegraphics[height=0.175\textwidth, trim= 30mm 4mm 28mm 12mm, clip]{ppscatter_f110}& - \includegraphics[height=0.175\textwidth, trim= 30mm 4mm 28mm 12mm, clip]{ppscatter_f113}\\ - & {\sf 102 Sphere (moderate)} & {\sf 105 Rosenbrock (moderate)} & {\sf 108 Sphere} & {\sf 111 Rosenbrock} & {\sf 114 Step-ellipsoid}\\ + \includegraphics[height=0.17\textwidth]{ppscatter_f101}& + \includegraphics[height=0.17\textwidth]{ppscatter_f104}& + \includegraphics[height=0.17\textwidth]{ppscatter_f107}& + \includegraphics[height=0.17\textwidth]{ppscatter_f110}& + \includegraphics[height=0.17\textwidth]{ppscatter_f113}\\ \begin{turn}{90}\parbox{0.175\textwidth}{\centering\sf uniform noise\vspace{1em}}\end{turn} & - \includegraphics[height=0.175\textwidth, trim= 30mm 4mm 28mm 12mm, clip]{ppscatter_f102}& - \includegraphics[height=0.175\textwidth, trim= 30mm 4mm 28mm 12mm, clip]{ppscatter_f105}& - \includegraphics[height=0.175\textwidth, trim= 30mm 4mm 28mm 12mm, clip]{ppscatter_f108}& - \includegraphics[height=0.175\textwidth, trim= 30mm 4mm 28mm 12mm, clip]{ppscatter_f111}& - \includegraphics[height=0.175\textwidth, trim= 30mm 4mm 28mm 12mm, clip]{ppscatter_f114}\\ - & {\sf 103 Sphere (moderate)} & {\sf 106 Rosenbrock (moderate)} & {\sf 109 Sphere} & {\sf 112 Rosenbrock} & {\sf 115 Step-ellipsoid}\\ + \includegraphics[height=0.17\textwidth]{ppscatter_f102}& + \includegraphics[height=0.17\textwidth]{ppscatter_f105}& + \includegraphics[height=0.17\textwidth]{ppscatter_f108}& + \includegraphics[height=0.17\textwidth]{ppscatter_f111}& + \includegraphics[height=0.17\textwidth]{ppscatter_f114}\\ \begin{turn}{90}\parbox{0.175\textwidth}{\centering\sf Cauchy noise\vspace{1em}}\end{turn} & - \includegraphics[height=0.175\textwidth, trim= 30mm 4mm 28mm 12mm, clip]{ppscatter_f103}& - \includegraphics[height=0.175\textwidth, trim= 30mm 4mm 28mm 12mm, clip]{ppscatter_f106}& - \includegraphics[height=0.175\textwidth, trim= 30mm 4mm 28mm 12mm, clip]{ppscatter_f109}& - \includegraphics[height=0.175\textwidth, trim= 30mm 4mm 28mm 12mm, clip]{ppscatter_f112}& - \includegraphics[height=0.175\textwidth, trim= 30mm 4mm 28mm 12mm, clip]{ppscatter_f115}\\\hline - & {\sf 116 Ellipsoid} & {\sf 119 Sum of diff.\ powers} & {\sf 122 Schaffer F7} & {\sf 125 Griewank-Rosenbrock} & {\sf 128 Gallagher}\\ + \includegraphics[height=0.17\textwidth]{ppscatter_f103}& + \includegraphics[height=0.17\textwidth]{ppscatter_f106}& + \includegraphics[height=0.17\textwidth]{ppscatter_f109}& + \includegraphics[height=0.17\textwidth]{ppscatter_f112}& + \includegraphics[height=0.17\textwidth]{ppscatter_f115}\\\hline \begin{turn}{90}\parbox{0.175\textwidth}{\centering\sf Gauss noise\vspace{1em}}\end{turn} & - \includegraphics[height=0.175\textwidth, trim= 30mm 4mm 28mm 12mm, clip]{ppscatter_f116}& - \includegraphics[height=0.175\textwidth, trim= 30mm 4mm 28mm 12mm, clip]{ppscatter_f119}& - \includegraphics[height=0.175\textwidth, trim= 30mm 4mm 28mm 12mm, clip]{ppscatter_f122}& - \includegraphics[height=0.175\textwidth, trim= 30mm 4mm 28mm 12mm, clip]{ppscatter_f125}& - \includegraphics[height=0.175\textwidth, trim= 30mm 4mm 28mm 12mm, clip]{ppscatter_f128}\\ - & {\sf 117 Ellipsoid} & {\sf 120 Sum of diff.\ powers} & {\sf 123 Schaffer F7} & {\sf 126 Griewank-Rosenbrock} & {\sf 129 Gallagher}\\ + \includegraphics[height=0.17\textwidth]{ppscatter_f116}& + \includegraphics[height=0.17\textwidth]{ppscatter_f119}& + \includegraphics[height=0.17\textwidth]{ppscatter_f122}& + \includegraphics[height=0.17\textwidth]{ppscatter_f125}& + \includegraphics[height=0.17\textwidth]{ppscatter_f128}\\ \begin{turn}{90}\parbox{0.175\textwidth}{\centering\sf uniform noise\vspace{1em}}\end{turn} & - \includegraphics[height=0.175\textwidth, trim= 30mm 4mm 28mm 12mm, clip]{ppscatter_f117}& - \includegraphics[height=0.175\textwidth, trim= 30mm 4mm 28mm 12mm, clip]{ppscatter_f120}& - \includegraphics[height=0.175\textwidth, trim= 30mm 4mm 28mm 12mm, clip]{ppscatter_f123}& - \includegraphics[height=0.175\textwidth, trim= 30mm 4mm 28mm 12mm, clip]{ppscatter_f126}& - \includegraphics[height=0.175\textwidth, trim= 30mm 4mm 28mm 12mm, clip]{ppscatter_f129}\\ -& {\sf 118 Ellipsoid} & {\sf 121 Sum of diff.\ powers} & {\sf 124 Schaffer F7} & {\sf 127 Griewank-Rosenbrock} & {\sf 130 Gallagher}\\ + \includegraphics[height=0.17\textwidth]{ppscatter_f117}& + \includegraphics[height=0.17\textwidth]{ppscatter_f120}& + \includegraphics[height=0.17\textwidth]{ppscatter_f123}& + \includegraphics[height=0.17\textwidth]{ppscatter_f126}& + \includegraphics[height=0.17\textwidth]{ppscatter_f129}\\ \begin{turn}{90}\parbox{0.175\textwidth}{~\centering\sf Cauchy noise\vspace{1em}}\end{turn} & - \includegraphics[height=0.175\textwidth, trim= 30mm 4mm 28mm 12mm, clip]{ppscatter_f118}& - \includegraphics[height=0.175\textwidth, trim= 30mm 4mm 28mm 12mm, clip]{ppscatter_f121}& - \includegraphics[height=0.175\textwidth, trim= 30mm 4mm 28mm 12mm, clip]{ppscatter_f124}& - \includegraphics[height=0.175\textwidth, trim= 30mm 4mm 28mm 12mm, clip]{ppscatter_f127}& - \includegraphics[height=0.175\textwidth, trim= 30mm 4mm 28mm 12mm, clip]{ppscatter_f130}\\[-1em] + \includegraphics[height=0.17\textwidth]{ppscatter_f118}& + \includegraphics[height=0.17\textwidth]{ppscatter_f121}& + \includegraphics[height=0.17\textwidth]{ppscatter_f124}& + \includegraphics[height=0.17\textwidth]{ppscatter_f127}& + \includegraphics[height=0.17\textwidth]{ppscatter_f130}\\[-1em] \end{tabular} \caption{\label{fig:scatterplots} \bbobppscatterlegend{$f_{101}$--$f_{130}$} diff --git a/code-postprocessing/setup.py b/code-postprocessing/setup.py index ac83f3723..7d854b26f 100644 --- a/code-postprocessing/setup.py +++ b/code-postprocessing/setup.py @@ -3,7 +3,9 @@ Prepare distribution:: - outcomment (activate) install requirements below + make a git tag (on GitHub) to have a new distribution release number + + outcomment (activate) install requirements below (in this file) python setup.py check python setup.py sdist bdist_wheel --universal > dist_call_output.txt ; less dist_call_output.txt # bdist_wininst @@ -14,9 +16,9 @@ Finally upload the distribution:: - twine upload dist/*2.x.x* # to not upload outdated stuff + twine upload dist/*2.4.x* # to not upload outdated stuff -and tag the version:: +and (possibly) tag the version:: git tag -a cocopp-2.3.x.xx -m "cocopp-2.3.x.xx uploaded to PyPI" diff --git a/code-preprocessing/archive-update/interface/coco_archive.c b/code-preprocessing/archive-update/interface/coco_archive.c index 16a23a16d..952da7cf0 100644 --- a/code-preprocessing/archive-update/interface/coco_archive.c +++ b/code-preprocessing/archive-update/interface/coco_archive.c @@ -1,16 +1,20 @@ -/* Generated by Cython 0.23.4 */ +/* Generated by Cython 0.29.23 */ +#ifndef PY_SSIZE_T_CLEAN #define PY_SSIZE_T_CLEAN +#endif /* PY_SSIZE_T_CLEAN */ #include "Python.h" #ifndef Py_PYTHON_H #error Python headers needed to compile C extensions, please install development version of Python. -#elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03020000) - #error Cython requires Python 2.6+ or Python 3.2+. +#elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) + #error Cython requires Python 2.6+ or Python 3.3+. #else -#define CYTHON_ABI "0_23_4" +#define CYTHON_ABI "0_29_23" +#define CYTHON_HEX_VERSION 0x001D17F0 +#define CYTHON_FUTURE_DIVISION 1 #include #ifndef offsetof -#define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) + #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) #endif #if !defined(WIN32) && !defined(MS_WINDOWS) #ifndef __stdcall @@ -29,6 +33,12 @@ #ifndef DL_EXPORT #define DL_EXPORT(t) t #endif +#define __PYX_COMMA , +#ifndef HAVE_LONG_LONG + #if PY_VERSION_HEX >= 0x02070000 + #define HAVE_LONG_LONG + #endif +#endif #ifndef PY_LONG_LONG #define PY_LONG_LONG LONG_LONG #endif @@ -36,17 +46,262 @@ #define Py_HUGE_VAL HUGE_VAL #endif #ifdef PYPY_VERSION -#define CYTHON_COMPILING_IN_PYPY 1 -#define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_PYPY 1 + #define CYTHON_COMPILING_IN_PYSTON 0 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 0 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #if PY_VERSION_HEX < 0x03050000 + #undef CYTHON_USE_ASYNC_SLOTS + #define CYTHON_USE_ASYNC_SLOTS 0 + #elif !defined(CYTHON_USE_ASYNC_SLOTS) + #define CYTHON_USE_ASYNC_SLOTS 1 + #endif + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #undef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 1 + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 0 + #undef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 +#elif defined(PYSTON_VERSION) + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_PYSTON 1 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #ifndef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #endif + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_ASYNC_SLOTS + #define CYTHON_USE_ASYNC_SLOTS 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #ifndef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 1 + #endif + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #ifndef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 1 + #endif + #ifndef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 1 + #endif + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 0 + #undef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 +#else + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_PYSTON 0 + #define CYTHON_COMPILING_IN_CPYTHON 1 + #ifndef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #endif + #if PY_VERSION_HEX < 0x02070000 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #elif !defined(CYTHON_USE_PYTYPE_LOOKUP) + #define CYTHON_USE_PYTYPE_LOOKUP 1 + #endif + #if PY_MAJOR_VERSION < 3 + #undef CYTHON_USE_ASYNC_SLOTS + #define CYTHON_USE_ASYNC_SLOTS 0 + #elif !defined(CYTHON_USE_ASYNC_SLOTS) + #define CYTHON_USE_ASYNC_SLOTS 1 + #endif + #if PY_VERSION_HEX < 0x02070000 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #elif !defined(CYTHON_USE_PYLONG_INTERNALS) + #define CYTHON_USE_PYLONG_INTERNALS 1 + #endif + #ifndef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 1 + #endif + #ifndef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 1 + #endif + #if PY_VERSION_HEX < 0x030300F0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #elif !defined(CYTHON_USE_UNICODE_WRITER) + #define CYTHON_USE_UNICODE_WRITER 1 + #endif + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #ifndef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 1 + #endif + #ifndef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 1 + #endif + #ifndef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 1 + #endif + #ifndef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 1 + #endif + #ifndef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000) + #endif + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1) + #endif + #ifndef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1) + #endif + #ifndef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3) + #endif +#endif +#if !defined(CYTHON_FAST_PYCCALL) +#define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1) +#endif +#if CYTHON_USE_PYLONG_INTERNALS + #include "longintrepr.h" + #undef SHIFT + #undef BASE + #undef MASK + #ifdef SIZEOF_VOID_P + enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) }; + #endif +#endif +#ifndef __has_attribute + #define __has_attribute(x) 0 +#endif +#ifndef __has_cpp_attribute + #define __has_cpp_attribute(x) 0 +#endif +#ifndef CYTHON_RESTRICT + #if defined(__GNUC__) + #define CYTHON_RESTRICT __restrict__ + #elif defined(_MSC_VER) && _MSC_VER >= 1400 + #define CYTHON_RESTRICT __restrict + #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define CYTHON_RESTRICT restrict + #else + #define CYTHON_RESTRICT + #endif +#endif +#ifndef CYTHON_UNUSED +# if defined(__GNUC__) +# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +#endif +#ifndef CYTHON_MAYBE_UNUSED_VAR +# if defined(__cplusplus) + template void CYTHON_MAYBE_UNUSED_VAR( const T& ) { } +# else +# define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x) +# endif +#endif +#ifndef CYTHON_NCP_UNUSED +# if CYTHON_COMPILING_IN_CPYTHON +# define CYTHON_NCP_UNUSED +# else +# define CYTHON_NCP_UNUSED CYTHON_UNUSED +# endif +#endif +#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None) +#ifdef _MSC_VER + #ifndef _MSC_STDINT_H_ + #if _MSC_VER < 1300 + typedef unsigned char uint8_t; + typedef unsigned int uint32_t; + #else + typedef unsigned __int8 uint8_t; + typedef unsigned __int32 uint32_t; + #endif + #endif #else -#define CYTHON_COMPILING_IN_PYPY 0 -#define CYTHON_COMPILING_IN_CPYTHON 1 + #include +#endif +#ifndef CYTHON_FALLTHROUGH + #if defined(__cplusplus) && __cplusplus >= 201103L + #if __has_cpp_attribute(fallthrough) + #define CYTHON_FALLTHROUGH [[fallthrough]] + #elif __has_cpp_attribute(clang::fallthrough) + #define CYTHON_FALLTHROUGH [[clang::fallthrough]] + #elif __has_cpp_attribute(gnu::fallthrough) + #define CYTHON_FALLTHROUGH [[gnu::fallthrough]] + #endif + #endif + #ifndef CYTHON_FALLTHROUGH + #if __has_attribute(fallthrough) + #define CYTHON_FALLTHROUGH __attribute__((fallthrough)) + #else + #define CYTHON_FALLTHROUGH + #endif + #endif + #if defined(__clang__ ) && defined(__apple_build_version__) + #if __apple_build_version__ < 7000000 + #undef CYTHON_FALLTHROUGH + #define CYTHON_FALLTHROUGH + #endif + #endif #endif -#if !defined(CYTHON_USE_PYLONG_INTERNALS) && CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x02070000 -#define CYTHON_USE_PYLONG_INTERNALS 1 + +#ifndef CYTHON_INLINE + #if defined(__clang__) + #define CYTHON_INLINE __inline__ __attribute__ ((__unused__)) + #elif defined(__GNUC__) + #define CYTHON_INLINE __inline__ + #elif defined(_MSC_VER) + #define CYTHON_INLINE __inline + #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define CYTHON_INLINE inline + #else + #define CYTHON_INLINE + #endif #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag) -#define Py_OptimizeFlag 0 + #define Py_OptimizeFlag 0 #endif #define __PYX_BUILD_PY_SSIZE_T "n" #define CYTHON_FORMAT_SSIZE_T "z" @@ -57,8 +312,13 @@ #define __Pyx_DefaultClassType PyClass_Type #else #define __Pyx_BUILTIN_MODULE_NAME "builtins" +#if PY_VERSION_HEX >= 0x030800A4 && PY_VERSION_HEX < 0x030800B2 + #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ + PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) +#else #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 #define __Pyx_DefaultClassType PyType_Type #endif #ifndef Py_TPFLAGS_CHECKTYPES @@ -73,23 +333,129 @@ #ifndef Py_TPFLAGS_HAVE_FINALIZE #define Py_TPFLAGS_HAVE_FINALIZE 0 #endif +#ifndef METH_STACKLESS + #define METH_STACKLESS 0 +#endif +#if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL) + #ifndef METH_FASTCALL + #define METH_FASTCALL 0x80 + #endif + typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs); + typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args, + Py_ssize_t nargs, PyObject *kwnames); +#else + #define __Pyx_PyCFunctionFast _PyCFunctionFast + #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords +#endif +#if CYTHON_FAST_PYCCALL +#define __Pyx_PyFastCFunction_Check(func)\ + ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS))))) +#else +#define __Pyx_PyFastCFunction_Check(func) 0 +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc) + #define PyObject_Malloc(s) PyMem_Malloc(s) + #define PyObject_Free(p) PyMem_Free(p) + #define PyObject_Realloc(p) PyMem_Realloc(p) +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030400A1 + #define PyMem_RawMalloc(n) PyMem_Malloc(n) + #define PyMem_RawRealloc(p, n) PyMem_Realloc(p, n) + #define PyMem_RawFree(p) PyMem_Free(p) +#endif +#if CYTHON_COMPILING_IN_PYSTON + #define __Pyx_PyCode_HasFreeVars(co) PyCode_HasFreeVars(co) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno) +#else + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno) +#endif +#if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000 + #define __Pyx_PyThreadState_Current PyThreadState_GET() +#elif PY_VERSION_HEX >= 0x03060000 + #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet() +#elif PY_VERSION_HEX >= 0x03000000 + #define __Pyx_PyThreadState_Current PyThreadState_GET() +#else + #define __Pyx_PyThreadState_Current _PyThreadState_Current +#endif +#if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT) +#include "pythread.h" +#define Py_tss_NEEDS_INIT 0 +typedef int Py_tss_t; +static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) { + *key = PyThread_create_key(); + return 0; +} +static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) { + Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t)); + *key = Py_tss_NEEDS_INIT; + return key; +} +static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) { + PyObject_Free(key); +} +static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) { + return *key != Py_tss_NEEDS_INIT; +} +static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) { + PyThread_delete_key(*key); + *key = Py_tss_NEEDS_INIT; +} +static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) { + return PyThread_set_key_value(*key, value); +} +static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { + return PyThread_get_key_value(*key); +} +#endif +#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized) +#define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n)) +#else +#define __Pyx_PyDict_NewPresized(n) PyDict_New() +#endif +#if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION + #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) + #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) +#else + #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y) + #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y) +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && CYTHON_USE_UNICODE_INTERNALS +#define __Pyx_PyDict_GetItemStr(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash) +#else +#define __Pyx_PyDict_GetItemStr(dict, name) PyDict_GetItem(dict, name) +#endif #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) #define CYTHON_PEP393_ENABLED 1 #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ 0 : _PyUnicode_Ready((PyObject *)(op))) #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u) #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) + #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch) + #if defined(PyUnicode_IS_READY) && defined(PyUnicode_GET_SIZE) + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) + #else + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) + #endif #else #define CYTHON_PEP393_ENABLED 0 + #define PyUnicode_1BYTE_KIND 1 + #define PyUnicode_2BYTE_KIND 2 + #define PyUnicode_4BYTE_KIND 4 #define __Pyx_PyUnicode_READY(op) (0) #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i])) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111) #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE)) #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u)) #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i])) + #define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = ch) + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u)) #endif #if CYTHON_COMPILING_IN_PYPY #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b) @@ -102,19 +468,31 @@ #if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains) #define PyUnicode_Contains(u, s) PySequence_Contains(u, s) #endif -#define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b)) -#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) +#if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check) + #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type) +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format) + #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt) +#endif +#define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b)) +#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b) #else #define __Pyx_PyString_Format(a, b) PyString_Format(a, b) #endif +#if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII) + #define PyObject_ASCII(o) PyObject_Repr(o) +#endif #if PY_MAJOR_VERSION >= 3 #define PyBaseString_Type PyUnicode_Type #define PyStringObject PyUnicodeObject #define PyString_Type PyUnicode_Type #define PyString_Check PyUnicode_Check #define PyString_CheckExact PyUnicode_CheckExact +#ifndef PyObject_Unicode + #define PyObject_Unicode PyObject_Str +#endif #endif #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj) @@ -126,7 +504,18 @@ #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_VERSION_HEX >= 0x030900A4 + #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size) +#else + #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size) +#endif +#if CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) +#else + #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq) +#endif #if PY_MAJOR_VERSION >= 3 #define PyIntObject PyLongObject #define PyInt_Type PyLong_Type @@ -161,46 +550,26 @@ #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t #endif #if PY_MAJOR_VERSION >= 3 - #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func)) + #define __Pyx_PyMethod_New(func, self, klass) ((self) ? ((void)(klass), PyMethod_New(func, self)) : __Pyx_NewRef(func)) #else #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass) #endif -#if PY_VERSION_HEX >= 0x030500B1 -#define __Pyx_PyAsyncMethodsStruct PyAsyncMethods -#define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async) -#elif CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 -typedef struct { - unaryfunc am_await; - unaryfunc am_aiter; - unaryfunc am_anext; -} __Pyx_PyAsyncMethodsStruct; -#define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved)) -#else -#define __Pyx_PyType_AsAsync(obj) NULL -#endif -#ifndef CYTHON_RESTRICT - #if defined(__GNUC__) - #define CYTHON_RESTRICT __restrict__ - #elif defined(_MSC_VER) && _MSC_VER >= 1400 - #define CYTHON_RESTRICT __restrict - #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L - #define CYTHON_RESTRICT restrict +#if CYTHON_USE_ASYNC_SLOTS + #if PY_VERSION_HEX >= 0x030500B1 + #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods + #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async) #else - #define CYTHON_RESTRICT + #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved)) #endif +#else + #define __Pyx_PyType_AsAsync(obj) NULL #endif -#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None) - -#ifndef CYTHON_INLINE - #if defined(__GNUC__) - #define CYTHON_INLINE __inline__ - #elif defined(_MSC_VER) - #define CYTHON_INLINE __inline - #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L - #define CYTHON_INLINE inline - #else - #define CYTHON_INLINE - #endif +#ifndef __Pyx_PyAsyncMethodsStruct + typedef struct { + unaryfunc am_await; + unaryfunc am_aiter; + unaryfunc am_anext; + } __Pyx_PyAsyncMethodsStruct; #endif #if defined(WIN32) || defined(MS_WINDOWS) @@ -216,16 +585,17 @@ static CYTHON_INLINE float __PYX_NAN() { 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) +#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL) +#define __Pyx_truncl trunc #else - #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) - #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) +#define __Pyx_truncl truncl #endif +#define __PYX_MARK_ERR_POS(f_index, lineno) \ + { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; } +#define __PYX_ERR(f_index, lineno, Ln_error) \ + { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; } + #ifndef __PYX_EXTERN_C #ifdef __cplusplus #define __PYX_EXTERN_C extern "C" @@ -236,45 +606,32 @@ static CYTHON_INLINE float __PYX_NAN() { #define __PYX_HAVE__cocoprep__coco_archive #define __PYX_HAVE_API__cocoprep__coco_archive -#include "string.h" -#include "stdio.h" -#include "stdlib.h" +/* Early includes */ +#include +#include #include "numpy/arrayobject.h" +#include "numpy/ndarrayobject.h" +#include "numpy/ndarraytypes.h" +#include "numpy/arrayscalars.h" #include "numpy/ufuncobject.h" + + /* NumPy API declarations from "numpy/__init__.pxd" */ + #include "coco.h" #ifdef _OPENMP #include #endif /* _OPENMP */ -#ifdef PYREX_WITHOUT_ASSERTIONS +#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS) #define CYTHON_WITHOUT_ASSERTIONS #endif -#ifndef CYTHON_UNUSED -# if defined(__GNUC__) -# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) -# define CYTHON_UNUSED __attribute__ ((__unused__)) -# else -# define CYTHON_UNUSED -# endif -# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) -# define CYTHON_UNUSED __attribute__ ((__unused__)) -# else -# define CYTHON_UNUSED -# endif -#endif -#ifndef CYTHON_NCP_UNUSED -# if CYTHON_COMPILING_IN_CPYTHON -# define CYTHON_NCP_UNUSED -# else -# define CYTHON_NCP_UNUSED CYTHON_UNUSED -# endif -#endif -typedef struct {PyObject **p; char *s; const Py_ssize_t n; const char* encoding; +typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding; const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0 -#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 0 +#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0 +#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8) #define __PYX_DEFAULT_STRING_ENCODING "" #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize @@ -290,6 +647,9 @@ typedef struct {PyObject **p; char *s; const Py_ssize_t n; const char* encoding; (sizeof(type) == sizeof(Py_ssize_t) &&\ (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\ v == (type)PY_SSIZE_T_MAX))) ) +static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) { + return (size_t) i < (size_t) limit; +} #if defined (__cplusplus) && __cplusplus >= 201103L #include #define __Pyx_sst_abs(value) std::abs(value) @@ -297,8 +657,8 @@ typedef struct {PyObject **p; char *s; const Py_ssize_t n; const char* encoding; #define __Pyx_sst_abs(value) abs(value) #elif SIZEOF_LONG >= SIZEOF_SIZE_T #define __Pyx_sst_abs(value) labs(value) -#elif defined (_MSC_VER) && defined (_M_X64) - #define __Pyx_sst_abs(value) _abs64(value) +#elif defined (_MSC_VER) + #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value)) #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define __Pyx_sst_abs(value) llabs(value) #elif defined (__GNUC__) @@ -306,8 +666,8 @@ typedef struct {PyObject **p; char *s; const Py_ssize_t n; const char* encoding; #else #define __Pyx_sst_abs(value) ((value<0) ? -value : value) #endif -static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject*); -static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*); +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); #define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s)) #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) #define __Pyx_PyBytes_FromString PyBytes_FromString @@ -320,39 +680,52 @@ static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*); #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_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s)) +#define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s)) +#define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s)) +#define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s)) +#define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s)) +#define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s)) +#define __Pyx_PyObject_AsWritableString(s) ((char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableSString(s) ((signed char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s) #define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s) #define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s) #define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s) #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s) -#if PY_MAJOR_VERSION < 3 -static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) -{ +static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) { const Py_UNICODE *u_end = u; while (*u_end++) ; return (size_t)(u_end - u - 1); } -#else -#define __Pyx_Py_UNICODE_strlen Py_UNICODE_strlen -#endif #define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u)) #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj) #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None) -#define __Pyx_PyBool_FromLong(b) ((b) ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False)) +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b); static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); -static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x); +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*); +static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x); +#define __Pyx_PySequence_Tuple(obj)\ + (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); -#if CYTHON_COMPILING_IN_CPYTHON +#if CYTHON_ASSUME_SAFE_MACROS #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) #else #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) #endif #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x)) +#if PY_MAJOR_VERSION >= 3 +#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x)) +#else +#define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x)) +#endif +#define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x)) #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII static int __Pyx_sys_getdefaultencoding_not_ascii; static int __Pyx_init_sys_getdefaultencoding_params(void) { @@ -416,7 +789,7 @@ static int __Pyx_init_sys_getdefaultencoding_params(void) { if (!default_encoding) goto bad; default_encoding_c = PyBytes_AsString(default_encoding); if (!default_encoding_c) goto bad; - __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c)); + __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1); if (!__PYX_DEFAULT_STRING_ENCODING) goto bad; strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c); Py_DECREF(default_encoding); @@ -437,17 +810,21 @@ static int __Pyx_init_sys_getdefaultencoding_params(void) { #define likely(x) (x) #define unlikely(x) (x) #endif /* __GNUC__ */ +static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; } -static PyObject *__pyx_m; +static PyObject *__pyx_m = NULL; static PyObject *__pyx_d; static PyObject *__pyx_b; +static PyObject *__pyx_cython_runtime = NULL; static PyObject *__pyx_empty_tuple; static PyObject *__pyx_empty_bytes; +static PyObject *__pyx_empty_unicode; static int __pyx_lineno; static int __pyx_clineno = 0; static const char * __pyx_cfilenm= __FILE__; static const char *__pyx_filename; +/* Header.proto */ #if !defined(CYTHON_CCOMPLEX) #if defined(__cplusplus) #define CYTHON_CCOMPLEX 1 @@ -471,12 +848,13 @@ static const char *__pyx_filename; static const char *__pyx_f[] = { - "interface/coco_archive.pyx", + "interface\\coco_archive.pyx", + "stringsource", "__init__.pxd", "type.pxd", }; -/* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":725 +/* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":690 * # in Cython to enable them only on the right systems. * * ctypedef npy_int8 int8_t # <<<<<<<<<<<<<< @@ -485,7 +863,7 @@ static const char *__pyx_f[] = { */ typedef npy_int8 __pyx_t_5numpy_int8_t; -/* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":726 +/* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":691 * * ctypedef npy_int8 int8_t * ctypedef npy_int16 int16_t # <<<<<<<<<<<<<< @@ -494,7 +872,7 @@ typedef npy_int8 __pyx_t_5numpy_int8_t; */ typedef npy_int16 __pyx_t_5numpy_int16_t; -/* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":727 +/* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":692 * ctypedef npy_int8 int8_t * ctypedef npy_int16 int16_t * ctypedef npy_int32 int32_t # <<<<<<<<<<<<<< @@ -503,7 +881,7 @@ typedef npy_int16 __pyx_t_5numpy_int16_t; */ typedef npy_int32 __pyx_t_5numpy_int32_t; -/* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":728 +/* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":693 * ctypedef npy_int16 int16_t * ctypedef npy_int32 int32_t * ctypedef npy_int64 int64_t # <<<<<<<<<<<<<< @@ -512,7 +890,7 @@ typedef npy_int32 __pyx_t_5numpy_int32_t; */ typedef npy_int64 __pyx_t_5numpy_int64_t; -/* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":732 +/* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":697 * #ctypedef npy_int128 int128_t * * ctypedef npy_uint8 uint8_t # <<<<<<<<<<<<<< @@ -521,7 +899,7 @@ typedef npy_int64 __pyx_t_5numpy_int64_t; */ typedef npy_uint8 __pyx_t_5numpy_uint8_t; -/* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":733 +/* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":698 * * ctypedef npy_uint8 uint8_t * ctypedef npy_uint16 uint16_t # <<<<<<<<<<<<<< @@ -530,7 +908,7 @@ typedef npy_uint8 __pyx_t_5numpy_uint8_t; */ typedef npy_uint16 __pyx_t_5numpy_uint16_t; -/* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":734 +/* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":699 * ctypedef npy_uint8 uint8_t * ctypedef npy_uint16 uint16_t * ctypedef npy_uint32 uint32_t # <<<<<<<<<<<<<< @@ -539,7 +917,7 @@ typedef npy_uint16 __pyx_t_5numpy_uint16_t; */ typedef npy_uint32 __pyx_t_5numpy_uint32_t; -/* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":735 +/* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":700 * ctypedef npy_uint16 uint16_t * ctypedef npy_uint32 uint32_t * ctypedef npy_uint64 uint64_t # <<<<<<<<<<<<<< @@ -548,7 +926,7 @@ typedef npy_uint32 __pyx_t_5numpy_uint32_t; */ typedef npy_uint64 __pyx_t_5numpy_uint64_t; -/* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":739 +/* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":704 * #ctypedef npy_uint128 uint128_t * * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<< @@ -557,7 +935,7 @@ typedef npy_uint64 __pyx_t_5numpy_uint64_t; */ typedef npy_float32 __pyx_t_5numpy_float32_t; -/* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":740 +/* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":705 * * ctypedef npy_float32 float32_t * ctypedef npy_float64 float64_t # <<<<<<<<<<<<<< @@ -566,7 +944,7 @@ typedef npy_float32 __pyx_t_5numpy_float32_t; */ typedef npy_float64 __pyx_t_5numpy_float64_t; -/* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":749 +/* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":714 * # The int types are mapped a bit surprising -- * # numpy.int corresponds to 'l' and numpy.long to 'q' * ctypedef npy_long int_t # <<<<<<<<<<<<<< @@ -575,7 +953,7 @@ typedef npy_float64 __pyx_t_5numpy_float64_t; */ typedef npy_long __pyx_t_5numpy_int_t; -/* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":750 +/* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":715 * # numpy.int corresponds to 'l' and numpy.long to 'q' * ctypedef npy_long int_t * ctypedef npy_longlong long_t # <<<<<<<<<<<<<< @@ -584,7 +962,7 @@ typedef npy_long __pyx_t_5numpy_int_t; */ typedef npy_longlong __pyx_t_5numpy_long_t; -/* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":751 +/* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":716 * ctypedef npy_long int_t * ctypedef npy_longlong long_t * ctypedef npy_longlong longlong_t # <<<<<<<<<<<<<< @@ -593,7 +971,7 @@ typedef npy_longlong __pyx_t_5numpy_long_t; */ typedef npy_longlong __pyx_t_5numpy_longlong_t; -/* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":753 +/* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":718 * ctypedef npy_longlong longlong_t * * ctypedef npy_ulong uint_t # <<<<<<<<<<<<<< @@ -602,7 +980,7 @@ typedef npy_longlong __pyx_t_5numpy_longlong_t; */ typedef npy_ulong __pyx_t_5numpy_uint_t; -/* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":754 +/* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":719 * * ctypedef npy_ulong uint_t * ctypedef npy_ulonglong ulong_t # <<<<<<<<<<<<<< @@ -611,7 +989,7 @@ typedef npy_ulong __pyx_t_5numpy_uint_t; */ typedef npy_ulonglong __pyx_t_5numpy_ulong_t; -/* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":755 +/* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":720 * ctypedef npy_ulong uint_t * ctypedef npy_ulonglong ulong_t * ctypedef npy_ulonglong ulonglong_t # <<<<<<<<<<<<<< @@ -620,7 +998,7 @@ typedef npy_ulonglong __pyx_t_5numpy_ulong_t; */ typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t; -/* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":757 +/* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":722 * ctypedef npy_ulonglong ulonglong_t * * ctypedef npy_intp intp_t # <<<<<<<<<<<<<< @@ -629,7 +1007,7 @@ typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t; */ typedef npy_intp __pyx_t_5numpy_intp_t; -/* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":758 +/* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":723 * * ctypedef npy_intp intp_t * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<< @@ -638,7 +1016,7 @@ typedef npy_intp __pyx_t_5numpy_intp_t; */ typedef npy_uintp __pyx_t_5numpy_uintp_t; -/* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":760 +/* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":725 * ctypedef npy_uintp uintp_t * * ctypedef npy_double float_t # <<<<<<<<<<<<<< @@ -647,7 +1025,7 @@ typedef npy_uintp __pyx_t_5numpy_uintp_t; */ typedef npy_double __pyx_t_5numpy_float_t; -/* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":761 +/* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":726 * * ctypedef npy_double float_t * ctypedef npy_double double_t # <<<<<<<<<<<<<< @@ -656,7 +1034,7 @@ typedef npy_double __pyx_t_5numpy_float_t; */ typedef npy_double __pyx_t_5numpy_double_t; -/* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":762 +/* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":727 * ctypedef npy_double float_t * ctypedef npy_double double_t * ctypedef npy_longdouble longdouble_t # <<<<<<<<<<<<<< @@ -664,6 +1042,7 @@ typedef npy_double __pyx_t_5numpy_double_t; * ctypedef npy_cfloat cfloat_t */ typedef npy_longdouble __pyx_t_5numpy_longdouble_t; +/* Declarations.proto */ #if CYTHON_CCOMPLEX #ifdef __cplusplus typedef ::std::complex< float > __pyx_t_float_complex; @@ -673,7 +1052,9 @@ typedef npy_longdouble __pyx_t_5numpy_longdouble_t; #else typedef struct { float real, imag; } __pyx_t_float_complex; #endif +static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float); +/* Declarations.proto */ #if CYTHON_CCOMPLEX #ifdef __cplusplus typedef ::std::complex< double > __pyx_t_double_complex; @@ -683,12 +1064,13 @@ typedef npy_longdouble __pyx_t_5numpy_longdouble_t; #else typedef struct { double real, imag; } __pyx_t_double_complex; #endif +static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double); /*--- Type declarations ---*/ struct __pyx_obj_8cocoprep_12coco_archive_Archive; -/* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":764 +/* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":729 * ctypedef npy_longdouble longdouble_t * * ctypedef npy_cfloat cfloat_t # <<<<<<<<<<<<<< @@ -697,7 +1079,7 @@ struct __pyx_obj_8cocoprep_12coco_archive_Archive; */ typedef npy_cfloat __pyx_t_5numpy_cfloat_t; -/* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":765 +/* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":730 * * ctypedef npy_cfloat cfloat_t * ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<< @@ -706,7 +1088,7 @@ typedef npy_cfloat __pyx_t_5numpy_cfloat_t; */ typedef npy_cdouble __pyx_t_5numpy_cdouble_t; -/* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":766 +/* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":731 * ctypedef npy_cfloat cfloat_t * ctypedef npy_cdouble cdouble_t * ctypedef npy_clongdouble clongdouble_t # <<<<<<<<<<<<<< @@ -715,7 +1097,7 @@ typedef npy_cdouble __pyx_t_5numpy_cdouble_t; */ typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t; -/* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":768 +/* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":733 * ctypedef npy_clongdouble clongdouble_t * * ctypedef npy_cdouble complex_t # <<<<<<<<<<<<<< @@ -746,6 +1128,7 @@ struct __pyx_obj_8cocoprep_12coco_archive_Archive { /* --- Runtime support code (head) --- */ +/* Refnanny.proto */ #ifndef CYTHON_REFNANNY #define CYTHON_REFNANNY 0 #endif @@ -808,69 +1191,158 @@ struct __pyx_obj_8cocoprep_12coco_archive_Archive { #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); -} +/* PyObjectGetAttrStr.proto */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name); #else #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) #endif +/* GetBuiltinName.proto */ static PyObject *__Pyx_GetBuiltinName(PyObject *name); +/* PyCFunctionFastCall.proto */ +#if CYTHON_FAST_PYCCALL +static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs); +#else +#define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL) +#endif + +/* PyFunctionFastCall.proto */ +#if CYTHON_FAST_PYCALL +#define __Pyx_PyFunction_FastCall(func, args, nargs)\ + __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL) +#if 1 || PY_VERSION_HEX < 0x030600B1 +static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs); +#else +#define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs) +#endif +#define __Pyx_BUILD_ASSERT_EXPR(cond)\ + (sizeof(char [1 - 2*!(cond)]) - 1) +#ifndef Py_MEMBER_SIZE +#define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member) +#endif + static size_t __pyx_pyframe_localsplus_offset = 0; + #include "frameobject.h" + #define __Pxy_PyFrame_Initialize_Offsets()\ + ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\ + (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus))) + #define __Pyx_PyFrame_GetLocalsplus(frame)\ + (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset)) +#endif + +/* PyObjectCall.proto */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); #else #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) #endif +/* PyObjectCall2Args.proto */ +static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2); + +/* PyObjectCallMethO.proto */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); #endif +/* PyObjectCallOneArg.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg); + +/* PyObjectCallNoArg.proto */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func); #else #define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL) #endif -static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); -static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); +/* PyThreadStateGet.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate; +#define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current; +#define __Pyx_PyErr_Occurred() __pyx_tstate->curexc_type +#else +#define __Pyx_PyThreadState_declare +#define __Pyx_PyThreadState_assign +#define __Pyx_PyErr_Occurred() PyErr_Occurred() +#endif + +/* PyErrFetchRestore.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL) +#define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL)) +#else +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#endif +#else +#define __Pyx_PyErr_Clear() PyErr_Clear() +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb) +#endif +/* RaiseException.proto */ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); +/* RaiseArgTupleInvalid.proto */ static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); +/* RaiseDoubleKeywords.proto */ static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); +/* ParseKeywords.proto */ static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\ PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\ const char* function_name); +/* IncludeStringH.proto */ #include +/* BytesEquals.proto */ static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals); +/* UnicodeEquals.proto */ static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals); +/* PySequenceContains.proto */ static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) { int result = PySequence_Contains(seq, item); return unlikely(result < 0) ? result : (result == (eq == Py_EQ)); } +/* decode_c_string_utf16.proto */ +static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16(const char *s, Py_ssize_t size, const char *errors) { + int byteorder = 0; + return PyUnicode_DecodeUTF16(s, size, errors, &byteorder); +} +static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16LE(const char *s, Py_ssize_t size, const char *errors) { + int byteorder = -1; + return PyUnicode_DecodeUTF16(s, size, errors, &byteorder); +} +static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16BE(const char *s, Py_ssize_t size, const char *errors) { + int byteorder = 1; + return PyUnicode_DecodeUTF16(s, size, errors, &byteorder); +} + +/* decode_c_bytes.proto */ static CYTHON_INLINE PyObject* __Pyx_decode_c_bytes( const char* cstring, Py_ssize_t length, Py_ssize_t start, Py_ssize_t stop, const char* encoding, const char* errors, PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)); +/* decode_bytes.proto */ static CYTHON_INLINE PyObject* __Pyx_decode_bytes( PyObject* string, Py_ssize_t start, Py_ssize_t stop, const char* encoding, const char* errors, @@ -880,45 +1352,109 @@ static CYTHON_INLINE PyObject* __Pyx_decode_bytes( start, stop, encoding, errors, decode_func); } -static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg); +/* GetTopmostException.proto */ +#if CYTHON_USE_EXC_INFO_STACK +static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate); +#endif -#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY -static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) { - PyObject *value; - value = PyDict_GetItemWithError(d, key); - if (unlikely(!value)) { - if (!PyErr_Occurred()) { - PyObject* args = PyTuple_Pack(1, key); - if (likely(args)) - PyErr_SetObject(PyExc_KeyError, args); - Py_XDECREF(args); - } - return NULL; - } - Py_INCREF(value); - return value; -} +/* SaveResetException.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); +#else +#define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb) +#define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb) +#endif + +/* PyErrExceptionMatches.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err) +static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err); #else - #define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key) +#define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err) #endif -static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); +/* GetException.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb) +static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#else +static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); +#endif + +/* PyObject_GenericGetAttrNoDict.proto */ +#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 +static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name); +#else +#define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr +#endif + +/* PyObject_GenericGetAttr.proto */ +#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 +static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name); +#else +#define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr +#endif -static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); +/* PyObjectGetAttrStrNoError.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name); -static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void); +/* SetupReduce.proto */ +static int __Pyx_setup_reduce(PyObject* type_obj); -static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); +/* TypeImport.proto */ +#ifndef __PYX_HAVE_RT_ImportType_proto +#define __PYX_HAVE_RT_ImportType_proto +enum __Pyx_ImportType_CheckSize { + __Pyx_ImportType_CheckSize_Error = 0, + __Pyx_ImportType_CheckSize_Warn = 1, + __Pyx_ImportType_CheckSize_Ignore = 2 +}; +static PyTypeObject *__Pyx_ImportType(PyObject* module, const char *module_name, const char *class_name, size_t size, enum __Pyx_ImportType_CheckSize check_size); +#endif +/* Import.proto */ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); -static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name); +/* PyDictVersioning.proto */ +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +#define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1) +#define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\ + (version_var) = __PYX_GET_DICT_VERSION(dict);\ + (cache_var) = (value); +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\ + (VAR) = __pyx_dict_cached_value;\ + } else {\ + (VAR) = __pyx_dict_cached_value = (LOOKUP);\ + __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\ + }\ +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj); +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj); +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version); +#else +#define __PYX_GET_DICT_VERSION(dict) (0) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var) +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP); +#endif -static PyObject *__Pyx_GetNameInClass(PyObject *nmspace, PyObject *name); +/* CLineInTraceback.proto */ +#ifdef CYTHON_CLINE_IN_TRACEBACK +#define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0) +#else +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line); +#endif +/* CodeObjectCache.proto */ typedef struct { - int code_line; PyCodeObject* code_object; + int code_line; } __Pyx_CodeObjectCacheEntry; struct __Pyx_CodeObjectCache { int count; @@ -930,13 +1466,16 @@ static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int co static PyCodeObject *__pyx_find_code_object(int code_line); static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object); +/* AddTraceback.proto */ static void __Pyx_AddTraceback(const char *funcname, int c_line, int py_line, const char *filename); -static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *); - -static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); +/* GCCDiagnostics.proto */ +#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) +#define __Pyx_HAS_GCC_DIAGNOSTIC +#endif +/* RealImag.proto */ #if CYTHON_CCOMPLEX #ifdef __cplusplus #define __Pyx_CREAL(z) ((z).real()) @@ -949,7 +1488,8 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); #define __Pyx_CREAL(z) ((z).real) #define __Pyx_CIMAG(z) ((z).imag) #endif -#if (defined(_WIN32) || defined(__clang__)) && defined(__cplusplus) && CYTHON_CCOMPLEX +#if defined(__cplusplus) && CYTHON_CCOMPLEX\ + && (defined(_WIN32) || defined(__clang__) || (defined(__GNUC__) && (__GNUC__ >= 5 || __GNUC__ == 4 && __GNUC_MINOR__ >= 4 )) || __cplusplus >= 201103) #define __Pyx_SET_CREAL(z,x) ((z).real(x)) #define __Pyx_SET_CIMAG(z,y) ((z).imag(y)) #else @@ -957,106 +1497,114 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); #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); - +/* Arithmetic.proto */ #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)) + #define __Pyx_c_eq_float(a, b) ((a)==(b)) + #define __Pyx_c_sum_float(a, b) ((a)+(b)) + #define __Pyx_c_diff_float(a, b) ((a)-(b)) + #define __Pyx_c_prod_float(a, b) ((a)*(b)) + #define __Pyx_c_quot_float(a, b) ((a)/(b)) + #define __Pyx_c_neg_float(a) (-(a)) #ifdef __cplusplus - #define __Pyx_c_is_zerof(z) ((z)==(float)0) - #define __Pyx_c_conjf(z) (::std::conj(z)) + #define __Pyx_c_is_zero_float(z) ((z)==(float)0) + #define __Pyx_c_conj_float(z) (::std::conj(z)) #if 1 - #define __Pyx_c_absf(z) (::std::abs(z)) - #define __Pyx_c_powf(a, b) (::std::pow(a, b)) + #define __Pyx_c_abs_float(z) (::std::abs(z)) + #define __Pyx_c_pow_float(a, b) (::std::pow(a, b)) #endif #else - #define __Pyx_c_is_zerof(z) ((z)==0) - #define __Pyx_c_conjf(z) (conjf(z)) + #define __Pyx_c_is_zero_float(z) ((z)==0) + #define __Pyx_c_conj_float(z) (conjf(z)) #if 1 - #define __Pyx_c_absf(z) (cabsf(z)) - #define __Pyx_c_powf(a, b) (cpowf(a, b)) + #define __Pyx_c_abs_float(z) (cabsf(z)) + #define __Pyx_c_pow_float(a, b) (cpowf(a, b)) #endif #endif #else - static CYTHON_INLINE int __Pyx_c_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); + static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex, __pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex, __pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex, __pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex, __pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex, __pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex); + static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex); #if 1 - static CYTHON_INLINE float __Pyx_c_absf(__pyx_t_float_complex); - static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_powf(__pyx_t_float_complex, __pyx_t_float_complex); + static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex, __pyx_t_float_complex); #endif #endif -static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double); - +/* Arithmetic.proto */ #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)) + #define __Pyx_c_eq_double(a, b) ((a)==(b)) + #define __Pyx_c_sum_double(a, b) ((a)+(b)) + #define __Pyx_c_diff_double(a, b) ((a)-(b)) + #define __Pyx_c_prod_double(a, b) ((a)*(b)) + #define __Pyx_c_quot_double(a, b) ((a)/(b)) + #define __Pyx_c_neg_double(a) (-(a)) #ifdef __cplusplus - #define __Pyx_c_is_zero(z) ((z)==(double)0) - #define __Pyx_c_conj(z) (::std::conj(z)) + #define __Pyx_c_is_zero_double(z) ((z)==(double)0) + #define __Pyx_c_conj_double(z) (::std::conj(z)) #if 1 - #define __Pyx_c_abs(z) (::std::abs(z)) - #define __Pyx_c_pow(a, b) (::std::pow(a, b)) + #define __Pyx_c_abs_double(z) (::std::abs(z)) + #define __Pyx_c_pow_double(a, b) (::std::pow(a, b)) #endif #else - #define __Pyx_c_is_zero(z) ((z)==0) - #define __Pyx_c_conj(z) (conj(z)) + #define __Pyx_c_is_zero_double(z) ((z)==0) + #define __Pyx_c_conj_double(z) (conj(z)) #if 1 - #define __Pyx_c_abs(z) (cabs(z)) - #define __Pyx_c_pow(a, b) (cpow(a, b)) + #define __Pyx_c_abs_double(z) (cabs(z)) + #define __Pyx_c_pow_double(a, b) (cpow(a, b)) #endif #endif #else - static CYTHON_INLINE int __Pyx_c_eq(__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); + static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex, __pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex, __pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex, __pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex, __pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex, __pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex); + static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex); #if 1 - static CYTHON_INLINE double __Pyx_c_abs(__pyx_t_double_complex); - static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow(__pyx_t_double_complex, __pyx_t_double_complex); + static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex, __pyx_t_double_complex); #endif #endif -static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); +/* CIntFromPy.proto */ +static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *); -static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value); +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); +/* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); +/* CIntFromPy.proto */ static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *); -static int __Pyx_check_binary_version(void); +/* CIntFromPy.proto */ +static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); -#if !defined(__Pyx_PyIdentifier_FromString) -#if PY_MAJOR_VERSION < 3 - #define __Pyx_PyIdentifier_FromString(s) PyString_FromString(s) +/* FastTypeChecks.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type) +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2); #else - #define __Pyx_PyIdentifier_FromString(s) PyUnicode_FromString(s) -#endif +#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) +#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type) +#define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2)) #endif +#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception) -static PyObject *__Pyx_ImportModule(const char *name); - -static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, size_t size, int strict); +/* CheckBinaryVersion.proto */ +static int __Pyx_check_binary_version(void); +/* InitStrings.proto */ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); @@ -1077,7 +1625,7 @@ static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0; /* Module declarations from 'cpython.ref' */ -/* Module declarations from 'libc.stdlib' */ +/* Module declarations from 'cpython.mem' */ /* Module declarations from 'numpy' */ @@ -1086,133 +1634,127 @@ 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_generic = 0; +static PyTypeObject *__pyx_ptype_5numpy_number = 0; +static PyTypeObject *__pyx_ptype_5numpy_integer = 0; +static PyTypeObject *__pyx_ptype_5numpy_signedinteger = 0; +static PyTypeObject *__pyx_ptype_5numpy_unsignedinteger = 0; +static PyTypeObject *__pyx_ptype_5numpy_inexact = 0; +static PyTypeObject *__pyx_ptype_5numpy_floating = 0; +static PyTypeObject *__pyx_ptype_5numpy_complexfloating = 0; +static PyTypeObject *__pyx_ptype_5numpy_flexible = 0; +static PyTypeObject *__pyx_ptype_5numpy_character = 0; static PyTypeObject *__pyx_ptype_5numpy_ufunc = 0; -static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *, char *, char *, int *); /*proto*/ +static CYTHON_INLINE int __pyx_f_5numpy_import_array(void); /*proto*/ /* Module declarations from 'cocoprep.coco_archive' */ static PyTypeObject *__pyx_ptype_8cocoprep_12coco_archive_Archive = 0; static PyObject *__pyx_f_8cocoprep_12coco_archive__bstring(PyObject *); /*proto*/ #define __Pyx_MODULE_NAME "cocoprep.coco_archive" +extern int __pyx_module_is_main_cocoprep__coco_archive; int __pyx_module_is_main_cocoprep__coco_archive = 0; /* Implementation of 'cocoprep.coco_archive' */ -static PyObject *__pyx_builtin_property; static PyObject *__pyx_builtin_TypeError; static PyObject *__pyx_builtin_range; -static PyObject *__pyx_builtin_ValueError; -static PyObject *__pyx_builtin_RuntimeError; -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_Zd[] = "Zd"; -static char __pyx_k_Zf[] = "Zf"; -static char __pyx_k_Zg[] = "Zg"; -static char __pyx_k__3[] = ""; -static char __pyx_k_f1[] = "f1"; -static char __pyx_k_f2[] = "f2"; -static char __pyx_k_np[] = "np"; -static char __pyx_k_main[] = "__main__"; -static char __pyx_k_test[] = "__test__"; -static char __pyx_k_text[] = "text"; -static char __pyx_k_ascii[] = "ascii"; -static char __pyx_k_level[] = "level"; -static char __pyx_k_numpy[] = "numpy"; -static char __pyx_k_range[] = "range"; -static char __pyx_k_encode[] = "encode"; -static char __pyx_k_import[] = "__import__"; -static char __pyx_k_update[] = "update"; -static char __pyx_k_level_2[] = "_level"; -static char __pyx_k_function[] = "function"; -static char __pyx_k_instance[] = "instance"; -static char __pyx_k_property[] = "property"; -static char __pyx_k_TypeError[] = "TypeError"; -static char __pyx_k_dimension[] = "dimension"; -static char __pyx_k_log_level[] = "log_level"; -static char __pyx_k_ValueError[] = "ValueError"; -static char __pyx_k_bbob_biobj[] = "bbob-biobj"; -static char __pyx_k_suite_name[] = "suite_name"; -static char __pyx_k_hypervolume[] = "hypervolume"; -static char __pyx_k_RuntimeError[] = "RuntimeError"; -static char __pyx_k_bbob_biobj_ext[] = "bbob-biobj-ext"; -static char __pyx_k_number_of_solutions[] = "number_of_solutions"; -static char __pyx_k_cocoprep_coco_archive[] = "cocoprep.coco_archive"; -static char __pyx_k_ndarray_is_not_C_contiguous[] = "ndarray is not C contiguous"; -static char __pyx_k_Users_tea_Delo_Github_ttusar_co[] = "/Users/tea/Delo/Github/ttusar-coco/code-preprocessing/archive-update/interface/coco_archive.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_kp_u_Non_native_byte_order_not_suppor; -static PyObject *__pyx_n_s_RuntimeError; +static PyObject *__pyx_builtin_ImportError; +static const char __pyx_k__2[] = ""; +static const char __pyx_k_f1[] = "f1"; +static const char __pyx_k_f2[] = "f2"; +static const char __pyx_k_np[] = "np"; +static const char __pyx_k_main[] = "__main__"; +static const char __pyx_k_name[] = "__name__"; +static const char __pyx_k_test[] = "__test__"; +static const char __pyx_k_text[] = "text"; +static const char __pyx_k_ascii[] = "ascii"; +static const char __pyx_k_level[] = "level"; +static const char __pyx_k_numpy[] = "numpy"; +static const char __pyx_k_range[] = "range"; +static const char __pyx_k_encode[] = "encode"; +static const char __pyx_k_import[] = "__import__"; +static const char __pyx_k_reduce[] = "__reduce__"; +static const char __pyx_k_update[] = "update"; +static const char __pyx_k_Archive[] = "Archive"; +static const char __pyx_k_level_2[] = "_level"; +static const char __pyx_k_function[] = "function"; +static const char __pyx_k_getstate[] = "__getstate__"; +static const char __pyx_k_instance[] = "instance"; +static const char __pyx_k_setstate[] = "__setstate__"; +static const char __pyx_k_TypeError[] = "TypeError"; +static const char __pyx_k_dimension[] = "dimension"; +static const char __pyx_k_log_level[] = "log_level"; +static const char __pyx_k_reduce_ex[] = "__reduce_ex__"; +static const char __pyx_k_bbob_biobj[] = "bbob-biobj"; +static const char __pyx_k_suite_name[] = "suite_name"; +static const char __pyx_k_ImportError[] = "ImportError"; +static const char __pyx_k_reduce_cython[] = "__reduce_cython__"; +static const char __pyx_k_bbob_biobj_ext[] = "bbob-biobj-ext"; +static const char __pyx_k_setstate_cython[] = "__setstate_cython__"; +static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback"; +static const char __pyx_k_cocoprep_coco_archive[] = "cocoprep.coco_archive"; +static const char __pyx_k_interface_coco_archive_pyx[] = "interface\\coco_archive.pyx"; +static const char __pyx_k_numpy_core_multiarray_failed_to[] = "numpy.core.multiarray failed to import"; +static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__"; +static const char __pyx_k_numpy_core_umath_failed_to_impor[] = "numpy.core.umath failed to import"; +static PyObject *__pyx_n_s_Archive; +static PyObject *__pyx_n_s_ImportError; static PyObject *__pyx_n_s_TypeError; -static PyObject *__pyx_kp_s_Users_tea_Delo_Github_ttusar_co; -static PyObject *__pyx_n_s_ValueError; -static PyObject *__pyx_kp_u__3; +static PyObject *__pyx_kp_u__2; static PyObject *__pyx_n_u_ascii; static PyObject *__pyx_kp_u_bbob_biobj; static PyObject *__pyx_kp_u_bbob_biobj_ext; +static PyObject *__pyx_n_s_cline_in_traceback; static PyObject *__pyx_n_s_cocoprep_coco_archive; static PyObject *__pyx_n_s_dimension; static PyObject *__pyx_n_s_encode; static PyObject *__pyx_n_s_f1; static PyObject *__pyx_n_s_f2; static PyObject *__pyx_n_s_function; -static PyObject *__pyx_n_s_hypervolume; +static PyObject *__pyx_n_s_getstate; static PyObject *__pyx_n_s_import; static PyObject *__pyx_n_s_instance; +static PyObject *__pyx_kp_s_interface_coco_archive_pyx; static PyObject *__pyx_n_s_level; static PyObject *__pyx_n_s_level_2; static PyObject *__pyx_n_s_log_level; static PyObject *__pyx_n_s_main; -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_name; +static PyObject *__pyx_kp_s_no_default___reduce___due_to_non; static PyObject *__pyx_n_s_np; -static PyObject *__pyx_n_s_number_of_solutions; static PyObject *__pyx_n_s_numpy; -static PyObject *__pyx_n_s_property; +static PyObject *__pyx_kp_u_numpy_core_multiarray_failed_to; +static PyObject *__pyx_kp_u_numpy_core_umath_failed_to_impor; static PyObject *__pyx_n_s_range; +static PyObject *__pyx_n_s_reduce; +static PyObject *__pyx_n_s_reduce_cython; +static PyObject *__pyx_n_s_reduce_ex; +static PyObject *__pyx_n_s_setstate; +static PyObject *__pyx_n_s_setstate_cython; static PyObject *__pyx_n_s_suite_name; static PyObject *__pyx_n_s_test; static PyObject *__pyx_n_s_text; -static PyObject *__pyx_kp_u_unknown_dtype_code_in_numpy_pxd; static PyObject *__pyx_n_s_update; static int __pyx_pf_8cocoprep_12coco_archive_7Archive___cinit__(struct __pyx_obj_8cocoprep_12coco_archive_Archive *__pyx_v_self, PyObject *__pyx_v_suite_name, PyObject *__pyx_v_function, PyObject *__pyx_v_instance, PyObject *__pyx_v_dimension); /* proto */ static void __pyx_pf_8cocoprep_12coco_archive_7Archive_2__dealloc__(struct __pyx_obj_8cocoprep_12coco_archive_Archive *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8cocoprep_12coco_archive_7Archive_4add_solution(struct __pyx_obj_8cocoprep_12coco_archive_Archive *__pyx_v_self, PyObject *__pyx_v_f1, PyObject *__pyx_v_f2, PyObject *__pyx_v_text); /* proto */ static PyObject *__pyx_pf_8cocoprep_12coco_archive_7Archive_6get_next_solution_text(struct __pyx_obj_8cocoprep_12coco_archive_Archive *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8cocoprep_12coco_archive_7Archive_8update(struct __pyx_obj_8cocoprep_12coco_archive_Archive *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_8cocoprep_12coco_archive_7Archive_10number_of_solutions(struct __pyx_obj_8cocoprep_12coco_archive_Archive *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_8cocoprep_12coco_archive_7Archive_12hypervolume(struct __pyx_obj_8cocoprep_12coco_archive_Archive *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8cocoprep_12coco_archive_7Archive_19number_of_solutions___get__(struct __pyx_obj_8cocoprep_12coco_archive_Archive *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8cocoprep_12coco_archive_7Archive_11hypervolume___get__(struct __pyx_obj_8cocoprep_12coco_archive_Archive *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8cocoprep_12coco_archive_7Archive_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8cocoprep_12coco_archive_Archive *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8cocoprep_12coco_archive_7Archive_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_8cocoprep_12coco_archive_Archive *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_8cocoprep_12coco_archive_log_level(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_level); /* 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_8cocoprep_12coco_archive_Archive(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_int_56; static PyObject *__pyx_int_93; 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_codeobj__11; +static PyObject *__pyx_codeobj__8; +/* Late includes */ /* "interface/coco_archive.pyx":25 * char* coco_set_log_level(char *level) @@ -1229,6 +1771,7 @@ static PyObject *__pyx_f_8cocoprep_12coco_archive__bstring(PyObject *__pyx_v_s) 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; @@ -1275,7 +1818,7 @@ static PyObject *__pyx_f_8cocoprep_12coco_archive__bstring(PyObject *__pyx_v_s) */ __pyx_t_2 = PyUnicode_Check(__pyx_v_s); __pyx_t_1 = (__pyx_t_2 != 0); - if (__pyx_t_1) { + if (likely(__pyx_t_1)) { /* "interface/coco_archive.pyx":29 * return s @@ -1285,14 +1828,26 @@ static PyObject *__pyx_f_8cocoprep_12coco_archive__bstring(PyObject *__pyx_v_s) * raise TypeError() */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_encode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 29, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_4)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_r = ((PyObject*)__pyx_t_4); - __pyx_t_4 = 0; + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_n_u_ascii) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_n_u_ascii); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (!(likely(PyBytes_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(0, 29, __pyx_L1_error) + __pyx_r = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; goto __pyx_L0; /* "interface/coco_archive.pyx":28 @@ -1312,11 +1867,11 @@ static PyObject *__pyx_f_8cocoprep_12coco_archive__bstring(PyObject *__pyx_v_s) * cdef class Archive: */ /*else*/ { - __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_builtin_TypeError); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __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 = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_builtin_TypeError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 31, __pyx_L1_error) } /* "interface/coco_archive.pyx":25 @@ -1331,6 +1886,7 @@ static PyObject *__pyx_f_8cocoprep_12coco_archive__bstring(PyObject *__pyx_v_s) __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("cocoprep.coco_archive._bstring", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; @@ -1368,35 +1924,42 @@ static int __pyx_pw_8cocoprep_12coco_archive_7Archive_1__cinit__(PyObject *__pyx const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: - if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_suite_name)) != 0)) kw_args--; + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_suite_name)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; case 1: - if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_function)) != 0)) kw_args--; + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_function)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 4, 4, 1); __PYX_ERR(0, 48, __pyx_L3_error) } + CYTHON_FALLTHROUGH; case 2: - if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_instance)) != 0)) kw_args--; + if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_instance)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 4, 4, 2); __PYX_ERR(0, 48, __pyx_L3_error) } + CYTHON_FALLTHROUGH; case 3: - if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dimension)) != 0)) kw_args--; + if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dimension)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 4, 4, 3); __PYX_ERR(0, 48, __pyx_L3_error) } } 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 = 48; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 48, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; @@ -1413,7 +1976,7 @@ static int __pyx_pw_8cocoprep_12coco_archive_7Archive_1__cinit__(PyObject *__pyx } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 48, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("cocoprep.coco_archive.Archive.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -1447,15 +2010,15 @@ static int __pyx_pf_8cocoprep_12coco_archive_7Archive___cinit__(struct __pyx_obj * self._suite_name = _bstring('bbob-biobj-ext') * else: */ - __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_v_suite_name, __pyx_kp_u_bbob_biobj, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_v_suite_name, __pyx_kp_u_bbob_biobj, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 51, __pyx_L1_error) if (__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L4_bool_binop_done; } - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 51, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_v_function, __pyx_t_3, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_v_function, __pyx_t_3, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 51, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = (__pyx_t_2 != 0); __pyx_t_1 = __pyx_t_4; @@ -1469,7 +2032,7 @@ static int __pyx_pf_8cocoprep_12coco_archive_7Archive___cinit__(struct __pyx_obj * else: * self._suite_name = _bstring(suite_name) */ - __pyx_t_3 = __pyx_f_8cocoprep_12coco_archive__bstring(__pyx_kp_u_bbob_biobj_ext); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __pyx_f_8cocoprep_12coco_archive__bstring(__pyx_kp_u_bbob_biobj_ext); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 52, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_self->_suite_name); @@ -1495,7 +2058,7 @@ static int __pyx_pf_8cocoprep_12coco_archive_7Archive___cinit__(struct __pyx_obj * self._function = function */ /*else*/ { - __pyx_t_3 = __pyx_f_8cocoprep_12coco_archive__bstring(__pyx_v_suite_name); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __pyx_f_8cocoprep_12coco_archive__bstring(__pyx_v_suite_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 54, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_self->_suite_name); @@ -1512,7 +2075,7 @@ static int __pyx_pf_8cocoprep_12coco_archive_7Archive___cinit__(struct __pyx_obj * self._instance = instance * self._dimension = dimension */ - __pyx_t_5 = __Pyx_PyInt_As_size_t(__pyx_v_function); if (unlikely((__pyx_t_5 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyInt_As_size_t(__pyx_v_function); if (unlikely((__pyx_t_5 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 56, __pyx_L1_error) __pyx_v_self->_function = __pyx_t_5; /* "interface/coco_archive.pyx":57 @@ -1522,7 +2085,7 @@ static int __pyx_pf_8cocoprep_12coco_archive_7Archive___cinit__(struct __pyx_obj * self._dimension = dimension * self.up_to_date = False */ - __pyx_t_5 = __Pyx_PyInt_As_size_t(__pyx_v_instance); if (unlikely((__pyx_t_5 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyInt_As_size_t(__pyx_v_instance); if (unlikely((__pyx_t_5 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 57, __pyx_L1_error) __pyx_v_self->_instance = __pyx_t_5; /* "interface/coco_archive.pyx":58 @@ -1532,7 +2095,7 @@ static int __pyx_pf_8cocoprep_12coco_archive_7Archive___cinit__(struct __pyx_obj * self.up_to_date = False * */ - __pyx_t_5 = __Pyx_PyInt_As_size_t(__pyx_v_dimension); if (unlikely((__pyx_t_5 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyInt_As_size_t(__pyx_v_dimension); if (unlikely((__pyx_t_5 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 58, __pyx_L1_error) __pyx_v_self->_dimension = __pyx_t_5; /* "interface/coco_archive.pyx":59 @@ -1555,7 +2118,11 @@ static int __pyx_pf_8cocoprep_12coco_archive_7Archive___cinit__(struct __pyx_obj * self._dimension, self._instance) * */ - __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_self->_suite_name); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(__pyx_v_self->_suite_name == Py_None)) { + PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); + __PYX_ERR(0, 61, __pyx_L1_error) + } + __pyx_t_6 = __Pyx_PyBytes_AsWritableString(__pyx_v_self->_suite_name); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(0, 61, __pyx_L1_error) /* "interface/coco_archive.pyx":62 * @@ -1658,29 +2225,34 @@ static PyObject *__pyx_pw_8cocoprep_12coco_archive_7Archive_5add_solution(PyObje const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: - if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_f1)) != 0)) kw_args--; + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_f1)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; case 1: - if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_f2)) != 0)) kw_args--; + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_f2)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("add_solution", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("add_solution", 1, 3, 3, 1); __PYX_ERR(0, 67, __pyx_L3_error) } + CYTHON_FALLTHROUGH; case 2: - if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_text)) != 0)) kw_args--; + if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_text)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("add_solution", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("add_solution", 1, 3, 3, 2); __PYX_ERR(0, 67, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_solution") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_solution") < 0)) __PYX_ERR(0, 67, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; @@ -1695,7 +2267,7 @@ static PyObject *__pyx_pw_8cocoprep_12coco_archive_7Archive_5add_solution(PyObje } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("add_solution", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("add_solution", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 67, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("cocoprep.coco_archive.Archive.add_solution", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -1729,11 +2301,15 @@ static PyObject *__pyx_pf_8cocoprep_12coco_archive_7Archive_4add_solution(struct * if updated: * self.up_to_date = False */ - __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_f1); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_v_f2); if (unlikely((__pyx_t_2 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_3 = __pyx_f_8cocoprep_12coco_archive__bstring(__pyx_v_text); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_f1); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 68, __pyx_L1_error) + __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_v_f2); if (unlikely((__pyx_t_2 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 68, __pyx_L1_error) + __pyx_t_3 = __pyx_f_8cocoprep_12coco_archive__bstring(__pyx_v_text); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 68, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_t_3); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(__pyx_t_3 == Py_None)) { + PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); + __PYX_ERR(0, 68, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_t_3); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 68, __pyx_L1_error) __pyx_v_updated = coco_archive_add_solution(__pyx_v_self->archive, __pyx_t_1, __pyx_t_2, __pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -1777,7 +2353,7 @@ static PyObject *__pyx_pf_8cocoprep_12coco_archive_7Archive_4add_solution(struct * def get_next_solution_text(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_updated); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_updated); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 71, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; @@ -1841,7 +2417,7 @@ static PyObject *__pyx_pf_8cocoprep_12coco_archive_7Archive_6get_next_solution_t * tmp_text = self._tmp_text.decode('ascii') * if tmp_text == "": */ - __pyx_t_1 = __Pyx_PyBytes_FromString(coco_archive_get_next_solution_text(__pyx_v_self->archive)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyBytes_FromString(coco_archive_get_next_solution_text(__pyx_v_self->archive)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->_tmp_text); @@ -1857,10 +2433,10 @@ static PyObject *__pyx_pf_8cocoprep_12coco_archive_7Archive_6get_next_solution_t * return None */ if (unlikely(__pyx_v_self->_tmp_text == Py_None)) { - PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "decode"); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode"); + __PYX_ERR(0, 75, __pyx_L1_error) } - __pyx_t_1 = __Pyx_decode_bytes(__pyx_v_self->_tmp_text, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_decode_bytes(__pyx_v_self->_tmp_text, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 75, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_tmp_text = __pyx_t_1; __pyx_t_1 = 0; @@ -1872,7 +2448,7 @@ static PyObject *__pyx_pf_8cocoprep_12coco_archive_7Archive_6get_next_solution_t * return None * return tmp_text */ - __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_v_tmp_text, __pyx_kp_u__3, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_v_tmp_text, __pyx_kp_u__2, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 76, __pyx_L1_error) if (__pyx_t_2) { /* "interface/coco_archive.pyx":77 @@ -1883,8 +2459,7 @@ static PyObject *__pyx_pf_8cocoprep_12coco_archive_7Archive_6get_next_solution_t * */ __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(Py_None); - __pyx_r = Py_None; + __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "interface/coco_archive.pyx":76 @@ -1966,7 +2541,7 @@ static PyObject *__pyx_pf_8cocoprep_12coco_archive_7Archive_8update(struct __pyx * self._number_of_solutions = coco_archive_get_number_of_solutions(self.archive) * self._hypervolume = coco_archive_get_hypervolume(self.archive) */ - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->up_to_date); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->up_to_date); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 81, __pyx_L1_error) __pyx_t_2 = ((!__pyx_t_1) != 0); if (__pyx_t_2) { @@ -2039,19 +2614,19 @@ static PyObject *__pyx_pf_8cocoprep_12coco_archive_7Archive_8update(struct __pyx */ /* Python wrapper */ -static PyObject *__pyx_pw_8cocoprep_12coco_archive_7Archive_11number_of_solutions(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static PyObject *__pyx_pw_8cocoprep_12coco_archive_7Archive_11number_of_solutions(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pw_8cocoprep_12coco_archive_7Archive_19number_of_solutions_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_8cocoprep_12coco_archive_7Archive_19number_of_solutions_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("number_of_solutions (wrapper)", 0); - __pyx_r = __pyx_pf_8cocoprep_12coco_archive_7Archive_10number_of_solutions(((struct __pyx_obj_8cocoprep_12coco_archive_Archive *)__pyx_v_self)); + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_8cocoprep_12coco_archive_7Archive_19number_of_solutions___get__(((struct __pyx_obj_8cocoprep_12coco_archive_Archive *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_8cocoprep_12coco_archive_7Archive_10number_of_solutions(struct __pyx_obj_8cocoprep_12coco_archive_Archive *__pyx_v_self) { +static PyObject *__pyx_pf_8cocoprep_12coco_archive_7Archive_19number_of_solutions___get__(struct __pyx_obj_8cocoprep_12coco_archive_Archive *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -2060,7 +2635,7 @@ static PyObject *__pyx_pf_8cocoprep_12coco_archive_7Archive_10number_of_solution int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("number_of_solutions", 0); + __Pyx_RefNannySetupContext("__get__", 0); /* "interface/coco_archive.pyx":88 * @property @@ -2069,10 +2644,10 @@ static PyObject *__pyx_pf_8cocoprep_12coco_archive_7Archive_10number_of_solution * return self._number_of_solutions * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_update); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_update); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 88, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; - if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) { + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); @@ -2081,12 +2656,9 @@ static PyObject *__pyx_pf_8cocoprep_12coco_archive_7Archive_10number_of_solution __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - } + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 88, __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; @@ -2099,7 +2671,7 @@ static PyObject *__pyx_pf_8cocoprep_12coco_archive_7Archive_10number_of_solution * @property */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_self->_number_of_solutions); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_self->_number_of_solutions); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 89, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -2118,7 +2690,7 @@ static PyObject *__pyx_pf_8cocoprep_12coco_archive_7Archive_10number_of_solution __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); - __Pyx_AddTraceback("cocoprep.coco_archive.Archive.number_of_solutions", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cocoprep.coco_archive.Archive.number_of_solutions.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -2135,19 +2707,19 @@ static PyObject *__pyx_pf_8cocoprep_12coco_archive_7Archive_10number_of_solution */ /* Python wrapper */ -static PyObject *__pyx_pw_8cocoprep_12coco_archive_7Archive_13hypervolume(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static PyObject *__pyx_pw_8cocoprep_12coco_archive_7Archive_13hypervolume(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pw_8cocoprep_12coco_archive_7Archive_11hypervolume_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_8cocoprep_12coco_archive_7Archive_11hypervolume_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("hypervolume (wrapper)", 0); - __pyx_r = __pyx_pf_8cocoprep_12coco_archive_7Archive_12hypervolume(((struct __pyx_obj_8cocoprep_12coco_archive_Archive *)__pyx_v_self)); + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_8cocoprep_12coco_archive_7Archive_11hypervolume___get__(((struct __pyx_obj_8cocoprep_12coco_archive_Archive *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_8cocoprep_12coco_archive_7Archive_12hypervolume(struct __pyx_obj_8cocoprep_12coco_archive_Archive *__pyx_v_self) { +static PyObject *__pyx_pf_8cocoprep_12coco_archive_7Archive_11hypervolume___get__(struct __pyx_obj_8cocoprep_12coco_archive_Archive *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -2156,7 +2728,7 @@ static PyObject *__pyx_pf_8cocoprep_12coco_archive_7Archive_12hypervolume(struct int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("hypervolume", 0); + __Pyx_RefNannySetupContext("__get__", 0); /* "interface/coco_archive.pyx":93 * @property @@ -2165,10 +2737,10 @@ static PyObject *__pyx_pf_8cocoprep_12coco_archive_7Archive_12hypervolume(struct * return self._hypervolume * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_update); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_update); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 93, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; - if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) { + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); @@ -2177,12 +2749,9 @@ static PyObject *__pyx_pf_8cocoprep_12coco_archive_7Archive_12hypervolume(struct __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - } + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 93, __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; @@ -2195,7 +2764,7 @@ static PyObject *__pyx_pf_8cocoprep_12coco_archive_7Archive_12hypervolume(struct * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->_hypervolume); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->_hypervolume); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 94, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -2214,7 +2783,7 @@ static PyObject *__pyx_pf_8cocoprep_12coco_archive_7Archive_12hypervolume(struct __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); - __Pyx_AddTraceback("cocoprep.coco_archive.Archive.hypervolume", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cocoprep.coco_archive.Archive.hypervolume.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -2222,6 +2791,119 @@ static PyObject *__pyx_pf_8cocoprep_12coco_archive_7Archive_12hypervolume(struct return __pyx_r; } +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8cocoprep_12coco_archive_7Archive_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8cocoprep_12coco_archive_7Archive_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf_8cocoprep_12coco_archive_7Archive_10__reduce_cython__(((struct __pyx_obj_8cocoprep_12coco_archive_Archive *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8cocoprep_12coco_archive_7Archive_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8cocoprep_12coco_archive_Archive *__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("__reduce_cython__", 0); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(1, 2, __pyx_L1_error) + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cocoprep.coco_archive.Archive.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8cocoprep_12coco_archive_7Archive_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ +static PyObject *__pyx_pw_8cocoprep_12coco_archive_7Archive_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf_8cocoprep_12coco_archive_7Archive_12__setstate_cython__(((struct __pyx_obj_8cocoprep_12coco_archive_Archive *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8cocoprep_12coco_archive_7Archive_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_8cocoprep_12coco_archive_Archive *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_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_cython__", 0); + + /* "(tree fragment)":4 + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(1, 4, __pyx_L1_error) + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cocoprep.coco_archive.Archive.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + /* "interface/coco_archive.pyx":97 * * @@ -2233,7 +2915,7 @@ static PyObject *__pyx_pf_8cocoprep_12coco_archive_7Archive_12hypervolume(struct /* Python wrapper */ static PyObject *__pyx_pw_8cocoprep_12coco_archive_1log_level(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8cocoprep_12coco_archive_log_level[] = "Returns current log level and sets new log level if level is not None.\n :param level: Supported values: 'error' or 'warning' or 'info' or 'debug', listed with increasing verbosity,\n or '', which doesn't change anything\n "; -static PyMethodDef __pyx_mdef_8cocoprep_12coco_archive_1log_level = {"log_level", (PyCFunction)__pyx_pw_8cocoprep_12coco_archive_1log_level, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8cocoprep_12coco_archive_log_level}; +static PyMethodDef __pyx_mdef_8cocoprep_12coco_archive_1log_level = {"log_level", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8cocoprep_12coco_archive_1log_level, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8cocoprep_12coco_archive_log_level}; static PyObject *__pyx_pw_8cocoprep_12coco_archive_1log_level(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_level = 0; int __pyx_lineno = 0; @@ -2251,6 +2933,7 @@ static PyObject *__pyx_pw_8cocoprep_12coco_archive_1log_level(PyObject *__pyx_se const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } @@ -2258,16 +2941,17 @@ static PyObject *__pyx_pw_8cocoprep_12coco_archive_1log_level(PyObject *__pyx_se switch (pos_args) { case 0: if (kw_args > 0) { - PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_level); + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_level); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "log_level") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "log_level") < 0)) __PYX_ERR(0, 97, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } @@ -2276,7 +2960,7 @@ static PyObject *__pyx_pw_8cocoprep_12coco_archive_1log_level(PyObject *__pyx_se } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("log_level", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("log_level", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 97, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("cocoprep.coco_archive.log_level", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -2314,10 +2998,10 @@ static PyObject *__pyx_pf_8cocoprep_12coco_archive_log_level(CYTHON_UNUSED PyObj __Pyx_INCREF(__pyx_v_level); __pyx_t_1 = __pyx_v_level; } else { - __Pyx_INCREF(__pyx_kp_u__3); - __pyx_t_1 = __pyx_kp_u__3; + __Pyx_INCREF(__pyx_kp_u__2); + __pyx_t_1 = __pyx_kp_u__2; } - __pyx_t_3 = __pyx_f_8cocoprep_12coco_archive__bstring(__pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __pyx_f_8cocoprep_12coco_archive__bstring(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 102, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v__level = ((PyObject*)__pyx_t_3); @@ -2330,8 +3014,12 @@ static PyObject *__pyx_pf_8cocoprep_12coco_archive_log_level(CYTHON_UNUSED PyObj * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v__level); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_3 = __Pyx_PyBytes_FromString(coco_set_log_level(__pyx_t_4)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(__pyx_v__level == Py_None)) { + PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); + __PYX_ERR(0, 103, __pyx_L1_error) + } + __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v__level); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 103, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyBytes_FromString(coco_set_log_level(__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 103, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; @@ -2358,1016 +3046,199 @@ static PyObject *__pyx_pf_8cocoprep_12coco_archive_log_level(CYTHON_UNUSED PyObj return __pyx_r; } -/* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":197 - * # 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. +/* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":735 + * ctypedef npy_cdouble complex_t + * + * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(1, a) + * */ -/* 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; +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) { + 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_t_5; - PyObject *__pyx_t_6 = NULL; - char *__pyx_t_7; + PyObject *__pyx_t_1 = NULL; 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); - } + __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0); - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":203 - * # of flags + /* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":736 * - * if info == NULL: return # <<<<<<<<<<<<<< + * cdef inline object PyArray_MultiIterNew1(a): + * return PyArray_MultiIterNew(1, a) # <<<<<<<<<<<<<< * - * cdef int copy_shape, i, ndim + * cdef inline object PyArray_MultiIterNew2(a, b): */ - __pyx_t_1 = ((__pyx_v_info == NULL) != 0); - if (__pyx_t_1) { - __pyx_r = 0; - goto __pyx_L0; - } + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 736, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":206 - * - * cdef int copy_shape, i, ndim - * cdef int endian_detector = 1 # <<<<<<<<<<<<<< - * cdef bint little_endian = ((&endian_detector)[0] != 0) + /* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":735 + * ctypedef npy_cdouble complex_t * - */ - __pyx_v_endian_detector = 1; - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":207 - * cdef int copy_shape, i, ndim - * cdef int endian_detector = 1 - * cdef bint little_endian = ((&endian_detector)[0] != 0) # <<<<<<<<<<<<<< + * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(1, a) * - * ndim = PyArray_NDIM(self) */ - __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0); - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":209 - * 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); + /* 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; +} - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":211 - * ndim = PyArray_NDIM(self) +/* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":738 + * return PyArray_MultiIterNew(1, a) * - * 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) { - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":212 + * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(2, a, b) * - * if sizeof(npy_intp) != sizeof(Py_ssize_t): - * copy_shape = 1 # <<<<<<<<<<<<<< - * else: - * copy_shape = 0 */ - __pyx_v_copy_shape = 1; - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":211 - * ndim = PyArray_NDIM(self) - * - * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< - * copy_shape = 1 - * else: - */ - goto __pyx_L4; - } +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); - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":214 - * copy_shape = 1 - * else: - * copy_shape = 0 # <<<<<<<<<<<<<< + /* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":739 * - * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) - */ - /*else*/ { - __pyx_v_copy_shape = 0; - } - __pyx_L4:; - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":216 - * copy_shape = 0 + * cdef inline object PyArray_MultiIterNew2(a, b): + * return PyArray_MultiIterNew(2, a, b) # <<<<<<<<<<<<<< * - * 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") + * cdef inline object PyArray_MultiIterNew3(a, b, c): */ - __pyx_t_2 = (((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS) != 0); - if (__pyx_t_2) { - } else { - __pyx_t_1 = __pyx_t_2; - goto __pyx_L6_bool_binop_done; - } + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 739, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":217 + /* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":738 + * return PyArray_MultiIterNew(1, a) * - * 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") + * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(2, a, b) * */ - __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_C_CONTIGUOUS) != 0)) != 0); - __pyx_t_1 = __pyx_t_2; - __pyx_L6_bool_binop_done:; - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":216 - * 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") - */ - if (__pyx_t_1) { + /* 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; +} - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":218 - * 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") # <<<<<<<<<<<<<< +/* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":741 + * return PyArray_MultiIterNew(2, a, b) * - * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) - */ - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__4, NULL); 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_Raise(__pyx_t_3, 0, 0, 0); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - {__pyx_filename = __pyx_f[1]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":216 - * copy_shape = 0 + * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(3, a, b, c) * - * 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") */ - } - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":220 - * raise ValueError(u"ndarray is not C contiguous") - * - * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< - * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)): - * raise ValueError(u"ndarray is not Fortran contiguous") - */ - __pyx_t_2 = (((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS) != 0); - if (__pyx_t_2) { - } else { - __pyx_t_1 = __pyx_t_2; - goto __pyx_L9_bool_binop_done; - } +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); - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":221 + /* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":742 * - * 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") + * 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_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_F_CONTIGUOUS) != 0)) != 0); - __pyx_t_1 = __pyx_t_2; - __pyx_L9_bool_binop_done:; + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 742, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":220 - * raise ValueError(u"ndarray is not C contiguous") + /* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":741 + * return PyArray_MultiIterNew(2, a, b) * - * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< - * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)): - * raise ValueError(u"ndarray is not Fortran contiguous") - */ - if (__pyx_t_1) { - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":222 - * 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") # <<<<<<<<<<<<<< + * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(3, a, b, c) * - * info.buf = PyArray_DATA(self) - */ - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 222; __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 = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":220 - * 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") - */ - } - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":224 - * 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); - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":225 - * - * 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; - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":226 - * 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_1 = (__pyx_v_copy_shape != 0); - if (__pyx_t_1) { - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":229 - * # 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))); - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":230 - * # 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); - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":231 - * 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_4 = __pyx_v_ndim; - for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { - __pyx_v_i = __pyx_t_5; - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":232 - * 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]); - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":233 - * 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]); - } - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":226 - * 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. - */ - goto __pyx_L11; - } - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":235 - * info.shape[i] = PyArray_DIMS(self)[i] - * else: - * info.strides = PyArray_STRIDES(self) # <<<<<<<<<<<<<< - * info.shape = PyArray_DIMS(self) - * info.suboffsets = NULL - */ - /*else*/ { - __pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(__pyx_v_self)); - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":236 - * 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_L11:; - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":237 - * 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; - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":238 - * 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); - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":239 - * 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)); - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":242 - * - * cdef int t - * cdef char* f = NULL # <<<<<<<<<<<<<< - * cdef dtype descr = self.descr - * cdef int offset - */ - __pyx_v_f = NULL; - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":243 - * cdef int t - * cdef char* f = NULL - * cdef dtype descr = self.descr # <<<<<<<<<<<<<< - * cdef int offset - * - */ - __pyx_t_3 = ((PyObject *)__pyx_v_self->descr); - __Pyx_INCREF(__pyx_t_3); - __pyx_v_descr = ((PyArray_Descr *)__pyx_t_3); - __pyx_t_3 = 0; - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.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); - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.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) { - } else { - __pyx_t_1 = __pyx_t_2; - goto __pyx_L15_bool_binop_done; - } - __pyx_t_2 = ((!(__pyx_v_copy_shape != 0)) != 0); - __pyx_t_1 = __pyx_t_2; - __pyx_L15_bool_binop_done:; - if (__pyx_t_1) { - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.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; - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":248 - * cdef bint hasfields = PyDataType_HASFIELDS(descr) - * - * if not hasfields and not copy_shape: # <<<<<<<<<<<<<< - * # do not call releasebuffer - * info.obj = None - */ - goto __pyx_L14; - } - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":253 - * else: - * # need to call releasebuffer - * info.obj = self # <<<<<<<<<<<<<< - * - * if not hasfields: - */ - /*else*/ { - __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_L14:; - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":255 - * info.obj = self - * - * if not hasfields: # <<<<<<<<<<<<<< - * t = descr.type_num - * if ((descr.byteorder == c'>' and little_endian) or - */ - __pyx_t_1 = ((!(__pyx_v_hasfields != 0)) != 0); - if (__pyx_t_1) { - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":256 - * - * if not hasfields: - * t = descr.type_num # <<<<<<<<<<<<<< - * if ((descr.byteorder == c'>' and little_endian) or - * (descr.byteorder == c'<' and not little_endian)): - */ - __pyx_t_4 = __pyx_v_descr->type_num; - __pyx_v_t = __pyx_t_4; - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":257 - * if not hasfields: - * t = descr.type_num - * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< - * (descr.byteorder == c'<' and not little_endian)): - * raise ValueError(u"Non-native byte order not supported") - */ - __pyx_t_2 = ((__pyx_v_descr->byteorder == '>') != 0); - if (!__pyx_t_2) { - goto __pyx_L20_next_or; - } else { - } - __pyx_t_2 = (__pyx_v_little_endian != 0); - if (!__pyx_t_2) { - } else { - __pyx_t_1 = __pyx_t_2; - goto __pyx_L19_bool_binop_done; - } - __pyx_L20_next_or:; - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":258 - * t = descr.type_num - * if ((descr.byteorder == c'>' and little_endian) or - * (descr.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<< - * raise ValueError(u"Non-native byte order not supported") - * if t == NPY_BYTE: f = "b" - */ - __pyx_t_2 = ((__pyx_v_descr->byteorder == '<') != 0); - if (__pyx_t_2) { - } else { - __pyx_t_1 = __pyx_t_2; - goto __pyx_L19_bool_binop_done; - } - __pyx_t_2 = ((!(__pyx_v_little_endian != 0)) != 0); - __pyx_t_1 = __pyx_t_2; - __pyx_L19_bool_binop_done:; - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":257 - * if not hasfields: - * t = descr.type_num - * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< - * (descr.byteorder == c'<' and not little_endian)): - * raise ValueError(u"Non-native byte order not supported") - */ - if (__pyx_t_1) { - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":259 - * if ((descr.byteorder == c'>' and little_endian) or - * (descr.byteorder == c'<' and not little_endian)): - * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< - * if t == NPY_BYTE: f = "b" - * elif t == NPY_UBYTE: f = "B" - */ - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__6, NULL); 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_Raise(__pyx_t_3, 0, 0, 0); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - {__pyx_filename = __pyx_f[1]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":257 - * if not hasfields: - * t = descr.type_num - * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< - * (descr.byteorder == c'<' and not little_endian)): - * raise ValueError(u"Non-native byte order not supported") - */ - } - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":260 - * (descr.byteorder == c'<' and not little_endian)): - * raise ValueError(u"Non-native byte order not supported") - * if t == NPY_BYTE: f = "b" # <<<<<<<<<<<<<< - * elif t == NPY_UBYTE: f = "B" - * elif t == NPY_SHORT: f = "h" - */ - switch (__pyx_v_t) { - case NPY_BYTE: - __pyx_v_f = __pyx_k_b; - break; - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.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; - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.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; - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.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; - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.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; - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.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; - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.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; - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.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; - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.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; - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.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; - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.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; - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.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; - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.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; - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.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; - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.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; - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.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; - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.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: - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.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_3 = __Pyx_PyInt_From_int(__pyx_v_t); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_t_3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 278; __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[1]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); - __Pyx_GIVEREF(__pyx_t_6); - PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6); - __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 278; __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[1]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - break; - } - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.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; - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.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; - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":255 - * info.obj = self - * - * if not hasfields: # <<<<<<<<<<<<<< - * t = descr.type_num - * if ((descr.byteorder == c'>' and little_endian) or - */ - } - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":282 - * return - * else: - * info.format = stdlib.malloc(_buffer_format_string_len) # <<<<<<<<<<<<<< - * info.format[0] = c'^' # Native data types, manual alignment - * offset = 0 - */ - /*else*/ { - __pyx_v_info->format = ((char *)malloc(0xFF)); - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":283 - * else: - * info.format = stdlib.malloc(_buffer_format_string_len) - * info.format[0] = c'^' # Native data types, manual alignment # <<<<<<<<<<<<<< - * offset = 0 - * f = _util_dtypestring(descr, info.format + 1, - */ - (__pyx_v_info->format[0]) = '^'; - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":284 - * info.format = stdlib.malloc(_buffer_format_string_len) - * info.format[0] = c'^' # Native data types, manual alignment - * offset = 0 # <<<<<<<<<<<<<< - * f = _util_dtypestring(descr, info.format + 1, - * info.format + _buffer_format_string_len, - */ - __pyx_v_offset = 0; - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":285 - * info.format[0] = c'^' # Native data types, manual alignment - * offset = 0 - * f = _util_dtypestring(descr, info.format + 1, # <<<<<<<<<<<<<< - * info.format + _buffer_format_string_len, - * &offset) - */ - __pyx_t_7 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 0xFF), (&__pyx_v_offset)); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_v_f = __pyx_t_7; - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":288 - * info.format + _buffer_format_string_len, - * &offset) - * f[0] = c'\0' # Terminate format string # <<<<<<<<<<<<<< - * - * def __releasebuffer__(ndarray self, Py_buffer* info): - */ - (__pyx_v_f[0]) = '\x00'; - } - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":197 - * # 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_3); - __Pyx_XDECREF(__pyx_t_6); - __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_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("numpy.PyArray_MultiIterNew3", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; __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_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":290 - * f[0] = c'\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); - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.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) { - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.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); - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.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): - */ - } - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.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) { - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.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); - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.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 - */ - } - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":290 - * f[0] = c'\0' # Terminate format string - * - * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< - * if PyArray_HASFIELDS(self): - * stdlib.free(info.format) - */ - - /* function exit code */ - __Pyx_RefNannyFinishContext(); -} - -/* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":770 - * ctypedef npy_cdouble complex_t +/* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":744 + * return PyArray_MultiIterNew(3, a, b, c) * - * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< - * return PyArray_MultiIterNew(1, a) + * 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_MultiIterNew1(PyObject *__pyx_v_a) { +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_MultiIterNew1", 0); + __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0); - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":771 + /* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":745 * - * cdef inline object PyArray_MultiIterNew1(a): - * return PyArray_MultiIterNew(1, a) # <<<<<<<<<<<<<< + * cdef inline object PyArray_MultiIterNew4(a, b, c, d): + * return PyArray_MultiIterNew(4, a, b, c, d) # <<<<<<<<<<<<<< * - * cdef inline object PyArray_MultiIterNew2(a, b): + * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): */ __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 = 771; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 745, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":770 - * ctypedef npy_cdouble complex_t + /* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":744 + * return PyArray_MultiIterNew(3, a, b, c) * - * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< - * return PyArray_MultiIterNew(1, a) + * 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_MultiIterNew1", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("numpy.PyArray_MultiIterNew4", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -3375,49 +3246,49 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__ return __pyx_r; } -/* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":773 - * return PyArray_MultiIterNew(1, a) +/* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":747 + * return PyArray_MultiIterNew(4, a, b, c, d) * - * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< - * return PyArray_MultiIterNew(2, a, b) + * 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_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) { +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_MultiIterNew2", 0); + __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0); - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":774 + /* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":748 * - * cdef inline object PyArray_MultiIterNew2(a, b): - * return PyArray_MultiIterNew(2, a, b) # <<<<<<<<<<<<<< + * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): + * return PyArray_MultiIterNew(5, a, b, c, d, e) # <<<<<<<<<<<<<< * - * cdef inline object PyArray_MultiIterNew3(a, b, c): + * cdef inline tuple PyDataType_SHAPE(dtype d): */ __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 = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 748, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":773 - * return PyArray_MultiIterNew(1, a) + /* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":747 + * return PyArray_MultiIterNew(4, a, b, c, d) * - * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< - * return PyArray_MultiIterNew(2, a, b) + * 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_MultiIterNew2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("numpy.PyArray_MultiIterNew5", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -3425,1079 +3296,770 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__ return __pyx_r; } -/* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":776 - * return PyArray_MultiIterNew(2, a, b) - * - * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< - * return PyArray_MultiIterNew(3, a, b, c) +/* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":750 + * return PyArray_MultiIterNew(5, a, b, c, d, e) * + * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< + * if PyDataType_HASSUBARRAY(d): + * return d.subarray.shape */ -static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) { +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__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_MultiIterNew3", 0); + int __pyx_t_1; + __Pyx_RefNannySetupContext("PyDataType_SHAPE", 0); - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":777 + /* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":751 * - * cdef inline object PyArray_MultiIterNew3(a, b, c): - * return PyArray_MultiIterNew(3, a, b, c) # <<<<<<<<<<<<<< + * cdef inline tuple PyDataType_SHAPE(dtype d): + * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< + * return d.subarray.shape + * else: + */ + __pyx_t_1 = (PyDataType_HASSUBARRAY(__pyx_v_d) != 0); + if (__pyx_t_1) { + + /* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":752 + * cdef inline tuple PyDataType_SHAPE(dtype d): + * if PyDataType_HASSUBARRAY(d): + * return d.subarray.shape # <<<<<<<<<<<<<< + * else: + * return () + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject*)__pyx_v_d->subarray->shape)); + __pyx_r = ((PyObject*)__pyx_v_d->subarray->shape); + goto __pyx_L0; + + /* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":751 * - * cdef inline object PyArray_MultiIterNew4(a, b, c, d): + * cdef inline tuple PyDataType_SHAPE(dtype d): + * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< + * return d.subarray.shape + * else: */ - __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 = 777; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; + } - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":776 - * return PyArray_MultiIterNew(2, a, b) + /* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":754 + * return d.subarray.shape + * else: + * return () # <<<<<<<<<<<<<< * - * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< - * return PyArray_MultiIterNew(3, a, b, c) * + */ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_empty_tuple); + __pyx_r = __pyx_empty_tuple; + goto __pyx_L0; + } + + /* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":750 + * return PyArray_MultiIterNew(5, a, b, c, d, e) + * + * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< + * if PyDataType_HASSUBARRAY(d): + * return d.subarray.shape */ /* function exit code */ - __pyx_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; } -/* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":779 - * return PyArray_MultiIterNew(3, a, b, c) - * - * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< - * return PyArray_MultiIterNew(4, a, b, c, d) +/* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":931 + * int _import_umath() except -1 * + * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< + * Py_INCREF(base) # important to do this before stealing the reference below! + * PyArray_SetBaseObject(arr, base) */ -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; +static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) { __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); + __Pyx_RefNannySetupContext("set_array_base", 0); - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":780 + /* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":932 * - * cdef inline object PyArray_MultiIterNew4(a, b, c, d): - * return PyArray_MultiIterNew(4, a, b, c, d) # <<<<<<<<<<<<<< + * cdef inline void set_array_base(ndarray arr, object base): + * Py_INCREF(base) # important to do this before stealing the reference below! # <<<<<<<<<<<<<< + * PyArray_SetBaseObject(arr, base) * - * 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 = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; + Py_INCREF(__pyx_v_base); - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":779 - * return PyArray_MultiIterNew(3, a, b, c) + /* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":933 + * cdef inline void set_array_base(ndarray arr, object base): + * Py_INCREF(base) # important to do this before stealing the reference below! + * PyArray_SetBaseObject(arr, base) # <<<<<<<<<<<<<< * - * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< - * return PyArray_MultiIterNew(4, a, b, c, d) + * cdef inline object get_array_base(ndarray arr): + */ + (void)(PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base)); + + /* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":931 + * int _import_umath() except -1 * + * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< + * Py_INCREF(base) # important to do this before stealing the reference below! + * PyArray_SetBaseObject(arr, base) */ /* 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; } -/* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":782 - * 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) +/* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":935 + * PyArray_SetBaseObject(arr, base) * + * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< + * base = PyArray_BASE(arr) + * if base is NULL: */ -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) { +static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__pyx_v_arr) { + PyObject *__pyx_v_base; PyObject *__pyx_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); + int __pyx_t_1; + __Pyx_RefNannySetupContext("get_array_base", 0); - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":783 + /* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":936 * - * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): - * return PyArray_MultiIterNew(5, a, b, c, d, e) # <<<<<<<<<<<<<< + * cdef inline object get_array_base(ndarray arr): + * base = PyArray_BASE(arr) # <<<<<<<<<<<<<< + * if base is NULL: + * return None + */ + __pyx_v_base = PyArray_BASE(__pyx_v_arr); + + /* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":937 + * cdef inline object get_array_base(ndarray arr): + * base = PyArray_BASE(arr) + * if base is NULL: # <<<<<<<<<<<<<< + * return None + * return base + */ + __pyx_t_1 = ((__pyx_v_base == NULL) != 0); + if (__pyx_t_1) { + + /* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":938 + * base = PyArray_BASE(arr) + * if base is NULL: + * return None # <<<<<<<<<<<<<< + * return base * - * 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 = 783; __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_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":782 - * return PyArray_MultiIterNew(4, a, b, c, d) + /* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":937 + * cdef inline object get_array_base(ndarray arr): + * base = PyArray_BASE(arr) + * if base is NULL: # <<<<<<<<<<<<<< + * return None + * return base + */ + } + + /* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":939 + * if base is NULL: + * return None + * return base # <<<<<<<<<<<<<< * - * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< - * return PyArray_MultiIterNew(5, a, b, c, d, e) + * # Versions of the import_* functions which are more suitable for + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_base)); + __pyx_r = ((PyObject *)__pyx_v_base); + goto __pyx_L0; + + /* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":935 + * PyArray_SetBaseObject(arr, base) * + * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< + * base = PyArray_BASE(arr) + * if base is NULL: */ /* 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; } -/* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":785 - * 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. +/* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":943 + * # Versions of the import_* functions which are more suitable for + * # Cython code. + * cdef inline int import_array() except -1: # <<<<<<<<<<<<<< + * try: + * __pyx_import_array() */ -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; +static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { + int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; - Py_ssize_t __pyx_t_2; + 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; - long __pyx_t_8; - char *__pyx_t_9; + 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_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("_util_dtypestring", 0); + __Pyx_RefNannySetupContext("import_array", 0); - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":790 - * - * cdef dtype child - * cdef int endian_detector = 1 # <<<<<<<<<<<<<< - * cdef bint little_endian = ((&endian_detector)[0] != 0) - * cdef tuple fields + /* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":944 + * # Cython code. + * cdef inline int import_array() except -1: + * try: # <<<<<<<<<<<<<< + * __pyx_import_array() + * except Exception: */ - __pyx_v_endian_detector = 1; - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":791 - * cdef dtype child - * cdef int endian_detector = 1 - * cdef bint little_endian = ((&endian_detector)[0] != 0) # <<<<<<<<<<<<<< - * cdef tuple fields - * + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_3); + /*try:*/ { + + /* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":945 + * cdef inline int import_array() except -1: + * try: + * __pyx_import_array() # <<<<<<<<<<<<<< + * except Exception: + * raise ImportError("numpy.core.multiarray failed to import") + */ + __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 945, __pyx_L3_error) + + /* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":944 + * # Cython code. + * cdef inline int import_array() except -1: + * try: # <<<<<<<<<<<<<< + * __pyx_import_array() + * except Exception: */ - __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 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_L8_try_end; + __pyx_L3_error:; + + /* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":946 + * try: + * __pyx_import_array() + * except Exception: # <<<<<<<<<<<<<< + * raise ImportError("numpy.core.multiarray failed to import") + * + */ + __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); + if (__pyx_t_4) { + __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 946, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GOTREF(__pyx_t_7); - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":794 - * cdef tuple fields + /* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":947 + * __pyx_import_array() + * except Exception: + * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<< * - * for childname in descr.names: # <<<<<<<<<<<<<< - * fields = descr.fields[childname] - * child, new_offset = fields + * cdef inline int import_umath() except -1: */ - if (unlikely(__pyx_v_descr->names == Py_None)) { - PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - {__pyx_filename = __pyx_f[1]; __pyx_lineno = 794; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 947, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_Raise(__pyx_t_8, 0, 0, 0); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __PYX_ERR(2, 947, __pyx_L5_except_error) + } + goto __pyx_L5_except_error; + __pyx_L5_except_error:; + + /* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":944 + * # Cython code. + * cdef inline int import_array() except -1: + * try: # <<<<<<<<<<<<<< + * __pyx_import_array() + * except Exception: + */ + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); + goto __pyx_L1_error; + __pyx_L8_try_end:; } - __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 = 794; __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 = 794; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); - #endif - __Pyx_XDECREF_SET(__pyx_v_childname, __pyx_t_3); - __pyx_t_3 = 0; - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":795 - * - * for childname in descr.names: - * fields = descr.fields[childname] # <<<<<<<<<<<<<< - * child, new_offset = fields - * + /* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":943 + * # Versions of the import_* functions which are more suitable for + * # Cython code. + * cdef inline int import_array() except -1: # <<<<<<<<<<<<<< + * try: + * __pyx_import_array() */ - if (unlikely(__pyx_v_descr->fields == Py_None)) { - PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - {__pyx_filename = __pyx_f[1]; __pyx_lineno = 795; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - } - __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 795; __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 = 795; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_XDECREF_SET(__pyx_v_fields, ((PyObject*)__pyx_t_3)); - __pyx_t_3 = 0; - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":796 - * 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 = 796; __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 = 796; __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 = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); - #endif - } else { - __Pyx_RaiseNoneNotIterableError(); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 796; __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 = 796; __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; + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":798 - * 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") +/* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":949 + * raise ImportError("numpy.core.multiarray failed to import") * + * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<< + * try: + * _import_umath() */ - __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 798; __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_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__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_6 = ((((__pyx_v_end - __pyx_v_f) - ((int)__pyx_t_5)) < 15) != 0); - if (__pyx_t_6) { - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":799 - * - * if (end - f) - (new_offset - offset[0]) < 15: - * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< - * - * if ((child.byteorder == c'>' and little_endian) or - */ - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 799; __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 = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} +static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("import_umath", 0); - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":798 - * 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") + /* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":950 * + * cdef inline int import_umath() except -1: + * try: # <<<<<<<<<<<<<< + * _import_umath() + * except Exception: */ - } - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":801 - * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") - * - * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< - * (child.byteorder == c'<' and not little_endian)): - * raise ValueError(u"Non-native byte order not supported") + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_3); + /*try:*/ { + + /* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":951 + * cdef inline int import_umath() except -1: + * try: + * _import_umath() # <<<<<<<<<<<<<< + * except Exception: + * raise ImportError("numpy.core.umath failed to import") + */ + __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 951, __pyx_L3_error) + + /* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":950 + * + * cdef inline int import_umath() except -1: + * try: # <<<<<<<<<<<<<< + * _import_umath() + * except Exception: */ - __pyx_t_7 = ((__pyx_v_child->byteorder == '>') != 0); - if (!__pyx_t_7) { - goto __pyx_L8_next_or; - } else { - } - __pyx_t_7 = (__pyx_v_little_endian != 0); - if (!__pyx_t_7) { - } else { - __pyx_t_6 = __pyx_t_7; - goto __pyx_L7_bool_binop_done; } - __pyx_L8_next_or:; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L8_try_end; + __pyx_L3_error:; + + /* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":952 + * try: + * _import_umath() + * except Exception: # <<<<<<<<<<<<<< + * raise ImportError("numpy.core.umath failed to import") + * + */ + __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); + if (__pyx_t_4) { + __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 952, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GOTREF(__pyx_t_7); - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":802 + /* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":953 + * _import_umath() + * except Exception: + * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< * - * if ((child.byteorder == c'>' and little_endian) or - * (child.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<< - * raise ValueError(u"Non-native byte order not supported") - * # One could encode it in the format string and have Cython + * cdef inline int import_ufunc() except -1: */ - __pyx_t_7 = ((__pyx_v_child->byteorder == '<') != 0); - if (__pyx_t_7) { - } else { - __pyx_t_6 = __pyx_t_7; - goto __pyx_L7_bool_binop_done; + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 953, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_Raise(__pyx_t_8, 0, 0, 0); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __PYX_ERR(2, 953, __pyx_L5_except_error) } - __pyx_t_7 = ((!(__pyx_v_little_endian != 0)) != 0); - __pyx_t_6 = __pyx_t_7; - __pyx_L7_bool_binop_done:; + goto __pyx_L5_except_error; + __pyx_L5_except_error:; + + /* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":950 + * + * cdef inline int import_umath() except -1: + * try: # <<<<<<<<<<<<<< + * _import_umath() + * except Exception: + */ + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); + goto __pyx_L1_error; + __pyx_L8_try_end:; + } - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":801 - * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") + /* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":949 + * raise ImportError("numpy.core.multiarray failed to import") * - * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< - * (child.byteorder == c'<' and not little_endian)): - * raise ValueError(u"Non-native byte order not supported") + * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<< + * try: + * _import_umath() */ - if (__pyx_t_6) { - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":803 - * if ((child.byteorder == c'>' and little_endian) or - * (child.byteorder == c'<' and not little_endian)): - * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< - * # One could encode it in the format string and have Cython - * # complain instead, BUT: < and > in format strings also imply - */ - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 803; __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 = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":801 - * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") +/* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":955 + * raise ImportError("numpy.core.umath failed to import") * - * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< - * (child.byteorder == c'<' and not little_endian)): - * raise ValueError(u"Non-native byte order not supported") + * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< + * try: + * _import_umath() */ - } - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":813 +static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("import_ufunc", 0); + + /* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":956 * - * # Output padding bytes - * while offset[0] < new_offset: # <<<<<<<<<<<<<< - * f[0] = 120 # "x"; pad byte - * f += 1 + * cdef inline int import_ufunc() except -1: + * try: # <<<<<<<<<<<<<< + * _import_umath() + * except Exception: */ - while (1) { - __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_v_new_offset, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (!__pyx_t_6) break; - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":814 - * # Output padding bytes - * while offset[0] < new_offset: - * f[0] = 120 # "x"; pad byte # <<<<<<<<<<<<<< - * f += 1 - * offset[0] += 1 + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_3); + /*try:*/ { + + /* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":957 + * cdef inline int import_ufunc() except -1: + * try: + * _import_umath() # <<<<<<<<<<<<<< + * except Exception: + * raise ImportError("numpy.core.umath failed to import") + */ + __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 957, __pyx_L3_error) + + /* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":956 + * + * cdef inline int import_ufunc() except -1: + * try: # <<<<<<<<<<<<<< + * _import_umath() + * except Exception: */ - (__pyx_v_f[0]) = 0x78; + } + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L8_try_end; + __pyx_L3_error:; + + /* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":958 + * try: + * _import_umath() + * except Exception: # <<<<<<<<<<<<<< + * raise ImportError("numpy.core.umath failed to import") + * + */ + __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); + if (__pyx_t_4) { + __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 958, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GOTREF(__pyx_t_7); - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":815 - * while offset[0] < new_offset: - * f[0] = 120 # "x"; pad byte - * f += 1 # <<<<<<<<<<<<<< - * offset[0] += 1 + /* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":959 + * _import_umath() + * except Exception: + * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< * + * cdef extern from *: */ - __pyx_v_f = (__pyx_v_f + 1); + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 959, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_Raise(__pyx_t_8, 0, 0, 0); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __PYX_ERR(2, 959, __pyx_L5_except_error) + } + goto __pyx_L5_except_error; + __pyx_L5_except_error:; + + /* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":956 + * + * cdef inline int import_ufunc() except -1: + * try: # <<<<<<<<<<<<<< + * _import_umath() + * except Exception: + */ + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); + goto __pyx_L1_error; + __pyx_L8_try_end:; + } - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":816 - * f[0] = 120 # "x"; pad byte - * f += 1 - * offset[0] += 1 # <<<<<<<<<<<<<< + /* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":955 + * raise ImportError("numpy.core.umath failed to import") * - * offset[0] += child.itemsize + * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< + * try: + * _import_umath() */ - __pyx_t_8 = 0; - (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + 1); - } - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":818 - * offset[0] += 1 + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":969 * - * offset[0] += child.itemsize # <<<<<<<<<<<<<< * - * if not PyDataType_HASFIELDS(child): + * cdef inline bint is_timedelta64_object(object obj): # <<<<<<<<<<<<<< + * """ + * Cython equivalent of `isinstance(obj, np.timedelta64)` */ - __pyx_t_8 = 0; - (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + __pyx_v_child->elsize); - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":820 - * 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) { +static CYTHON_INLINE int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_obj) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("is_timedelta64_object", 0); - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":821 + /* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":981 + * bool + * """ + * return PyObject_TypeCheck(obj, &PyTimedeltaArrType_Type) # <<<<<<<<<<<<<< * - * if not PyDataType_HASFIELDS(child): - * t = child.type_num # <<<<<<<<<<<<<< - * if end - f < 5: - * raise RuntimeError(u"Format string allocated too short.") - */ - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_child->type_num); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); - __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_4); - __pyx_t_4 = 0; - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":822 - * 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) { + __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyTimedeltaArrType_Type)); + goto __pyx_L0; - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":823 - * t = child.type_num - * if end - f < 5: - * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<< + /* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":969 * - * # Until ticket #99 is fixed, use integers to avoid warnings - */ - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 823; __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 = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":822 - * if not PyDataType_HASFIELDS(child): - * t = child.type_num - * if end - f < 5: # <<<<<<<<<<<<<< - * raise RuntimeError(u"Format string allocated too short.") * + * cdef inline bint is_timedelta64_object(object obj): # <<<<<<<<<<<<<< + * """ + * Cython equivalent of `isinstance(obj, np.timedelta64)` */ - } - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":826 - * - * # Until ticket #99 is fixed, use integers to avoid warnings - * if t == NPY_BYTE: f[0] = 98 #"b" # <<<<<<<<<<<<<< - * elif t == NPY_UBYTE: f[0] = 66 #"B" - * elif t == NPY_SHORT: f[0] = 104 #"h" - */ - __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_BYTE); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (__pyx_t_6) { - (__pyx_v_f[0]) = 98; - goto __pyx_L15; - } - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":827 - * # Until ticket #99 is fixed, use integers to avoid warnings - * if t == NPY_BYTE: f[0] = 98 #"b" - * elif t == NPY_UBYTE: f[0] = 66 #"B" # <<<<<<<<<<<<<< - * elif t == NPY_SHORT: f[0] = 104 #"h" - * elif t == NPY_USHORT: f[0] = 72 #"H" - */ - __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UBYTE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (__pyx_t_6) { - (__pyx_v_f[0]) = 66; - goto __pyx_L15; - } - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":828 - * if t == NPY_BYTE: f[0] = 98 #"b" - * elif t == NPY_UBYTE: f[0] = 66 #"B" - * elif t == NPY_SHORT: f[0] = 104 #"h" # <<<<<<<<<<<<<< - * elif t == NPY_USHORT: f[0] = 72 #"H" - * elif t == NPY_INT: f[0] = 105 #"i" - */ - __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_SHORT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (__pyx_t_6) { - (__pyx_v_f[0]) = 0x68; - goto __pyx_L15; - } - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":829 - * elif t == NPY_UBYTE: f[0] = 66 #"B" - * elif t == NPY_SHORT: f[0] = 104 #"h" - * elif t == NPY_USHORT: f[0] = 72 #"H" # <<<<<<<<<<<<<< - * elif t == NPY_INT: f[0] = 105 #"i" - * elif t == NPY_UINT: f[0] = 73 #"I" - */ - __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_USHORT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (__pyx_t_6) { - (__pyx_v_f[0]) = 72; - goto __pyx_L15; - } - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":830 - * elif t == NPY_SHORT: f[0] = 104 #"h" - * elif t == NPY_USHORT: f[0] = 72 #"H" - * elif t == NPY_INT: f[0] = 105 #"i" # <<<<<<<<<<<<<< - * elif t == NPY_UINT: f[0] = 73 #"I" - * elif t == NPY_LONG: f[0] = 108 #"l" - */ - __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_INT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (__pyx_t_6) { - (__pyx_v_f[0]) = 0x69; - goto __pyx_L15; - } - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":831 - * elif t == NPY_USHORT: f[0] = 72 #"H" - * elif t == NPY_INT: f[0] = 105 #"i" - * elif t == NPY_UINT: f[0] = 73 #"I" # <<<<<<<<<<<<<< - * elif t == NPY_LONG: f[0] = 108 #"l" - * elif t == NPY_ULONG: f[0] = 76 #"L" - */ - __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UINT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (__pyx_t_6) { - (__pyx_v_f[0]) = 73; - goto __pyx_L15; - } - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":832 - * elif t == NPY_INT: f[0] = 105 #"i" - * elif t == NPY_UINT: f[0] = 73 #"I" - * elif t == NPY_LONG: f[0] = 108 #"l" # <<<<<<<<<<<<<< - * elif t == NPY_ULONG: f[0] = 76 #"L" - * elif t == NPY_LONGLONG: f[0] = 113 #"q" - */ - __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONG); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (__pyx_t_6) { - (__pyx_v_f[0]) = 0x6C; - goto __pyx_L15; - } - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":833 - * elif t == NPY_UINT: f[0] = 73 #"I" - * elif t == NPY_LONG: f[0] = 108 #"l" - * elif t == NPY_ULONG: f[0] = 76 #"L" # <<<<<<<<<<<<<< - * elif t == NPY_LONGLONG: f[0] = 113 #"q" - * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" - */ - __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONG); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (__pyx_t_6) { - (__pyx_v_f[0]) = 76; - goto __pyx_L15; - } - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":834 - * elif t == NPY_LONG: f[0] = 108 #"l" - * elif t == NPY_ULONG: f[0] = 76 #"L" - * elif t == NPY_LONGLONG: f[0] = 113 #"q" # <<<<<<<<<<<<<< - * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" - * elif t == NPY_FLOAT: f[0] = 102 #"f" - */ - __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGLONG); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (__pyx_t_6) { - (__pyx_v_f[0]) = 0x71; - goto __pyx_L15; - } - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":835 - * elif t == NPY_ULONG: f[0] = 76 #"L" - * elif t == NPY_LONGLONG: f[0] = 113 #"q" - * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" # <<<<<<<<<<<<<< - * elif t == NPY_FLOAT: f[0] = 102 #"f" - * elif t == NPY_DOUBLE: f[0] = 100 #"d" - */ - __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONGLONG); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (__pyx_t_6) { - (__pyx_v_f[0]) = 81; - goto __pyx_L15; - } - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":836 - * elif t == NPY_LONGLONG: f[0] = 113 #"q" - * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" - * elif t == NPY_FLOAT: f[0] = 102 #"f" # <<<<<<<<<<<<<< - * elif t == NPY_DOUBLE: f[0] = 100 #"d" - * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" - */ - __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_FLOAT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (__pyx_t_6) { - (__pyx_v_f[0]) = 0x66; - goto __pyx_L15; - } - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":837 - * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" - * elif t == NPY_FLOAT: f[0] = 102 #"f" - * elif t == NPY_DOUBLE: f[0] = 100 #"d" # <<<<<<<<<<<<<< - * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" - * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf - */ - __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_DOUBLE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (__pyx_t_6) { - (__pyx_v_f[0]) = 0x64; - goto __pyx_L15; - } - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":838 - * elif t == NPY_FLOAT: f[0] = 102 #"f" - * elif t == NPY_DOUBLE: f[0] = 100 #"d" - * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" # <<<<<<<<<<<<<< - * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf - * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd - */ - __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (__pyx_t_6) { - (__pyx_v_f[0]) = 0x67; - goto __pyx_L15; - } - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":839 - * elif t == NPY_DOUBLE: f[0] = 100 #"d" - * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" - * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf # <<<<<<<<<<<<<< - * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd - * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg - */ - __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CFLOAT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (__pyx_t_6) { - (__pyx_v_f[0]) = 90; - (__pyx_v_f[1]) = 0x66; - __pyx_v_f = (__pyx_v_f + 1); - goto __pyx_L15; - } - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":840 - * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" - * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf - * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd # <<<<<<<<<<<<<< - * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg - * elif t == NPY_OBJECT: f[0] = 79 #"O" - */ - __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CDOUBLE); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 840; __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]) = 0x64; - __pyx_v_f = (__pyx_v_f + 1); - goto __pyx_L15; - } - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":841 - * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf - * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd - * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg # <<<<<<<<<<<<<< - * elif t == NPY_OBJECT: f[0] = 79 #"O" - * else: - */ - __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (__pyx_t_6) { - (__pyx_v_f[0]) = 90; - (__pyx_v_f[1]) = 0x67; - __pyx_v_f = (__pyx_v_f + 1); - goto __pyx_L15; - } - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":842 - * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd - * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg - * elif t == NPY_OBJECT: f[0] = 79 #"O" # <<<<<<<<<<<<<< - * else: - * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) - */ - __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_OBJECT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (__pyx_t_6) { - (__pyx_v_f[0]) = 79; - goto __pyx_L15; - } - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":844 - * elif t == NPY_OBJECT: f[0] = 79 #"O" - * else: - * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< - * f += 1 - * else: - */ - /*else*/ { - __pyx_t_3 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_v_t); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 844; __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 = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); - __Pyx_GIVEREF(__pyx_t_3); - PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); - __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL); 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_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[1]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - } - __pyx_L15:; - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":845 - * 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); + /* function exit code */ + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":820 - * offset[0] += child.itemsize +/* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":984 * - * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<< - * t = child.type_num - * if end - f < 5: - */ - goto __pyx_L13; - } - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":849 - * # Cython ignores struct boundary information ("T{...}"), - * # so don't output it - * f = _util_dtypestring(child, f, end, offset) # <<<<<<<<<<<<<< - * return f * + * cdef inline bint is_datetime64_object(object obj): # <<<<<<<<<<<<<< + * """ + * Cython equivalent of `isinstance(obj, np.datetime64)` */ - /*else*/ { - __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 849; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_v_f = __pyx_t_9; - } - __pyx_L13:; - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":794 - * cdef tuple fields - * - * for childname in descr.names: # <<<<<<<<<<<<<< - * fields = descr.fields[childname] - * child, new_offset = fields - */ - } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; +static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_obj) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("is_datetime64_object", 0); - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":850 - * # so don't output it - * f = _util_dtypestring(child, f, end, offset) - * return f # <<<<<<<<<<<<<< + /* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":996 + * bool + * """ + * return PyObject_TypeCheck(obj, &PyDatetimeArrType_Type) # <<<<<<<<<<<<<< * * */ - __pyx_r = __pyx_v_f; + __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyDatetimeArrType_Type)); goto __pyx_L0; - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":785 - * return PyArray_MultiIterNew(5, a, b, c, d, e) + /* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":984 + * * - * 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. + * cdef inline bint is_datetime64_object(object obj): # <<<<<<<<<<<<<< + * """ + * Cython equivalent of `isinstance(obj, np.datetime64)` */ /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); - __Pyx_AddTraceback("numpy._util_dtypestring", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; __pyx_L0:; - __Pyx_XDECREF((PyObject *)__pyx_v_child); - __Pyx_XDECREF(__pyx_v_fields); - __Pyx_XDECREF(__pyx_v_childname); - __Pyx_XDECREF(__pyx_v_new_offset); - __Pyx_XDECREF(__pyx_v_t); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":966 +/* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":999 * * - * 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); - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":968 - * 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) { - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":969 - * cdef PyObject* baseptr - * if base is None: - * baseptr = NULL # <<<<<<<<<<<<<< - * else: - * Py_INCREF(base) # important to do this before decref below! - */ - __pyx_v_baseptr = NULL; - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":968 - * cdef inline void set_array_base(ndarray arr, object base): - * cdef PyObject* baseptr - * if base is None: # <<<<<<<<<<<<<< - * baseptr = NULL - * else: - */ - goto __pyx_L3; - } - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":971 - * baseptr = NULL - * else: - * Py_INCREF(base) # important to do this before decref below! # <<<<<<<<<<<<<< - * baseptr = base - * Py_XDECREF(arr.base) + * cdef inline npy_datetime get_datetime64_value(object obj) nogil: # <<<<<<<<<<<<<< + * """ + * returns the int64 value underlying scalar numpy datetime64 object */ - /*else*/ { - Py_INCREF(__pyx_v_base); - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":972 - * 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:; +static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject *__pyx_v_obj) { + npy_datetime __pyx_r; - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":973 - * Py_INCREF(base) # important to do this before decref below! - * baseptr = base - * Py_XDECREF(arr.base) # <<<<<<<<<<<<<< - * arr.base = baseptr + /* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":1006 + * also needed. That can be found using `get_datetime64_unit`. + * """ + * return (obj).obval # <<<<<<<<<<<<<< * - */ - Py_XDECREF(__pyx_v_arr->base); - - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":974 - * 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_r = ((PyDatetimeScalarObject *)__pyx_v_obj)->obval; + goto __pyx_L0; - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":966 + /* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":999 * * - * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< - * cdef PyObject* baseptr - * if base is None: + * cdef inline npy_datetime get_datetime64_value(object obj) nogil: # <<<<<<<<<<<<<< + * """ + * returns the int64 value underlying scalar numpy datetime64 object */ /* function exit code */ - __Pyx_RefNannyFinishContext(); + __pyx_L0:; + return __pyx_r; } -/* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":976 - * arr.base = baseptr +/* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":1009 * - * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< - * if arr.base is NULL: - * return None + * + * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil: # <<<<<<<<<<<<<< + * """ + * returns the int64 value underlying scalar numpy timedelta64 object */ -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); +static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject *__pyx_v_obj) { + npy_timedelta __pyx_r; - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":977 + /* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":1013 + * returns the int64 value underlying scalar numpy timedelta64 object + * """ + * return (obj).obval # <<<<<<<<<<<<<< + * * - * 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) { + __pyx_r = ((PyTimedeltaScalarObject *)__pyx_v_obj)->obval; + goto __pyx_L0; - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":978 - * cdef inline object get_array_base(ndarray arr): - * if arr.base is NULL: - * return None # <<<<<<<<<<<<<< - * else: - * return arr.base + /* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":1009 + * + * + * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil: # <<<<<<<<<<<<<< + * """ + * returns the int64 value underlying scalar numpy timedelta64 object */ - __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(Py_None); - __pyx_r = Py_None; - goto __pyx_L0; - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":977 + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":1016 * - * cdef inline object get_array_base(ndarray arr): - * if arr.base is NULL: # <<<<<<<<<<<<<< - * return None - * else: + * + * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< + * """ + * returns the unit part of the dtype for a numpy datetime64 object. */ - } - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":980 - * return None - * else: - * return arr.base # <<<<<<<<<<<<<< +static CYTHON_INLINE NPY_DATETIMEUNIT __pyx_f_5numpy_get_datetime64_unit(PyObject *__pyx_v_obj) { + NPY_DATETIMEUNIT __pyx_r; + + /* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":1020 + * returns the unit part of the dtype for a numpy datetime64 object. + * """ + * return (obj).obmeta.base # <<<<<<<<<<<<<< */ - /*else*/ { - __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(((PyObject *)__pyx_v_arr->base)); - __pyx_r = ((PyObject *)__pyx_v_arr->base); - goto __pyx_L0; - } + __pyx_r = ((NPY_DATETIMEUNIT)((PyDatetimeScalarObject *)__pyx_v_obj)->obmeta.base); + goto __pyx_L0; - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":976 - * arr.base = baseptr + /* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":1016 * - * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< - * if arr.base is NULL: - * return None + * + * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< + * """ + * returns the unit part of the dtype for a numpy datetime64 object. */ /* function exit code */ __pyx_L0:; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -4514,16 +4076,17 @@ static PyObject *__pyx_tp_new_8cocoprep_12coco_archive_Archive(PyTypeObject *t, p->_suite_name = ((PyObject*)Py_None); Py_INCREF(Py_None); p->_tmp_text = ((PyObject*)Py_None); Py_INCREF(Py_None); p->up_to_date = Py_None; Py_INCREF(Py_None); - if (unlikely(__pyx_pw_8cocoprep_12coco_archive_7Archive_1__cinit__(o, a, k) < 0)) { - Py_DECREF(o); o = 0; - } + if (unlikely(__pyx_pw_8cocoprep_12coco_archive_7Archive_1__cinit__(o, a, k) < 0)) goto bad; return o; + bad: + Py_DECREF(o); o = 0; + return NULL; } static void __pyx_tp_dealloc_8cocoprep_12coco_archive_Archive(PyObject *o) { struct __pyx_obj_8cocoprep_12coco_archive_Archive *p = (struct __pyx_obj_8cocoprep_12coco_archive_Archive *)o; - #if PY_VERSION_HEX >= 0x030400a1 - if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { + #if CYTHON_USE_TP_FINALIZE + if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif @@ -4531,9 +4094,9 @@ static void __pyx_tp_dealloc_8cocoprep_12coco_archive_Archive(PyObject *o) { { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); - ++Py_REFCNT(o); + __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1); __pyx_pw_8cocoprep_12coco_archive_7Archive_3__dealloc__(o); - --Py_REFCNT(o); + __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1); PyErr_Restore(etype, eval, etb); } Py_CLEAR(p->_suite_name); @@ -4560,22 +4123,41 @@ static int __pyx_tp_clear_8cocoprep_12coco_archive_Archive(PyObject *o) { return 0; } +static PyObject *__pyx_getprop_8cocoprep_12coco_archive_7Archive_number_of_solutions(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_8cocoprep_12coco_archive_7Archive_19number_of_solutions_1__get__(o); +} + +static PyObject *__pyx_getprop_8cocoprep_12coco_archive_7Archive_hypervolume(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_8cocoprep_12coco_archive_7Archive_11hypervolume_1__get__(o); +} + static PyMethodDef __pyx_methods_8cocoprep_12coco_archive_Archive[] = { - {"add_solution", (PyCFunction)__pyx_pw_8cocoprep_12coco_archive_7Archive_5add_solution, METH_VARARGS|METH_KEYWORDS, 0}, + {"add_solution", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8cocoprep_12coco_archive_7Archive_5add_solution, METH_VARARGS|METH_KEYWORDS, 0}, {"get_next_solution_text", (PyCFunction)__pyx_pw_8cocoprep_12coco_archive_7Archive_7get_next_solution_text, METH_NOARGS, 0}, {"update", (PyCFunction)__pyx_pw_8cocoprep_12coco_archive_7Archive_9update, METH_NOARGS, 0}, - {"number_of_solutions", (PyCFunction)__pyx_pw_8cocoprep_12coco_archive_7Archive_11number_of_solutions, METH_NOARGS, 0}, - {"hypervolume", (PyCFunction)__pyx_pw_8cocoprep_12coco_archive_7Archive_13hypervolume, METH_NOARGS, 0}, + {"__reduce_cython__", (PyCFunction)__pyx_pw_8cocoprep_12coco_archive_7Archive_11__reduce_cython__, METH_NOARGS, 0}, + {"__setstate_cython__", (PyCFunction)__pyx_pw_8cocoprep_12coco_archive_7Archive_13__setstate_cython__, METH_O, 0}, {0, 0, 0, 0} }; +static struct PyGetSetDef __pyx_getsets_8cocoprep_12coco_archive_Archive[] = { + {(char *)"number_of_solutions", __pyx_getprop_8cocoprep_12coco_archive_7Archive_number_of_solutions, 0, (char *)0, 0}, + {(char *)"hypervolume", __pyx_getprop_8cocoprep_12coco_archive_7Archive_hypervolume, 0, (char *)0, 0}, + {0, 0, 0, 0, 0} +}; + static PyTypeObject __pyx_type_8cocoprep_12coco_archive_Archive = { PyVarObject_HEAD_INIT(0, 0) "cocoprep.coco_archive.Archive", /*tp_name*/ sizeof(struct __pyx_obj_8cocoprep_12coco_archive_Archive), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_8cocoprep_12coco_archive_Archive, /*tp_dealloc*/ + #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 + 0, /*tp_vectorcall_offset*/ + #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 @@ -4604,7 +4186,7 @@ static PyTypeObject __pyx_type_8cocoprep_12coco_archive_Archive = { 0, /*tp_iternext*/ __pyx_methods_8cocoprep_12coco_archive_Archive, /*tp_methods*/ 0, /*tp_members*/ - 0, /*tp_getset*/ + __pyx_getsets_8cocoprep_12coco_archive_Archive, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ @@ -4625,6 +4207,12 @@ static PyTypeObject __pyx_type_8cocoprep_12coco_archive_Archive = { #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif + #if PY_VERSION_HEX >= 0x030800b1 + 0, /*tp_vectorcall*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 + 0, /*tp_print*/ + #endif }; static PyMethodDef __pyx_methods[] = { @@ -4632,88 +4220,100 @@ static PyMethodDef __pyx_methods[] = { }; #if PY_MAJOR_VERSION >= 3 +#if CYTHON_PEP489_MULTI_PHASE_INIT +static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/ +static int __pyx_pymod_exec_coco_archive(PyObject* module); /*proto*/ +static PyModuleDef_Slot __pyx_moduledef_slots[] = { + {Py_mod_create, (void*)__pyx_pymod_create}, + {Py_mod_exec, (void*)__pyx_pymod_exec_coco_archive}, + {0, NULL} +}; +#endif + static struct PyModuleDef __pyx_moduledef = { - #if PY_VERSION_HEX < 0x03020000 - { PyObject_HEAD_INIT(NULL) NULL, 0, NULL }, - #else PyModuleDef_HEAD_INIT, - #endif "coco_archive", 0, /* m_doc */ + #if CYTHON_PEP489_MULTI_PHASE_INIT + 0, /* m_size */ + #else -1, /* m_size */ + #endif __pyx_methods /* m_methods */, + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_moduledef_slots, /* m_slots */ + #else NULL, /* m_reload */ + #endif NULL, /* m_traverse */ NULL, /* m_clear */ NULL /* m_free */ }; #endif +#ifndef CYTHON_SMALL_CODE +#if defined(__clang__) + #define CYTHON_SMALL_CODE +#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) + #define CYTHON_SMALL_CODE __attribute__((cold)) +#else + #define CYTHON_SMALL_CODE +#endif +#endif 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_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_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1}, + {&__pyx_n_s_Archive, __pyx_k_Archive, sizeof(__pyx_k_Archive), 0, 0, 1, 1}, + {&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1}, {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1}, - {&__pyx_kp_s_Users_tea_Delo_Github_ttusar_co, __pyx_k_Users_tea_Delo_Github_ttusar_co, sizeof(__pyx_k_Users_tea_Delo_Github_ttusar_co), 0, 0, 1, 0}, - {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1}, - {&__pyx_kp_u__3, __pyx_k__3, sizeof(__pyx_k__3), 0, 1, 0, 0}, + {&__pyx_kp_u__2, __pyx_k__2, sizeof(__pyx_k__2), 0, 1, 0, 0}, {&__pyx_n_u_ascii, __pyx_k_ascii, sizeof(__pyx_k_ascii), 0, 1, 0, 1}, {&__pyx_kp_u_bbob_biobj, __pyx_k_bbob_biobj, sizeof(__pyx_k_bbob_biobj), 0, 1, 0, 0}, {&__pyx_kp_u_bbob_biobj_ext, __pyx_k_bbob_biobj_ext, sizeof(__pyx_k_bbob_biobj_ext), 0, 1, 0, 0}, + {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1}, {&__pyx_n_s_cocoprep_coco_archive, __pyx_k_cocoprep_coco_archive, sizeof(__pyx_k_cocoprep_coco_archive), 0, 0, 1, 1}, {&__pyx_n_s_dimension, __pyx_k_dimension, sizeof(__pyx_k_dimension), 0, 0, 1, 1}, {&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1}, {&__pyx_n_s_f1, __pyx_k_f1, sizeof(__pyx_k_f1), 0, 0, 1, 1}, {&__pyx_n_s_f2, __pyx_k_f2, sizeof(__pyx_k_f2), 0, 0, 1, 1}, {&__pyx_n_s_function, __pyx_k_function, sizeof(__pyx_k_function), 0, 0, 1, 1}, - {&__pyx_n_s_hypervolume, __pyx_k_hypervolume, sizeof(__pyx_k_hypervolume), 0, 0, 1, 1}, + {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1}, {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1}, {&__pyx_n_s_instance, __pyx_k_instance, sizeof(__pyx_k_instance), 0, 0, 1, 1}, + {&__pyx_kp_s_interface_coco_archive_pyx, __pyx_k_interface_coco_archive_pyx, sizeof(__pyx_k_interface_coco_archive_pyx), 0, 0, 1, 0}, {&__pyx_n_s_level, __pyx_k_level, sizeof(__pyx_k_level), 0, 0, 1, 1}, {&__pyx_n_s_level_2, __pyx_k_level_2, sizeof(__pyx_k_level_2), 0, 0, 1, 1}, {&__pyx_n_s_log_level, __pyx_k_log_level, sizeof(__pyx_k_log_level), 0, 0, 1, 1}, {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 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_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1}, + {&__pyx_kp_s_no_default___reduce___due_to_non, __pyx_k_no_default___reduce___due_to_non, sizeof(__pyx_k_no_default___reduce___due_to_non), 0, 0, 1, 0}, {&__pyx_n_s_np, __pyx_k_np, sizeof(__pyx_k_np), 0, 0, 1, 1}, - {&__pyx_n_s_number_of_solutions, __pyx_k_number_of_solutions, sizeof(__pyx_k_number_of_solutions), 0, 0, 1, 1}, {&__pyx_n_s_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 0, 0, 1, 1}, - {&__pyx_n_s_property, __pyx_k_property, sizeof(__pyx_k_property), 0, 0, 1, 1}, + {&__pyx_kp_u_numpy_core_multiarray_failed_to, __pyx_k_numpy_core_multiarray_failed_to, sizeof(__pyx_k_numpy_core_multiarray_failed_to), 0, 1, 0, 0}, + {&__pyx_kp_u_numpy_core_umath_failed_to_impor, __pyx_k_numpy_core_umath_failed_to_impor, sizeof(__pyx_k_numpy_core_umath_failed_to_impor), 0, 1, 0, 0}, {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1}, + {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1}, + {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1}, + {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1}, + {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1}, + {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1}, {&__pyx_n_s_suite_name, __pyx_k_suite_name, sizeof(__pyx_k_suite_name), 0, 0, 1, 1}, {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1}, {&__pyx_n_s_text, __pyx_k_text, sizeof(__pyx_k_text), 0, 0, 1, 1}, - {&__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_k_unknown_dtype_code_in_numpy_pxd, sizeof(__pyx_k_unknown_dtype_code_in_numpy_pxd), 0, 1, 0, 0}, {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1}, {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 = 86; __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 = 31; __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 = 51; __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 = 218; __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 = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} +static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { + __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 31, __pyx_L1_error) + __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 51, __pyx_L1_error) + __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(2, 947, __pyx_L1_error) return 0; __pyx_L1_error:; return -1; } -static int __Pyx_InitCachedConstants(void) { +static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); - /* "interface/coco_archive.pyx":29 - * return s - * elif isinstance(s, unicode): - * return s.encode('ascii') # <<<<<<<<<<<<<< - * else: - * raise TypeError() - */ - __pyx_tuple_ = PyTuple_Pack(1, __pyx_n_u_ascii); if (unlikely(!__pyx_tuple_)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_tuple_); - __Pyx_GIVEREF(__pyx_tuple_); - /* "interface/coco_archive.pyx":51 * * # A "dirty" hack to take care of the fact that the bbob-biobj-ext suite produces archives named "bbob-biobj_..." @@ -4721,87 +4321,127 @@ static int __Pyx_InitCachedConstants(void) { * self._suite_name = _bstring('bbob-biobj-ext') * else: */ - __pyx_tuple__2 = PyTuple_Pack(2, __pyx_int_56, __pyx_int_93); if (unlikely(!__pyx_tuple__2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_tuple__2); - __Pyx_GIVEREF(__pyx_tuple__2); + __pyx_tuple_ = PyTuple_Pack(2, __pyx_int_56, __pyx_int_93); if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 51, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple_); + __Pyx_GIVEREF(__pyx_tuple_); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(1, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__3); + __Pyx_GIVEREF(__pyx_tuple__3); - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":218 - * 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) + /* "(tree fragment)":4 + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< */ - __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_C_contiguous); if (unlikely(!__pyx_tuple__4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(1, 4, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__4); __Pyx_GIVEREF(__pyx_tuple__4); - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":222 - * 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") # <<<<<<<<<<<<<< + /* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":947 + * __pyx_import_array() + * except Exception: + * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<< * - * info.buf = PyArray_DATA(self) + * cdef inline int import_umath() except -1: */ - __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_Fortran_contiguou); if (unlikely(!__pyx_tuple__5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_u_numpy_core_multiarray_failed_to); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(2, 947, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__5); __Pyx_GIVEREF(__pyx_tuple__5); - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":259 - * if ((descr.byteorder == c'>' and little_endian) or - * (descr.byteorder == c'<' and not little_endian)): - * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< - * if t == NPY_BYTE: f = "b" - * elif t == NPY_UBYTE: f = "B" + /* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":953 + * _import_umath() + * except Exception: + * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< + * + * cdef inline int import_ufunc() except -1: */ - __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_u_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(2, 953, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__6); __Pyx_GIVEREF(__pyx_tuple__6); - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":799 + /* "interface/coco_archive.pyx":97 * - * if (end - f) - (new_offset - offset[0]) < 15: - * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< * - * if ((child.byteorder == c'>' and little_endian) or + * def log_level(level=None): # <<<<<<<<<<<<<< + * """Returns current log level and sets new log level if level is not None. + * :param level: Supported values: 'error' or 'warning' or 'info' or 'debug', listed with increasing verbosity, */ - __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor); if (unlikely(!__pyx_tuple__7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_tuple__7 = PyTuple_Pack(2, __pyx_n_s_level, __pyx_n_s_level_2); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 97, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__7); __Pyx_GIVEREF(__pyx_tuple__7); + __pyx_codeobj__8 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__7, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_interface_coco_archive_pyx, __pyx_n_s_log_level, 97, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__8)) __PYX_ERR(0, 97, __pyx_L1_error) + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_RefNannyFinishContext(); + return -1; +} - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":803 - * if ((child.byteorder == c'>' and little_endian) or - * (child.byteorder == c'<' and not little_endian)): - * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< - * # One could encode it in the format string and have Cython - * # complain instead, BUT: < and > in format strings also imply - */ - __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_tuple__8); - __Pyx_GIVEREF(__pyx_tuple__8); +static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) { + if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error); + __pyx_int_56 = PyInt_FromLong(56); if (unlikely(!__pyx_int_56)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_int_93 = PyInt_FromLong(93); if (unlikely(!__pyx_int_93)) __PYX_ERR(0, 1, __pyx_L1_error) + return 0; + __pyx_L1_error:; + return -1; +} - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":823 - * 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__9 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor_2); if (unlikely(!__pyx_tuple__9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_tuple__9); - __Pyx_GIVEREF(__pyx_tuple__9); +static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/ - /* "interface/coco_archive.pyx":97 - * - * - * def log_level(level=None): # <<<<<<<<<<<<<< - * """Returns current log level and sets new log level if level is not None. - * :param level: Supported values: 'error' or 'warning' or 'info' or 'debug', listed with increasing verbosity, - */ - __pyx_tuple__10 = PyTuple_Pack(2, __pyx_n_s_level, __pyx_n_s_level_2); if (unlikely(!__pyx_tuple__10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_tuple__10); - __Pyx_GIVEREF(__pyx_tuple__10); - __pyx_codeobj__11 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__10, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_tea_Delo_Github_ttusar_co, __pyx_n_s_log_level, 97, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} +static int __Pyx_modinit_global_init_code(void) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0); + /*--- Global init code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_variable_export_code(void) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0); + /*--- Variable export code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_function_export_code(void) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0); + /*--- Function export code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_type_init_code(void) { + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); + /*--- Type init code ---*/ + if (PyType_Ready(&__pyx_type_8cocoprep_12coco_archive_Archive) < 0) __PYX_ERR(0, 33, __pyx_L1_error) + #if PY_VERSION_HEX < 0x030800B1 + __pyx_type_8cocoprep_12coco_archive_Archive.tp_print = 0; + #endif + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_8cocoprep_12coco_archive_Archive.tp_dictoffset && __pyx_type_8cocoprep_12coco_archive_Archive.tp_getattro == PyObject_GenericGetAttr)) { + __pyx_type_8cocoprep_12coco_archive_Archive.tp_getattro = __Pyx_PyObject_GenericGetAttr; + } + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Archive, (PyObject *)&__pyx_type_8cocoprep_12coco_archive_Archive) < 0) __PYX_ERR(0, 33, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_8cocoprep_12coco_archive_Archive) < 0) __PYX_ERR(0, 33, __pyx_L1_error) + __pyx_ptype_8cocoprep_12coco_archive_Archive = &__pyx_type_8cocoprep_12coco_archive_Archive; __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; @@ -4809,56 +4449,225 @@ static int __Pyx_InitCachedConstants(void) { 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_56 = PyInt_FromLong(56); if (unlikely(!__pyx_int_56)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_int_93 = PyInt_FromLong(93); if (unlikely(!__pyx_int_93)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} +static int __Pyx_modinit_type_import_code(void) { + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); + /*--- Type import code ---*/ + __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(PyTypeObject), + #else + sizeof(PyHeapTypeObject), + #endif + __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_7cpython_4type_type) __PYX_ERR(3, 9, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyImport_ImportModule("numpy"); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 200, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_ptype_5numpy_dtype = __Pyx_ImportType(__pyx_t_1, "numpy", "dtype", sizeof(PyArray_Descr), __Pyx_ImportType_CheckSize_Ignore); + if (!__pyx_ptype_5numpy_dtype) __PYX_ERR(2, 200, __pyx_L1_error) + __pyx_ptype_5numpy_flatiter = __Pyx_ImportType(__pyx_t_1, "numpy", "flatiter", sizeof(PyArrayIterObject), __Pyx_ImportType_CheckSize_Ignore); + if (!__pyx_ptype_5numpy_flatiter) __PYX_ERR(2, 223, __pyx_L1_error) + __pyx_ptype_5numpy_broadcast = __Pyx_ImportType(__pyx_t_1, "numpy", "broadcast", sizeof(PyArrayMultiIterObject), __Pyx_ImportType_CheckSize_Ignore); + if (!__pyx_ptype_5numpy_broadcast) __PYX_ERR(2, 227, __pyx_L1_error) + __pyx_ptype_5numpy_ndarray = __Pyx_ImportType(__pyx_t_1, "numpy", "ndarray", sizeof(PyArrayObject), __Pyx_ImportType_CheckSize_Ignore); + if (!__pyx_ptype_5numpy_ndarray) __PYX_ERR(2, 239, __pyx_L1_error) + __pyx_ptype_5numpy_generic = __Pyx_ImportType(__pyx_t_1, "numpy", "generic", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_5numpy_generic) __PYX_ERR(2, 771, __pyx_L1_error) + __pyx_ptype_5numpy_number = __Pyx_ImportType(__pyx_t_1, "numpy", "number", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_5numpy_number) __PYX_ERR(2, 773, __pyx_L1_error) + __pyx_ptype_5numpy_integer = __Pyx_ImportType(__pyx_t_1, "numpy", "integer", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_5numpy_integer) __PYX_ERR(2, 775, __pyx_L1_error) + __pyx_ptype_5numpy_signedinteger = __Pyx_ImportType(__pyx_t_1, "numpy", "signedinteger", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_5numpy_signedinteger) __PYX_ERR(2, 777, __pyx_L1_error) + __pyx_ptype_5numpy_unsignedinteger = __Pyx_ImportType(__pyx_t_1, "numpy", "unsignedinteger", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_5numpy_unsignedinteger) __PYX_ERR(2, 779, __pyx_L1_error) + __pyx_ptype_5numpy_inexact = __Pyx_ImportType(__pyx_t_1, "numpy", "inexact", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_5numpy_inexact) __PYX_ERR(2, 781, __pyx_L1_error) + __pyx_ptype_5numpy_floating = __Pyx_ImportType(__pyx_t_1, "numpy", "floating", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_5numpy_floating) __PYX_ERR(2, 783, __pyx_L1_error) + __pyx_ptype_5numpy_complexfloating = __Pyx_ImportType(__pyx_t_1, "numpy", "complexfloating", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_5numpy_complexfloating) __PYX_ERR(2, 785, __pyx_L1_error) + __pyx_ptype_5numpy_flexible = __Pyx_ImportType(__pyx_t_1, "numpy", "flexible", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_5numpy_flexible) __PYX_ERR(2, 787, __pyx_L1_error) + __pyx_ptype_5numpy_character = __Pyx_ImportType(__pyx_t_1, "numpy", "character", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_5numpy_character) __PYX_ERR(2, 789, __pyx_L1_error) + __pyx_ptype_5numpy_ufunc = __Pyx_ImportType(__pyx_t_1, "numpy", "ufunc", sizeof(PyUFuncObject), __Pyx_ImportType_CheckSize_Ignore); + if (!__pyx_ptype_5numpy_ufunc) __PYX_ERR(2, 827, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_RefNannyFinishContext(); return -1; } +static int __Pyx_modinit_variable_import_code(void) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0); + /*--- Variable import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_function_import_code(void) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0); + /*--- Function import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + + +#ifndef CYTHON_NO_PYINIT_EXPORT +#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC +#elif PY_MAJOR_VERSION < 3 +#ifdef __cplusplus +#define __Pyx_PyMODINIT_FUNC extern "C" void +#else +#define __Pyx_PyMODINIT_FUNC void +#endif +#else +#ifdef __cplusplus +#define __Pyx_PyMODINIT_FUNC extern "C" PyObject * +#else +#define __Pyx_PyMODINIT_FUNC PyObject * +#endif +#endif + + #if PY_MAJOR_VERSION < 3 -PyMODINIT_FUNC initcoco_archive(void); /*proto*/ -PyMODINIT_FUNC initcoco_archive(void) +__Pyx_PyMODINIT_FUNC initcoco_archive(void) CYTHON_SMALL_CODE; /*proto*/ +__Pyx_PyMODINIT_FUNC initcoco_archive(void) #else -PyMODINIT_FUNC PyInit_coco_archive(void); /*proto*/ -PyMODINIT_FUNC PyInit_coco_archive(void) +__Pyx_PyMODINIT_FUNC PyInit_coco_archive(void) CYTHON_SMALL_CODE; /*proto*/ +__Pyx_PyMODINIT_FUNC PyInit_coco_archive(void) +#if CYTHON_PEP489_MULTI_PHASE_INIT +{ + return PyModuleDef_Init(&__pyx_moduledef); +} +static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) { + #if PY_VERSION_HEX >= 0x030700A1 + static PY_INT64_T main_interpreter_id = -1; + PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp); + if (main_interpreter_id == -1) { + main_interpreter_id = current_id; + return (unlikely(current_id == -1)) ? -1 : 0; + } else if (unlikely(main_interpreter_id != current_id)) + #else + static PyInterpreterState *main_interpreter = NULL; + PyInterpreterState *current_interpreter = PyThreadState_Get()->interp; + if (!main_interpreter) { + main_interpreter = current_interpreter; + } else if (unlikely(main_interpreter != current_interpreter)) + #endif + { + PyErr_SetString( + PyExc_ImportError, + "Interpreter change detected - this module can only be loaded into one interpreter per process."); + return -1; + } + return 0; +} +static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) { + PyObject *value = PyObject_GetAttrString(spec, from_name); + int result = 0; + if (likely(value)) { + if (allow_none || value != Py_None) { + result = PyDict_SetItemString(moddict, to_name, value); + } + Py_DECREF(value); + } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) { + PyErr_Clear(); + } else { + result = -1; + } + return result; +} +static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) { + PyObject *module = NULL, *moddict, *modname; + if (__Pyx_check_single_interpreter()) + return NULL; + if (__pyx_m) + return __Pyx_NewRef(__pyx_m); + modname = PyObject_GetAttrString(spec, "name"); + if (unlikely(!modname)) goto bad; + module = PyModule_NewObject(modname); + Py_DECREF(modname); + if (unlikely(!module)) goto bad; + moddict = PyModule_GetDict(module); + if (unlikely(!moddict)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad; + return module; +bad: + Py_XDECREF(module); + return NULL; +} + + +static CYTHON_SMALL_CODE int __pyx_pymod_exec_coco_archive(PyObject *__pyx_pyinit_module) +#endif #endif { PyObject *__pyx_t_1 = NULL; - PyObject *__pyx_t_2 = NULL; + int __pyx_t_2; 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"); + #if CYTHON_PEP489_MULTI_PHASE_INIT + if (__pyx_m) { + if (__pyx_m == __pyx_pyinit_module) return 0; + PyErr_SetString(PyExc_RuntimeError, "Module 'coco_archive' has already been imported. Re-initialisation is not supported."); + return -1; } + #elif PY_MAJOR_VERSION >= 3 + if (__pyx_m) return __Pyx_NewRef(__pyx_m); + #endif + #if CYTHON_REFNANNY +__Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); +if (!__Pyx_RefNanny) { + PyErr_Clear(); + __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); + if (!__Pyx_RefNanny) + Py_FatalError("failed to import 'refnanny' module"); +} +#endif + __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_coco_archive(void)", 0); + if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #ifdef __Pxy_PyFrame_Initialize_Offsets + __Pxy_PyFrame_Initialize_Offsets(); #endif - __Pyx_RefNannySetupContext("PyMODINIT_FUNC PyInit_coco_archive(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;} + __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error) #ifdef __Pyx_CyFunction_USED - if (__pyx_CyFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __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;} + if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error) #endif #ifdef __Pyx_Coroutine_USED - if (__pyx_Coroutine_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __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;} + if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_AsyncGen_USED + if (__pyx_AsyncGen_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error) #endif #ifdef __Pyx_StopAsyncIteration_USED - if (__pyx_StopAsyncIteration_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error) #endif /*--- Library function declarations ---*/ /*--- Threads initialization code ---*/ @@ -4868,65 +4677,55 @@ PyMODINIT_FUNC PyInit_coco_archive(void) #endif #endif /*--- Module creation code ---*/ + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_m = __pyx_pyinit_module; + Py_INCREF(__pyx_m); + #else #if PY_MAJOR_VERSION < 3 __pyx_m = Py_InitModule4("coco_archive", __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;} + if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error) Py_INCREF(__pyx_d); - __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - #if CYTHON_COMPILING_IN_PYPY + __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error) Py_INCREF(__pyx_b); - #endif - if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error) + Py_INCREF(__pyx_cython_runtime); + if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error); /*--- Initialize various global constants etc. ---*/ - if (__Pyx_InitGlobals() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error) #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT) - if (__Pyx_init_sys_getdefaultencoding_params() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error) #endif if (__pyx_module_is_main_cocoprep__coco_archive) { - if (PyObject_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 (PyObject_SetAttr(__pyx_m, __pyx_n_s_name, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error) } #if PY_MAJOR_VERSION >= 3 { - PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error) if (!PyDict_GetItemString(modules, "cocoprep.coco_archive")) { - if (unlikely(PyDict_SetItemString(modules, "cocoprep.coco_archive", __pyx_m) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(PyDict_SetItemString(modules, "cocoprep.coco_archive", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error) } } #endif /*--- Builtin init code ---*/ - if (__Pyx_InitCachedBuiltins() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error) /*--- Constants init code ---*/ - if (__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_8cocoprep_12coco_archive_Archive) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_type_8cocoprep_12coco_archive_Archive.tp_print = 0; - if (PyObject_SetAttrString(__pyx_m, "Archive", (PyObject *)&__pyx_type_8cocoprep_12coco_archive_Archive) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_8cocoprep_12coco_archive_Archive = &__pyx_type_8cocoprep_12coco_archive_Archive; - /*--- 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_5numpy_dtype = __Pyx_ImportType("numpy", "dtype", sizeof(PyArray_Descr), 0); if (unlikely(!__pyx_ptype_5numpy_dtype)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 155; __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 = 168; __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 = 172; __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 = 181; __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 = 861; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /*--- Variable import code ---*/ - /*--- Function import code ---*/ + if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Global type/function init code ---*/ + (void)__Pyx_modinit_global_init_code(); + (void)__Pyx_modinit_variable_export_code(); + (void)__Pyx_modinit_function_export_code(); + if (unlikely(__Pyx_modinit_type_init_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error) + if (unlikely(__Pyx_modinit_type_import_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error) + (void)__Pyx_modinit_variable_import_code(); + (void)__Pyx_modinit_function_import_code(); /*--- Execution code ---*/ #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) - if (__Pyx_patch_abc() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error) #endif /* "interface/coco_archive.pyx":4 @@ -4936,9 +4735,9 @@ PyMODINIT_FUNC PyInit_coco_archive(void) * cimport numpy as np * */ - __pyx_t_1 = __Pyx_Import(__pyx_n_s_numpy, 0, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_Import(__pyx_n_s_numpy, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __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 = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s_np, __pyx_t_1) < 0) __PYX_ERR(0, 4, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "interface/coco_archive.pyx":8 @@ -4948,65 +4747,7 @@ PyMODINIT_FUNC PyInit_coco_archive(void) * * cdef extern from "coco.h": */ - import_array(); - - /* "interface/coco_archive.pyx":87 - * - * @property - * def number_of_solutions(self): # <<<<<<<<<<<<<< - * self.update() - * return self._number_of_solutions - */ - __pyx_t_1 = __Pyx_GetNameInClass((PyObject *)__pyx_ptype_8cocoprep_12coco_archive_Archive, __pyx_n_s_number_of_solutions); 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); - - /* "interface/coco_archive.pyx":86 - * self.up_to_date = True - * - * @property # <<<<<<<<<<<<<< - * def number_of_solutions(self): - * self.update() - */ - __pyx_t_2 = PyTuple_New(1); 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_GIVEREF(__pyx_t_1); - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); - __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __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_8cocoprep_12coco_archive_Archive->tp_dict, __pyx_n_s_number_of_solutions, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - PyType_Modified(__pyx_ptype_8cocoprep_12coco_archive_Archive); - - /* "interface/coco_archive.pyx":92 - * - * @property - * def hypervolume(self): # <<<<<<<<<<<<<< - * self.update() - * return self._hypervolume - */ - __pyx_t_1 = __Pyx_GetNameInClass((PyObject *)__pyx_ptype_8cocoprep_12coco_archive_Archive, __pyx_n_s_hypervolume); 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); - - /* "interface/coco_archive.pyx":91 - * return self._number_of_solutions - * - * @property # <<<<<<<<<<<<<< - * def hypervolume(self): - * self.update() - */ - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __Pyx_GIVEREF(__pyx_t_1); - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); - __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __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_8cocoprep_12coco_archive_Archive->tp_dict, __pyx_n_s_hypervolume, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - PyType_Modified(__pyx_ptype_8cocoprep_12coco_archive_Archive); + __pyx_t_2 = __pyx_f_5numpy_import_array(); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 8, __pyx_L1_error) /* "interface/coco_archive.pyx":97 * @@ -5015,9 +4756,9 @@ PyMODINIT_FUNC PyInit_coco_archive(void) * """Returns current log level and sets new log level if level is not None. * :param level: Supported values: 'error' or 'warning' or 'info' or 'debug', listed with increasing verbosity, */ - __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_8cocoprep_12coco_archive_1log_level, NULL, __pyx_n_s_cocoprep_coco_archive); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_8cocoprep_12coco_archive_1log_level, NULL, __pyx_n_s_cocoprep_coco_archive); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 97, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_log_level, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s_log_level, __pyx_t_1) < 0) __PYX_ERR(0, 97, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "interface/coco_archive.pyx":1 @@ -5025,17 +4766,17 @@ PyMODINIT_FUNC PyInit_coco_archive(void) * #interface: c_string_type=str, c_string_encoding=ascii * from __future__ import absolute_import, division, print_function, unicode_literals */ - __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_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __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;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "../../../../../../../Applications/anaconda/envs/py27/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":976 - * arr.base = baseptr + /* "C:/Anaconda3/envs/py39coco/lib/site-packages/numpy/__init__.pxd":1016 * - * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< - * if arr.base is NULL: - * return None + * + * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< + * """ + * returns the unit part of the dtype for a numpy datetime64 object. */ /*--- Wrapped vars code ---*/ @@ -5043,32 +4784,34 @@ PyMODINIT_FUNC PyInit_coco_archive(void) goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_2); if (__pyx_m) { if (__pyx_d) { __Pyx_AddTraceback("init cocoprep.coco_archive", __pyx_clineno, __pyx_lineno, __pyx_filename); } - Py_DECREF(__pyx_m); __pyx_m = 0; + Py_CLEAR(__pyx_m); } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_ImportError, "init cocoprep.coco_archive"); } - __pyx_L0:; - __Pyx_RefNannyFinishContext(); - #if PY_MAJOR_VERSION < 3 - return; - #else + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + #if CYTHON_PEP489_MULTI_PHASE_INIT + return (__pyx_m != NULL) ? 0 : -1; + #elif PY_MAJOR_VERSION >= 3 return __pyx_m; + #else + return; #endif } /* --- Runtime support code --- */ +/* Refnanny */ #if CYTHON_REFNANNY static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { PyObject *m = NULL, *p = NULL; void *r = NULL; - m = PyImport_ImportModule((char *)modname); + m = PyImport_ImportModule(modname); if (!m) goto end; - p = PyObject_GetAttrString(m, (char *)"RefNannyAPI"); + p = PyObject_GetAttrString(m, "RefNannyAPI"); if (!p) goto end; r = PyLong_AsVoidPtr(p); end: @@ -5078,6 +4821,21 @@ static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { } #endif +/* PyObjectGetAttrStr */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro)) + return tp->tp_getattro(obj, attr_name); +#if PY_MAJOR_VERSION < 3 + if (likely(tp->tp_getattr)) + return tp->tp_getattr(obj, PyString_AS_STRING(attr_name)); +#endif + return PyObject_GetAttr(obj, attr_name); +} +#endif + +/* GetBuiltinName */ static PyObject *__Pyx_GetBuiltinName(PyObject *name) { PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name); if (unlikely(!result)) { @@ -5091,6 +4849,149 @@ static PyObject *__Pyx_GetBuiltinName(PyObject *name) { return result; } +/* PyCFunctionFastCall */ +#if CYTHON_FAST_PYCCALL +static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) { + PyCFunctionObject *func = (PyCFunctionObject*)func_obj; + PyCFunction meth = PyCFunction_GET_FUNCTION(func); + PyObject *self = PyCFunction_GET_SELF(func); + int flags = PyCFunction_GET_FLAGS(func); + assert(PyCFunction_Check(func)); + assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS))); + assert(nargs >= 0); + assert(nargs == 0 || args != NULL); + /* _PyCFunction_FastCallDict() must not be called with an exception set, + because it may clear it (directly or indirectly) and so the + caller loses its exception */ + assert(!PyErr_Occurred()); + if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) { + return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL); + } else { + return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs); + } +} +#endif + +/* PyFunctionFastCall */ +#if CYTHON_FAST_PYCALL +static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na, + PyObject *globals) { + PyFrameObject *f; + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject **fastlocals; + Py_ssize_t i; + PyObject *result; + assert(globals != NULL); + /* XXX Perhaps we should create a specialized + PyFrame_New() that doesn't take locals, but does + take builtins without sanity checking them. + */ + assert(tstate != NULL); + f = PyFrame_New(tstate, co, globals, NULL); + if (f == NULL) { + return NULL; + } + fastlocals = __Pyx_PyFrame_GetLocalsplus(f); + for (i = 0; i < na; i++) { + Py_INCREF(*args); + fastlocals[i] = *args++; + } + result = PyEval_EvalFrameEx(f,0); + ++tstate->recursion_depth; + Py_DECREF(f); + --tstate->recursion_depth; + return result; +} +#if 1 || PY_VERSION_HEX < 0x030600B1 +static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) { + PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func); + PyObject *globals = PyFunction_GET_GLOBALS(func); + PyObject *argdefs = PyFunction_GET_DEFAULTS(func); + PyObject *closure; +#if PY_MAJOR_VERSION >= 3 + PyObject *kwdefs; +#endif + PyObject *kwtuple, **k; + PyObject **d; + Py_ssize_t nd; + Py_ssize_t nk; + PyObject *result; + assert(kwargs == NULL || PyDict_Check(kwargs)); + nk = kwargs ? PyDict_Size(kwargs) : 0; + if (Py_EnterRecursiveCall((char*)" while calling a Python object")) { + return NULL; + } + if ( +#if PY_MAJOR_VERSION >= 3 + co->co_kwonlyargcount == 0 && +#endif + likely(kwargs == NULL || nk == 0) && + co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) { + if (argdefs == NULL && co->co_argcount == nargs) { + result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals); + goto done; + } + else if (nargs == 0 && argdefs != NULL + && co->co_argcount == Py_SIZE(argdefs)) { + /* function called with no arguments, but all parameters have + a default value: use default values as arguments .*/ + args = &PyTuple_GET_ITEM(argdefs, 0); + result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals); + goto done; + } + } + if (kwargs != NULL) { + Py_ssize_t pos, i; + kwtuple = PyTuple_New(2 * nk); + if (kwtuple == NULL) { + result = NULL; + goto done; + } + k = &PyTuple_GET_ITEM(kwtuple, 0); + pos = i = 0; + while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) { + Py_INCREF(k[i]); + Py_INCREF(k[i+1]); + i += 2; + } + nk = i / 2; + } + else { + kwtuple = NULL; + k = NULL; + } + closure = PyFunction_GET_CLOSURE(func); +#if PY_MAJOR_VERSION >= 3 + kwdefs = PyFunction_GET_KW_DEFAULTS(func); +#endif + if (argdefs != NULL) { + d = &PyTuple_GET_ITEM(argdefs, 0); + nd = Py_SIZE(argdefs); + } + else { + d = NULL; + nd = 0; + } +#if PY_MAJOR_VERSION >= 3 + result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL, + args, (int)nargs, + k, (int)nk, + d, (int)nd, kwdefs, closure); +#else + result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL, + args, (int)nargs, + k, (int)nk, + d, (int)nd, closure); +#endif + Py_XDECREF(kwtuple); +done: + Py_LeaveRecursiveCall(); + return result; +} +#endif +#endif + +/* PyObjectCall */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { PyObject *result; @@ -5110,6 +5011,36 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg } #endif +/* PyObjectCall2Args */ +static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) { + PyObject *args, *result = NULL; + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(function)) { + PyObject *args[2] = {arg1, arg2}; + return __Pyx_PyFunction_FastCall(function, args, 2); + } + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(function)) { + PyObject *args[2] = {arg1, arg2}; + return __Pyx_PyCFunction_FastCall(function, args, 2); + } + #endif + args = PyTuple_New(2); + if (unlikely(!args)) goto done; + Py_INCREF(arg1); + PyTuple_SET_ITEM(args, 0, arg1); + Py_INCREF(arg2); + PyTuple_SET_ITEM(args, 1, arg2); + Py_INCREF(function); + result = __Pyx_PyObject_Call(function, args, NULL); + Py_DECREF(args); + Py_DECREF(function); +done: + return result; +} + +/* PyObjectCallMethO */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) { PyObject *self, *result; @@ -5129,13 +5060,60 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject } #endif +/* PyObjectCallOneArg */ +#if CYTHON_COMPILING_IN_CPYTHON +static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) { + PyObject *result; + PyObject *args = PyTuple_New(1); + if (unlikely(!args)) return NULL; + Py_INCREF(arg); + PyTuple_SET_ITEM(args, 0, arg); + result = __Pyx_PyObject_Call(func, args, NULL); + Py_DECREF(args); + return result; +} +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { +#if CYTHON_FAST_PYCALL + if (PyFunction_Check(func)) { + return __Pyx_PyFunction_FastCall(func, &arg, 1); + } +#endif + if (likely(PyCFunction_Check(func))) { + if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) { + return __Pyx_PyObject_CallMethO(func, arg); +#if CYTHON_FAST_PYCCALL + } else if (__Pyx_PyFastCFunction_Check(func)) { + return __Pyx_PyCFunction_FastCall(func, &arg, 1); +#endif + } + } + return __Pyx__PyObject_CallOneArg(func, arg); +} +#else +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { + PyObject *result; + PyObject *args = PyTuple_Pack(1, arg); + if (unlikely(!args)) return NULL; + result = __Pyx_PyObject_Call(func, args, NULL); + Py_DECREF(args); + return result; +} +#endif + +/* PyObjectCallNoArg */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) { +#if CYTHON_FAST_PYCALL + if (PyFunction_Check(func)) { + return __Pyx_PyFunction_FastCall(func, NULL, 0); + } +#endif #ifdef __Pyx_CyFunction_USED - if (likely(PyCFunction_Check(func) || PyObject_TypeCheck(func, __pyx_CyFunctionType))) { + if (likely(PyCFunction_Check(func) || __Pyx_CyFunction_Check(func))) #else - if (likely(PyCFunction_Check(func))) { + if (likely(PyCFunction_Check(func))) #endif + { if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) { return __Pyx_PyObject_CallMethO(func, NULL); } @@ -5144,10 +5122,10 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) { } #endif -static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) { -#if CYTHON_COMPILING_IN_CPYTHON +/* PyErrFetchRestore */ +#if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { PyObject *tmp_type, *tmp_value, *tmp_tb; - PyThreadState *tstate = PyThreadState_GET(); tmp_type = tstate->curexc_type; tmp_value = tstate->curexc_value; tmp_tb = tstate->curexc_traceback; @@ -5157,27 +5135,22 @@ static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyOb 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(); +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { *type = tstate->curexc_type; *value = tstate->curexc_value; *tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; -#else - PyErr_Fetch(type, value, tb); -#endif } +#endif +/* RaiseException */ #if PY_MAJOR_VERSION < 3 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, CYTHON_UNUSED PyObject *cause) { + __Pyx_PyThreadState_declare Py_XINCREF(type); if (!value || value == Py_None) value = NULL; @@ -5216,6 +5189,7 @@ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, goto raise_error; } } + __Pyx_PyThreadState_assign __Pyx_ErrRestore(type, value, tb); return; raise_error: @@ -5288,11 +5262,7 @@ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject "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; @@ -5320,7 +5290,7 @@ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject PyErr_Restore(tmp_type, tmp_value, tb); Py_XDECREF(tmp_tb); #else - PyThreadState *tstate = PyThreadState_GET(); + PyThreadState *tstate = __Pyx_PyThreadState_Current; PyObject* tmp_tb = tstate->curexc_traceback; if (tb != tmp_tb) { Py_INCREF(tb); @@ -5335,6 +5305,7 @@ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject } #endif +/* RaiseArgTupleInvalid */ static void __Pyx_RaiseArgtupleInvalid( const char* func_name, int exact, @@ -5360,6 +5331,7 @@ static void __Pyx_RaiseArgtupleInvalid( (num_expected == 1) ? "" : "s", num_found); } +/* RaiseDoubleKeywords */ static void __Pyx_RaiseDoubleKeywordsError( const char* func_name, PyObject* kw_name) @@ -5373,6 +5345,7 @@ static void __Pyx_RaiseDoubleKeywordsError( #endif } +/* ParseKeywords */ static int __Pyx_ParseOptionalKeywords( PyObject *kwds, PyObject **argnames[], @@ -5394,7 +5367,7 @@ static int __Pyx_ParseOptionalKeywords( } name = first_kw_arg; #if PY_MAJOR_VERSION < 3 - if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) { + if (likely(PyString_Check(key))) { while (*name) { if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key)) && _PyString_Eq(**name, key)) { @@ -5421,7 +5394,7 @@ static int __Pyx_ParseOptionalKeywords( 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 : + (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 : #endif PyUnicode_Compare(**name, key); if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; @@ -5437,7 +5410,7 @@ static int __Pyx_ParseOptionalKeywords( 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 : + (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 : #endif PyUnicode_Compare(**argname, key); if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; @@ -5474,6 +5447,7 @@ static int __Pyx_ParseOptionalKeywords( return -1; } +/* BytesEquals */ static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) { #if CYTHON_COMPILING_IN_PYPY return PyObject_RichCompareBool(s1, s2, equals); @@ -5492,7 +5466,16 @@ static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int eq } else if (length == 1) { return (equals == Py_EQ); } else { - int result = memcmp(ps1, ps2, (size_t)length); + int result; +#if CYTHON_USE_UNICODE_INTERNALS + Py_hash_t hash1, hash2; + hash1 = ((PyBytesObject*)s1)->ob_shash; + hash2 = ((PyBytesObject*)s2)->ob_shash; + if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { + return (equals == Py_NE); + } +#endif + result = memcmp(ps1, ps2, (size_t)length); return (equals == Py_EQ) ? (result == 0) : (result != 0); } } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) { @@ -5511,6 +5494,7 @@ static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int eq #endif } +/* UnicodeEquals */ static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) { #if CYTHON_COMPILING_IN_PYPY return PyObject_RichCompareBool(s1, s2, equals); @@ -5551,6 +5535,21 @@ static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) { goto return_ne; } +#if CYTHON_USE_UNICODE_INTERNALS + { + Py_hash_t hash1, hash2; + #if CYTHON_PEP393_ENABLED + hash1 = ((PyASCIIObject*)s1)->hash; + hash2 = ((PyASCIIObject*)s2)->hash; + #else + hash1 = ((PyUnicodeObject*)s1)->hash; + hash2 = ((PyUnicodeObject*)s2)->hash; + #endif + if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { + goto return_ne; + } + } +#endif kind = __Pyx_PyUnicode_KIND(s1); if (kind != __Pyx_PyUnicode_KIND(s2)) { goto return_ne; @@ -5575,6 +5574,9 @@ static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int } else { int result; PyObject* py_result = PyObject_RichCompare(s1, s2, equals); + #if PY_MAJOR_VERSION < 3 + Py_XDECREF(owned_ref); + #endif if (!py_result) return -1; result = __Pyx_PyObject_IsTrue(py_result); @@ -5594,6 +5596,7 @@ static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int #endif } +/* decode_c_bytes */ static CYTHON_INLINE PyObject* __Pyx_decode_c_bytes( const char* cstring, Py_ssize_t length, Py_ssize_t start, Py_ssize_t stop, const char* encoding, const char* errors, @@ -5609,9 +5612,9 @@ static CYTHON_INLINE PyObject* __Pyx_decode_c_bytes( } if (stop > length) stop = length; + if (unlikely(stop <= start)) + return __Pyx_NewRef(__pyx_empty_unicode); length = stop - start; - if (unlikely(length <= 0)) - return PyUnicode_FromUnicode(NULL, 0); cstring += start; if (decode_func) { return decode_func(cstring, length, errors); @@ -5620,74 +5623,386 @@ static CYTHON_INLINE PyObject* __Pyx_decode_c_bytes( } } -#if CYTHON_COMPILING_IN_CPYTHON -static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) { - PyObject *result; - PyObject *args = PyTuple_New(1); - if (unlikely(!args)) return NULL; - Py_INCREF(arg); - PyTuple_SET_ITEM(args, 0, arg); - result = __Pyx_PyObject_Call(func, args, NULL); - Py_DECREF(args); - return result; +/* GetTopmostException */ +#if CYTHON_USE_EXC_INFO_STACK +static _PyErr_StackItem * +__Pyx_PyErr_GetTopmostException(PyThreadState *tstate) +{ + _PyErr_StackItem *exc_info = tstate->exc_info; + while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) && + exc_info->previous_item != NULL) + { + exc_info = exc_info->previous_item; + } + return exc_info; } -static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { -#ifdef __Pyx_CyFunction_USED - if (likely(PyCFunction_Check(func) || PyObject_TypeCheck(func, __pyx_CyFunctionType))) { +#endif + +/* SaveResetException */ +#if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { + #if CYTHON_USE_EXC_INFO_STACK + _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate); + *type = exc_info->exc_type; + *value = exc_info->exc_value; + *tb = exc_info->exc_traceback; + #else + *type = tstate->exc_type; + *value = tstate->exc_value; + *tb = tstate->exc_traceback; + #endif + Py_XINCREF(*type); + Py_XINCREF(*value); + Py_XINCREF(*tb); +} +static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { + PyObject *tmp_type, *tmp_value, *tmp_tb; + #if CYTHON_USE_EXC_INFO_STACK + _PyErr_StackItem *exc_info = tstate->exc_info; + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + exc_info->exc_type = type; + exc_info->exc_value = value; + exc_info->exc_traceback = tb; + #else + tmp_type = tstate->exc_type; + tmp_value = tstate->exc_value; + tmp_tb = tstate->exc_traceback; + tstate->exc_type = type; + tstate->exc_value = value; + tstate->exc_traceback = tb; + #endif + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +} +#endif + +/* PyErrExceptionMatches */ +#if CYTHON_FAST_THREAD_STATE +static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(tuple); +#if PY_MAJOR_VERSION >= 3 + for (i=0; icurexc_type; + if (exc_type == err) return 1; + if (unlikely(!exc_type)) return 0; + if (unlikely(PyTuple_Check(err))) + return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err); + return __Pyx_PyErr_GivenExceptionMatches(exc_type, err); +} +#endif + +/* GetException */ +#if CYTHON_FAST_THREAD_STATE +static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) #else - if (likely(PyCFunction_Check(func))) { +static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) #endif - if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) { - return __Pyx_PyObject_CallMethO(func, arg); - } +{ + PyObject *local_type, *local_value, *local_tb; +#if CYTHON_FAST_THREAD_STATE + PyObject *tmp_type, *tmp_value, *tmp_tb; + local_type = tstate->curexc_type; + local_value = tstate->curexc_value; + local_tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; +#else + PyErr_Fetch(&local_type, &local_value, &local_tb); +#endif + PyErr_NormalizeException(&local_type, &local_value, &local_tb); +#if CYTHON_FAST_THREAD_STATE + if (unlikely(tstate->curexc_type)) +#else + if (unlikely(PyErr_Occurred())) +#endif + goto bad; + #if PY_MAJOR_VERSION >= 3 + if (local_tb) { + if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0)) + goto bad; } - return __Pyx__PyObject_CallOneArg(func, arg); + #endif + Py_XINCREF(local_tb); + Py_XINCREF(local_type); + Py_XINCREF(local_value); + *type = local_type; + *value = local_value; + *tb = local_tb; +#if CYTHON_FAST_THREAD_STATE + #if CYTHON_USE_EXC_INFO_STACK + { + _PyErr_StackItem *exc_info = tstate->exc_info; + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + exc_info->exc_type = local_type; + exc_info->exc_value = local_value; + exc_info->exc_traceback = local_tb; + } + #else + tmp_type = tstate->exc_type; + tmp_value = tstate->exc_value; + tmp_tb = tstate->exc_traceback; + tstate->exc_type = local_type; + tstate->exc_value = local_value; + tstate->exc_traceback = local_tb; + #endif + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +#else + PyErr_SetExcInfo(local_type, local_value, local_tb); +#endif + return 0; +bad: + *type = 0; + *value = 0; + *tb = 0; + Py_XDECREF(local_type); + Py_XDECREF(local_value); + Py_XDECREF(local_tb); + return -1; } + +/* PyObject_GenericGetAttrNoDict */ +#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 +static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) { + PyErr_Format(PyExc_AttributeError, +#if PY_MAJOR_VERSION >= 3 + "'%.50s' object has no attribute '%U'", + tp->tp_name, attr_name); #else -static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { + "'%.50s' object has no attribute '%.400s'", + tp->tp_name, PyString_AS_STRING(attr_name)); +#endif + return NULL; +} +static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) { + PyObject *descr; + PyTypeObject *tp = Py_TYPE(obj); + if (unlikely(!PyString_Check(attr_name))) { + return PyObject_GenericGetAttr(obj, attr_name); + } + assert(!tp->tp_dictoffset); + descr = _PyType_Lookup(tp, attr_name); + if (unlikely(!descr)) { + return __Pyx_RaiseGenericGetAttributeError(tp, attr_name); + } + Py_INCREF(descr); + #if PY_MAJOR_VERSION < 3 + if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS))) + #endif + { + descrgetfunc f = Py_TYPE(descr)->tp_descr_get; + if (unlikely(f)) { + PyObject *res = f(descr, obj, (PyObject *)tp); + Py_DECREF(descr); + return res; + } + } + return descr; +} +#endif + +/* PyObject_GenericGetAttr */ +#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 +static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) { + if (unlikely(Py_TYPE(obj)->tp_dictoffset)) { + return PyObject_GenericGetAttr(obj, attr_name); + } + return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name); +} +#endif + +/* PyObjectGetAttrStrNoError */ +static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) + __Pyx_PyErr_Clear(); +} +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) { PyObject *result; - PyObject *args = PyTuple_Pack(1, arg); - if (unlikely(!args)) return NULL; - result = __Pyx_PyObject_Call(func, args, NULL); - Py_DECREF(args); +#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1 + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) { + return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1); + } +#endif + result = __Pyx_PyObject_GetAttrStr(obj, attr_name); + if (unlikely(!result)) { + __Pyx_PyObject_GetAttrStr_ClearAttributeError(); + } return result; } + +/* SetupReduce */ +static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) { + int ret; + PyObject *name_attr; + name_attr = __Pyx_PyObject_GetAttrStr(meth, __pyx_n_s_name); + if (likely(name_attr)) { + ret = PyObject_RichCompareBool(name_attr, name, Py_EQ); + } else { + ret = -1; + } + if (unlikely(ret < 0)) { + PyErr_Clear(); + ret = 0; + } + Py_XDECREF(name_attr); + return ret; +} +static int __Pyx_setup_reduce(PyObject* type_obj) { + int ret = 0; + PyObject *object_reduce = NULL; + PyObject *object_reduce_ex = NULL; + PyObject *reduce = NULL; + PyObject *reduce_ex = NULL; + PyObject *reduce_cython = NULL; + PyObject *setstate = NULL; + PyObject *setstate_cython = NULL; +#if CYTHON_USE_PYTYPE_LOOKUP + if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD; +#else + if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD; +#endif +#if CYTHON_USE_PYTYPE_LOOKUP + object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; +#else + object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; +#endif + reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD; + if (reduce_ex == object_reduce_ex) { +#if CYTHON_USE_PYTYPE_LOOKUP + object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD; +#else + object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD; +#endif + reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto __PYX_BAD; + if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) { + reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_reduce_cython); + if (likely(reduce_cython)) { + ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + } else if (reduce == object_reduce || PyErr_Occurred()) { + goto __PYX_BAD; + } + setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate); + if (!setstate) PyErr_Clear(); + if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) { + setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate_cython); + if (likely(setstate_cython)) { + ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + } else if (!setstate || PyErr_Occurred()) { + goto __PYX_BAD; + } + } + PyType_Modified((PyTypeObject*)type_obj); + } + } + goto __PYX_GOOD; +__PYX_BAD: + if (!PyErr_Occurred()) + PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name); + ret = -1; +__PYX_GOOD: +#if !CYTHON_USE_PYTYPE_LOOKUP + Py_XDECREF(object_reduce); + Py_XDECREF(object_reduce_ex); +#endif + Py_XDECREF(reduce); + Py_XDECREF(reduce_ex); + Py_XDECREF(reduce_cython); + Py_XDECREF(setstate); + Py_XDECREF(setstate_cython); + return ret; +} + +/* TypeImport */ +#ifndef __PYX_HAVE_RT_ImportType +#define __PYX_HAVE_RT_ImportType +static PyTypeObject *__Pyx_ImportType(PyObject *module, const char *module_name, const char *class_name, + size_t size, enum __Pyx_ImportType_CheckSize check_size) +{ + PyObject *result = 0; + char warning[200]; + Py_ssize_t basicsize; +#ifdef Py_LIMITED_API + PyObject *py_basicsize; +#endif + result = PyObject_GetAttrString(module, class_name); + if (!result) + goto bad; + if (!PyType_Check(result)) { + PyErr_Format(PyExc_TypeError, + "%.200s.%.200s is not a type object", + module_name, class_name); + goto bad; + } +#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 - -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 CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { - if (unlikely(!type)) { - PyErr_SetString(PyExc_SystemError, "Missing type object"); - return 0; + if ((size_t)basicsize < size) { + PyErr_Format(PyExc_ValueError, + "%.200s.%.200s size changed, may indicate binary incompatibility. " + "Expected %zd from C header, got %zd from PyObject", + module_name, class_name, size, basicsize); + goto bad; } - 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; + if (check_size == __Pyx_ImportType_CheckSize_Error && (size_t)basicsize != size) { + PyErr_Format(PyExc_ValueError, + "%.200s.%.200s size changed, may indicate binary incompatibility. " + "Expected %zd from C header, got %zd from PyObject", + module_name, class_name, size, basicsize); + goto bad; + } + else if (check_size == __Pyx_ImportType_CheckSize_Warn && (size_t)basicsize > size) { + PyOS_snprintf(warning, sizeof(warning), + "%s.%s size changed, may indicate binary incompatibility. " + "Expected %zd from C header, got %zd from PyObject", + module_name, class_name, size, basicsize); + if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad; + } + return (PyTypeObject *)result; +bad: + Py_XDECREF(result); + return NULL; } +#endif +/* Import */ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { PyObject *empty_list = 0; PyObject *module = 0; PyObject *global_dict = 0; PyObject *empty_dict = 0; PyObject *list; - #if PY_VERSION_HEX < 0x03030000 + #if PY_MAJOR_VERSION < 3 PyObject *py_import; py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import); if (!py_import) @@ -5710,18 +6025,9 @@ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { { #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 + if ((1) && (strchr(__Pyx_MODULE_NAME, '.'))) { module = PyImport_ImportModuleLevelObject( name, global_dict, empty_dict, list, 1); - #endif if (!module) { if (!PyErr_ExceptionMatches(PyExc_ImportError)) goto bad; @@ -5732,12 +6038,12 @@ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { } #endif if (!module) { - #if PY_VERSION_HEX < 0x03030000 + #if PY_MAJOR_VERSION < 3 PyObject *py_level = PyInt_FromLong(level); if (!py_level) goto bad; module = PyObject_CallFunctionObjArgs(py_import, - name, global_dict, empty_dict, list, py_level, NULL); + name, global_dict, empty_dict, list, py_level, (PyObject *)NULL); Py_DECREF(py_level); #else module = PyImport_ImportModuleLevelObject( @@ -5746,7 +6052,7 @@ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { } } bad: - #if PY_VERSION_HEX < 0x03030000 + #if PY_MAJOR_VERSION < 3 Py_XDECREF(py_import); #endif Py_XDECREF(empty_list); @@ -5754,31 +6060,75 @@ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { return module; } -static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) { - PyObject *result; +/* PyDictVersioning */ +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0; +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) { + PyObject **dictptr = NULL; + Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset; + if (offset) { #if CYTHON_COMPILING_IN_CPYTHON - result = PyDict_GetItem(__pyx_d, name); - if (likely(result)) { - Py_INCREF(result); - } else { + dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj); #else - result = PyObject_GetItem(__pyx_d, name); - if (!result) { - PyErr_Clear(); + dictptr = _PyObject_GetDictPtr(obj); #endif - result = __Pyx_GetBuiltinName(name); } - return result; + return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0; +} +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict))) + return 0; + return obj_dict_version == __Pyx_get_object_dict_version(obj); } +#endif -static PyObject *__Pyx_GetNameInClass(PyObject *nmspace, PyObject *name) { - PyObject *result; - result = __Pyx_PyObject_GetAttrStr(nmspace, name); - if (!result) - result = __Pyx_GetModuleGlobalName(name); - return result; +/* CLineInTraceback */ +#ifndef CYTHON_CLINE_IN_TRACEBACK +static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tstate, int c_line) { + PyObject *use_cline; + PyObject *ptype, *pvalue, *ptraceback; +#if CYTHON_COMPILING_IN_CPYTHON + PyObject **cython_runtime_dict; +#endif + if (unlikely(!__pyx_cython_runtime)) { + return c_line; + } + __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); +#if CYTHON_COMPILING_IN_CPYTHON + cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime); + if (likely(cython_runtime_dict)) { + __PYX_PY_DICT_LOOKUP_IF_MODIFIED( + use_cline, *cython_runtime_dict, + __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback)) + } else +#endif + { + PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback); + if (use_cline_obj) { + use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True; + Py_DECREF(use_cline_obj); + } else { + PyErr_Clear(); + use_cline = NULL; + } + } + if (!use_cline) { + c_line = 0; + PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False); + } + else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { + c_line = 0; + } + __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); + return c_line; } +#endif +/* CodeObjectCache */ static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { int start = 0, mid = 0, end = count - 1; if (end >= 0 && code_line > entries[end].code_line) { @@ -5842,7 +6192,7 @@ static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { if (__pyx_code_cache.count == __pyx_code_cache.max_count) { int new_max = __pyx_code_cache.max_count + 64; entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( - __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry)); + __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry)); if (unlikely(!entries)) { return; } @@ -5858,6 +6208,7 @@ static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { Py_INCREF(code_object); } +/* AddTraceback */ #include "compile.h" #include "frameobject.h" #include "traceback.h" @@ -5917,54 +6268,371 @@ static void __Pyx_AddTraceback(const char *funcname, int c_line, int py_line, const char *filename) { PyCodeObject *py_code = 0; PyFrameObject *py_frame = 0; - py_code = __pyx_find_code_object(c_line ? c_line : py_line); + PyThreadState *tstate = __Pyx_PyThreadState_Current; + if (c_line) { + c_line = __Pyx_CLineForTraceback(tstate, c_line); + } + py_code = __pyx_find_code_object(c_line ? -c_line : py_line); if (!py_code) { py_code = __Pyx_CreateCodeObjectForTraceback( funcname, c_line, py_line, filename); if (!py_code) goto bad; - __pyx_insert_code_object(c_line ? c_line : py_line, py_code); + __pyx_insert_code_object(c_line ? -c_line : py_line, py_code); + } + py_frame = PyFrame_New( + tstate, /*PyThreadState *tstate,*/ + py_code, /*PyCodeObject *code,*/ + __pyx_d, /*PyObject *globals,*/ + 0 /*PyObject *locals*/ + ); + if (!py_frame) goto bad; + __Pyx_PyFrame_SetLineNumber(py_frame, py_line); + PyTraceBack_Here(py_frame); +bad: + Py_XDECREF(py_code); + Py_XDECREF(py_frame); +} + +/* CIntFromPyVerify */ +#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) +#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) +#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\ + {\ + func_type value = func_value;\ + if (sizeof(target_type) < sizeof(func_type)) {\ + if (unlikely(value != (func_type) (target_type) value)) {\ + func_type zero = 0;\ + if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\ + return (target_type) -1;\ + if (is_unsigned && unlikely(value < zero))\ + goto raise_neg_overflow;\ + else\ + goto raise_overflow;\ + }\ + }\ + return (target_type) value;\ + } + +/* Declarations */ +#if CYTHON_CCOMPLEX + #ifdef __cplusplus + static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) { + return ::std::complex< float >(x, y); + } + #else + static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) { + return x + y*(__pyx_t_float_complex)_Complex_I; + } + #endif +#else + static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) { + __pyx_t_float_complex z; + z.real = x; + z.imag = y; + return z; + } +#endif + +/* Arithmetic */ +#if CYTHON_CCOMPLEX +#else + static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex a, __pyx_t_float_complex b) { + return (a.real == b.real) && (a.imag == b.imag); + } + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex a, __pyx_t_float_complex b) { + __pyx_t_float_complex z; + z.real = a.real + b.real; + z.imag = a.imag + b.imag; + return z; + } + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex a, __pyx_t_float_complex b) { + __pyx_t_float_complex z; + z.real = a.real - b.real; + z.imag = a.imag - b.imag; + return z; + } + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex a, __pyx_t_float_complex b) { + __pyx_t_float_complex z; + z.real = a.real * b.real - a.imag * b.imag; + z.imag = a.real * b.imag + a.imag * b.real; + return z; + } + #if 1 + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) { + if (b.imag == 0) { + return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real); + } else if (fabsf(b.real) >= fabsf(b.imag)) { + if (b.real == 0 && b.imag == 0) { + return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.imag); + } else { + float r = b.imag / b.real; + float s = (float)(1.0) / (b.real + b.imag * r); + return __pyx_t_float_complex_from_parts( + (a.real + a.imag * r) * s, (a.imag - a.real * r) * s); + } + } else { + float r = b.real / b.imag; + float s = (float)(1.0) / (b.imag + b.real * r); + return __pyx_t_float_complex_from_parts( + (a.real * r + a.imag) * s, (a.imag * r - a.real) * s); + } + } + #else + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) { + if (b.imag == 0) { + return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real); + } else { + float denom = b.real * b.real + b.imag * b.imag; + return __pyx_t_float_complex_from_parts( + (a.real * b.real + a.imag * b.imag) / denom, + (a.imag * b.real - a.real * b.imag) / denom); + } + } + #endif + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex a) { + __pyx_t_float_complex z; + z.real = -a.real; + z.imag = -a.imag; + return z; + } + static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex a) { + return (a.real == 0) && (a.imag == 0); + } + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex a) { + __pyx_t_float_complex z; + z.real = a.real; + z.imag = -a.imag; + return z; + } + #if 1 + static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex z) { + #if !defined(HAVE_HYPOT) || defined(_MSC_VER) + return sqrtf(z.real*z.real + z.imag*z.imag); + #else + return hypotf(z.real, z.imag); + #endif + } + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex a, __pyx_t_float_complex b) { + __pyx_t_float_complex z; + float r, lnr, theta, z_r, z_theta; + if (b.imag == 0 && b.real == (int)b.real) { + if (b.real < 0) { + float denom = a.real * a.real + a.imag * a.imag; + a.real = a.real / denom; + a.imag = -a.imag / denom; + b.real = -b.real; + } + switch ((int)b.real) { + case 0: + z.real = 1; + z.imag = 0; + return z; + case 1: + return a; + case 2: + return __Pyx_c_prod_float(a, a); + case 3: + z = __Pyx_c_prod_float(a, a); + return __Pyx_c_prod_float(z, a); + case 4: + z = __Pyx_c_prod_float(a, a); + return __Pyx_c_prod_float(z, z); + } + } + if (a.imag == 0) { + if (a.real == 0) { + return a; + } else if (b.imag == 0) { + z.real = powf(a.real, b.real); + z.imag = 0; + return z; + } else if (a.real > 0) { + r = a.real; + theta = 0; + } else { + r = -a.real; + theta = atan2f(0.0, -1.0); + } + } else { + r = __Pyx_c_abs_float(a); + theta = atan2f(a.imag, a.real); + } + lnr = logf(r); + z_r = expf(lnr * b.real - theta * b.imag); + z_theta = theta * b.real + lnr * b.imag; + z.real = z_r * cosf(z_theta); + z.imag = z_r * sinf(z_theta); + return z; + } + #endif +#endif + +/* Declarations */ +#if CYTHON_CCOMPLEX + #ifdef __cplusplus + static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) { + return ::std::complex< double >(x, y); + } + #else + static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) { + return x + y*(__pyx_t_double_complex)_Complex_I; + } + #endif +#else + static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) { + __pyx_t_double_complex z; + z.real = x; + z.imag = y; + return z; + } +#endif + +/* Arithmetic */ +#if CYTHON_CCOMPLEX +#else + static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { + return (a.real == b.real) && (a.imag == b.imag); + } + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { + __pyx_t_double_complex z; + z.real = a.real + b.real; + z.imag = a.imag + b.imag; + return z; + } + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { + __pyx_t_double_complex z; + z.real = a.real - b.real; + z.imag = a.imag - b.imag; + return z; + } + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { + __pyx_t_double_complex z; + z.real = a.real * b.real - a.imag * b.imag; + z.imag = a.real * b.imag + a.imag * b.real; + return z; + } + #if 1 + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { + if (b.imag == 0) { + return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real); + } else if (fabs(b.real) >= fabs(b.imag)) { + if (b.real == 0 && b.imag == 0) { + return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.imag); + } else { + double r = b.imag / b.real; + double s = (double)(1.0) / (b.real + b.imag * r); + return __pyx_t_double_complex_from_parts( + (a.real + a.imag * r) * s, (a.imag - a.real * r) * s); + } + } else { + double r = b.real / b.imag; + double s = (double)(1.0) / (b.imag + b.real * r); + return __pyx_t_double_complex_from_parts( + (a.real * r + a.imag) * s, (a.imag * r - a.real) * s); + } + } + #else + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { + if (b.imag == 0) { + return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real); + } else { + double denom = b.real * b.real + b.imag * b.imag; + return __pyx_t_double_complex_from_parts( + (a.real * b.real + a.imag * b.imag) / denom, + (a.imag * b.real - a.real * b.imag) / denom); + } + } + #endif + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex a) { + __pyx_t_double_complex z; + z.real = -a.real; + z.imag = -a.imag; + return z; + } + static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex a) { + return (a.real == 0) && (a.imag == 0); } - py_frame = PyFrame_New( - PyThreadState_GET(), /*PyThreadState *tstate,*/ - py_code, /*PyCodeObject *code,*/ - __pyx_d, /*PyObject *globals,*/ - 0 /*PyObject *locals*/ - ); - if (!py_frame) goto bad; - py_frame->f_lineno = py_line; - PyTraceBack_Here(py_frame); -bad: - Py_XDECREF(py_code); - Py_XDECREF(py_frame); -} - -#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ - __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) -#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ - __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) -#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\ - {\ - func_type value = func_value;\ - if (sizeof(target_type) < sizeof(func_type)) {\ - if (unlikely(value != (func_type) (target_type) value)) {\ - func_type zero = 0;\ - if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\ - return (target_type) -1;\ - if (is_unsigned && unlikely(value < zero))\ - goto raise_neg_overflow;\ - else\ - goto raise_overflow;\ - }\ - }\ - return (target_type) value;\ + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex a) { + __pyx_t_double_complex z; + z.real = a.real; + z.imag = -a.imag; + return z; } - -#if CYTHON_USE_PYLONG_INTERNALS - #include "longintrepr.h" + #if 1 + static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex z) { + #if !defined(HAVE_HYPOT) || defined(_MSC_VER) + return sqrt(z.real*z.real + z.imag*z.imag); + #else + return hypot(z.real, z.imag); + #endif + } + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { + __pyx_t_double_complex z; + double r, lnr, theta, z_r, z_theta; + if (b.imag == 0 && b.real == (int)b.real) { + if (b.real < 0) { + double denom = a.real * a.real + a.imag * a.imag; + a.real = a.real / denom; + a.imag = -a.imag / denom; + b.real = -b.real; + } + switch ((int)b.real) { + case 0: + z.real = 1; + z.imag = 0; + return z; + case 1: + return a; + case 2: + return __Pyx_c_prod_double(a, a); + case 3: + z = __Pyx_c_prod_double(a, a); + return __Pyx_c_prod_double(z, a); + case 4: + z = __Pyx_c_prod_double(a, a); + return __Pyx_c_prod_double(z, z); + } + } + if (a.imag == 0) { + if (a.real == 0) { + return a; + } else if (b.imag == 0) { + z.real = pow(a.real, b.real); + z.imag = 0; + return z; + } else if (a.real > 0) { + r = a.real; + theta = 0; + } else { + r = -a.real; + theta = atan2(0.0, -1.0); + } + } else { + r = __Pyx_c_abs_double(a); + theta = atan2(a.imag, a.real); + } + lnr = log(r); + z_r = exp(lnr * b.real - theta * b.imag); + z_theta = theta * b.real + lnr * b.imag; + z.real = z_r * cos(z_theta); + z.imag = z_r * sin(z_theta); + return z; + } + #endif #endif +/* CIntFromPy */ static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif const size_t neg_one = (size_t) -1, const_zero = (size_t) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { @@ -6030,15 +6698,17 @@ static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *x) { #endif if (sizeof(size_t) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG } else if (sizeof(size_t) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (size_t) 0; - case -1: __PYX_VERIFY_RETURN_INT(size_t, sdigit, -(sdigit) digits[0]) + case -1: __PYX_VERIFY_RETURN_INT(size_t, sdigit, (sdigit) (-(sdigit)digits[0])) case 1: __PYX_VERIFY_RETURN_INT(size_t, digit, +digits[0]) case -2: if (8 * sizeof(size_t) - 1 > 1 * PyLong_SHIFT) { @@ -6098,8 +6768,10 @@ static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *x) { #endif if (sizeof(size_t) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(size_t, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG } else if (sizeof(size_t) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(size_t, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif } } { @@ -6108,7 +6780,7 @@ static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *x) { "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else size_t val; - PyObject *v = __Pyx_PyNumber_Int(x); + PyObject *v = __Pyx_PyNumber_IntOrLong(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; @@ -6131,7 +6803,7 @@ static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *x) { } } else { size_t val; - PyObject *tmp = __Pyx_PyNumber_Int(x); + PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (size_t) -1; val = __Pyx_PyInt_As_size_t(tmp); Py_DECREF(tmp); @@ -6147,285 +6819,103 @@ static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *x) { return (size_t) -1; } +/* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif const int neg_one = (int) -1, const_zero = (int) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(int) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(int) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); +#ifdef HAVE_LONG_LONG } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); - } - } else { - if (sizeof(int) <= sizeof(long)) { - return PyInt_FromLong((long) value); - } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { - return PyLong_FromLongLong((PY_LONG_LONG) value); - } - } - { - int one = 1; int little = (int)*(unsigned char *)&one; - unsigned char *bytes = (unsigned char *)&value; - return _PyLong_FromByteArray(bytes, sizeof(int), - little, !is_unsigned); - } -} - -#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 + } else { + if (sizeof(int) <= sizeof(long)) { + return PyInt_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif } - 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; + } + { + int one = 1; int little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&value; + return _PyLong_FromByteArray(bytes, sizeof(int), + little, !is_unsigned); + } +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const long neg_one = (long) -1, const_zero = (long) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(long) < sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(long) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif } - #endif + } else { + if (sizeof(long) <= sizeof(long)) { + return PyInt_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); #endif + } + } + { + int one = 1; int little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&value; + return _PyLong_FromByteArray(bytes, sizeof(long), + little, !is_unsigned); + } +} -static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { - const int neg_one = (int) -1, const_zero = (int) 0; +/* CIntFromPy */ +static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const long neg_one = (long) -1, const_zero = (long) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { - if (sizeof(int) < sizeof(long)) { - __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x)) + if (sizeof(long) < sizeof(long)) { + __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } - return (int) val; + return (long) val; } } else #endif @@ -6434,32 +6924,32 @@ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { - case 0: return (int) 0; - case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0]) + case 0: return (long) 0; + case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0]) case 2: - if (8 * sizeof(int) > 1 * PyLong_SHIFT) { + if (8 * sizeof(long) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) { - return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) { + return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); } } break; case 3: - if (8 * sizeof(int) > 2 * PyLong_SHIFT) { + if (8 * sizeof(long) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) { - return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) { + return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); } } break; case 4: - if (8 * sizeof(int) > 3 * PyLong_SHIFT) { + if (8 * sizeof(long) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) { - return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) { + return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); } } break; @@ -6473,83 +6963,87 @@ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) - return (int) -1; + return (long) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif - if (sizeof(int) <= sizeof(unsigned long)) { - __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) - } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { - __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) + if (sizeof(long) <= sizeof(unsigned long)) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { - case 0: return (int) 0; - case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, -(sdigit) digits[0]) - case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0]) + case 0: return (long) 0; + case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0])) + case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0]) case -2: - if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) { + if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { - return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { + return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case 2: - if (8 * sizeof(int) > 1 * PyLong_SHIFT) { + if (8 * sizeof(long) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { - return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { + return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case -3: - if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { + if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { - return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { + return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case 3: - if (8 * sizeof(int) > 2 * PyLong_SHIFT) { + if (8 * sizeof(long) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { - return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { + return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case -4: - if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { + if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { - return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { + return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case 4: - if (8 * sizeof(int) > 3 * PyLong_SHIFT) { + if (8 * sizeof(long) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { - return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { + return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; } #endif - if (sizeof(int) <= sizeof(long)) { - __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) - } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { - __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) + if (sizeof(long) <= sizeof(long)) { + __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif } } { @@ -6557,8 +7051,8 @@ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else - int val; - PyObject *v = __Pyx_PyNumber_Int(x); + long val; + PyObject *v = __Pyx_PyNumber_IntOrLong(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; @@ -6577,91 +7071,47 @@ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { return val; } #endif - return (int) -1; + return (long) -1; } } else { - int val; - PyObject *tmp = __Pyx_PyNumber_Int(x); - if (!tmp) return (int) -1; - val = __Pyx_PyInt_As_int(tmp); + long val; + PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); + if (!tmp) return (long) -1; + val = __Pyx_PyInt_As_long(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, - "value too large to convert to int"); - return (int) -1; + "value too large to convert to long"); + return (long) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, - "can't convert negative value to int"); - return (int) -1; -} - -static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value) { - const enum NPY_TYPES neg_one = (enum NPY_TYPES) -1, const_zero = (enum NPY_TYPES) 0; - const int is_unsigned = neg_one > const_zero; - if (is_unsigned) { - if (sizeof(enum NPY_TYPES) < sizeof(long)) { - return PyInt_FromLong((long) value); - } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned long)) { - return PyLong_FromUnsignedLong((unsigned long) value); - } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned PY_LONG_LONG)) { - return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); - } - } else { - if (sizeof(enum NPY_TYPES) <= sizeof(long)) { - return PyInt_FromLong((long) value); - } else if (sizeof(enum NPY_TYPES) <= sizeof(PY_LONG_LONG)) { - return PyLong_FromLongLong((PY_LONG_LONG) value); - } - } - { - int one = 1; int little = (int)*(unsigned char *)&one; - unsigned char *bytes = (unsigned char *)&value; - return _PyLong_FromByteArray(bytes, sizeof(enum NPY_TYPES), - little, !is_unsigned); - } -} - -static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { - const long neg_one = (long) -1, const_zero = (long) 0; - const int is_unsigned = neg_one > const_zero; - if (is_unsigned) { - if (sizeof(long) < sizeof(long)) { - return PyInt_FromLong((long) value); - } else if (sizeof(long) <= sizeof(unsigned long)) { - return PyLong_FromUnsignedLong((unsigned long) value); - } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { - return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); - } - } else { - if (sizeof(long) <= sizeof(long)) { - return PyInt_FromLong((long) value); - } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { - return PyLong_FromLongLong((PY_LONG_LONG) value); - } - } - { - int one = 1; int little = (int)*(unsigned char *)&one; - unsigned char *bytes = (unsigned char *)&value; - return _PyLong_FromByteArray(bytes, sizeof(long), - little, !is_unsigned); - } + "can't convert negative value to long"); + return (long) -1; } -static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { - const long neg_one = (long) -1, const_zero = (long) 0; +/* CIntFromPy */ +static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int neg_one = (int) -1, const_zero = (int) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { - if (sizeof(long) < sizeof(long)) { - __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x)) + if (sizeof(int) < sizeof(long)) { + __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } - return (long) val; + return (int) val; } } else #endif @@ -6670,32 +7120,32 @@ static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { - case 0: return (long) 0; - case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0]) + case 0: return (int) 0; + case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0]) case 2: - if (8 * sizeof(long) > 1 * PyLong_SHIFT) { + if (8 * sizeof(int) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) { - return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) { + return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); } } break; case 3: - if (8 * sizeof(long) > 2 * PyLong_SHIFT) { + if (8 * sizeof(int) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) { - return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) { + return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); } } break; case 4: - if (8 * sizeof(long) > 3 * PyLong_SHIFT) { + if (8 * sizeof(int) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) { - return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) { + return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); } } break; @@ -6709,83 +7159,87 @@ static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) - return (long) -1; + return (int) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif - if (sizeof(long) <= sizeof(unsigned long)) { - __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) - } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { - __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) + if (sizeof(int) <= sizeof(unsigned long)) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { - case 0: return (long) 0; - case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, -(sdigit) digits[0]) - case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0]) + case 0: return (int) 0; + case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0])) + case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0]) case -2: - if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) { + if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { - return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { + return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case 2: - if (8 * sizeof(long) > 1 * PyLong_SHIFT) { + if (8 * sizeof(int) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { - return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { + return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case -3: - if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { + if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { - return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { + return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case 3: - if (8 * sizeof(long) > 2 * PyLong_SHIFT) { + if (8 * sizeof(int) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { - return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { + return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case -4: - if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { + if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { - return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { + return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case 4: - if (8 * sizeof(long) > 3 * PyLong_SHIFT) { + if (8 * sizeof(int) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { - return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { + return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; } #endif - if (sizeof(long) <= sizeof(long)) { - __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) - } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { - __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) + if (sizeof(int) <= sizeof(long)) { + __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif } } { @@ -6793,8 +7247,8 @@ static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else - long val; - PyObject *v = __Pyx_PyNumber_Int(x); + int val; + PyObject *v = __Pyx_PyNumber_IntOrLong(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; @@ -6813,26 +7267,127 @@ static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { return val; } #endif - return (long) -1; + return (int) -1; } } else { - long val; - PyObject *tmp = __Pyx_PyNumber_Int(x); - if (!tmp) return (long) -1; - val = __Pyx_PyInt_As_long(tmp); + int val; + PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); + if (!tmp) return (int) -1; + val = __Pyx_PyInt_As_int(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, - "value too large to convert to long"); - return (long) -1; + "value too large to convert to int"); + return (int) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, - "can't convert negative value to long"); - return (long) -1; + "can't convert negative value to int"); + return (int) -1; +} + +/* FastTypeChecks */ +#if CYTHON_COMPILING_IN_CPYTHON +static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) { + while (a) { + a = a->tp_base; + if (a == b) + return 1; + } + return b == &PyBaseObject_Type; +} +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) { + PyObject *mro; + if (a == b) return 1; + mro = a->tp_mro; + if (likely(mro)) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(mro); + for (i = 0; i < n; i++) { + if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b) + return 1; + } + return 0; + } + return __Pyx_InBases(a, b); +} +#if PY_MAJOR_VERSION == 2 +static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) { + PyObject *exception, *value, *tb; + int res; + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ErrFetch(&exception, &value, &tb); + res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0; + if (unlikely(res == -1)) { + PyErr_WriteUnraisable(err); + res = 0; + } + if (!res) { + res = PyObject_IsSubclass(err, exc_type2); + if (unlikely(res == -1)) { + PyErr_WriteUnraisable(err); + res = 0; + } + } + __Pyx_ErrRestore(exception, value, tb); + return res; +} +#else +static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) { + int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0; + if (!res) { + res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2); + } + return res; +} +#endif +static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + assert(PyExceptionClass_Check(exc_type)); + n = PyTuple_GET_SIZE(tuple); +#if PY_MAJOR_VERSION >= 3 + for (i=0; itp_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 (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad; - } - else if ((size_t)basicsize != size) { - PyErr_Format(PyExc_ValueError, - "%.200s.%.200s has the wrong size, try recompiling", - module_name, class_name); - goto bad; - } - return (PyTypeObject *)result; -bad: - Py_XDECREF(py_module); - Py_XDECREF(result); - return NULL; -} -#endif - +/* InitStrings */ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) { while (t->p) { #if PY_MAJOR_VERSION < 3 @@ -6954,6 +7429,8 @@ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) { #endif if (!*t->p) return -1; + if (PyObject_Hash(*t->p) == -1) + return -1; ++t; } return 0; @@ -6962,50 +7439,57 @@ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) { static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) { return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str)); } -static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject* o) { +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) { Py_ssize_t ignore; return __Pyx_PyObject_AsStringAndSize(o, &ignore); } -static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { -#if CYTHON_COMPILING_IN_CPYTHON && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT) - if ( -#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII - __Pyx_sys_getdefaultencoding_not_ascii && -#endif - PyUnicode_Check(o)) { -#if PY_VERSION_HEX < 0x03030000 - char* defenc_c; - PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL); - if (!defenc) return NULL; - defenc_c = PyBytes_AS_STRING(defenc); +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT +#if !CYTHON_PEP393_ENABLED +static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { + char* defenc_c; + PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL); + if (!defenc) return NULL; + defenc_c = PyBytes_AS_STRING(defenc); #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII - { - char* end = defenc_c + PyBytes_GET_SIZE(defenc); - char* c; - for (c = defenc_c; c < end; c++) { - if ((unsigned char) (*c) >= 128) { - PyUnicode_AsASCIIString(o); - return NULL; - } + { + char* end = defenc_c + PyBytes_GET_SIZE(defenc); + char* c; + for (c = defenc_c; c < end; c++) { + if ((unsigned char) (*c) >= 128) { + PyUnicode_AsASCIIString(o); + return NULL; } } + } #endif - *length = PyBytes_GET_SIZE(defenc); - return defenc_c; + *length = PyBytes_GET_SIZE(defenc); + return defenc_c; +} #else - if (__Pyx_PyUnicode_READY(o) == -1) return NULL; +static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { + if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL; #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII - if (PyUnicode_IS_ASCII(o)) { - *length = PyUnicode_GET_LENGTH(o); - return PyUnicode_AsUTF8(o); - } else { - PyUnicode_AsASCIIString(o); - return NULL; - } + if (likely(PyUnicode_IS_ASCII(o))) { + *length = PyUnicode_GET_LENGTH(o); + return PyUnicode_AsUTF8(o); + } else { + PyUnicode_AsASCIIString(o); + return NULL; + } #else - return PyUnicode_AsUTF8AndSize(o, length); + return PyUnicode_AsUTF8AndSize(o, length); +#endif +} +#endif #endif +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT + if ( +#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + __Pyx_sys_getdefaultencoding_not_ascii && #endif + PyUnicode_Check(o)) { + return __Pyx_PyUnicode_AsStringAndSize(o, length); } else #endif #if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE)) @@ -7029,43 +7513,74 @@ static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { 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) { +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) { + int retval; + if (unlikely(!x)) return -1; + retval = __Pyx_PyObject_IsTrue(x); + Py_DECREF(x); + return retval; +} +static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) { +#if PY_MAJOR_VERSION >= 3 + if (PyLong_Check(result)) { + if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1, + "__int__ returned non-int (type %.200s). " + "The ability to return an instance of a strict subclass of int " + "is deprecated, and may be removed in a future version of Python.", + Py_TYPE(result)->tp_name)) { + Py_DECREF(result); + return NULL; + } + return result; + } +#endif + PyErr_Format(PyExc_TypeError, + "__%.4s__ returned non-%.4s (type %.200s)", + type_name, type_name, Py_TYPE(result)->tp_name); + Py_DECREF(result); + return NULL; +} +static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) { +#if CYTHON_USE_TYPE_SLOTS PyNumberMethods *m; +#endif const char *name = NULL; PyObject *res = NULL; #if PY_MAJOR_VERSION < 3 - if (PyInt_Check(x) || PyLong_Check(x)) + if (likely(PyInt_Check(x) || PyLong_Check(x))) #else - if (PyLong_Check(x)) + if (likely(PyLong_Check(x))) #endif return __Pyx_NewRef(x); +#if CYTHON_USE_TYPE_SLOTS m = Py_TYPE(x)->tp_as_number; -#if PY_MAJOR_VERSION < 3 + #if PY_MAJOR_VERSION < 3 if (m && m->nb_int) { name = "int"; - res = PyNumber_Int(x); + res = m->nb_int(x); } else if (m && m->nb_long) { name = "long"; - res = PyNumber_Long(x); + res = m->nb_long(x); } -#else - if (m && m->nb_int) { + #else + if (likely(m && m->nb_int)) { name = "int"; - res = PyNumber_Long(x); + res = m->nb_int(x); + } + #endif +#else + if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) { + res = PyNumber_Int(x); } #endif - if (res) { + if (likely(res)) { #if PY_MAJOR_VERSION < 3 - if (!PyInt_Check(res) && !PyLong_Check(res)) { + if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) { #else - if (!PyLong_Check(res)) { + if (unlikely(!PyLong_CheckExact(res))) { #endif - PyErr_Format(PyExc_TypeError, - "__%.4s__ returned non-%.4s (type %.200s)", - name, name, Py_TYPE(res)->tp_name); - Py_DECREF(res); - return NULL; + return __Pyx_PyNumber_IntOrLongWrongResultType(res, name); } } else if (!PyErr_Occurred()) { @@ -7082,7 +7597,7 @@ static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { if (sizeof(Py_ssize_t) >= sizeof(long)) return PyInt_AS_LONG(b); else - return PyInt_AsSsize_t(x); + return PyInt_AsSsize_t(b); } #endif if (likely(PyLong_CheckExact(b))) { @@ -7136,6 +7651,9 @@ static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { Py_DECREF(x); return ival; } +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { + return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False); +} static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) { return PyInt_FromSize_t(ival); } diff --git a/code-preprocessing/archive-update/setup.py.in b/code-preprocessing/archive-update/setup.py.in index 58c75c1bc..70edf9c01 100644 --- a/code-preprocessing/archive-update/setup.py.in +++ b/code-preprocessing/archive-update/setup.py.in @@ -17,7 +17,8 @@ print('Using Cython to build interface.') extensions.append(Extension('cocoprep.coco_archive', sources=['interface/coco_archive.pyx', 'interface/coco.c'], - include_dirs=[np.get_include()])) + include_dirs=[np.get_include()], + )) setup( name='cocoprep', diff --git a/howtos/publish-a-dataset-howto.md b/howtos/publish-a-dataset-howto.md index 407af04ca..bff2e6bcd 100644 --- a/howtos/publish-a-dataset-howto.md +++ b/howtos/publish-a-dataset-howto.md @@ -75,7 +75,7 @@ For this: Archives can contain other archives as subfolders or, the other way around, additional subarchives can be created in any archive subfolder. This is how - http://coco.gforge.inria.fr/data-archive is organize. + https://numbbo.github.io/data-archive/ is organized.
Alternative code (from a system shell, click to expand) python -c "import cocopp; cocopp.archiving.create('elisa_2020')"
@@ -92,7 +92,7 @@ For this: ### Example of an resulting archive For example, the `bbob-mixint` archive at -http://coco.gforge.inria.fr/data-archive/bbob-mixint +https://github.com/numbbo/data-archive/tree/gh-pages/data-archive/bbob-mixint contains four datasets and the folder structure looks like