summaryrefslogtreecommitdiff
path: root/silx/math/combo.c
diff options
context:
space:
mode:
Diffstat (limited to 'silx/math/combo.c')
-rw-r--r--silx/math/combo.c38741
1 files changed, 38741 insertions, 0 deletions
diff --git a/silx/math/combo.c b/silx/math/combo.c
new file mode 100644
index 0000000..7f0654d
--- /dev/null
+++ b/silx/math/combo.c
@@ -0,0 +1,38741 @@
+/* Generated by Cython 0.25.2 */
+
+/* BEGIN: Cython Metadata
+{
+ "distutils": {
+ "depends": [
+ "silx/math/include/isnan.h"
+ ],
+ "include_dirs": [
+ "silx/math/include"
+ ],
+ "language": "c"
+ },
+ "module_name": "silx.math.combo"
+}
+END: Cython Metadata */
+
+#define PY_SSIZE_T_CLEAN
+#include "Python.h"
+#ifndef Py_PYTHON_H
+ #error Python headers needed to compile C extensions, please install development version of Python.
+#elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03020000)
+ #error Cython requires Python 2.6+ or Python 3.2+.
+#else
+#define CYTHON_ABI "0_25_2"
+#include <stddef.h>
+#ifndef offsetof
+ #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
+#endif
+#if !defined(WIN32) && !defined(MS_WINDOWS)
+ #ifndef __stdcall
+ #define __stdcall
+ #endif
+ #ifndef __cdecl
+ #define __cdecl
+ #endif
+ #ifndef __fastcall
+ #define __fastcall
+ #endif
+#endif
+#ifndef DL_IMPORT
+ #define DL_IMPORT(t) t
+#endif
+#ifndef DL_EXPORT
+ #define DL_EXPORT(t) t
+#endif
+#ifndef HAVE_LONG_LONG
+ #if PY_VERSION_HEX >= 0x03030000 || (PY_MAJOR_VERSION == 2 && PY_VERSION_HEX >= 0x02070000)
+ #define HAVE_LONG_LONG
+ #endif
+#endif
+#ifndef PY_LONG_LONG
+ #define PY_LONG_LONG LONG_LONG
+#endif
+#ifndef Py_HUGE_VAL
+ #define Py_HUGE_VAL HUGE_VAL
+#endif
+#ifdef PYPY_VERSION
+ #define CYTHON_COMPILING_IN_PYPY 1
+ #define CYTHON_COMPILING_IN_PYSTON 0
+ #define CYTHON_COMPILING_IN_CPYTHON 0
+ #undef CYTHON_USE_TYPE_SLOTS
+ #define CYTHON_USE_TYPE_SLOTS 0
+ #undef CYTHON_USE_ASYNC_SLOTS
+ #define CYTHON_USE_ASYNC_SLOTS 0
+ #undef CYTHON_USE_PYLIST_INTERNALS
+ #define CYTHON_USE_PYLIST_INTERNALS 0
+ #undef CYTHON_USE_UNICODE_INTERNALS
+ #define CYTHON_USE_UNICODE_INTERNALS 0
+ #undef CYTHON_USE_UNICODE_WRITER
+ #define CYTHON_USE_UNICODE_WRITER 0
+ #undef CYTHON_USE_PYLONG_INTERNALS
+ #define CYTHON_USE_PYLONG_INTERNALS 0
+ #undef CYTHON_AVOID_BORROWED_REFS
+ #define CYTHON_AVOID_BORROWED_REFS 1
+ #undef CYTHON_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
+#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_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
+#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_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
+#endif
+#if !defined(CYTHON_FAST_PYCCALL)
+#define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
+#endif
+#if CYTHON_USE_PYLONG_INTERNALS
+ #include "longintrepr.h"
+ #undef SHIFT
+ #undef BASE
+ #undef MASK
+#endif
+#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
+ #define Py_OptimizeFlag 0
+#endif
+#define __PYX_BUILD_PY_SSIZE_T "n"
+#define CYTHON_FORMAT_SSIZE_T "z"
+#if PY_MAJOR_VERSION < 3
+ #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
+ #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
+ PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
+ #define __Pyx_DefaultClassType PyClass_Type
+#else
+ #define __Pyx_BUILTIN_MODULE_NAME "builtins"
+ #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
+ PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
+ #define __Pyx_DefaultClassType PyType_Type
+#endif
+#ifndef Py_TPFLAGS_CHECKTYPES
+ #define Py_TPFLAGS_CHECKTYPES 0
+#endif
+#ifndef Py_TPFLAGS_HAVE_INDEX
+ #define Py_TPFLAGS_HAVE_INDEX 0
+#endif
+#ifndef Py_TPFLAGS_HAVE_NEWBUFFER
+ #define Py_TPFLAGS_HAVE_NEWBUFFER 0
+#endif
+#ifndef Py_TPFLAGS_HAVE_FINALIZE
+ #define Py_TPFLAGS_HAVE_FINALIZE 0
+#endif
+#ifndef METH_FASTCALL
+ #define METH_FASTCALL 0x80
+ typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject **args,
+ Py_ssize_t nargs, PyObject *kwnames);
+#else
+ #define __Pyx_PyCFunctionFast _PyCFunctionFast
+#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)))))
+#else
+#define __Pyx_PyFastCFunction_Check(func) 0
+#endif
+#if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
+ #define CYTHON_PEP393_ENABLED 1
+ #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\
+ 0 : _PyUnicode_Ready((PyObject *)(op)))
+ #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u)
+ #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
+ #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u)
+ #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u)
+ #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u)
+ #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i)
+ #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch)
+ #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
+#else
+ #define CYTHON_PEP393_ENABLED 0
+ #define PyUnicode_1BYTE_KIND 1
+ #define PyUnicode_2BYTE_KIND 2
+ #define PyUnicode_4BYTE_KIND 4
+ #define __Pyx_PyUnicode_READY(op) (0)
+ #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u)
+ #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
+ #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)
+ #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE))
+ #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u))
+ #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
+ #define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
+ #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u))
+#endif
+#if CYTHON_COMPILING_IN_PYPY
+ #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b)
+ #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b)
+#else
+ #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b)
+ #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
+ PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
+#endif
+#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
+ #define PyUnicode_Contains(u, s) PySequence_Contains(u, s)
+#endif
+#if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
+ #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type)
+#endif
+#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
+ #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt)
+#endif
+#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
+ #define PyObject_Malloc(s) PyMem_Malloc(s)
+ #define PyObject_Free(p) PyMem_Free(p)
+ #define PyObject_Realloc(p) PyMem_Realloc(p)
+#endif
+#if CYTHON_COMPILING_IN_PYSTON
+ #define __Pyx_PyCode_HasFreeVars(co) PyCode_HasFreeVars(co)
+ #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
+#else
+ #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
+ #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno)
+#endif
+#define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
+#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
+#if PY_MAJOR_VERSION >= 3
+ #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b)
+#else
+ #define __Pyx_PyString_Format(a, b) PyString_Format(a, b)
+#endif
+#if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
+ #define PyObject_ASCII(o) PyObject_Repr(o)
+#endif
+#if PY_MAJOR_VERSION >= 3
+ #define PyBaseString_Type PyUnicode_Type
+ #define PyStringObject PyUnicodeObject
+ #define PyString_Type PyUnicode_Type
+ #define PyString_Check PyUnicode_Check
+ #define PyString_CheckExact PyUnicode_CheckExact
+#endif
+#if PY_MAJOR_VERSION >= 3
+ #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
+ #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
+#else
+ #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
+ #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
+#endif
+#ifndef PySet_CheckExact
+ #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type)
+#endif
+#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
+#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
+#if PY_MAJOR_VERSION >= 3
+ #define PyIntObject PyLongObject
+ #define PyInt_Type PyLong_Type
+ #define PyInt_Check(op) PyLong_Check(op)
+ #define PyInt_CheckExact(op) PyLong_CheckExact(op)
+ #define PyInt_FromString PyLong_FromString
+ #define PyInt_FromUnicode PyLong_FromUnicode
+ #define PyInt_FromLong PyLong_FromLong
+ #define PyInt_FromSize_t PyLong_FromSize_t
+ #define PyInt_FromSsize_t PyLong_FromSsize_t
+ #define PyInt_AsLong PyLong_AsLong
+ #define PyInt_AS_LONG PyLong_AS_LONG
+ #define PyInt_AsSsize_t PyLong_AsSsize_t
+ #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask
+ #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
+ #define PyNumber_Int PyNumber_Long
+#endif
+#if PY_MAJOR_VERSION >= 3
+ #define PyBoolObject PyLongObject
+#endif
+#if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
+ #ifndef PyUnicode_InternFromString
+ #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
+ #endif
+#endif
+#if PY_VERSION_HEX < 0x030200A4
+ typedef long Py_hash_t;
+ #define __Pyx_PyInt_FromHash_t PyInt_FromLong
+ #define __Pyx_PyInt_AsHash_t PyInt_AsLong
+#else
+ #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
+ #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t
+#endif
+#if PY_MAJOR_VERSION >= 3
+ #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func))
+#else
+ #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
+#endif
+#if CYTHON_USE_ASYNC_SLOTS
+ #if PY_VERSION_HEX >= 0x030500B1
+ #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
+ #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
+ #else
+ 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))
+ #endif
+#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
+ #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<class T> 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)
+
+#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 defined(WIN32) || defined(MS_WINDOWS)
+ #define _USE_MATH_DEFINES
+#endif
+#include <math.h>
+#ifdef NAN
+#define __PYX_NAN() ((float) NAN)
+#else
+static CYTHON_INLINE float __PYX_NAN() {
+ float value;
+ memset(&value, 0xFF, sizeof(value));
+ return value;
+}
+#endif
+#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
+#define __Pyx_truncl trunc
+#else
+#define __Pyx_truncl truncl
+#endif
+
+
+#define __PYX_ERR(f_index, lineno, Ln_error) \
+{ \
+ __pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \
+}
+
+#if PY_MAJOR_VERSION >= 3
+ #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y)
+ #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y)
+#else
+ #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y)
+ #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y)
+#endif
+
+#ifndef __PYX_EXTERN_C
+ #ifdef __cplusplus
+ #define __PYX_EXTERN_C extern "C"
+ #else
+ #define __PYX_EXTERN_C extern
+ #endif
+#endif
+
+#define __PYX_HAVE__silx__math__combo
+#define __PYX_HAVE_API__silx__math__combo
+#include <float.h>
+#include "isnan.h"
+#include "pythread.h"
+#include <string.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include "pystate.h"
+#ifdef _OPENMP
+#include <omp.h>
+#endif /* _OPENMP */
+
+#ifdef PYREX_WITHOUT_ASSERTIONS
+#define CYTHON_WITHOUT_ASSERTIONS
+#endif
+
+typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
+ const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;
+
+#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
+#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 0
+#define __PYX_DEFAULT_STRING_ENCODING ""
+#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
+#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
+#define __Pyx_uchar_cast(c) ((unsigned char)c)
+#define __Pyx_long_cast(x) ((long)x)
+#define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\
+ (sizeof(type) < sizeof(Py_ssize_t)) ||\
+ (sizeof(type) > sizeof(Py_ssize_t) &&\
+ likely(v < (type)PY_SSIZE_T_MAX ||\
+ v == (type)PY_SSIZE_T_MAX) &&\
+ (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
+ v == (type)PY_SSIZE_T_MIN))) ||\
+ (sizeof(type) == sizeof(Py_ssize_t) &&\
+ (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
+ v == (type)PY_SSIZE_T_MAX))) )
+#if defined (__cplusplus) && __cplusplus >= 201103L
+ #include <cstdlib>
+ #define __Pyx_sst_abs(value) std::abs(value)
+#elif SIZEOF_INT >= SIZEOF_SIZE_T
+ #define __Pyx_sst_abs(value) abs(value)
+#elif SIZEOF_LONG >= SIZEOF_SIZE_T
+ #define __Pyx_sst_abs(value) labs(value)
+#elif defined (_MSC_VER) && defined (_M_X64)
+ #define __Pyx_sst_abs(value) _abs64(value)
+#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+ #define __Pyx_sst_abs(value) llabs(value)
+#elif defined (__GNUC__)
+ #define __Pyx_sst_abs(value) __builtin_llabs(value)
+#else
+ #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
+#endif
+static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject*);
+static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
+#define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
+#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
+#define __Pyx_PyBytes_FromString PyBytes_FromString
+#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
+static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
+#if PY_MAJOR_VERSION < 3
+ #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString
+ #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
+#else
+ #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString
+ #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
+#endif
+#define __Pyx_PyObject_AsSString(s) ((signed char*) __Pyx_PyObject_AsString(s))
+#define __Pyx_PyObject_AsUString(s) ((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)
+{
+ 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 int __Pyx_PyObject_IsTrue(PyObject*);
+static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
+static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
+static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
+#if CYTHON_ASSUME_SAFE_MACROS
+#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
+#else
+#define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
+#endif
+#define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
+#if PY_MAJOR_VERSION >= 3
+#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
+#else
+#define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
+#endif
+#define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x))
+#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
+static int __Pyx_sys_getdefaultencoding_not_ascii;
+static int __Pyx_init_sys_getdefaultencoding_params(void) {
+ PyObject* sys;
+ PyObject* default_encoding = NULL;
+ PyObject* ascii_chars_u = NULL;
+ PyObject* ascii_chars_b = NULL;
+ const char* default_encoding_c;
+ sys = PyImport_ImportModule("sys");
+ if (!sys) goto bad;
+ default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
+ Py_DECREF(sys);
+ if (!default_encoding) goto bad;
+ default_encoding_c = PyBytes_AsString(default_encoding);
+ if (!default_encoding_c) goto bad;
+ if (strcmp(default_encoding_c, "ascii") == 0) {
+ __Pyx_sys_getdefaultencoding_not_ascii = 0;
+ } else {
+ char ascii_chars[128];
+ int c;
+ for (c = 0; c < 128; c++) {
+ ascii_chars[c] = c;
+ }
+ __Pyx_sys_getdefaultencoding_not_ascii = 1;
+ ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
+ if (!ascii_chars_u) goto bad;
+ ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
+ if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
+ PyErr_Format(
+ PyExc_ValueError,
+ "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
+ default_encoding_c);
+ goto bad;
+ }
+ Py_DECREF(ascii_chars_u);
+ Py_DECREF(ascii_chars_b);
+ }
+ Py_DECREF(default_encoding);
+ return 0;
+bad:
+ Py_XDECREF(default_encoding);
+ Py_XDECREF(ascii_chars_u);
+ Py_XDECREF(ascii_chars_b);
+ return -1;
+}
+#endif
+#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
+#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
+#else
+#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
+#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
+static char* __PYX_DEFAULT_STRING_ENCODING;
+static int __Pyx_init_sys_getdefaultencoding_params(void) {
+ PyObject* sys;
+ PyObject* default_encoding = NULL;
+ char* default_encoding_c;
+ sys = PyImport_ImportModule("sys");
+ if (!sys) goto bad;
+ default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
+ Py_DECREF(sys);
+ if (!default_encoding) goto bad;
+ default_encoding_c = PyBytes_AsString(default_encoding);
+ if (!default_encoding_c) goto bad;
+ __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c));
+ if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
+ strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
+ Py_DECREF(default_encoding);
+ return 0;
+bad:
+ Py_XDECREF(default_encoding);
+ return -1;
+}
+#endif
+#endif
+
+
+/* Test for GCC > 2.95 */
+#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
+ #define likely(x) __builtin_expect(!!(x), 1)
+ #define unlikely(x) __builtin_expect(!!(x), 0)
+#else /* !__GNUC__ or GCC < 2.95 */
+ #define likely(x) (x)
+ #define unlikely(x) (x)
+#endif /* __GNUC__ */
+
+static PyObject *__pyx_m;
+static PyObject *__pyx_d;
+static PyObject *__pyx_b;
+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;
+
+
+static const char *__pyx_f[] = {
+ "silx/math/combo.pyx",
+ "stringsource",
+};
+/* MemviewSliceStruct.proto */
+struct __pyx_memoryview_obj;
+typedef struct {
+ struct __pyx_memoryview_obj *memview;
+ char *data;
+ Py_ssize_t shape[8];
+ Py_ssize_t strides[8];
+ Py_ssize_t suboffsets[8];
+} __Pyx_memviewslice;
+
+/* BufferFormatStructs.proto */
+#define IS_UNSIGNED(type) (((type) -1) > 0)
+struct __Pyx_StructField_;
+#define __PYX_BUF_FLAGS_PACKED_STRUCT (1 << 0)
+typedef struct {
+ const char* name;
+ struct __Pyx_StructField_* fields;
+ size_t size;
+ size_t arraysize[8];
+ int ndim;
+ char typegroup;
+ char is_unsigned;
+ int flags;
+} __Pyx_TypeInfo;
+typedef struct __Pyx_StructField_ {
+ __Pyx_TypeInfo* type;
+ const char* name;
+ size_t offset;
+} __Pyx_StructField;
+typedef struct {
+ __Pyx_StructField* field;
+ size_t parent_offset;
+} __Pyx_BufFmt_StackElem;
+typedef struct {
+ __Pyx_StructField root;
+ __Pyx_BufFmt_StackElem* head;
+ size_t fmt_offset;
+ size_t new_count, enc_count;
+ size_t struct_alignment;
+ int is_complex;
+ char enc_type;
+ char new_packmode;
+ char enc_packmode;
+ char is_valid_array;
+} __Pyx_BufFmt_Context;
+
+/* Atomics.proto */
+#include <pythread.h>
+#ifndef CYTHON_ATOMICS
+ #define CYTHON_ATOMICS 1
+#endif
+#define __pyx_atomic_int_type int
+#if CYTHON_ATOMICS && __GNUC__ >= 4 && (__GNUC_MINOR__ > 1 ||\
+ (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL >= 2)) &&\
+ !defined(__i386__)
+ #define __pyx_atomic_incr_aligned(value, lock) __sync_fetch_and_add(value, 1)
+ #define __pyx_atomic_decr_aligned(value, lock) __sync_fetch_and_sub(value, 1)
+ #ifdef __PYX_DEBUG_ATOMICS
+ #warning "Using GNU atomics"
+ #endif
+#elif CYTHON_ATOMICS && defined(_MSC_VER) && 0
+ #include <Windows.h>
+ #undef __pyx_atomic_int_type
+ #define __pyx_atomic_int_type LONG
+ #define __pyx_atomic_incr_aligned(value, lock) InterlockedIncrement(value)
+ #define __pyx_atomic_decr_aligned(value, lock) InterlockedDecrement(value)
+ #ifdef __PYX_DEBUG_ATOMICS
+ #pragma message ("Using MSVC atomics")
+ #endif
+#elif CYTHON_ATOMICS && (defined(__ICC) || defined(__INTEL_COMPILER)) && 0
+ #define __pyx_atomic_incr_aligned(value, lock) _InterlockedIncrement(value)
+ #define __pyx_atomic_decr_aligned(value, lock) _InterlockedDecrement(value)
+ #ifdef __PYX_DEBUG_ATOMICS
+ #warning "Using Intel atomics"
+ #endif
+#else
+ #undef CYTHON_ATOMICS
+ #define CYTHON_ATOMICS 0
+ #ifdef __PYX_DEBUG_ATOMICS
+ #warning "Not using atomics"
+ #endif
+#endif
+typedef volatile __pyx_atomic_int_type __pyx_atomic_int;
+#if CYTHON_ATOMICS
+ #define __pyx_add_acquisition_count(memview)\
+ __pyx_atomic_incr_aligned(__pyx_get_slice_count_pointer(memview), memview->lock)
+ #define __pyx_sub_acquisition_count(memview)\
+ __pyx_atomic_decr_aligned(__pyx_get_slice_count_pointer(memview), memview->lock)
+#else
+ #define __pyx_add_acquisition_count(memview)\
+ __pyx_add_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock)
+ #define __pyx_sub_acquisition_count(memview)\
+ __pyx_sub_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock)
+#endif
+
+
+/*--- Type declarations ---*/
+struct __pyx_array_obj;
+struct __pyx_MemviewEnum_obj;
+struct __pyx_memoryview_obj;
+struct __pyx_memoryviewslice_obj;
+struct __pyx_defaults;
+typedef struct __pyx_defaults __pyx_defaults;
+struct __pyx_defaults1;
+typedef struct __pyx_defaults1 __pyx_defaults1;
+struct __pyx_defaults2;
+typedef struct __pyx_defaults2 __pyx_defaults2;
+struct __pyx_defaults3;
+typedef struct __pyx_defaults3 __pyx_defaults3;
+struct __pyx_defaults4;
+typedef struct __pyx_defaults4 __pyx_defaults4;
+struct __pyx_defaults5;
+typedef struct __pyx_defaults5 __pyx_defaults5;
+struct __pyx_defaults6;
+typedef struct __pyx_defaults6 __pyx_defaults6;
+struct __pyx_defaults7;
+typedef struct __pyx_defaults7 __pyx_defaults7;
+struct __pyx_defaults8;
+typedef struct __pyx_defaults8 __pyx_defaults8;
+struct __pyx_defaults9;
+typedef struct __pyx_defaults9 __pyx_defaults9;
+struct __pyx_defaults10;
+typedef struct __pyx_defaults10 __pyx_defaults10;
+struct __pyx_defaults11;
+typedef struct __pyx_defaults11 __pyx_defaults11;
+struct __pyx_defaults12;
+typedef struct __pyx_defaults12 __pyx_defaults12;
+struct __pyx_defaults13;
+typedef struct __pyx_defaults13 __pyx_defaults13;
+struct __pyx_defaults14;
+typedef struct __pyx_defaults14 __pyx_defaults14;
+struct __pyx_defaults15;
+typedef struct __pyx_defaults15 __pyx_defaults15;
+struct __pyx_defaults16;
+typedef struct __pyx_defaults16 __pyx_defaults16;
+struct __pyx_defaults17;
+typedef struct __pyx_defaults17 __pyx_defaults17;
+struct __pyx_defaults18;
+typedef struct __pyx_defaults18 __pyx_defaults18;
+struct __pyx_defaults19;
+typedef struct __pyx_defaults19 __pyx_defaults19;
+struct __pyx_defaults20;
+typedef struct __pyx_defaults20 __pyx_defaults20;
+struct __pyx_defaults21;
+typedef struct __pyx_defaults21 __pyx_defaults21;
+struct __pyx_defaults22;
+typedef struct __pyx_defaults22 __pyx_defaults22;
+struct __pyx_defaults23;
+typedef struct __pyx_defaults23 __pyx_defaults23;
+struct __pyx_defaults24;
+typedef struct __pyx_defaults24 __pyx_defaults24;
+struct __pyx_defaults25;
+typedef struct __pyx_defaults25 __pyx_defaults25;
+struct __pyx_defaults26;
+typedef struct __pyx_defaults26 __pyx_defaults26;
+struct __pyx_defaults27;
+typedef struct __pyx_defaults27 __pyx_defaults27;
+struct __pyx_defaults {
+ int __pyx_arg_min_positive;
+};
+struct __pyx_defaults1 {
+ int __pyx_arg_min_positive;
+};
+struct __pyx_defaults2 {
+ int __pyx_arg_min_positive;
+};
+struct __pyx_defaults3 {
+ int __pyx_arg_min_positive;
+};
+struct __pyx_defaults4 {
+ int __pyx_arg_min_positive;
+};
+struct __pyx_defaults5 {
+ int __pyx_arg_min_positive;
+};
+struct __pyx_defaults6 {
+ int __pyx_arg_min_positive;
+};
+struct __pyx_defaults7 {
+ int __pyx_arg_min_positive;
+};
+struct __pyx_defaults8 {
+ int __pyx_arg_min_positive;
+};
+struct __pyx_defaults9 {
+ int __pyx_arg_min_positive;
+};
+struct __pyx_defaults10 {
+ int __pyx_arg_min_positive;
+};
+struct __pyx_defaults11 {
+ int __pyx_arg_min_positive;
+};
+struct __pyx_defaults12 {
+ int __pyx_arg_min_positive;
+};
+struct __pyx_defaults13 {
+ int __pyx_arg_min_positive;
+};
+struct __pyx_defaults14 {
+ int __pyx_arg_min_positive;
+};
+struct __pyx_defaults15 {
+ int __pyx_arg_min_positive;
+};
+struct __pyx_defaults16 {
+ int __pyx_arg_min_positive;
+};
+struct __pyx_defaults17 {
+ int __pyx_arg_min_positive;
+};
+struct __pyx_defaults18 {
+ int __pyx_arg_min_positive;
+};
+struct __pyx_defaults19 {
+ int __pyx_arg_min_positive;
+};
+struct __pyx_defaults20 {
+ int __pyx_arg_min_positive;
+};
+struct __pyx_defaults21 {
+ int __pyx_arg_min_positive;
+};
+struct __pyx_defaults22 {
+ int __pyx_arg_min_positive;
+};
+struct __pyx_defaults23 {
+ int __pyx_arg_min_positive;
+};
+struct __pyx_defaults24 {
+ int __pyx_arg_min_positive;
+};
+struct __pyx_defaults25 {
+ int __pyx_arg_min_positive;
+};
+struct __pyx_defaults26 {
+ int __pyx_arg_min_positive;
+};
+struct __pyx_defaults27 {
+ int __pyx_arg_min_positive;
+};
+
+/* "View.MemoryView":103
+ *
+ * @cname("__pyx_array")
+ * cdef class array: # <<<<<<<<<<<<<<
+ *
+ * cdef:
+ */
+struct __pyx_array_obj {
+ PyObject_HEAD
+ struct __pyx_vtabstruct_array *__pyx_vtab;
+ char *data;
+ Py_ssize_t len;
+ char *format;
+ int ndim;
+ Py_ssize_t *_shape;
+ Py_ssize_t *_strides;
+ Py_ssize_t itemsize;
+ PyObject *mode;
+ PyObject *_format;
+ void (*callback_free_data)(void *);
+ int free_data;
+ int dtype_is_object;
+};
+
+
+/* "View.MemoryView":275
+ *
+ * @cname('__pyx_MemviewEnum')
+ * cdef class Enum(object): # <<<<<<<<<<<<<<
+ * cdef object name
+ * def __init__(self, name):
+ */
+struct __pyx_MemviewEnum_obj {
+ PyObject_HEAD
+ PyObject *name;
+};
+
+
+/* "View.MemoryView":326
+ *
+ * @cname('__pyx_memoryview')
+ * cdef class memoryview(object): # <<<<<<<<<<<<<<
+ *
+ * cdef object obj
+ */
+struct __pyx_memoryview_obj {
+ PyObject_HEAD
+ struct __pyx_vtabstruct_memoryview *__pyx_vtab;
+ PyObject *obj;
+ PyObject *_size;
+ PyObject *_array_interface;
+ PyThread_type_lock lock;
+ __pyx_atomic_int acquisition_count[2];
+ __pyx_atomic_int *acquisition_count_aligned_p;
+ Py_buffer view;
+ int flags;
+ int dtype_is_object;
+ __Pyx_TypeInfo *typeinfo;
+};
+
+
+/* "View.MemoryView":951
+ *
+ * @cname('__pyx_memoryviewslice')
+ * cdef class _memoryviewslice(memoryview): # <<<<<<<<<<<<<<
+ * "Internal class for passing memoryview slices to Python"
+ *
+ */
+struct __pyx_memoryviewslice_obj {
+ struct __pyx_memoryview_obj __pyx_base;
+ __Pyx_memviewslice from_slice;
+ PyObject *from_object;
+ PyObject *(*to_object_func)(char *);
+ int (*to_dtype_func)(char *, PyObject *);
+};
+
+
+
+/* "View.MemoryView":103
+ *
+ * @cname("__pyx_array")
+ * cdef class array: # <<<<<<<<<<<<<<
+ *
+ * cdef:
+ */
+
+struct __pyx_vtabstruct_array {
+ PyObject *(*get_memview)(struct __pyx_array_obj *);
+};
+static struct __pyx_vtabstruct_array *__pyx_vtabptr_array;
+
+
+/* "View.MemoryView":326
+ *
+ * @cname('__pyx_memoryview')
+ * cdef class memoryview(object): # <<<<<<<<<<<<<<
+ *
+ * cdef object obj
+ */
+
+struct __pyx_vtabstruct_memoryview {
+ char *(*get_item_pointer)(struct __pyx_memoryview_obj *, PyObject *);
+ PyObject *(*is_slice)(struct __pyx_memoryview_obj *, PyObject *);
+ PyObject *(*setitem_slice_assignment)(struct __pyx_memoryview_obj *, PyObject *, PyObject *);
+ PyObject *(*setitem_slice_assign_scalar)(struct __pyx_memoryview_obj *, struct __pyx_memoryview_obj *, PyObject *);
+ PyObject *(*setitem_indexed)(struct __pyx_memoryview_obj *, PyObject *, PyObject *);
+ PyObject *(*convert_item_to_object)(struct __pyx_memoryview_obj *, char *);
+ PyObject *(*assign_item_from_object)(struct __pyx_memoryview_obj *, char *, PyObject *);
+};
+static struct __pyx_vtabstruct_memoryview *__pyx_vtabptr_memoryview;
+
+
+/* "View.MemoryView":951
+ *
+ * @cname('__pyx_memoryviewslice')
+ * cdef class _memoryviewslice(memoryview): # <<<<<<<<<<<<<<
+ * "Internal class for passing memoryview slices to Python"
+ *
+ */
+
+struct __pyx_vtabstruct__memoryviewslice {
+ struct __pyx_vtabstruct_memoryview __pyx_base;
+};
+static struct __pyx_vtabstruct__memoryviewslice *__pyx_vtabptr__memoryviewslice;
+
+/* --- Runtime support code (head) --- */
+/* Refnanny.proto */
+#ifndef CYTHON_REFNANNY
+ #define CYTHON_REFNANNY 0
+#endif
+#if CYTHON_REFNANNY
+ typedef struct {
+ void (*INCREF)(void*, PyObject*, int);
+ void (*DECREF)(void*, PyObject*, int);
+ void (*GOTREF)(void*, PyObject*, int);
+ void (*GIVEREF)(void*, PyObject*, int);
+ void* (*SetupContext)(const char*, int, const char*);
+ void (*FinishContext)(void**);
+ } __Pyx_RefNannyAPIStruct;
+ static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
+ static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
+ #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
+#ifdef WITH_THREAD
+ #define __Pyx_RefNannySetupContext(name, acquire_gil)\
+ if (acquire_gil) {\
+ PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
+ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
+ PyGILState_Release(__pyx_gilstate_save);\
+ } else {\
+ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
+ }
+#else
+ #define __Pyx_RefNannySetupContext(name, acquire_gil)\
+ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
+#endif
+ #define __Pyx_RefNannyFinishContext()\
+ __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
+ #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
+ #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
+ #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
+ #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
+ #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
+ #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
+ #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
+ #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
+#else
+ #define __Pyx_RefNannyDeclarations
+ #define __Pyx_RefNannySetupContext(name, acquire_gil)
+ #define __Pyx_RefNannyFinishContext()
+ #define __Pyx_INCREF(r) Py_INCREF(r)
+ #define __Pyx_DECREF(r) Py_DECREF(r)
+ #define __Pyx_GOTREF(r)
+ #define __Pyx_GIVEREF(r)
+ #define __Pyx_XINCREF(r) Py_XINCREF(r)
+ #define __Pyx_XDECREF(r) Py_XDECREF(r)
+ #define __Pyx_XGOTREF(r)
+ #define __Pyx_XGIVEREF(r)
+#endif
+#define __Pyx_XDECREF_SET(r, v) do {\
+ PyObject *tmp = (PyObject *) r;\
+ r = v; __Pyx_XDECREF(tmp);\
+ } while (0)
+#define __Pyx_DECREF_SET(r, v) do {\
+ PyObject *tmp = (PyObject *) r;\
+ r = v; __Pyx_DECREF(tmp);\
+ } while (0)
+#define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
+#define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
+
+/* PyObjectGetAttrStr.proto */
+#if CYTHON_USE_TYPE_SLOTS
+static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
+ PyTypeObject* tp = Py_TYPE(obj);
+ if (likely(tp->tp_getattro))
+ return tp->tp_getattro(obj, attr_name);
+#if PY_MAJOR_VERSION < 3
+ if (likely(tp->tp_getattr))
+ return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
+#endif
+ return PyObject_GetAttr(obj, attr_name);
+}
+#else
+#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
+#endif
+
+/* GetBuiltinName.proto */
+static PyObject *__Pyx_GetBuiltinName(PyObject *name);
+
+/* RaiseArgTupleInvalid.proto */
+static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
+ Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
+
+/* 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);
+
+/* PyObjectSetAttrStr.proto */
+#if CYTHON_USE_TYPE_SLOTS
+#define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o,n,NULL)
+static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) {
+ PyTypeObject* tp = Py_TYPE(obj);
+ if (likely(tp->tp_setattro))
+ return tp->tp_setattro(obj, attr_name, value);
+#if PY_MAJOR_VERSION < 3
+ if (likely(tp->tp_setattr))
+ return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value);
+#endif
+ return PyObject_SetAttr(obj, attr_name, value);
+}
+#else
+#define __Pyx_PyObject_DelAttrStr(o,n) PyObject_DelAttr(o,n)
+#define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v)
+#endif
+
+/* PyIntBinop.proto */
+#if !CYTHON_COMPILING_IN_PYPY
+static PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, long intval, int inplace);
+#else
+#define __Pyx_PyInt_EqObjC(op1, op2, intval, inplace)\
+ PyObject_RichCompare(op1, op2, Py_EQ)
+ #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
+
+/* PyThreadStateGet.proto */
+#if CYTHON_FAST_THREAD_STATE
+#define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate;
+#define __Pyx_PyThreadState_assign __pyx_tstate = PyThreadState_GET();
+#else
+#define __Pyx_PyThreadState_declare
+#define __Pyx_PyThreadState_assign
+#endif
+
+/* PyErrFetchRestore.proto */
+#if CYTHON_FAST_THREAD_STATE
+#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);
+#else
+#define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb)
+#define __Pyx_ErrFetchWithState(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);
+
+/* Import.proto */
+static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);
+
+/* 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_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err)
+#endif
+
+/* GetException.proto */
+#if CYTHON_FAST_THREAD_STATE
+#define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb)
+static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
+#else
+static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
+#endif
+
+/* PyDictContains.proto */
+static CYTHON_INLINE int __Pyx_PyDict_ContainsTF(PyObject* item, PyObject* dict, int eq) {
+ int result = PyDict_Contains(dict, item);
+ return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
+}
+
+/* DictGetItem.proto */
+#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
+static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) {
+ PyObject *value;
+ value = PyDict_GetItemWithError(d, key);
+ if (unlikely(!value)) {
+ if (!PyErr_Occurred()) {
+ PyObject* args = PyTuple_Pack(1, key);
+ if (likely(args))
+ PyErr_SetObject(PyExc_KeyError, args);
+ Py_XDECREF(args);
+ }
+ return NULL;
+ }
+ Py_INCREF(value);
+ return value;
+}
+#else
+ #define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key)
+#endif
+
+/* UnicodeAsUCS4.proto */
+static CYTHON_INLINE Py_UCS4 __Pyx_PyUnicode_AsPy_UCS4(PyObject*);
+
+/* object_ord.proto */
+#if PY_MAJOR_VERSION >= 3
+#define __Pyx_PyObject_Ord(c)\
+ (likely(PyUnicode_Check(c)) ? (long)__Pyx_PyUnicode_AsPy_UCS4(c) : __Pyx__PyObject_Ord(c))
+#else
+#define __Pyx_PyObject_Ord(c) __Pyx__PyObject_Ord(c)
+#endif
+static long __Pyx__PyObject_Ord(PyObject* c);
+
+/* SetItemInt.proto */
+#define __Pyx_SetItemInt(o, i, v, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
+ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
+ __Pyx_SetItemInt_Fast(o, (Py_ssize_t)i, v, is_list, wraparound, boundscheck) :\
+ (is_list ? (PyErr_SetString(PyExc_IndexError, "list assignment index out of range"), -1) :\
+ __Pyx_SetItemInt_Generic(o, to_py_func(i), v)))
+static CYTHON_INLINE int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v);
+static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v,
+ int is_list, int wraparound, int boundscheck);
+
+/* IterFinish.proto */
+static CYTHON_INLINE int __Pyx_IterFinish(void);
+
+/* PyFunctionFastCall.proto */
+#if CYTHON_FAST_PYCALL
+#define __Pyx_PyFunction_FastCall(func, args, nargs)\
+ __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
+#if 1 || PY_VERSION_HEX < 0x030600B1
+static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, int nargs, PyObject *kwargs);
+#else
+#define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
+#endif
+#endif
+
+/* PyObjectCallMethO.proto */
+#if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
+#endif
+
+/* 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
+
+/* 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
+
+/* PyObjectCallOneArg.proto */
+static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
+
+/* PyObjectCallMethod0.proto */
+static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name);
+
+/* RaiseNeedMoreValuesToUnpack.proto */
+static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
+
+/* RaiseTooManyValuesToUnpack.proto */
+static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
+
+/* UnpackItemEndCheck.proto */
+static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected);
+
+/* RaiseNoneIterError.proto */
+static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void);
+
+/* UnpackTupleError.proto */
+static void __Pyx_UnpackTupleError(PyObject *, Py_ssize_t index);
+
+/* UnpackTuple2.proto */
+static CYTHON_INLINE int __Pyx_unpack_tuple2(PyObject* tuple, PyObject** value1, PyObject** value2,
+ int is_tuple, int has_known_size, int decref_tuple);
+
+/* dict_iter.proto */
+static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* dict, int is_dict, PyObject* method_name,
+ Py_ssize_t* p_orig_length, int* p_is_dict);
+static CYTHON_INLINE int __Pyx_dict_iter_next(PyObject* dict_or_iter, Py_ssize_t orig_length, Py_ssize_t* ppos,
+ PyObject** pkey, PyObject** pvalue, PyObject** pitem, int is_dict);
+
+/* ListAppend.proto */
+#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
+static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
+ PyListObject* L = (PyListObject*) list;
+ Py_ssize_t len = Py_SIZE(list);
+ if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) {
+ Py_INCREF(x);
+ PyList_SET_ITEM(list, len, x);
+ Py_SIZE(list) = len+1;
+ return 0;
+ }
+ return PyList_Append(list, x);
+}
+#else
+#define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
+#endif
+
+/* GetModuleGlobalName.proto */
+static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name);
+
+/* BufferFormatCheck.proto */
+static CYTHON_INLINE int __Pyx_GetBufferAndValidate(Py_buffer* buf, PyObject* obj,
+ __Pyx_TypeInfo* dtype, int flags, int nd, int cast, __Pyx_BufFmt_StackElem* stack);
+static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info);
+static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts);
+static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx,
+ __Pyx_BufFmt_StackElem* stack,
+ __Pyx_TypeInfo* type); // PROTO
+
+/* MemviewSliceInit.proto */
+#define __Pyx_BUF_MAX_NDIMS %(BUF_MAX_NDIMS)d
+#define __Pyx_MEMVIEW_DIRECT 1
+#define __Pyx_MEMVIEW_PTR 2
+#define __Pyx_MEMVIEW_FULL 4
+#define __Pyx_MEMVIEW_CONTIG 8
+#define __Pyx_MEMVIEW_STRIDED 16
+#define __Pyx_MEMVIEW_FOLLOW 32
+#define __Pyx_IS_C_CONTIG 1
+#define __Pyx_IS_F_CONTIG 2
+static int __Pyx_init_memviewslice(
+ struct __pyx_memoryview_obj *memview,
+ int ndim,
+ __Pyx_memviewslice *memviewslice,
+ int memview_is_new_reference);
+static CYTHON_INLINE int __pyx_add_acquisition_count_locked(
+ __pyx_atomic_int *acquisition_count, PyThread_type_lock lock);
+static CYTHON_INLINE int __pyx_sub_acquisition_count_locked(
+ __pyx_atomic_int *acquisition_count, PyThread_type_lock lock);
+#define __pyx_get_slice_count_pointer(memview) (memview->acquisition_count_aligned_p)
+#define __pyx_get_slice_count(memview) (*__pyx_get_slice_count_pointer(memview))
+#define __PYX_INC_MEMVIEW(slice, have_gil) __Pyx_INC_MEMVIEW(slice, have_gil, __LINE__)
+#define __PYX_XDEC_MEMVIEW(slice, have_gil) __Pyx_XDEC_MEMVIEW(slice, have_gil, __LINE__)
+static CYTHON_INLINE void __Pyx_INC_MEMVIEW(__Pyx_memviewslice *, int, int);
+static CYTHON_INLINE void __Pyx_XDEC_MEMVIEW(__Pyx_memviewslice *, int, int);
+
+/* IncludeStringH.proto */
+#include <string.h>
+
+/* 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);
+
+/* StrEquals.proto */
+#if PY_MAJOR_VERSION >= 3
+#define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals
+#else
+#define __Pyx_PyString_Equals __Pyx_PyBytes_Equals
+#endif
+
+/* ArgTypeTest.proto */
+static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
+ const char *name, int exact);
+
+/* None.proto */
+static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t, Py_ssize_t);
+
+/* UnaryNegOverflows.proto */
+#define UNARY_NEG_WOULD_OVERFLOW(x)\
+ (((x) < 0) & ((unsigned long)(x) == 0-(unsigned long)(x)))
+
+static CYTHON_UNUSED int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
+static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *); /*proto*/
+/* GetAttr.proto */
+static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *);
+
+/* decode_c_string.proto */
+static CYTHON_INLINE PyObject* __Pyx_decode_c_string(
+ const char* cstring, Py_ssize_t start, Py_ssize_t stop,
+ const char* encoding, const char* errors,
+ PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors));
+
+/* ExtTypeTest.proto */
+static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type);
+
+/* SwapException.proto */
+#if CYTHON_FAST_THREAD_STATE
+#define __Pyx_ExceptionSwap(type, value, tb) __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb)
+static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
+#else
+static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
+#endif
+
+/* GetItemInt.proto */
+#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
+ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
+ __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\
+ (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\
+ __Pyx_GetItemInt_Generic(o, to_py_func(i))))
+#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
+ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
+ __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
+ (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
+ int wraparound, int boundscheck);
+#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
+ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
+ __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
+ (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
+ int wraparound, int boundscheck);
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
+ int is_list, int wraparound, int boundscheck);
+
+static CYTHON_UNUSED int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
+/* ListCompAppend.proto */
+#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
+static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) {
+ PyListObject* L = (PyListObject*) list;
+ Py_ssize_t len = Py_SIZE(list);
+ if (likely(L->allocated > len)) {
+ Py_INCREF(x);
+ PyList_SET_ITEM(list, len, x);
+ Py_SIZE(list) = len+1;
+ return 0;
+ }
+ return PyList_Append(list, x);
+}
+#else
+#define __Pyx_ListComp_Append(L,x) PyList_Append(L,x)
+#endif
+
+/* PyIntBinop.proto */
+#if !CYTHON_COMPILING_IN_PYPY
+static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace);
+#else
+#define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace)\
+ (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
+#endif
+
+/* ListExtend.proto */
+static CYTHON_INLINE int __Pyx_PyList_Extend(PyObject* L, PyObject* v) {
+#if CYTHON_COMPILING_IN_CPYTHON
+ PyObject* none = _PyList_Extend((PyListObject*)L, v);
+ if (unlikely(!none))
+ return -1;
+ Py_DECREF(none);
+ return 0;
+#else
+ return PyList_SetSlice(L, PY_SSIZE_T_MAX, PY_SSIZE_T_MAX, v);
+#endif
+}
+
+/* None.proto */
+static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname);
+
+/* ForceInitThreads.proto */
+#ifndef __PYX_FORCE_INIT_THREADS
+ #define __PYX_FORCE_INIT_THREADS 0
+#endif
+
+/* None.proto */
+static CYTHON_INLINE long __Pyx_div_long(long, long);
+
+/* WriteUnraisableException.proto */
+static void __Pyx_WriteUnraisable(const char *name, int clineno,
+ int lineno, const char *filename,
+ int full_traceback, int nogil);
+
+/* SetVTable.proto */
+static int __Pyx_SetVtable(PyObject *dict, void *vtable);
+
+/* CalculateMetaclass.proto */
+static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases);
+
+/* FetchCommonType.proto */
+static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);
+
+/* CythonFunction.proto */
+#define __Pyx_CyFunction_USED 1
+#include <structmember.h>
+#define __Pyx_CYFUNCTION_STATICMETHOD 0x01
+#define __Pyx_CYFUNCTION_CLASSMETHOD 0x02
+#define __Pyx_CYFUNCTION_CCLASS 0x04
+#define __Pyx_CyFunction_GetClosure(f)\
+ (((__pyx_CyFunctionObject *) (f))->func_closure)
+#define __Pyx_CyFunction_GetClassObj(f)\
+ (((__pyx_CyFunctionObject *) (f))->func_classobj)
+#define __Pyx_CyFunction_Defaults(type, f)\
+ ((type *)(((__pyx_CyFunctionObject *) (f))->defaults))
+#define __Pyx_CyFunction_SetDefaultsGetter(f, g)\
+ ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g)
+typedef struct {
+ PyCFunctionObject func;
+#if PY_VERSION_HEX < 0x030500A0
+ PyObject *func_weakreflist;
+#endif
+ PyObject *func_dict;
+ PyObject *func_name;
+ PyObject *func_qualname;
+ PyObject *func_doc;
+ PyObject *func_globals;
+ PyObject *func_code;
+ PyObject *func_closure;
+ PyObject *func_classobj;
+ void *defaults;
+ int defaults_pyobjects;
+ int flags;
+ PyObject *defaults_tuple;
+ PyObject *defaults_kwdict;
+ PyObject *(*defaults_getter)(PyObject *);
+ PyObject *func_annotations;
+} __pyx_CyFunctionObject;
+static PyTypeObject *__pyx_CyFunctionType = 0;
+#define __Pyx_CyFunction_NewEx(ml, flags, qualname, self, module, globals, code)\
+ __Pyx_CyFunction_New(__pyx_CyFunctionType, ml, flags, qualname, self, module, globals, code)
+static PyObject *__Pyx_CyFunction_New(PyTypeObject *, PyMethodDef *ml,
+ int flags, PyObject* qualname,
+ PyObject *self,
+ PyObject *module, PyObject *globals,
+ PyObject* code);
+static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m,
+ size_t size,
+ int pyobjects);
+static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m,
+ PyObject *tuple);
+static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m,
+ PyObject *dict);
+static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m,
+ PyObject *dict);
+static int __pyx_CyFunction_init(void);
+
+/* Py3ClassCreate.proto */
+static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname,
+ PyObject *mkw, PyObject *modname, PyObject *doc);
+static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict,
+ PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass);
+
+/* FusedFunction.proto */
+typedef struct {
+ __pyx_CyFunctionObject func;
+ PyObject *__signatures__;
+ PyObject *type;
+ PyObject *self;
+} __pyx_FusedFunctionObject;
+#define __pyx_FusedFunction_NewEx(ml, flags, qualname, self, module, globals, code)\
+ __pyx_FusedFunction_New(__pyx_FusedFunctionType, ml, flags, qualname, self, module, globals, code)
+static PyObject *__pyx_FusedFunction_New(PyTypeObject *type,
+ PyMethodDef *ml, int flags,
+ PyObject *qualname, PyObject *self,
+ PyObject *module, PyObject *globals,
+ PyObject *code);
+static int __pyx_FusedFunction_clear(__pyx_FusedFunctionObject *self);
+static PyTypeObject *__pyx_FusedFunctionType = NULL;
+static int __pyx_FusedFunction_init(void);
+#define __Pyx_FusedFunction_USED
+
+/* CodeObjectCache.proto */
+typedef struct {
+ PyCodeObject* code_object;
+ int code_line;
+} __Pyx_CodeObjectCacheEntry;
+struct __Pyx_CodeObjectCache {
+ int count;
+ int max_count;
+ __Pyx_CodeObjectCacheEntry* entries;
+};
+static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
+static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
+static PyCodeObject *__pyx_find_code_object(int code_line);
+static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
+
+/* AddTraceback.proto */
+static void __Pyx_AddTraceback(const char *funcname, int c_line,
+ int py_line, const char *filename);
+
+#if PY_MAJOR_VERSION < 3
+ static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags);
+ static void __Pyx_ReleaseBuffer(Py_buffer *view);
+#else
+ #define __Pyx_GetBuffer PyObject_GetBuffer
+ #define __Pyx_ReleaseBuffer PyBuffer_Release
+#endif
+
+
+/* BufferStructDeclare.proto */
+typedef struct {
+ Py_ssize_t shape, strides, suboffsets;
+} __Pyx_Buf_DimInfo;
+typedef struct {
+ size_t refcount;
+ Py_buffer pybuffer;
+} __Pyx_Buffer;
+typedef struct {
+ __Pyx_Buffer *rcbuffer;
+ char *data;
+ __Pyx_Buf_DimInfo diminfo[8];
+} __Pyx_LocalBuf_ND;
+
+/* None.proto */
+static Py_ssize_t __Pyx_zeros[] = {0, 0, 0, 0, 0, 0, 0, 0};
+static Py_ssize_t __Pyx_minusones[] = {-1, -1, -1, -1, -1, -1, -1, -1};
+
+/* MemviewSliceIsContig.proto */
+static int __pyx_memviewslice_is_contig(const __Pyx_memviewslice mvs,
+ char order, int ndim);
+
+/* OverlappingSlices.proto */
+static int __pyx_slices_overlap(__Pyx_memviewslice *slice1,
+ __Pyx_memviewslice *slice2,
+ int ndim, size_t itemsize);
+
+/* Capsule.proto */
+static CYTHON_INLINE PyObject *__pyx_capsule_create(void *p, const char *sig);
+
+/* TypeInfoCompare.proto */
+static int __pyx_typeinfo_cmp(__Pyx_TypeInfo *a, __Pyx_TypeInfo *b);
+
+/* MemviewSliceValidateAndInit.proto */
+static int __Pyx_ValidateAndInit_memviewslice(
+ int *axes_specs,
+ int c_or_f_flag,
+ int buf_flags,
+ int ndim,
+ __Pyx_TypeInfo *dtype,
+ __Pyx_BufFmt_StackElem stack[],
+ __Pyx_memviewslice *memviewslice,
+ PyObject *original_obj);
+
+/* ObjectToMemviewSlice.proto */
+static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_float(PyObject *);
+
+/* ObjectToMemviewSlice.proto */
+static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_double(PyObject *);
+
+/* ObjectToMemviewSlice.proto */
+static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_signed__char(PyObject *);
+
+/* ObjectToMemviewSlice.proto */
+static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_short(PyObject *);
+
+/* ObjectToMemviewSlice.proto */
+static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_int(PyObject *);
+
+/* ObjectToMemviewSlice.proto */
+static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_long(PyObject *);
+
+/* ObjectToMemviewSlice.proto */
+static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_PY_LONG_LONG(PyObject *);
+
+/* ObjectToMemviewSlice.proto */
+static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_unsigned_char(PyObject *);
+
+/* ObjectToMemviewSlice.proto */
+static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_unsigned_short(PyObject *);
+
+/* ObjectToMemviewSlice.proto */
+static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_unsigned_int(PyObject *);
+
+/* ObjectToMemviewSlice.proto */
+static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_unsigned_long(PyObject *);
+
+/* ObjectToMemviewSlice.proto */
+static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_unsigned_PY_LONG_LONG(PyObject *);
+
+/* CIntToPy.proto */
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
+
+/* MemviewDtypeToObject.proto */
+static CYTHON_INLINE PyObject *__pyx_memview_get_float(const char *itemp);
+static CYTHON_INLINE int __pyx_memview_set_float(const char *itemp, PyObject *obj);
+
+/* CIntToPy.proto */
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_int(unsigned int value);
+
+/* MemviewDtypeToObject.proto */
+static CYTHON_INLINE PyObject *__pyx_memview_get_double(const char *itemp);
+static CYTHON_INLINE int __pyx_memview_set_double(const char *itemp, PyObject *obj);
+
+/* CIntToPy.proto */
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_signed__char(signed char value);
+
+/* MemviewDtypeToObject.proto */
+static CYTHON_INLINE PyObject *__pyx_memview_get_signed__char(const char *itemp);
+static CYTHON_INLINE int __pyx_memview_set_signed__char(const char *itemp, PyObject *obj);
+
+/* CIntToPy.proto */
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_short(short value);
+
+/* MemviewDtypeToObject.proto */
+static CYTHON_INLINE PyObject *__pyx_memview_get_short(const char *itemp);
+static CYTHON_INLINE int __pyx_memview_set_short(const char *itemp, PyObject *obj);
+
+/* CIntToPy.proto */
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);
+
+/* MemviewDtypeToObject.proto */
+static CYTHON_INLINE PyObject *__pyx_memview_get_int(const char *itemp);
+static CYTHON_INLINE int __pyx_memview_set_int(const char *itemp, PyObject *obj);
+
+/* MemviewDtypeToObject.proto */
+static CYTHON_INLINE PyObject *__pyx_memview_get_long(const char *itemp);
+static CYTHON_INLINE int __pyx_memview_set_long(const char *itemp, PyObject *obj);
+
+/* CIntToPy.proto */
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_PY_LONG_LONG(PY_LONG_LONG value);
+
+/* MemviewDtypeToObject.proto */
+static CYTHON_INLINE PyObject *__pyx_memview_get_PY_LONG_LONG(const char *itemp);
+static CYTHON_INLINE int __pyx_memview_set_PY_LONG_LONG(const char *itemp, PyObject *obj);
+
+/* CIntToPy.proto */
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_char(unsigned char value);
+
+/* MemviewDtypeToObject.proto */
+static CYTHON_INLINE PyObject *__pyx_memview_get_unsigned_char(const char *itemp);
+static CYTHON_INLINE int __pyx_memview_set_unsigned_char(const char *itemp, PyObject *obj);
+
+/* CIntToPy.proto */
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_short(unsigned short value);
+
+/* MemviewDtypeToObject.proto */
+static CYTHON_INLINE PyObject *__pyx_memview_get_unsigned_short(const char *itemp);
+static CYTHON_INLINE int __pyx_memview_set_unsigned_short(const char *itemp, PyObject *obj);
+
+/* MemviewDtypeToObject.proto */
+static CYTHON_INLINE PyObject *__pyx_memview_get_unsigned_int(const char *itemp);
+static CYTHON_INLINE int __pyx_memview_set_unsigned_int(const char *itemp, PyObject *obj);
+
+/* CIntToPy.proto */
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_long(unsigned long value);
+
+/* MemviewDtypeToObject.proto */
+static CYTHON_INLINE PyObject *__pyx_memview_get_unsigned_long(const char *itemp);
+static CYTHON_INLINE int __pyx_memview_set_unsigned_long(const char *itemp, PyObject *obj);
+
+/* CIntToPy.proto */
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_PY_LONG_LONG(unsigned PY_LONG_LONG value);
+
+/* MemviewDtypeToObject.proto */
+static CYTHON_INLINE PyObject *__pyx_memview_get_unsigned_PY_LONG_LONG(const char *itemp);
+static CYTHON_INLINE int __pyx_memview_set_unsigned_PY_LONG_LONG(const char *itemp, PyObject *obj);
+
+/* MemviewSliceCopyTemplate.proto */
+static __Pyx_memviewslice
+__pyx_memoryview_copy_new_contig(const __Pyx_memviewslice *from_mvs,
+ const char *mode, int ndim,
+ size_t sizeof_dtype, int contig_flag,
+ int dtype_is_object);
+
+/* BytesContains.proto */
+static CYTHON_INLINE int __Pyx_BytesContains(PyObject* bytes, char character);
+
+/* CIntFromPy.proto */
+static CYTHON_INLINE unsigned int __Pyx_PyInt_As_unsigned_int(PyObject *);
+
+/* CIntFromPy.proto */
+static CYTHON_INLINE signed char __Pyx_PyInt_As_signed__char(PyObject *);
+
+/* CIntFromPy.proto */
+static CYTHON_INLINE short __Pyx_PyInt_As_short(PyObject *);
+
+/* CIntFromPy.proto */
+static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
+
+/* CIntFromPy.proto */
+static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
+
+/* CIntFromPy.proto */
+static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_As_PY_LONG_LONG(PyObject *);
+
+/* CIntFromPy.proto */
+static CYTHON_INLINE unsigned char __Pyx_PyInt_As_unsigned_char(PyObject *);
+
+/* CIntFromPy.proto */
+static CYTHON_INLINE unsigned short __Pyx_PyInt_As_unsigned_short(PyObject *);
+
+/* CIntFromPy.proto */
+static CYTHON_INLINE unsigned long __Pyx_PyInt_As_unsigned_long(PyObject *);
+
+/* CIntFromPy.proto */
+static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_As_unsigned_PY_LONG_LONG(PyObject *);
+
+/* CIntFromPy.proto */
+static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *);
+
+/* CheckBinaryVersion.proto */
+static int __Pyx_check_binary_version(void);
+
+/* InitStrings.proto */
+static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
+
+static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *__pyx_v_self); /* proto*/
+static char *__pyx_memoryview_get_item_pointer(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index); /* proto*/
+static PyObject *__pyx_memoryview_is_slice(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj); /* proto*/
+static PyObject *__pyx_memoryview_setitem_slice_assignment(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_dst, PyObject *__pyx_v_src); /* proto*/
+static PyObject *__pyx_memoryview_setitem_slice_assign_scalar(struct __pyx_memoryview_obj *__pyx_v_self, struct __pyx_memoryview_obj *__pyx_v_dst, PyObject *__pyx_v_value); /* proto*/
+static PyObject *__pyx_memoryview_setitem_indexed(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /* proto*/
+static PyObject *__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp); /* proto*/
+static PyObject *__pyx_memoryview_assign_item_from_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value); /* proto*/
+static PyObject *__pyx_memoryviewslice_convert_item_to_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp); /* proto*/
+static PyObject *__pyx_memoryviewslice_assign_item_from_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value); /* proto*/
+
+/* Module declarations from 'cython.view' */
+
+/* Module declarations from 'cython' */
+
+/* Module declarations from 'libc.float' */
+
+/* Module declarations from 'silx.math.combo' */
+static PyTypeObject *__pyx_array_type = 0;
+static PyTypeObject *__pyx_MemviewEnum_type = 0;
+static PyTypeObject *__pyx_memoryview_type = 0;
+static PyTypeObject *__pyx_memoryviewslice_type = 0;
+static double __pyx_v_4silx_4math_5combo_INFINITY;
+static PyObject *generic = 0;
+static PyObject *strided = 0;
+static PyObject *indirect = 0;
+static PyObject *contiguous = 0;
+static PyObject *indirect_contiguous = 0;
+static int __pyx_memoryview_thread_locks_used;
+static PyThread_type_lock __pyx_memoryview_thread_locks[8];
+static struct __pyx_array_obj *__pyx_array_new(PyObject *, Py_ssize_t, char *, char *, char *); /*proto*/
+static void *__pyx_align_pointer(void *, size_t); /*proto*/
+static PyObject *__pyx_memoryview_new(PyObject *, int, int, __Pyx_TypeInfo *); /*proto*/
+static CYTHON_INLINE int __pyx_memoryview_check(PyObject *); /*proto*/
+static PyObject *_unellipsify(PyObject *, int); /*proto*/
+static PyObject *assert_direct_dimensions(Py_ssize_t *, int); /*proto*/
+static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_obj *, PyObject *); /*proto*/
+static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *, Py_ssize_t, Py_ssize_t, Py_ssize_t, int, int, int *, Py_ssize_t, Py_ssize_t, Py_ssize_t, int, int, int, int); /*proto*/
+static char *__pyx_pybuffer_index(Py_buffer *, char *, Py_ssize_t, Py_ssize_t); /*proto*/
+static int __pyx_memslice_transpose(__Pyx_memviewslice *); /*proto*/
+static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice, int, PyObject *(*)(char *), int (*)(char *, PyObject *), int); /*proto*/
+static __Pyx_memviewslice *__pyx_memoryview_get_slice_from_memoryview(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/
+static void __pyx_memoryview_slice_copy(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/
+static PyObject *__pyx_memoryview_copy_object(struct __pyx_memoryview_obj *); /*proto*/
+static PyObject *__pyx_memoryview_copy_object_from_slice(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/
+static Py_ssize_t abs_py_ssize_t(Py_ssize_t); /*proto*/
+static char __pyx_get_best_slice_order(__Pyx_memviewslice *, int); /*proto*/
+static void _copy_strided_to_strided(char *, Py_ssize_t *, char *, Py_ssize_t *, Py_ssize_t *, Py_ssize_t *, int, size_t); /*proto*/
+static void copy_strided_to_strided(__Pyx_memviewslice *, __Pyx_memviewslice *, int, size_t); /*proto*/
+static Py_ssize_t __pyx_memoryview_slice_get_size(__Pyx_memviewslice *, int); /*proto*/
+static Py_ssize_t __pyx_fill_contig_strides_array(Py_ssize_t *, Py_ssize_t *, Py_ssize_t, int, char); /*proto*/
+static void *__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice *, __Pyx_memviewslice *, char, int); /*proto*/
+static int __pyx_memoryview_err_extents(int, Py_ssize_t, Py_ssize_t); /*proto*/
+static int __pyx_memoryview_err_dim(PyObject *, char *, int); /*proto*/
+static int __pyx_memoryview_err(PyObject *, char *); /*proto*/
+static int __pyx_memoryview_copy_contents(__Pyx_memviewslice, __Pyx_memviewslice, int, int, int); /*proto*/
+static void __pyx_memoryview_broadcast_leading(__Pyx_memviewslice *, int, int); /*proto*/
+static void __pyx_memoryview_refcount_copying(__Pyx_memviewslice *, int, int, int); /*proto*/
+static void __pyx_memoryview_refcount_objects_in_slice_with_gil(char *, Py_ssize_t *, Py_ssize_t *, int, int); /*proto*/
+static void __pyx_memoryview_refcount_objects_in_slice(char *, Py_ssize_t *, Py_ssize_t *, int, int); /*proto*/
+static void __pyx_memoryview_slice_assign_scalar(__Pyx_memviewslice *, int, size_t, void *, int); /*proto*/
+static void __pyx_memoryview__slice_assign_scalar(char *, Py_ssize_t *, Py_ssize_t *, int, size_t, void *); /*proto*/
+static __Pyx_TypeInfo __Pyx_TypeInfo_float = { "float", NULL, sizeof(float), { 0 }, 0, 'R', 0, 0 };
+static __Pyx_TypeInfo __Pyx_TypeInfo_double = { "double", NULL, sizeof(double), { 0 }, 0, 'R', 0, 0 };
+static __Pyx_TypeInfo __Pyx_TypeInfo_signed__char = { "signed char", NULL, sizeof(signed char), { 0 }, 0, IS_UNSIGNED(signed char) ? 'U' : 'I', IS_UNSIGNED(signed char), 0 };
+static __Pyx_TypeInfo __Pyx_TypeInfo_short = { "short", NULL, sizeof(short), { 0 }, 0, IS_UNSIGNED(short) ? 'U' : 'I', IS_UNSIGNED(short), 0 };
+static __Pyx_TypeInfo __Pyx_TypeInfo_int = { "int", NULL, sizeof(int), { 0 }, 0, IS_UNSIGNED(int) ? 'U' : 'I', IS_UNSIGNED(int), 0 };
+static __Pyx_TypeInfo __Pyx_TypeInfo_long = { "long", NULL, sizeof(long), { 0 }, 0, IS_UNSIGNED(long) ? 'U' : 'I', IS_UNSIGNED(long), 0 };
+static __Pyx_TypeInfo __Pyx_TypeInfo_PY_LONG_LONG = { "long long", NULL, sizeof(PY_LONG_LONG), { 0 }, 0, IS_UNSIGNED(PY_LONG_LONG) ? 'U' : 'I', IS_UNSIGNED(PY_LONG_LONG), 0 };
+static __Pyx_TypeInfo __Pyx_TypeInfo_unsigned_char = { "unsigned char", NULL, sizeof(unsigned char), { 0 }, 0, IS_UNSIGNED(unsigned char) ? 'U' : 'I', IS_UNSIGNED(unsigned char), 0 };
+static __Pyx_TypeInfo __Pyx_TypeInfo_unsigned_short = { "unsigned short", NULL, sizeof(unsigned short), { 0 }, 0, IS_UNSIGNED(unsigned short) ? 'U' : 'I', IS_UNSIGNED(unsigned short), 0 };
+static __Pyx_TypeInfo __Pyx_TypeInfo_unsigned_int = { "unsigned int", NULL, sizeof(unsigned int), { 0 }, 0, IS_UNSIGNED(unsigned int) ? 'U' : 'I', IS_UNSIGNED(unsigned int), 0 };
+static __Pyx_TypeInfo __Pyx_TypeInfo_unsigned_long = { "unsigned long", NULL, sizeof(unsigned long), { 0 }, 0, IS_UNSIGNED(unsigned long) ? 'U' : 'I', IS_UNSIGNED(unsigned long), 0 };
+static __Pyx_TypeInfo __Pyx_TypeInfo_unsigned_PY_LONG_LONG = { "unsigned long long", NULL, sizeof(unsigned PY_LONG_LONG), { 0 }, 0, IS_UNSIGNED(unsigned PY_LONG_LONG) ? 'U' : 'I', IS_UNSIGNED(unsigned PY_LONG_LONG), 0 };
+#define __Pyx_MODULE_NAME "silx.math.combo"
+int __pyx_module_is_main_silx__math__combo = 0;
+
+/* Implementation of 'silx.math.combo' */
+static PyObject *__pyx_builtin_object;
+static PyObject *__pyx_builtin_property;
+static PyObject *__pyx_builtin_IndexError;
+static PyObject *__pyx_builtin_ImportError;
+static PyObject *__pyx_builtin_AttributeError;
+static PyObject *__pyx_builtin_TypeError;
+static PyObject *__pyx_builtin_zip;
+static PyObject *__pyx_builtin_ValueError;
+static PyObject *__pyx_builtin_range;
+static PyObject *__pyx_builtin_MemoryError;
+static PyObject *__pyx_builtin_enumerate;
+static PyObject *__pyx_builtin_Ellipsis;
+static PyObject *__pyx_builtin_id;
+static const char __pyx_k_N[] = "N";
+static const char __pyx_k_O[] = "O";
+static const char __pyx_k_c[] = "c";
+static const char __pyx_k_f[] = "f";
+static const char __pyx_k__3[] = "()";
+static const char __pyx_k__5[] = "|";
+static const char __pyx_k_id[] = "id";
+static const char __pyx_k_MIT[] = "MIT";
+static const char __pyx_k_doc[] = "doc";
+static const char __pyx_k_int[] = "int";
+static const char __pyx_k_key[] = "key";
+static const char __pyx_k_obj[] = "obj";
+static const char __pyx_k_zip[] = "zip";
+static const char __pyx_k_args[] = "args";
+static const char __pyx_k_base[] = "base";
+static const char __pyx_k_copy[] = "copy";
+static const char __pyx_k_data[] = "data";
+static const char __pyx_k_date[] = "__date__";
+static const char __pyx_k_init[] = "__init__";
+static const char __pyx_k_kind[] = "kind";
+static const char __pyx_k_long[] = "long";
+static const char __pyx_k_main[] = "__main__";
+static const char __pyx_k_mode[] = "mode";
+static const char __pyx_k_name[] = "name";
+static const char __pyx_k_ndim[] = "ndim";
+static const char __pyx_k_pack[] = "pack";
+static const char __pyx_k_self[] = "self";
+static const char __pyx_k_size[] = "size";
+static const char __pyx_k_step[] = "step";
+static const char __pyx_k_stop[] = "stop";
+static const char __pyx_k_test[] = "__test__";
+static const char __pyx_k_ASCII[] = "ASCII";
+static const char __pyx_k_array[] = "array";
+static const char __pyx_k_class[] = "__class__";
+static const char __pyx_k_doc_2[] = "__doc__";
+static const char __pyx_k_dtype[] = "dtype";
+static const char __pyx_k_error[] = "error";
+static const char __pyx_k_flags[] = "flags";
+static const char __pyx_k_float[] = "float";
+static const char __pyx_k_index[] = "index";
+static const char __pyx_k_numpy[] = "numpy";
+static const char __pyx_k_range[] = "range";
+static const char __pyx_k_ravel[] = "ravel";
+static const char __pyx_k_shape[] = "shape";
+static const char __pyx_k_short[] = "short";
+static const char __pyx_k_split[] = "split";
+static const char __pyx_k_start[] = "start";
+static const char __pyx_k_strip[] = "strip";
+static const char __pyx_k_value[] = "value";
+static const char __pyx_k_argmax[] = "_argmax";
+static const char __pyx_k_argmin[] = "_argmin";
+static const char __pyx_k_double[] = "double";
+static const char __pyx_k_encode[] = "encode";
+static const char __pyx_k_finite[] = "finite";
+static const char __pyx_k_format[] = "format";
+static const char __pyx_k_import[] = "__import__";
+static const char __pyx_k_kwargs[] = "kwargs";
+static const char __pyx_k_length[] = "length";
+static const char __pyx_k_minpos[] = "minpos";
+static const char __pyx_k_module[] = "__module__";
+static const char __pyx_k_name_2[] = "__name__";
+static const char __pyx_k_object[] = "object";
+static const char __pyx_k_struct[] = "struct";
+static const char __pyx_k_unpack[] = "unpack";
+static const char __pyx_k_authors[] = "__authors__";
+static const char __pyx_k_fortran[] = "fortran";
+static const char __pyx_k_getitem[] = "__getitem__";
+static const char __pyx_k_license[] = "__license__";
+static const char __pyx_k_maximum[] = "_maximum";
+static const char __pyx_k_memview[] = "memview";
+static const char __pyx_k_min_max[] = "_min_max";
+static const char __pyx_k_min_pos[] = "min_pos";
+static const char __pyx_k_minimum[] = "_minimum";
+static const char __pyx_k_ndarray[] = "ndarray";
+static const char __pyx_k_prepare[] = "__prepare__";
+static const char __pyx_k_Ellipsis[] = "Ellipsis";
+static const char __pyx_k_argmax_2[] = "argmax";
+static const char __pyx_k_argmin_2[] = "argmin";
+static const char __pyx_k_defaults[] = "defaults";
+static const char __pyx_k_itemsize[] = "itemsize";
+static const char __pyx_k_property[] = "property";
+static const char __pyx_k_qualname[] = "__qualname__";
+static const char __pyx_k_T_Vincent[] = "T. Vincent";
+static const char __pyx_k_TypeError[] = "TypeError";
+static const char __pyx_k_enumerate[] = "enumerate";
+static const char __pyx_k_long_long[] = "long long";
+static const char __pyx_k_max_index[] = "max_index";
+static const char __pyx_k_maximum_2[] = "maximum";
+static const char __pyx_k_metaclass[] = "__metaclass__";
+static const char __pyx_k_min_index[] = "min_index";
+static const char __pyx_k_min_max_2[] = "min_max";
+static const char __pyx_k_minimum_2[] = "minimum";
+static const char __pyx_k_16_08_2017[] = "16/08/2017";
+static const char __pyx_k_IndexError[] = "IndexError";
+static const char __pyx_k_ValueError[] = "ValueError";
+static const char __pyx_k_argmin_pos[] = "argmin_pos";
+static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
+static const char __pyx_k_signatures[] = "signatures";
+static const char __pyx_k_ImportError[] = "ImportError";
+static const char __pyx_k_MemoryError[] = "MemoryError";
+static const char __pyx_k_signed_char[] = "signed char";
+static const char __pyx_k_MinMaxResult[] = "_MinMaxResult";
+static const char __pyx_k_min_positive[] = "_min_positive";
+static const char __pyx_k_newbyteorder[] = "newbyteorder";
+static const char __pyx_k_unsigned_int[] = "unsigned int";
+static const char __pyx_k_min_pos_index[] = "min_pos_index";
+static const char __pyx_k_pyx_getbuffer[] = "__pyx_getbuffer";
+static const char __pyx_k_unsigned_char[] = "unsigned char";
+static const char __pyx_k_unsigned_long[] = "unsigned long";
+static const char __pyx_k_AttributeError[] = "AttributeError";
+static const char __pyx_k_finite_min_max[] = "_finite_min_max";
+static const char __pyx_k_min_positive_2[] = "min_positive";
+static const char __pyx_k_unsigned_short[] = "unsigned short";
+static const char __pyx_k_Zero_size_array[] = "Zero-size array";
+static const char __pyx_k_allocate_buffer[] = "allocate_buffer";
+static const char __pyx_k_argmin_positive[] = "_argmin_positive";
+static const char __pyx_k_dtype_is_object[] = "dtype_is_object";
+static const char __pyx_k_silx_math_combo[] = "silx.math.combo";
+static const char __pyx_k_min_max_line_267[] = "min_max (line 267)";
+static const char __pyx_k_argmin_positive_2[] = "argmin_positive";
+static const char __pyx_k_ascontiguousarray[] = "ascontiguousarray";
+static const char __pyx_k_Index_out_of_range[] = "Index out of range";
+static const char __pyx_k_strided_and_direct[] = "<strided and direct>";
+static const char __pyx_k_unsigned_long_long[] = "unsigned long long";
+static const char __pyx_k_MinMaxResult___init[] = "_MinMaxResult.__init__";
+static const char __pyx_k_MinMaxResult_lambda[] = "_MinMaxResult.<lambda>";
+static const char __pyx_k_native_endian_dtype[] = "native_endian_dtype";
+static const char __pyx_k_strided_and_indirect[] = "<strided and indirect>";
+static const char __pyx_k_contiguous_and_direct[] = "<contiguous and direct>";
+static const char __pyx_k_MemoryView_of_r_object[] = "<MemoryView of %r object>";
+static const char __pyx_k_MinMaxResult___getitem[] = "_MinMaxResult.__getitem__";
+static const char __pyx_k_MemoryView_of_r_at_0x_x[] = "<MemoryView of %r at 0x%x>";
+static const char __pyx_k_contiguous_and_indirect[] = "<contiguous and indirect>";
+static const char __pyx_k_Cannot_index_with_type_s[] = "Cannot index with type '%s'";
+static const char __pyx_k_Invalid_shape_in_axis_d_d[] = "Invalid shape in axis %d: %d.";
+static const char __pyx_k_Maximum_value_of_the_array[] = "Maximum value of the array";
+static const char __pyx_k_Minimum_value_of_the_array[] = "Minimum value of the array";
+static const char __pyx_k_No_matching_signature_found[] = "No matching signature found";
+static const char __pyx_k_itemsize_0_for_cython_array[] = "itemsize <= 0 for cython.array";
+static const char __pyx_k_Expected_at_least_d_arguments[] = "Expected at least %d arguments";
+static const char __pyx_k_unable_to_allocate_array_data[] = "unable to allocate array data.";
+static const char __pyx_k_strided_and_direct_or_indirect[] = "<strided and direct or indirect>";
+static const char __pyx_k_Object_storing_result_from_func[] = "Object storing result from :func:`min_max`";
+static const char __pyx_k_Strictly_positive_minimum_value[] = "Strictly positive minimum value\n\n It is None if no value is strictly positive.\n ";
+static const char __pyx_k_users_kieffer_workspace_400_rel[] = "/users/kieffer/workspace-400/release/silx/silx/math/combo.pyx";
+static const char __pyx_k_Buffer_view_does_not_expose_stri[] = "Buffer view does not expose strides";
+static const char __pyx_k_Can_only_create_a_buffer_that_is[] = "Can only create a buffer that is contiguous in memory.";
+static const char __pyx_k_Empty_shape_tuple_for_cython_arr[] = "Empty shape tuple for cython.array";
+static const char __pyx_k_Function_call_with_ambiguous_arg[] = "Function call with ambiguous argument types";
+static const char __pyx_k_Index_of_the_first_occurrence_of[] = "Index of the first occurrence of the minimum value";
+static const char __pyx_k_Index_of_the_strictly_positive_m[] = "Index of the strictly positive minimum value.\n\n It is None if no value is strictly positive.\n It is the index of the first occurrence.";
+static const char __pyx_k_Indirect_dimensions_not_supporte[] = "Indirect dimensions not supported";
+static const char __pyx_k_Invalid_mode_expected_c_or_fortr[] = "Invalid mode, expected 'c' or 'fortran', got %s";
+static const char __pyx_k_Out_of_bounds_on_buffer_access_a[] = "Out of bounds on buffer access (axis %d)";
+static const char __pyx_k_Returns_min_max_and_optionally_s[] = "Returns min, max and optionally strictly positive min of data.\n\n It also computes the indices of first occurrence of min/max.\n\n NaNs are ignored while computing min/max unless all data is NaNs,\n in which case returned min/max are NaNs.\n\n Examples:\n\n >>> import numpy\n >>> data = numpy.arange(10)\n\n Usage as a function returning min and max:\n\n >>> min_, max_ = min_max(data)\n\n Usage as a function returning a result object to access all information:\n\n >>> result = min_max(data) # Do not get positive min\n >>> result.minimum, result.argmin\n 0, 0\n >>> result.maximum, result.argmax\n 9, 10\n >>> result.min_positive, result.argmin_positive # Not computed\n None, None\n\n Getting strictly positive min information:\n\n >>> result = min_max(data, min_positive=True)\n >>> result.min_positive, result.argmin_positive # Computed\n 1, 1\n\n If *finite* is True, min/max information is computed only from finite data.\n Then, all result fields (include minimum and maximum) can be None\n when all data is infinity or NaN.\n\n :param data: Array-like dataset\n :param bool min_positive: True to compute the positive min and argmin\n Default: False.\n :param bool finite: True to compute min/max from finite data only\n Default: False.\n :returns: An object with minimum, maximum and min_positive attributes\n and the indices of first occurrence in the flattened data:\n argmin, argmax and argmin_positive attributes.\n If all data is <= 0 or min_positive argument is False, then\n min_positive and argmin_positive are None.\n :raises: ValueError if data is empty\n ";
+static const char __pyx_k_This_module_provides_combination[] = "This module provides combination of statistics as single operation.\n\nFor now it provides min/max (and optionally positive min) and indices\nof first occurrences (i.e., argmin/argmax) in a single pass.\n";
+static const char __pyx_k_Unable_to_convert_item_to_object[] = "Unable to convert item to object";
+static const char __pyx_k_got_differing_extents_in_dimensi[] = "got differing extents in dimension %d (got %d and %d)";
+static const char __pyx_k_unable_to_allocate_shape_and_str[] = "unable to allocate shape and strides.";
+static const char __pyx_k_Index_of_the_first_occurrence_of_2[] = "Index of the first occurrence of the maximum value";
+static PyObject *__pyx_kp_s_16_08_2017;
+static PyObject *__pyx_n_s_ASCII;
+static PyObject *__pyx_n_s_AttributeError;
+static PyObject *__pyx_kp_s_Buffer_view_does_not_expose_stri;
+static PyObject *__pyx_kp_s_Can_only_create_a_buffer_that_is;
+static PyObject *__pyx_kp_s_Cannot_index_with_type_s;
+static PyObject *__pyx_n_s_Ellipsis;
+static PyObject *__pyx_kp_s_Empty_shape_tuple_for_cython_arr;
+static PyObject *__pyx_kp_s_Expected_at_least_d_arguments;
+static PyObject *__pyx_kp_s_Function_call_with_ambiguous_arg;
+static PyObject *__pyx_n_s_ImportError;
+static PyObject *__pyx_n_s_IndexError;
+static PyObject *__pyx_kp_s_Index_of_the_first_occurrence_of;
+static PyObject *__pyx_kp_s_Index_of_the_first_occurrence_of_2;
+static PyObject *__pyx_kp_s_Index_of_the_strictly_positive_m;
+static PyObject *__pyx_kp_s_Index_out_of_range;
+static PyObject *__pyx_kp_s_Indirect_dimensions_not_supporte;
+static PyObject *__pyx_kp_s_Invalid_mode_expected_c_or_fortr;
+static PyObject *__pyx_kp_s_Invalid_shape_in_axis_d_d;
+static PyObject *__pyx_n_s_MIT;
+static PyObject *__pyx_kp_s_Maximum_value_of_the_array;
+static PyObject *__pyx_n_s_MemoryError;
+static PyObject *__pyx_kp_s_MemoryView_of_r_at_0x_x;
+static PyObject *__pyx_kp_s_MemoryView_of_r_object;
+static PyObject *__pyx_n_s_MinMaxResult;
+static PyObject *__pyx_n_s_MinMaxResult___getitem;
+static PyObject *__pyx_n_s_MinMaxResult___init;
+static PyObject *__pyx_n_s_MinMaxResult_lambda;
+static PyObject *__pyx_kp_s_Minimum_value_of_the_array;
+static PyObject *__pyx_n_s_N;
+static PyObject *__pyx_kp_s_No_matching_signature_found;
+static PyObject *__pyx_n_b_O;
+static PyObject *__pyx_kp_s_Object_storing_result_from_func;
+static PyObject *__pyx_kp_s_Out_of_bounds_on_buffer_access_a;
+static PyObject *__pyx_kp_u_Returns_min_max_and_optionally_s;
+static PyObject *__pyx_kp_s_Strictly_positive_minimum_value;
+static PyObject *__pyx_kp_s_T_Vincent;
+static PyObject *__pyx_n_s_TypeError;
+static PyObject *__pyx_kp_s_Unable_to_convert_item_to_object;
+static PyObject *__pyx_n_s_ValueError;
+static PyObject *__pyx_kp_s_Zero_size_array;
+static PyObject *__pyx_kp_s__3;
+static PyObject *__pyx_kp_s__5;
+static PyObject *__pyx_n_s_allocate_buffer;
+static PyObject *__pyx_n_s_argmax;
+static PyObject *__pyx_n_s_argmax_2;
+static PyObject *__pyx_n_s_argmin;
+static PyObject *__pyx_n_s_argmin_2;
+static PyObject *__pyx_n_s_argmin_pos;
+static PyObject *__pyx_n_s_argmin_positive;
+static PyObject *__pyx_n_s_argmin_positive_2;
+static PyObject *__pyx_n_s_args;
+static PyObject *__pyx_n_s_array;
+static PyObject *__pyx_n_s_ascontiguousarray;
+static PyObject *__pyx_n_s_authors;
+static PyObject *__pyx_n_s_base;
+static PyObject *__pyx_n_s_c;
+static PyObject *__pyx_n_u_c;
+static PyObject *__pyx_n_s_class;
+static PyObject *__pyx_kp_s_contiguous_and_direct;
+static PyObject *__pyx_kp_s_contiguous_and_indirect;
+static PyObject *__pyx_n_s_copy;
+static PyObject *__pyx_n_s_data;
+static PyObject *__pyx_n_s_date;
+static PyObject *__pyx_n_s_defaults;
+static PyObject *__pyx_n_s_doc;
+static PyObject *__pyx_n_s_doc_2;
+static PyObject *__pyx_n_s_double;
+static PyObject *__pyx_n_s_dtype;
+static PyObject *__pyx_n_s_dtype_is_object;
+static PyObject *__pyx_n_s_encode;
+static PyObject *__pyx_n_s_enumerate;
+static PyObject *__pyx_n_s_error;
+static PyObject *__pyx_n_s_f;
+static PyObject *__pyx_n_s_finite;
+static PyObject *__pyx_n_s_finite_min_max;
+static PyObject *__pyx_n_s_flags;
+static PyObject *__pyx_n_s_float;
+static PyObject *__pyx_n_s_format;
+static PyObject *__pyx_n_s_fortran;
+static PyObject *__pyx_n_u_fortran;
+static PyObject *__pyx_n_s_getitem;
+static PyObject *__pyx_kp_s_got_differing_extents_in_dimensi;
+static PyObject *__pyx_n_s_id;
+static PyObject *__pyx_n_s_import;
+static PyObject *__pyx_n_s_index;
+static PyObject *__pyx_n_s_init;
+static PyObject *__pyx_n_s_int;
+static PyObject *__pyx_n_s_itemsize;
+static PyObject *__pyx_kp_s_itemsize_0_for_cython_array;
+static PyObject *__pyx_n_s_key;
+static PyObject *__pyx_n_s_kind;
+static PyObject *__pyx_n_s_kwargs;
+static PyObject *__pyx_n_s_length;
+static PyObject *__pyx_n_s_license;
+static PyObject *__pyx_n_s_long;
+static PyObject *__pyx_kp_s_long_long;
+static PyObject *__pyx_n_s_main;
+static PyObject *__pyx_n_s_max_index;
+static PyObject *__pyx_n_s_maximum;
+static PyObject *__pyx_n_s_maximum_2;
+static PyObject *__pyx_n_s_memview;
+static PyObject *__pyx_n_s_metaclass;
+static PyObject *__pyx_n_s_min_index;
+static PyObject *__pyx_n_s_min_max;
+static PyObject *__pyx_n_s_min_max_2;
+static PyObject *__pyx_kp_u_min_max_line_267;
+static PyObject *__pyx_n_s_min_pos;
+static PyObject *__pyx_n_s_min_pos_index;
+static PyObject *__pyx_n_s_min_positive;
+static PyObject *__pyx_n_s_min_positive_2;
+static PyObject *__pyx_n_s_minimum;
+static PyObject *__pyx_n_s_minimum_2;
+static PyObject *__pyx_n_s_minpos;
+static PyObject *__pyx_n_s_mode;
+static PyObject *__pyx_n_s_module;
+static PyObject *__pyx_n_s_name;
+static PyObject *__pyx_n_s_name_2;
+static PyObject *__pyx_n_s_native_endian_dtype;
+static PyObject *__pyx_n_s_ndarray;
+static PyObject *__pyx_n_s_ndim;
+static PyObject *__pyx_n_s_newbyteorder;
+static PyObject *__pyx_n_s_numpy;
+static PyObject *__pyx_n_s_obj;
+static PyObject *__pyx_n_s_object;
+static PyObject *__pyx_n_s_pack;
+static PyObject *__pyx_n_s_prepare;
+static PyObject *__pyx_n_s_property;
+static PyObject *__pyx_n_s_pyx_getbuffer;
+static PyObject *__pyx_n_s_pyx_vtable;
+static PyObject *__pyx_n_s_qualname;
+static PyObject *__pyx_n_s_range;
+static PyObject *__pyx_n_s_ravel;
+static PyObject *__pyx_n_s_self;
+static PyObject *__pyx_n_s_shape;
+static PyObject *__pyx_n_s_short;
+static PyObject *__pyx_n_s_signatures;
+static PyObject *__pyx_kp_s_signed_char;
+static PyObject *__pyx_n_s_silx_math_combo;
+static PyObject *__pyx_n_s_size;
+static PyObject *__pyx_n_s_split;
+static PyObject *__pyx_n_s_start;
+static PyObject *__pyx_n_s_step;
+static PyObject *__pyx_n_s_stop;
+static PyObject *__pyx_kp_s_strided_and_direct;
+static PyObject *__pyx_kp_s_strided_and_direct_or_indirect;
+static PyObject *__pyx_kp_s_strided_and_indirect;
+static PyObject *__pyx_n_s_strip;
+static PyObject *__pyx_n_s_struct;
+static PyObject *__pyx_n_s_test;
+static PyObject *__pyx_kp_s_unable_to_allocate_array_data;
+static PyObject *__pyx_kp_s_unable_to_allocate_shape_and_str;
+static PyObject *__pyx_n_s_unpack;
+static PyObject *__pyx_kp_s_unsigned_char;
+static PyObject *__pyx_kp_s_unsigned_int;
+static PyObject *__pyx_kp_s_unsigned_long;
+static PyObject *__pyx_kp_s_unsigned_long_long;
+static PyObject *__pyx_kp_s_unsigned_short;
+static PyObject *__pyx_kp_s_users_kieffer_workspace_400_rel;
+static PyObject *__pyx_n_s_value;
+static PyObject *__pyx_n_s_zip;
+static PyObject *__pyx_lambda_funcdef_4silx_4math_5combo_13_MinMaxResult_lambda(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_lambda_funcdef_4silx_4math_5combo_13_MinMaxResult_lambda1(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_lambda_funcdef_4silx_4math_5combo_13_MinMaxResult_lambda2(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_lambda_funcdef_4silx_4math_5combo_13_MinMaxResult_lambda3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_lambda_funcdef_4silx_4math_5combo_13_MinMaxResult_lambda4(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_lambda_funcdef_4silx_4math_5combo_13_MinMaxResult_lambda5(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_4silx_4math_5combo_13_MinMaxResult___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_minimum, PyObject *__pyx_v_min_pos, PyObject *__pyx_v_maximum, PyObject *__pyx_v_argmin, PyObject *__pyx_v_argmin_pos, PyObject *__pyx_v_argmax); /* proto */
+static PyObject *__pyx_pf_4silx_4math_5combo_13_MinMaxResult_2__getitem__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
+static PyObject *__pyx_pf_4silx_4math_5combo__min_max(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_signatures, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs, CYTHON_UNUSED PyObject *__pyx_v_defaults); /* proto */
+static PyObject *__pyx_pf_4silx_4math_5combo_62__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_4silx_4math_5combo_6_min_max(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_data, int __pyx_v_min_positive); /* proto */
+static PyObject *__pyx_pf_4silx_4math_5combo_64__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_4silx_4math_5combo_8_min_max(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_data, int __pyx_v_min_positive); /* proto */
+static PyObject *__pyx_pf_4silx_4math_5combo_66__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_4silx_4math_5combo_10_min_max(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_data, int __pyx_v_min_positive); /* proto */
+static PyObject *__pyx_pf_4silx_4math_5combo_68__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_4silx_4math_5combo_12_min_max(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_data, int __pyx_v_min_positive); /* proto */
+static PyObject *__pyx_pf_4silx_4math_5combo_70__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_4silx_4math_5combo_14_min_max(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_data, int __pyx_v_min_positive); /* proto */
+static PyObject *__pyx_pf_4silx_4math_5combo_72__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_4silx_4math_5combo_16_min_max(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_data, int __pyx_v_min_positive); /* proto */
+static PyObject *__pyx_pf_4silx_4math_5combo_74__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_4silx_4math_5combo_18_min_max(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_data, int __pyx_v_min_positive); /* proto */
+static PyObject *__pyx_pf_4silx_4math_5combo_76__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_4silx_4math_5combo_20_min_max(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_data, int __pyx_v_min_positive); /* proto */
+static PyObject *__pyx_pf_4silx_4math_5combo_78__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_4silx_4math_5combo_22_min_max(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_data, int __pyx_v_min_positive); /* proto */
+static PyObject *__pyx_pf_4silx_4math_5combo_80__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_4silx_4math_5combo_24_min_max(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_data, int __pyx_v_min_positive); /* proto */
+static PyObject *__pyx_pf_4silx_4math_5combo_82__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_4silx_4math_5combo_26_min_max(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_data, int __pyx_v_min_positive); /* proto */
+static PyObject *__pyx_pf_4silx_4math_5combo_84__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_4silx_4math_5combo_28_min_max(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_data, int __pyx_v_min_positive); /* proto */
+static PyObject *__pyx_pf_4silx_4math_5combo_2_finite_min_max(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_signatures, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs, CYTHON_UNUSED PyObject *__pyx_v_defaults); /* proto */
+static PyObject *__pyx_pf_4silx_4math_5combo_90__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_4silx_4math_5combo_32_finite_min_max(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_data, int __pyx_v_min_positive); /* proto */
+static PyObject *__pyx_pf_4silx_4math_5combo_92__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_4silx_4math_5combo_34_finite_min_max(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_data, int __pyx_v_min_positive); /* proto */
+static PyObject *__pyx_pf_4silx_4math_5combo_4min_max(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_data, int __pyx_v_min_positive, int __pyx_v_finite); /* proto */
+static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, PyObject *__pyx_v_format, PyObject *__pyx_v_mode, int __pyx_v_allocate_buffer); /* proto */
+static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(struct __pyx_array_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */
+static void __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(struct __pyx_array_obj *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_15View_dot_MemoryView_5array_7memview___get__(struct __pyx_array_obj *__pyx_v_self); /* proto */
+static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__getattr__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_attr); /* proto */
+static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item); /* proto */
+static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__setitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value); /* proto */
+static int __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
+static PyObject *__pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(struct __pyx_MemviewEnum_obj *__pyx_v_self); /* proto */
+static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_v_flags, int __pyx_v_dtype_is_object); /* proto */
+static void __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
+static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index); /* proto */
+static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /* proto */
+static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbuffer__(struct __pyx_memoryview_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */
+static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
+static Py_ssize_t __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
+static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
+static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
+static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
+static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
+static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
+static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
+static void __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_15View_dot_MemoryView_16_memoryviewslice_4base___get__(struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */
+static PyObject *__pyx_tp_new_array(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_Enum(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_memoryview(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new__memoryviewslice(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_int_0;
+static PyObject *__pyx_int_1;
+static PyObject *__pyx_int_neg_1;
+static PyObject *__pyx_k__2;
+static PyObject *__pyx_k__21;
+static PyObject *__pyx_tuple_;
+static PyObject *__pyx_tuple__4;
+static PyObject *__pyx_tuple__6;
+static PyObject *__pyx_tuple__7;
+static PyObject *__pyx_tuple__8;
+static PyObject *__pyx_tuple__9;
+static PyObject *__pyx_slice__38;
+static PyObject *__pyx_slice__39;
+static PyObject *__pyx_slice__40;
+static PyObject *__pyx_tuple__10;
+static PyObject *__pyx_tuple__11;
+static PyObject *__pyx_tuple__12;
+static PyObject *__pyx_tuple__13;
+static PyObject *__pyx_tuple__14;
+static PyObject *__pyx_tuple__15;
+static PyObject *__pyx_tuple__16;
+static PyObject *__pyx_tuple__17;
+static PyObject *__pyx_tuple__18;
+static PyObject *__pyx_tuple__19;
+static PyObject *__pyx_tuple__20;
+static PyObject *__pyx_tuple__22;
+static PyObject *__pyx_tuple__23;
+static PyObject *__pyx_tuple__24;
+static PyObject *__pyx_tuple__25;
+static PyObject *__pyx_tuple__26;
+static PyObject *__pyx_tuple__27;
+static PyObject *__pyx_tuple__28;
+static PyObject *__pyx_tuple__29;
+static PyObject *__pyx_tuple__30;
+static PyObject *__pyx_tuple__31;
+static PyObject *__pyx_tuple__32;
+static PyObject *__pyx_tuple__33;
+static PyObject *__pyx_tuple__34;
+static PyObject *__pyx_tuple__35;
+static PyObject *__pyx_tuple__36;
+static PyObject *__pyx_tuple__37;
+static PyObject *__pyx_tuple__41;
+static PyObject *__pyx_tuple__42;
+static PyObject *__pyx_tuple__44;
+static PyObject *__pyx_tuple__46;
+static PyObject *__pyx_tuple__48;
+static PyObject *__pyx_tuple__50;
+static PyObject *__pyx_tuple__52;
+static PyObject *__pyx_tuple__53;
+static PyObject *__pyx_tuple__54;
+static PyObject *__pyx_tuple__55;
+static PyObject *__pyx_tuple__56;
+static PyObject *__pyx_codeobj__43;
+static PyObject *__pyx_codeobj__45;
+static PyObject *__pyx_codeobj__47;
+static PyObject *__pyx_codeobj__49;
+static PyObject *__pyx_codeobj__51;
+
+/* "silx/math/combo.pyx":81
+ *
+ * minimum = property(
+ * lambda self: self._minimum, # <<<<<<<<<<<<<<
+ * doc="Minimum value of the array")
+ * maximum = property(
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_4silx_4math_5combo_13_MinMaxResult_4lambda(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_4silx_4math_5combo_13_MinMaxResult_4lambda = {"lambda", (PyCFunction)__pyx_pw_4silx_4math_5combo_13_MinMaxResult_4lambda, METH_O, 0};
+static PyObject *__pyx_pw_4silx_4math_5combo_13_MinMaxResult_4lambda(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("lambda (wrapper)", 0);
+ __pyx_r = __pyx_lambda_funcdef_4silx_4math_5combo_13_MinMaxResult_lambda(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_lambda_funcdef_4silx_4math_5combo_13_MinMaxResult_lambda(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("lambda", 0);
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_minimum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 81, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("silx.math.combo._MinMaxResult.lambda", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "silx/math/combo.pyx":84
+ * doc="Minimum value of the array")
+ * maximum = property(
+ * lambda self: self._maximum, # <<<<<<<<<<<<<<
+ * doc="Maximum value of the array")
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_4silx_4math_5combo_13_MinMaxResult_5lambda1(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_4silx_4math_5combo_13_MinMaxResult_5lambda1 = {"lambda1", (PyCFunction)__pyx_pw_4silx_4math_5combo_13_MinMaxResult_5lambda1, METH_O, 0};
+static PyObject *__pyx_pw_4silx_4math_5combo_13_MinMaxResult_5lambda1(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("lambda1 (wrapper)", 0);
+ __pyx_r = __pyx_lambda_funcdef_4silx_4math_5combo_13_MinMaxResult_lambda1(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_lambda_funcdef_4silx_4math_5combo_13_MinMaxResult_lambda1(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("lambda1", 0);
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_maximum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 84, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("silx.math.combo._MinMaxResult.lambda1", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "silx/math/combo.pyx":88
+ *
+ * argmin = property(
+ * lambda self: self._argmin, # <<<<<<<<<<<<<<
+ * doc="Index of the first occurrence of the minimum value")
+ * argmax = property(
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_4silx_4math_5combo_13_MinMaxResult_6lambda2(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_4silx_4math_5combo_13_MinMaxResult_6lambda2 = {"lambda2", (PyCFunction)__pyx_pw_4silx_4math_5combo_13_MinMaxResult_6lambda2, METH_O, 0};
+static PyObject *__pyx_pw_4silx_4math_5combo_13_MinMaxResult_6lambda2(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("lambda2 (wrapper)", 0);
+ __pyx_r = __pyx_lambda_funcdef_4silx_4math_5combo_13_MinMaxResult_lambda2(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_lambda_funcdef_4silx_4math_5combo_13_MinMaxResult_lambda2(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("lambda2", 0);
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_argmin); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 88, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("silx.math.combo._MinMaxResult.lambda2", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "silx/math/combo.pyx":91
+ * doc="Index of the first occurrence of the minimum value")
+ * argmax = property(
+ * lambda self: self._argmax, # <<<<<<<<<<<<<<
+ * doc="Index of the first occurrence of the maximum value")
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_4silx_4math_5combo_13_MinMaxResult_7lambda3(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_4silx_4math_5combo_13_MinMaxResult_7lambda3 = {"lambda3", (PyCFunction)__pyx_pw_4silx_4math_5combo_13_MinMaxResult_7lambda3, METH_O, 0};
+static PyObject *__pyx_pw_4silx_4math_5combo_13_MinMaxResult_7lambda3(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("lambda3 (wrapper)", 0);
+ __pyx_r = __pyx_lambda_funcdef_4silx_4math_5combo_13_MinMaxResult_lambda3(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_lambda_funcdef_4silx_4math_5combo_13_MinMaxResult_lambda3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("lambda3", 0);
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_argmax); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 91, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("silx.math.combo._MinMaxResult.lambda3", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "silx/math/combo.pyx":95
+ *
+ * min_positive = property(
+ * lambda self: self._min_positive, # <<<<<<<<<<<<<<
+ * doc="""Strictly positive minimum value
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_4silx_4math_5combo_13_MinMaxResult_8lambda4(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_4silx_4math_5combo_13_MinMaxResult_8lambda4 = {"lambda4", (PyCFunction)__pyx_pw_4silx_4math_5combo_13_MinMaxResult_8lambda4, METH_O, 0};
+static PyObject *__pyx_pw_4silx_4math_5combo_13_MinMaxResult_8lambda4(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("lambda4 (wrapper)", 0);
+ __pyx_r = __pyx_lambda_funcdef_4silx_4math_5combo_13_MinMaxResult_lambda4(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_lambda_funcdef_4silx_4math_5combo_13_MinMaxResult_lambda4(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("lambda4", 0);
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_min_positive); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 95, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("silx.math.combo._MinMaxResult.lambda4", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "silx/math/combo.pyx":101
+ * """)
+ * argmin_positive = property(
+ * lambda self: self._argmin_positive, # <<<<<<<<<<<<<<
+ * doc="""Index of the strictly positive minimum value.
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_4silx_4math_5combo_13_MinMaxResult_9lambda5(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_4silx_4math_5combo_13_MinMaxResult_9lambda5 = {"lambda5", (PyCFunction)__pyx_pw_4silx_4math_5combo_13_MinMaxResult_9lambda5, METH_O, 0};
+static PyObject *__pyx_pw_4silx_4math_5combo_13_MinMaxResult_9lambda5(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("lambda5 (wrapper)", 0);
+ __pyx_r = __pyx_lambda_funcdef_4silx_4math_5combo_13_MinMaxResult_lambda5(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_lambda_funcdef_4silx_4math_5combo_13_MinMaxResult_lambda5(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("lambda5", 0);
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_argmin_positive); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 101, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("silx.math.combo._MinMaxResult.lambda5", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "silx/math/combo.pyx":70
+ * """Object storing result from :func:`min_max`"""
+ *
+ * def __init__(self, minimum, min_pos, maximum, # <<<<<<<<<<<<<<
+ * argmin, argmin_pos, argmax):
+ * self._minimum = minimum
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_4silx_4math_5combo_13_MinMaxResult_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_4silx_4math_5combo_13_MinMaxResult___init__[] = "_MinMaxResult.__init__(self, minimum, min_pos, maximum, argmin, argmin_pos, argmax)";
+static PyMethodDef __pyx_mdef_4silx_4math_5combo_13_MinMaxResult_1__init__ = {"__init__", (PyCFunction)__pyx_pw_4silx_4math_5combo_13_MinMaxResult_1__init__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4silx_4math_5combo_13_MinMaxResult___init__};
+static PyObject *__pyx_pw_4silx_4math_5combo_13_MinMaxResult_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_minimum = 0;
+ PyObject *__pyx_v_min_pos = 0;
+ PyObject *__pyx_v_maximum = 0;
+ PyObject *__pyx_v_argmin = 0;
+ PyObject *__pyx_v_argmin_pos = 0;
+ PyObject *__pyx_v_argmax = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_minimum_2,&__pyx_n_s_min_pos,&__pyx_n_s_maximum_2,&__pyx_n_s_argmin_2,&__pyx_n_s_argmin_pos,&__pyx_n_s_argmax_2,0};
+ PyObject* values[7] = {0,0,0,0,0,0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
+ case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_minimum_2)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 7, 7, 1); __PYX_ERR(0, 70, __pyx_L3_error)
+ }
+ case 2:
+ if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_min_pos)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 7, 7, 2); __PYX_ERR(0, 70, __pyx_L3_error)
+ }
+ case 3:
+ if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_maximum_2)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 7, 7, 3); __PYX_ERR(0, 70, __pyx_L3_error)
+ }
+ case 4:
+ if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_argmin_2)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 7, 7, 4); __PYX_ERR(0, 70, __pyx_L3_error)
+ }
+ case 5:
+ if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_argmin_pos)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 7, 7, 5); __PYX_ERR(0, 70, __pyx_L3_error)
+ }
+ case 6:
+ if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_argmax_2)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 7, 7, 6); __PYX_ERR(0, 70, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 70, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 7) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_minimum = values[1];
+ __pyx_v_min_pos = values[2];
+ __pyx_v_maximum = values[3];
+ __pyx_v_argmin = values[4];
+ __pyx_v_argmin_pos = values[5];
+ __pyx_v_argmax = values[6];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 7, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 70, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("silx.math.combo._MinMaxResult.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_4silx_4math_5combo_13_MinMaxResult___init__(__pyx_self, __pyx_v_self, __pyx_v_minimum, __pyx_v_min_pos, __pyx_v_maximum, __pyx_v_argmin, __pyx_v_argmin_pos, __pyx_v_argmax);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_4silx_4math_5combo_13_MinMaxResult___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_minimum, PyObject *__pyx_v_min_pos, PyObject *__pyx_v_maximum, PyObject *__pyx_v_argmin, PyObject *__pyx_v_argmin_pos, PyObject *__pyx_v_argmax) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__init__", 0);
+
+ /* "silx/math/combo.pyx":72
+ * def __init__(self, minimum, min_pos, maximum,
+ * argmin, argmin_pos, argmax):
+ * self._minimum = minimum # <<<<<<<<<<<<<<
+ * self._min_positive = min_pos
+ * self._maximum = maximum
+ */
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_minimum, __pyx_v_minimum) < 0) __PYX_ERR(0, 72, __pyx_L1_error)
+
+ /* "silx/math/combo.pyx":73
+ * argmin, argmin_pos, argmax):
+ * self._minimum = minimum
+ * self._min_positive = min_pos # <<<<<<<<<<<<<<
+ * self._maximum = maximum
+ *
+ */
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_min_positive, __pyx_v_min_pos) < 0) __PYX_ERR(0, 73, __pyx_L1_error)
+
+ /* "silx/math/combo.pyx":74
+ * self._minimum = minimum
+ * self._min_positive = min_pos
+ * self._maximum = maximum # <<<<<<<<<<<<<<
+ *
+ * self._argmin = argmin
+ */
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_maximum, __pyx_v_maximum) < 0) __PYX_ERR(0, 74, __pyx_L1_error)
+
+ /* "silx/math/combo.pyx":76
+ * self._maximum = maximum
+ *
+ * self._argmin = argmin # <<<<<<<<<<<<<<
+ * self._argmin_positive = argmin_pos
+ * self._argmax = argmax
+ */
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_argmin, __pyx_v_argmin) < 0) __PYX_ERR(0, 76, __pyx_L1_error)
+
+ /* "silx/math/combo.pyx":77
+ *
+ * self._argmin = argmin
+ * self._argmin_positive = argmin_pos # <<<<<<<<<<<<<<
+ * self._argmax = argmax
+ *
+ */
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_argmin_positive, __pyx_v_argmin_pos) < 0) __PYX_ERR(0, 77, __pyx_L1_error)
+
+ /* "silx/math/combo.pyx":78
+ * self._argmin = argmin
+ * self._argmin_positive = argmin_pos
+ * self._argmax = argmax # <<<<<<<<<<<<<<
+ *
+ * minimum = property(
+ */
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_argmax, __pyx_v_argmax) < 0) __PYX_ERR(0, 78, __pyx_L1_error)
+
+ /* "silx/math/combo.pyx":70
+ * """Object storing result from :func:`min_max`"""
+ *
+ * def __init__(self, minimum, min_pos, maximum, # <<<<<<<<<<<<<<
+ * argmin, argmin_pos, argmax):
+ * self._minimum = minimum
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_AddTraceback("silx.math.combo._MinMaxResult.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "silx/math/combo.pyx":107
+ * It is the index of the first occurrence.""")
+ *
+ * def __getitem__(self, key): # <<<<<<<<<<<<<<
+ * if key == 0:
+ * return self.minimum
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_4silx_4math_5combo_13_MinMaxResult_3__getitem__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_4silx_4math_5combo_13_MinMaxResult_2__getitem__[] = "_MinMaxResult.__getitem__(self, key)";
+static PyMethodDef __pyx_mdef_4silx_4math_5combo_13_MinMaxResult_3__getitem__ = {"__getitem__", (PyCFunction)__pyx_pw_4silx_4math_5combo_13_MinMaxResult_3__getitem__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4silx_4math_5combo_13_MinMaxResult_2__getitem__};
+static PyObject *__pyx_pw_4silx_4math_5combo_13_MinMaxResult_3__getitem__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_key = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_key,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_key)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__getitem__", 1, 2, 2, 1); __PYX_ERR(0, 107, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__getitem__") < 0)) __PYX_ERR(0, 107, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_key = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("__getitem__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 107, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("silx.math.combo._MinMaxResult.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_4silx_4math_5combo_13_MinMaxResult_2__getitem__(__pyx_self, __pyx_v_self, __pyx_v_key);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_4silx_4math_5combo_13_MinMaxResult_2__getitem__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ int __pyx_t_2;
+ __Pyx_RefNannySetupContext("__getitem__", 0);
+
+ /* "silx/math/combo.pyx":108
+ *
+ * def __getitem__(self, key):
+ * if key == 0: # <<<<<<<<<<<<<<
+ * return self.minimum
+ * elif key == 1:
+ */
+ __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_key, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 108, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 108, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (__pyx_t_2) {
+
+ /* "silx/math/combo.pyx":109
+ * def __getitem__(self, key):
+ * if key == 0:
+ * return self.minimum # <<<<<<<<<<<<<<
+ * elif key == 1:
+ * return self.maximum
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_minimum_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 109, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "silx/math/combo.pyx":108
+ *
+ * def __getitem__(self, key):
+ * if key == 0: # <<<<<<<<<<<<<<
+ * return self.minimum
+ * elif key == 1:
+ */
+ }
+
+ /* "silx/math/combo.pyx":110
+ * if key == 0:
+ * return self.minimum
+ * elif key == 1: # <<<<<<<<<<<<<<
+ * return self.maximum
+ * else:
+ */
+ __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_key, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 110, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 110, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (__pyx_t_2) {
+
+ /* "silx/math/combo.pyx":111
+ * return self.minimum
+ * elif key == 1:
+ * return self.maximum # <<<<<<<<<<<<<<
+ * else:
+ * raise IndexError("Index out of range")
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_maximum_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 111, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "silx/math/combo.pyx":110
+ * if key == 0:
+ * return self.minimum
+ * elif key == 1: # <<<<<<<<<<<<<<
+ * return self.maximum
+ * else:
+ */
+ }
+
+ /* "silx/math/combo.pyx":113
+ * return self.maximum
+ * else:
+ * raise IndexError("Index out of range") # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ /*else*/ {
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 113, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __PYX_ERR(0, 113, __pyx_L1_error)
+ }
+
+ /* "silx/math/combo.pyx":107
+ * It is the index of the first occurrence.""")
+ *
+ * def __getitem__(self, key): # <<<<<<<<<<<<<<
+ * if key == 0:
+ * return self.minimum
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("silx.math.combo._MinMaxResult.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "silx/math/combo.pyx":119
+ * @cython.boundscheck(False)
+ * @cython.wraparound(False)
+ * def _min_max(_number[::1] data, bint min_positive=False): # <<<<<<<<<<<<<<
+ * """:func:`min_max` implementation including infinite values
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_4silx_4math_5combo_1_min_max(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_4silx_4math_5combo__min_max[] = "_min_max(signatures, args, kwargs, defaults)\n:func:`min_max` implementation including infinite values\n\n See :func:`min_max` for documentation.\n ";
+static PyMethodDef __pyx_mdef_4silx_4math_5combo_1_min_max = {"_min_max", (PyCFunction)__pyx_pw_4silx_4math_5combo_1_min_max, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4silx_4math_5combo__min_max};
+static PyObject *__pyx_pw_4silx_4math_5combo_1_min_max(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_signatures = 0;
+ PyObject *__pyx_v_args = 0;
+ PyObject *__pyx_v_kwargs = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_defaults = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__pyx_fused_cpdef (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_signatures,&__pyx_n_s_args,&__pyx_n_s_kwargs,&__pyx_n_s_defaults,0};
+ PyObject* values[4] = {0,0,0,0};
+ values[1] = __pyx_k__2;
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_signatures)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ case 1:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_args);
+ if (value) { values[1] = value; kw_args--; }
+ }
+ case 2:
+ if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_kwargs)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 1, 4, 4, 2); __PYX_ERR(0, 119, __pyx_L3_error)
+ }
+ case 3:
+ if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_defaults)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 1, 4, 4, 3); __PYX_ERR(0, 119, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_fused_cpdef") < 0)) __PYX_ERR(0, 119, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ }
+ __pyx_v_signatures = values[0];
+ __pyx_v_args = values[1];
+ __pyx_v_kwargs = values[2];
+ __pyx_v_defaults = values[3];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 119, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("silx.math.combo.__pyx_fused_cpdef", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_4silx_4math_5combo__min_max(__pyx_self, __pyx_v_signatures, __pyx_v_args, __pyx_v_kwargs, __pyx_v_defaults);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_4silx_4math_5combo__min_max(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_signatures, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs, CYTHON_UNUSED PyObject *__pyx_v_defaults) {
+ PyObject *__pyx_v_dest_sig = NULL;
+ PyTypeObject *__pyx_v_ndarray = 0;
+ PyObject *__pyx_v_numpy = NULL;
+ __Pyx_memviewslice __pyx_v_memslice;
+ Py_ssize_t __pyx_v_itemsize;
+ int __pyx_v_dtype_signed;
+ char __pyx_v_kind;
+ int __pyx_v_long_is_signed;
+ int __pyx_v_long_long_is_signed;
+ int __pyx_v_unsigned_short_is_signed;
+ int __pyx_v_short_is_signed;
+ int __pyx_v_int_is_signed;
+ int __pyx_v_unsigned_long_long_is_signed;
+ int __pyx_v_signed_char_is_signed;
+ int __pyx_v_unsigned_long_is_signed;
+ int __pyx_v_unsigned_char_is_signed;
+ int __pyx_v_unsigned_int_is_signed;
+ PyObject *__pyx_v_arg = NULL;
+ PyObject *__pyx_v_dtype = NULL;
+ PyObject *__pyx_v_arg_base = NULL;
+ PyObject *__pyx_v_candidates = NULL;
+ PyObject *__pyx_v_sig = NULL;
+ int __pyx_v_match_found;
+ PyObject *__pyx_v_src_type = NULL;
+ PyObject *__pyx_v_dst_type = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ int __pyx_t_2;
+ int __pyx_t_3;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ int __pyx_t_7;
+ PyObject *__pyx_t_8 = NULL;
+ PyObject *__pyx_t_9 = NULL;
+ Py_ssize_t __pyx_t_10;
+ long __pyx_t_11;
+ __Pyx_memviewslice __pyx_t_12;
+ Py_ssize_t __pyx_t_13;
+ int __pyx_t_14;
+ Py_ssize_t __pyx_t_15;
+ PyObject *(*__pyx_t_16)(PyObject *);
+ PyObject *__pyx_t_17 = NULL;
+ PyObject *__pyx_t_18 = NULL;
+ PyObject *__pyx_t_19 = NULL;
+ PyObject *(*__pyx_t_20)(PyObject *);
+ int __pyx_t_21;
+ __Pyx_RefNannySetupContext("_min_max", 0);
+ __Pyx_INCREF(__pyx_v_kwargs);
+ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(Py_None);
+ __Pyx_GIVEREF(Py_None);
+ PyList_SET_ITEM(__pyx_t_1, 0, Py_None);
+ __pyx_v_dest_sig = ((PyObject*)__pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_2 = (__pyx_v_kwargs == Py_None);
+ __pyx_t_3 = (__pyx_t_2 != 0);
+ if (__pyx_t_3) {
+ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF_SET(__pyx_v_kwargs, __pyx_t_1);
+ __pyx_t_1 = 0;
+ }
+ {
+ __Pyx_PyThreadState_declare
+ __Pyx_PyThreadState_assign
+ __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
+ __Pyx_XGOTREF(__pyx_t_4);
+ __Pyx_XGOTREF(__pyx_t_5);
+ __Pyx_XGOTREF(__pyx_t_6);
+ /*try:*/ {
+ __pyx_t_1 = __Pyx_Import(__pyx_n_s_numpy, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L4_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_v_numpy = __pyx_t_1;
+ __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_numpy, __pyx_n_s_ndarray); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L4_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (!(likely(PyType_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "type", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 119, __pyx_L4_error)
+ __pyx_v_ndarray = ((PyTypeObject*)__pyx_t_1);
+ __pyx_t_1 = 0;
+ }
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ goto __pyx_L11_try_end;
+ __pyx_L4_error:;
+ __Pyx_PyThreadState_assign
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ImportError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError);
+ if (__pyx_t_7) {
+ __Pyx_AddTraceback("silx.math.combo.__pyx_fused_cpdef", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_8, &__pyx_t_9) < 0) __PYX_ERR(0, 119, __pyx_L6_except_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_INCREF(Py_None);
+ __Pyx_XDECREF_SET(__pyx_v_ndarray, ((PyTypeObject*)Py_None));
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ goto __pyx_L5_exception_handled;
+ }
+ goto __pyx_L6_except_error;
+ __pyx_L6_except_error:;
+ __Pyx_PyThreadState_assign
+ __Pyx_XGIVEREF(__pyx_t_4);
+ __Pyx_XGIVEREF(__pyx_t_5);
+ __Pyx_XGIVEREF(__pyx_t_6);
+ __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
+ goto __pyx_L1_error;
+ __pyx_L5_exception_handled:;
+ __Pyx_PyThreadState_assign
+ __Pyx_XGIVEREF(__pyx_t_4);
+ __Pyx_XGIVEREF(__pyx_t_5);
+ __Pyx_XGIVEREF(__pyx_t_6);
+ __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
+ __pyx_L11_try_end:;
+ }
+ __pyx_v_itemsize = -1L;
+ __pyx_v_long_is_signed = (((long)-1L) < 0);
+ __pyx_v_long_long_is_signed = (((PY_LONG_LONG)-1L) < 0);
+ __pyx_v_unsigned_short_is_signed = (((unsigned short)-1L) < 0);
+ __pyx_v_short_is_signed = (((short)-1L) < 0);
+ __pyx_v_int_is_signed = (((int)-1L) < 0);
+ __pyx_v_unsigned_long_long_is_signed = (((unsigned PY_LONG_LONG)-1L) < 0);
+ __pyx_v_signed_char_is_signed = (((signed char)-1L) < 0);
+ __pyx_v_unsigned_long_is_signed = (((unsigned long)-1L) < 0);
+ __pyx_v_unsigned_char_is_signed = (((unsigned char)-1L) < 0);
+ __pyx_v_unsigned_int_is_signed = (((unsigned int)-1L) < 0);
+ if (unlikely(__pyx_v_args == Py_None)) {
+ PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
+ __PYX_ERR(0, 119, __pyx_L1_error)
+ }
+ __pyx_t_10 = PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __pyx_t_3 = ((0 < __pyx_t_10) != 0);
+ if (__pyx_t_3) {
+ if (unlikely(__pyx_v_args == Py_None)) {
+ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
+ __PYX_ERR(0, 119, __pyx_L1_error)
+ }
+ __pyx_t_9 = PyTuple_GET_ITEM(((PyObject*)__pyx_v_args), 0);
+ __Pyx_INCREF(__pyx_t_9);
+ __pyx_v_arg = __pyx_t_9;
+ __pyx_t_9 = 0;
+ goto __pyx_L14;
+ }
+ if (unlikely(__pyx_v_kwargs == Py_None)) {
+ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
+ __PYX_ERR(0, 119, __pyx_L1_error)
+ }
+ __pyx_t_3 = (__Pyx_PyDict_ContainsTF(__pyx_n_s_data, ((PyObject*)__pyx_v_kwargs), Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __pyx_t_2 = (__pyx_t_3 != 0);
+ if (__pyx_t_2) {
+ if (unlikely(__pyx_v_kwargs == Py_None)) {
+ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
+ __PYX_ERR(0, 119, __pyx_L1_error)
+ }
+ __pyx_t_9 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_kwargs), __pyx_n_s_data); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_v_arg = __pyx_t_9;
+ __pyx_t_9 = 0;
+ goto __pyx_L14;
+ }
+ /*else*/ {
+ if (unlikely(__pyx_v_args == Py_None)) {
+ PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
+ __PYX_ERR(0, 119, __pyx_L1_error)
+ }
+ __pyx_t_10 = PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __pyx_t_9 = PyInt_FromSsize_t(__pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_8 = __Pyx_PyString_Format(__pyx_kp_s_Expected_at_least_d_arguments, __pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_GIVEREF(__pyx_t_8);
+ PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8);
+ __pyx_t_8 = 0;
+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_9, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_Raise(__pyx_t_8, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __PYX_ERR(0, 119, __pyx_L1_error)
+ }
+ __pyx_L14:;
+ while (1) {
+ __pyx_t_2 = (__pyx_v_ndarray != ((PyTypeObject*)Py_None));
+ __pyx_t_3 = (__pyx_t_2 != 0);
+ if (__pyx_t_3) {
+ __pyx_t_3 = __Pyx_TypeCheck(__pyx_v_arg, __pyx_v_ndarray);
+ __pyx_t_2 = (__pyx_t_3 != 0);
+ if (__pyx_t_2) {
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_dtype); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_v_dtype = __pyx_t_8;
+ __pyx_t_8 = 0;
+ goto __pyx_L18;
+ }
+ __pyx_t_2 = __pyx_memoryview_check(__pyx_v_arg);
+ __pyx_t_3 = (__pyx_t_2 != 0);
+ if (__pyx_t_3) {
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_base); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_v_arg_base = __pyx_t_8;
+ __pyx_t_8 = 0;
+ __pyx_t_3 = __Pyx_TypeCheck(__pyx_v_arg_base, __pyx_v_ndarray);
+ __pyx_t_2 = (__pyx_t_3 != 0);
+ if (__pyx_t_2) {
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg_base, __pyx_n_s_dtype); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_v_dtype = __pyx_t_8;
+ __pyx_t_8 = 0;
+ goto __pyx_L19;
+ }
+ /*else*/ {
+ __Pyx_INCREF(Py_None);
+ __pyx_v_dtype = Py_None;
+ }
+ __pyx_L19:;
+ goto __pyx_L18;
+ }
+ /*else*/ {
+ __Pyx_INCREF(Py_None);
+ __pyx_v_dtype = Py_None;
+ }
+ __pyx_L18:;
+ __pyx_v_itemsize = -1L;
+ __pyx_t_2 = (__pyx_v_dtype != Py_None);
+ __pyx_t_3 = (__pyx_t_2 != 0);
+ if (__pyx_t_3) {
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_itemsize); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 119, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_v_itemsize = __pyx_t_10;
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_kind); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_11 = __Pyx_PyObject_Ord(__pyx_t_8); if (unlikely(__pyx_t_11 == (long)(Py_UCS4)-1)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_v_kind = __pyx_t_11;
+ __pyx_v_dtype_signed = (__pyx_v_kind == 'i');
+ switch (__pyx_v_kind) {
+ case 'i':
+ case 'u':
+ __pyx_t_2 = (((sizeof(signed char)) == __pyx_v_itemsize) != 0);
+ if (__pyx_t_2) {
+ } else {
+ __pyx_t_3 = __pyx_t_2;
+ goto __pyx_L22_bool_binop_done;
+ }
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 119, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_2 = ((((Py_ssize_t)__pyx_t_10) == 1) != 0);
+ if (__pyx_t_2) {
+ } else {
+ __pyx_t_3 = __pyx_t_2;
+ goto __pyx_L22_bool_binop_done;
+ }
+ __pyx_t_2 = ((!((__pyx_v_signed_char_is_signed ^ __pyx_v_dtype_signed) != 0)) != 0);
+ __pyx_t_3 = __pyx_t_2;
+ __pyx_L22_bool_binop_done:;
+ if (__pyx_t_3) {
+ if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_kp_s_signed_char, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 119, __pyx_L1_error)
+ goto __pyx_L16_break;
+ }
+ __pyx_t_2 = (((sizeof(short)) == __pyx_v_itemsize) != 0);
+ if (__pyx_t_2) {
+ } else {
+ __pyx_t_3 = __pyx_t_2;
+ goto __pyx_L26_bool_binop_done;
+ }
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 119, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_2 = ((((Py_ssize_t)__pyx_t_10) == 1) != 0);
+ if (__pyx_t_2) {
+ } else {
+ __pyx_t_3 = __pyx_t_2;
+ goto __pyx_L26_bool_binop_done;
+ }
+ __pyx_t_2 = ((!((__pyx_v_short_is_signed ^ __pyx_v_dtype_signed) != 0)) != 0);
+ __pyx_t_3 = __pyx_t_2;
+ __pyx_L26_bool_binop_done:;
+ if (__pyx_t_3) {
+ if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_short, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 119, __pyx_L1_error)
+ goto __pyx_L16_break;
+ }
+ __pyx_t_2 = (((sizeof(int)) == __pyx_v_itemsize) != 0);
+ if (__pyx_t_2) {
+ } else {
+ __pyx_t_3 = __pyx_t_2;
+ goto __pyx_L30_bool_binop_done;
+ }
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 119, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_2 = ((((Py_ssize_t)__pyx_t_10) == 1) != 0);
+ if (__pyx_t_2) {
+ } else {
+ __pyx_t_3 = __pyx_t_2;
+ goto __pyx_L30_bool_binop_done;
+ }
+ __pyx_t_2 = ((!((__pyx_v_int_is_signed ^ __pyx_v_dtype_signed) != 0)) != 0);
+ __pyx_t_3 = __pyx_t_2;
+ __pyx_L30_bool_binop_done:;
+ if (__pyx_t_3) {
+ if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_int, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 119, __pyx_L1_error)
+ goto __pyx_L16_break;
+ }
+ __pyx_t_2 = (((sizeof(long)) == __pyx_v_itemsize) != 0);
+ if (__pyx_t_2) {
+ } else {
+ __pyx_t_3 = __pyx_t_2;
+ goto __pyx_L34_bool_binop_done;
+ }
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 119, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_2 = ((((Py_ssize_t)__pyx_t_10) == 1) != 0);
+ if (__pyx_t_2) {
+ } else {
+ __pyx_t_3 = __pyx_t_2;
+ goto __pyx_L34_bool_binop_done;
+ }
+ __pyx_t_2 = ((!((__pyx_v_long_is_signed ^ __pyx_v_dtype_signed) != 0)) != 0);
+ __pyx_t_3 = __pyx_t_2;
+ __pyx_L34_bool_binop_done:;
+ if (__pyx_t_3) {
+ if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_long, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 119, __pyx_L1_error)
+ goto __pyx_L16_break;
+ }
+ __pyx_t_2 = (((sizeof(PY_LONG_LONG)) == __pyx_v_itemsize) != 0);
+ if (__pyx_t_2) {
+ } else {
+ __pyx_t_3 = __pyx_t_2;
+ goto __pyx_L38_bool_binop_done;
+ }
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 119, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_2 = ((((Py_ssize_t)__pyx_t_10) == 1) != 0);
+ if (__pyx_t_2) {
+ } else {
+ __pyx_t_3 = __pyx_t_2;
+ goto __pyx_L38_bool_binop_done;
+ }
+ __pyx_t_2 = ((!((__pyx_v_long_long_is_signed ^ __pyx_v_dtype_signed) != 0)) != 0);
+ __pyx_t_3 = __pyx_t_2;
+ __pyx_L38_bool_binop_done:;
+ if (__pyx_t_3) {
+ if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_kp_s_long_long, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 119, __pyx_L1_error)
+ goto __pyx_L16_break;
+ }
+ __pyx_t_2 = (((sizeof(unsigned char)) == __pyx_v_itemsize) != 0);
+ if (__pyx_t_2) {
+ } else {
+ __pyx_t_3 = __pyx_t_2;
+ goto __pyx_L42_bool_binop_done;
+ }
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 119, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_2 = ((((Py_ssize_t)__pyx_t_10) == 1) != 0);
+ if (__pyx_t_2) {
+ } else {
+ __pyx_t_3 = __pyx_t_2;
+ goto __pyx_L42_bool_binop_done;
+ }
+ __pyx_t_2 = ((!((__pyx_v_unsigned_char_is_signed ^ __pyx_v_dtype_signed) != 0)) != 0);
+ __pyx_t_3 = __pyx_t_2;
+ __pyx_L42_bool_binop_done:;
+ if (__pyx_t_3) {
+ if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_kp_s_unsigned_char, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 119, __pyx_L1_error)
+ goto __pyx_L16_break;
+ }
+ __pyx_t_2 = (((sizeof(unsigned short)) == __pyx_v_itemsize) != 0);
+ if (__pyx_t_2) {
+ } else {
+ __pyx_t_3 = __pyx_t_2;
+ goto __pyx_L46_bool_binop_done;
+ }
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 119, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_2 = ((((Py_ssize_t)__pyx_t_10) == 1) != 0);
+ if (__pyx_t_2) {
+ } else {
+ __pyx_t_3 = __pyx_t_2;
+ goto __pyx_L46_bool_binop_done;
+ }
+ __pyx_t_2 = ((!((__pyx_v_unsigned_short_is_signed ^ __pyx_v_dtype_signed) != 0)) != 0);
+ __pyx_t_3 = __pyx_t_2;
+ __pyx_L46_bool_binop_done:;
+ if (__pyx_t_3) {
+ if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_kp_s_unsigned_short, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 119, __pyx_L1_error)
+ goto __pyx_L16_break;
+ }
+ __pyx_t_2 = (((sizeof(unsigned int)) == __pyx_v_itemsize) != 0);
+ if (__pyx_t_2) {
+ } else {
+ __pyx_t_3 = __pyx_t_2;
+ goto __pyx_L50_bool_binop_done;
+ }
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 119, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_2 = ((((Py_ssize_t)__pyx_t_10) == 1) != 0);
+ if (__pyx_t_2) {
+ } else {
+ __pyx_t_3 = __pyx_t_2;
+ goto __pyx_L50_bool_binop_done;
+ }
+ __pyx_t_2 = ((!((__pyx_v_unsigned_int_is_signed ^ __pyx_v_dtype_signed) != 0)) != 0);
+ __pyx_t_3 = __pyx_t_2;
+ __pyx_L50_bool_binop_done:;
+ if (__pyx_t_3) {
+ if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_kp_s_unsigned_int, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 119, __pyx_L1_error)
+ goto __pyx_L16_break;
+ }
+ __pyx_t_2 = (((sizeof(unsigned long)) == __pyx_v_itemsize) != 0);
+ if (__pyx_t_2) {
+ } else {
+ __pyx_t_3 = __pyx_t_2;
+ goto __pyx_L54_bool_binop_done;
+ }
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 119, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_2 = ((((Py_ssize_t)__pyx_t_10) == 1) != 0);
+ if (__pyx_t_2) {
+ } else {
+ __pyx_t_3 = __pyx_t_2;
+ goto __pyx_L54_bool_binop_done;
+ }
+ __pyx_t_2 = ((!((__pyx_v_unsigned_long_is_signed ^ __pyx_v_dtype_signed) != 0)) != 0);
+ __pyx_t_3 = __pyx_t_2;
+ __pyx_L54_bool_binop_done:;
+ if (__pyx_t_3) {
+ if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_kp_s_unsigned_long, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 119, __pyx_L1_error)
+ goto __pyx_L16_break;
+ }
+ __pyx_t_2 = (((sizeof(unsigned PY_LONG_LONG)) == __pyx_v_itemsize) != 0);
+ if (__pyx_t_2) {
+ } else {
+ __pyx_t_3 = __pyx_t_2;
+ goto __pyx_L58_bool_binop_done;
+ }
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 119, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_2 = ((((Py_ssize_t)__pyx_t_10) == 1) != 0);
+ if (__pyx_t_2) {
+ } else {
+ __pyx_t_3 = __pyx_t_2;
+ goto __pyx_L58_bool_binop_done;
+ }
+ __pyx_t_2 = ((!((__pyx_v_unsigned_long_long_is_signed ^ __pyx_v_dtype_signed) != 0)) != 0);
+ __pyx_t_3 = __pyx_t_2;
+ __pyx_L58_bool_binop_done:;
+ if (__pyx_t_3) {
+ if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_kp_s_unsigned_long_long, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 119, __pyx_L1_error)
+ goto __pyx_L16_break;
+ }
+ break;
+ case 'f':
+ __pyx_t_2 = (((sizeof(float)) == __pyx_v_itemsize) != 0);
+ if (__pyx_t_2) {
+ } else {
+ __pyx_t_3 = __pyx_t_2;
+ goto __pyx_L62_bool_binop_done;
+ }
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 119, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_2 = ((((Py_ssize_t)__pyx_t_10) == 1) != 0);
+ __pyx_t_3 = __pyx_t_2;
+ __pyx_L62_bool_binop_done:;
+ if (__pyx_t_3) {
+ if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_float, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 119, __pyx_L1_error)
+ goto __pyx_L16_break;
+ }
+ __pyx_t_2 = (((sizeof(double)) == __pyx_v_itemsize) != 0);
+ if (__pyx_t_2) {
+ } else {
+ __pyx_t_3 = __pyx_t_2;
+ goto __pyx_L65_bool_binop_done;
+ }
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 119, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_2 = ((((Py_ssize_t)__pyx_t_10) == 1) != 0);
+ __pyx_t_3 = __pyx_t_2;
+ __pyx_L65_bool_binop_done:;
+ if (__pyx_t_3) {
+ if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_double, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 119, __pyx_L1_error)
+ goto __pyx_L16_break;
+ }
+ break;
+ case 'c':
+ break;
+ case 'O':
+ break;
+ default: break;
+ }
+ }
+ }
+ __pyx_t_2 = ((__pyx_v_itemsize == -1L) != 0);
+ if (!__pyx_t_2) {
+ } else {
+ __pyx_t_3 = __pyx_t_2;
+ goto __pyx_L68_bool_binop_done;
+ }
+ __pyx_t_2 = ((__pyx_v_itemsize == (sizeof(float))) != 0);
+ __pyx_t_3 = __pyx_t_2;
+ __pyx_L68_bool_binop_done:;
+ if (__pyx_t_3) {
+ __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_dc_float(__pyx_v_arg);
+ __pyx_v_memslice = __pyx_t_12;
+ __pyx_t_3 = (__pyx_v_memslice.memview != 0);
+ if (__pyx_t_3) {
+ __PYX_XDEC_MEMVIEW((&__pyx_v_memslice), 1);
+ if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_float, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 119, __pyx_L1_error)
+ goto __pyx_L16_break;
+ }
+ /*else*/ {
+ PyErr_Clear();
+ }
+ }
+ __pyx_t_2 = ((__pyx_v_itemsize == -1L) != 0);
+ if (!__pyx_t_2) {
+ } else {
+ __pyx_t_3 = __pyx_t_2;
+ goto __pyx_L72_bool_binop_done;
+ }
+ __pyx_t_2 = ((__pyx_v_itemsize == (sizeof(double))) != 0);
+ __pyx_t_3 = __pyx_t_2;
+ __pyx_L72_bool_binop_done:;
+ if (__pyx_t_3) {
+ __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_dc_double(__pyx_v_arg);
+ __pyx_v_memslice = __pyx_t_12;
+ __pyx_t_3 = (__pyx_v_memslice.memview != 0);
+ if (__pyx_t_3) {
+ __PYX_XDEC_MEMVIEW((&__pyx_v_memslice), 1);
+ if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_double, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 119, __pyx_L1_error)
+ goto __pyx_L16_break;
+ }
+ /*else*/ {
+ PyErr_Clear();
+ }
+ }
+ __pyx_t_2 = ((__pyx_v_itemsize == -1L) != 0);
+ if (!__pyx_t_2) {
+ } else {
+ __pyx_t_3 = __pyx_t_2;
+ goto __pyx_L76_bool_binop_done;
+ }
+ __pyx_t_2 = ((__pyx_v_itemsize == (sizeof(signed char))) != 0);
+ __pyx_t_3 = __pyx_t_2;
+ __pyx_L76_bool_binop_done:;
+ if (__pyx_t_3) {
+ __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_dc_signed__char(__pyx_v_arg);
+ __pyx_v_memslice = __pyx_t_12;
+ __pyx_t_3 = (__pyx_v_memslice.memview != 0);
+ if (__pyx_t_3) {
+ __PYX_XDEC_MEMVIEW((&__pyx_v_memslice), 1);
+ if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_kp_s_signed_char, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 119, __pyx_L1_error)
+ goto __pyx_L16_break;
+ }
+ /*else*/ {
+ PyErr_Clear();
+ }
+ }
+ __pyx_t_2 = ((__pyx_v_itemsize == -1L) != 0);
+ if (!__pyx_t_2) {
+ } else {
+ __pyx_t_3 = __pyx_t_2;
+ goto __pyx_L80_bool_binop_done;
+ }
+ __pyx_t_2 = ((__pyx_v_itemsize == (sizeof(short))) != 0);
+ __pyx_t_3 = __pyx_t_2;
+ __pyx_L80_bool_binop_done:;
+ if (__pyx_t_3) {
+ __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_dc_short(__pyx_v_arg);
+ __pyx_v_memslice = __pyx_t_12;
+ __pyx_t_3 = (__pyx_v_memslice.memview != 0);
+ if (__pyx_t_3) {
+ __PYX_XDEC_MEMVIEW((&__pyx_v_memslice), 1);
+ if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_short, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 119, __pyx_L1_error)
+ goto __pyx_L16_break;
+ }
+ /*else*/ {
+ PyErr_Clear();
+ }
+ }
+ __pyx_t_2 = ((__pyx_v_itemsize == -1L) != 0);
+ if (!__pyx_t_2) {
+ } else {
+ __pyx_t_3 = __pyx_t_2;
+ goto __pyx_L84_bool_binop_done;
+ }
+ __pyx_t_2 = ((__pyx_v_itemsize == (sizeof(int))) != 0);
+ __pyx_t_3 = __pyx_t_2;
+ __pyx_L84_bool_binop_done:;
+ if (__pyx_t_3) {
+ __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_dc_int(__pyx_v_arg);
+ __pyx_v_memslice = __pyx_t_12;
+ __pyx_t_3 = (__pyx_v_memslice.memview != 0);
+ if (__pyx_t_3) {
+ __PYX_XDEC_MEMVIEW((&__pyx_v_memslice), 1);
+ if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_int, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 119, __pyx_L1_error)
+ goto __pyx_L16_break;
+ }
+ /*else*/ {
+ PyErr_Clear();
+ }
+ }
+ __pyx_t_2 = ((__pyx_v_itemsize == -1L) != 0);
+ if (!__pyx_t_2) {
+ } else {
+ __pyx_t_3 = __pyx_t_2;
+ goto __pyx_L88_bool_binop_done;
+ }
+ __pyx_t_2 = ((__pyx_v_itemsize == (sizeof(long))) != 0);
+ __pyx_t_3 = __pyx_t_2;
+ __pyx_L88_bool_binop_done:;
+ if (__pyx_t_3) {
+ __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_dc_long(__pyx_v_arg);
+ __pyx_v_memslice = __pyx_t_12;
+ __pyx_t_3 = (__pyx_v_memslice.memview != 0);
+ if (__pyx_t_3) {
+ __PYX_XDEC_MEMVIEW((&__pyx_v_memslice), 1);
+ if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_long, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 119, __pyx_L1_error)
+ goto __pyx_L16_break;
+ }
+ /*else*/ {
+ PyErr_Clear();
+ }
+ }
+ __pyx_t_2 = ((__pyx_v_itemsize == -1L) != 0);
+ if (!__pyx_t_2) {
+ } else {
+ __pyx_t_3 = __pyx_t_2;
+ goto __pyx_L92_bool_binop_done;
+ }
+ __pyx_t_2 = ((__pyx_v_itemsize == (sizeof(PY_LONG_LONG))) != 0);
+ __pyx_t_3 = __pyx_t_2;
+ __pyx_L92_bool_binop_done:;
+ if (__pyx_t_3) {
+ __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_dc_PY_LONG_LONG(__pyx_v_arg);
+ __pyx_v_memslice = __pyx_t_12;
+ __pyx_t_3 = (__pyx_v_memslice.memview != 0);
+ if (__pyx_t_3) {
+ __PYX_XDEC_MEMVIEW((&__pyx_v_memslice), 1);
+ if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_kp_s_long_long, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 119, __pyx_L1_error)
+ goto __pyx_L16_break;
+ }
+ /*else*/ {
+ PyErr_Clear();
+ }
+ }
+ __pyx_t_2 = ((__pyx_v_itemsize == -1L) != 0);
+ if (!__pyx_t_2) {
+ } else {
+ __pyx_t_3 = __pyx_t_2;
+ goto __pyx_L96_bool_binop_done;
+ }
+ __pyx_t_2 = ((__pyx_v_itemsize == (sizeof(unsigned char))) != 0);
+ __pyx_t_3 = __pyx_t_2;
+ __pyx_L96_bool_binop_done:;
+ if (__pyx_t_3) {
+ __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_dc_unsigned_char(__pyx_v_arg);
+ __pyx_v_memslice = __pyx_t_12;
+ __pyx_t_3 = (__pyx_v_memslice.memview != 0);
+ if (__pyx_t_3) {
+ __PYX_XDEC_MEMVIEW((&__pyx_v_memslice), 1);
+ if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_kp_s_unsigned_char, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 119, __pyx_L1_error)
+ goto __pyx_L16_break;
+ }
+ /*else*/ {
+ PyErr_Clear();
+ }
+ }
+ __pyx_t_2 = ((__pyx_v_itemsize == -1L) != 0);
+ if (!__pyx_t_2) {
+ } else {
+ __pyx_t_3 = __pyx_t_2;
+ goto __pyx_L100_bool_binop_done;
+ }
+ __pyx_t_2 = ((__pyx_v_itemsize == (sizeof(unsigned short))) != 0);
+ __pyx_t_3 = __pyx_t_2;
+ __pyx_L100_bool_binop_done:;
+ if (__pyx_t_3) {
+ __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_dc_unsigned_short(__pyx_v_arg);
+ __pyx_v_memslice = __pyx_t_12;
+ __pyx_t_3 = (__pyx_v_memslice.memview != 0);
+ if (__pyx_t_3) {
+ __PYX_XDEC_MEMVIEW((&__pyx_v_memslice), 1);
+ if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_kp_s_unsigned_short, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 119, __pyx_L1_error)
+ goto __pyx_L16_break;
+ }
+ /*else*/ {
+ PyErr_Clear();
+ }
+ }
+ __pyx_t_2 = ((__pyx_v_itemsize == -1L) != 0);
+ if (!__pyx_t_2) {
+ } else {
+ __pyx_t_3 = __pyx_t_2;
+ goto __pyx_L104_bool_binop_done;
+ }
+ __pyx_t_2 = ((__pyx_v_itemsize == (sizeof(unsigned int))) != 0);
+ __pyx_t_3 = __pyx_t_2;
+ __pyx_L104_bool_binop_done:;
+ if (__pyx_t_3) {
+ __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_dc_unsigned_int(__pyx_v_arg);
+ __pyx_v_memslice = __pyx_t_12;
+ __pyx_t_3 = (__pyx_v_memslice.memview != 0);
+ if (__pyx_t_3) {
+ __PYX_XDEC_MEMVIEW((&__pyx_v_memslice), 1);
+ if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_kp_s_unsigned_int, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 119, __pyx_L1_error)
+ goto __pyx_L16_break;
+ }
+ /*else*/ {
+ PyErr_Clear();
+ }
+ }
+ __pyx_t_2 = ((__pyx_v_itemsize == -1L) != 0);
+ if (!__pyx_t_2) {
+ } else {
+ __pyx_t_3 = __pyx_t_2;
+ goto __pyx_L108_bool_binop_done;
+ }
+ __pyx_t_2 = ((__pyx_v_itemsize == (sizeof(unsigned long))) != 0);
+ __pyx_t_3 = __pyx_t_2;
+ __pyx_L108_bool_binop_done:;
+ if (__pyx_t_3) {
+ __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_dc_unsigned_long(__pyx_v_arg);
+ __pyx_v_memslice = __pyx_t_12;
+ __pyx_t_3 = (__pyx_v_memslice.memview != 0);
+ if (__pyx_t_3) {
+ __PYX_XDEC_MEMVIEW((&__pyx_v_memslice), 1);
+ if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_kp_s_unsigned_long, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 119, __pyx_L1_error)
+ goto __pyx_L16_break;
+ }
+ /*else*/ {
+ PyErr_Clear();
+ }
+ }
+ __pyx_t_2 = ((__pyx_v_itemsize == -1L) != 0);
+ if (!__pyx_t_2) {
+ } else {
+ __pyx_t_3 = __pyx_t_2;
+ goto __pyx_L112_bool_binop_done;
+ }
+ __pyx_t_2 = ((__pyx_v_itemsize == (sizeof(unsigned PY_LONG_LONG))) != 0);
+ __pyx_t_3 = __pyx_t_2;
+ __pyx_L112_bool_binop_done:;
+ if (__pyx_t_3) {
+ __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_dc_unsigned_PY_LONG_LONG(__pyx_v_arg);
+ __pyx_v_memslice = __pyx_t_12;
+ __pyx_t_3 = (__pyx_v_memslice.memview != 0);
+ if (__pyx_t_3) {
+ __PYX_XDEC_MEMVIEW((&__pyx_v_memslice), 1);
+ if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_kp_s_unsigned_long_long, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 119, __pyx_L1_error)
+ goto __pyx_L16_break;
+ }
+ /*else*/ {
+ PyErr_Clear();
+ }
+ }
+ if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, Py_None, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 119, __pyx_L1_error)
+ goto __pyx_L16_break;
+ }
+ __pyx_L16_break:;
+ __pyx_t_8 = PyList_New(0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_v_candidates = ((PyObject*)__pyx_t_8);
+ __pyx_t_8 = 0;
+ __pyx_t_10 = 0;
+ if (unlikely(__pyx_v_signatures == Py_None)) {
+ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
+ __PYX_ERR(0, 119, __pyx_L1_error)
+ }
+ __pyx_t_9 = __Pyx_dict_iterator(((PyObject*)__pyx_v_signatures), 1, ((PyObject *)NULL), (&__pyx_t_13), (&__pyx_t_7)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_XDECREF(__pyx_t_8);
+ __pyx_t_8 = __pyx_t_9;
+ __pyx_t_9 = 0;
+ while (1) {
+ __pyx_t_14 = __Pyx_dict_iter_next(__pyx_t_8, __pyx_t_13, &__pyx_t_10, &__pyx_t_9, NULL, NULL, __pyx_t_7);
+ if (unlikely(__pyx_t_14 == 0)) break;
+ if (unlikely(__pyx_t_14 == -1)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_XDECREF_SET(__pyx_v_sig, __pyx_t_9);
+ __pyx_t_9 = 0;
+ __pyx_v_match_found = 0;
+ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_sig, __pyx_n_s_strip); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_split); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_1);
+ __Pyx_INCREF(__pyx_v_dest_sig);
+ __Pyx_GIVEREF(__pyx_v_dest_sig);
+ PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v_dest_sig);
+ __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
+ __pyx_t_9 = __pyx_t_1; __Pyx_INCREF(__pyx_t_9); __pyx_t_15 = 0;
+ __pyx_t_16 = NULL;
+ } else {
+ __pyx_t_15 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_16 = Py_TYPE(__pyx_t_9)->tp_iternext; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 119, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_16)) {
+ if (likely(PyList_CheckExact(__pyx_t_9))) {
+ if (__pyx_t_15 >= PyList_GET_SIZE(__pyx_t_9)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_1 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_15); __Pyx_INCREF(__pyx_t_1); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 119, __pyx_L1_error)
+ #else
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_9, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ #endif
+ } else {
+ if (__pyx_t_15 >= PyTuple_GET_SIZE(__pyx_t_9)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_9, __pyx_t_15); __Pyx_INCREF(__pyx_t_1); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 119, __pyx_L1_error)
+ #else
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_9, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ #endif
+ }
+ } else {
+ __pyx_t_1 = __pyx_t_16(__pyx_t_9);
+ if (unlikely(!__pyx_t_1)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 119, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ }
+ if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
+ PyObject* sequence = __pyx_t_1;
+ #if !CYTHON_COMPILING_IN_PYPY
+ 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_ERR(0, 119, __pyx_L1_error)
+ }
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ if (likely(PyTuple_CheckExact(sequence))) {
+ __pyx_t_17 = PyTuple_GET_ITEM(sequence, 0);
+ __pyx_t_18 = PyTuple_GET_ITEM(sequence, 1);
+ } else {
+ __pyx_t_17 = PyList_GET_ITEM(sequence, 0);
+ __pyx_t_18 = PyList_GET_ITEM(sequence, 1);
+ }
+ __Pyx_INCREF(__pyx_t_17);
+ __Pyx_INCREF(__pyx_t_18);
+ #else
+ __pyx_t_17 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_17);
+ __pyx_t_18 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_18);
+ #endif
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ } else {
+ Py_ssize_t index = -1;
+ __pyx_t_19 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_19);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_20 = Py_TYPE(__pyx_t_19)->tp_iternext;
+ index = 0; __pyx_t_17 = __pyx_t_20(__pyx_t_19); if (unlikely(!__pyx_t_17)) goto __pyx_L119_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_17);
+ index = 1; __pyx_t_18 = __pyx_t_20(__pyx_t_19); if (unlikely(!__pyx_t_18)) goto __pyx_L119_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_18);
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_20(__pyx_t_19), 2) < 0) __PYX_ERR(0, 119, __pyx_L1_error)
+ __pyx_t_20 = NULL;
+ __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
+ goto __pyx_L120_unpacking_done;
+ __pyx_L119_unpacking_failed:;
+ __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
+ __pyx_t_20 = NULL;
+ if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+ __PYX_ERR(0, 119, __pyx_L1_error)
+ __pyx_L120_unpacking_done:;
+ }
+ __Pyx_XDECREF_SET(__pyx_v_src_type, __pyx_t_17);
+ __pyx_t_17 = 0;
+ __Pyx_XDECREF_SET(__pyx_v_dst_type, __pyx_t_18);
+ __pyx_t_18 = 0;
+ __pyx_t_3 = (__pyx_v_dst_type != Py_None);
+ __pyx_t_2 = (__pyx_t_3 != 0);
+ if (__pyx_t_2) {
+ __pyx_t_1 = PyObject_RichCompare(__pyx_v_src_type, __pyx_v_dst_type, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (__pyx_t_2) {
+ __pyx_v_match_found = 1;
+ goto __pyx_L122;
+ }
+ /*else*/ {
+ __pyx_v_match_found = 0;
+ goto __pyx_L118_break;
+ }
+ __pyx_L122:;
+ }
+ }
+ __pyx_L118_break:;
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __pyx_t_2 = (__pyx_v_match_found != 0);
+ if (__pyx_t_2) {
+ __pyx_t_21 = __Pyx_PyList_Append(__pyx_v_candidates, __pyx_v_sig); if (unlikely(__pyx_t_21 == -1)) __PYX_ERR(0, 119, __pyx_L1_error)
+ }
+ }
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_2 = (__pyx_v_candidates != Py_None) && (PyList_GET_SIZE(__pyx_v_candidates) != 0);
+ __pyx_t_3 = ((!__pyx_t_2) != 0);
+ if (__pyx_t_3) {
+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_Raise(__pyx_t_8, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __PYX_ERR(0, 119, __pyx_L1_error)
+ }
+ __pyx_t_13 = PyList_GET_SIZE(__pyx_v_candidates); if (unlikely(__pyx_t_13 == -1)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __pyx_t_3 = ((__pyx_t_13 > 1) != 0);
+ if (__pyx_t_3) {
+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_Raise(__pyx_t_8, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __PYX_ERR(0, 119, __pyx_L1_error)
+ }
+ /*else*/ {
+ __Pyx_XDECREF(__pyx_r);
+ if (unlikely(__pyx_v_signatures == Py_None)) {
+ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
+ __PYX_ERR(0, 119, __pyx_L1_error)
+ }
+ __pyx_t_8 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_signatures), PyList_GET_ITEM(__pyx_v_candidates, 0)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_r = __pyx_t_8;
+ __pyx_t_8 = 0;
+ goto __pyx_L0;
+ }
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_8);
+ __Pyx_XDECREF(__pyx_t_9);
+ __Pyx_XDECREF(__pyx_t_17);
+ __Pyx_XDECREF(__pyx_t_18);
+ __Pyx_XDECREF(__pyx_t_19);
+ __Pyx_AddTraceback("silx.math.combo.__pyx_fused_cpdef", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_dest_sig);
+ __Pyx_XDECREF(__pyx_v_ndarray);
+ __Pyx_XDECREF(__pyx_v_numpy);
+ __Pyx_XDECREF(__pyx_v_arg);
+ __Pyx_XDECREF(__pyx_v_dtype);
+ __Pyx_XDECREF(__pyx_v_arg_base);
+ __Pyx_XDECREF(__pyx_v_candidates);
+ __Pyx_XDECREF(__pyx_v_sig);
+ __Pyx_XDECREF(__pyx_v_src_type);
+ __Pyx_XDECREF(__pyx_v_dst_type);
+ __Pyx_XDECREF(__pyx_v_kwargs);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_4silx_4math_5combo_62__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ __Pyx_RefNannySetupContext("__defaults__", 0);
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyBool_FromLong(__Pyx_CyFunction_Defaults(__pyx_defaults12, __pyx_self)->__pyx_arg_min_positive); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 119, __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 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
+ __Pyx_INCREF(Py_None);
+ __Pyx_GIVEREF(Py_None);
+ PyTuple_SET_ITEM(__pyx_t_1, 1, Py_None);
+ __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_AddTraceback("silx.math.combo.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_fuse_0__pyx_pw_4silx_4math_5combo_7_min_max(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_fuse_0__pyx_mdef_4silx_4math_5combo_7_min_max = {"__pyx_fuse_0_min_max", (PyCFunction)__pyx_fuse_0__pyx_pw_4silx_4math_5combo_7_min_max, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4silx_4math_5combo__min_max};
+static PyObject *__pyx_fuse_0__pyx_pw_4silx_4math_5combo_7_min_max(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ __Pyx_memviewslice __pyx_v_data = { 0, 0, { 0 }, { 0 }, { 0 } };
+ int __pyx_v_min_positive;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_min_max (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,&__pyx_n_s_min_positive_2,0};
+ PyObject* values[2] = {0,0};
+ __pyx_defaults12 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults12, __pyx_self);
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ case 1:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_min_positive_2);
+ if (value) { values[1] = value; kw_args--; }
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_min_max") < 0)) __PYX_ERR(0, 119, __pyx_L3_error)
+ }
+ } else {
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ }
+ __pyx_v_data = __Pyx_PyObject_to_MemoryviewSlice_dc_float(values[0]); if (unlikely(!__pyx_v_data.memview)) __PYX_ERR(0, 119, __pyx_L3_error)
+ if (values[1]) {
+ __pyx_v_min_positive = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_min_positive == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 119, __pyx_L3_error)
+ } else {
+ __pyx_v_min_positive = __pyx_dynamic_args->__pyx_arg_min_positive;
+ }
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("_min_max", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 119, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("silx.math.combo._min_max", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_4silx_4math_5combo_6_min_max(__pyx_self, __pyx_v_data, __pyx_v_min_positive);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_4silx_4math_5combo_6_min_max(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_data, int __pyx_v_min_positive) {
+ float __pyx_v_value;
+ float __pyx_v_minimum;
+ float __pyx_v_maximum;
+ unsigned int __pyx_v_length;
+ unsigned int __pyx_v_index;
+ unsigned int __pyx_v_min_index;
+ unsigned int __pyx_v_min_pos_index;
+ unsigned int __pyx_v_max_index;
+ double __pyx_v_min_pos;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ Py_ssize_t __pyx_t_2;
+ int __pyx_t_3;
+ Py_ssize_t __pyx_t_4;
+ int __pyx_t_5;
+ unsigned int __pyx_t_6;
+ unsigned int __pyx_t_7;
+ size_t __pyx_t_8;
+ size_t __pyx_t_9;
+ size_t __pyx_t_10;
+ size_t __pyx_t_11;
+ PyObject *__pyx_t_12 = NULL;
+ PyObject *__pyx_t_13 = NULL;
+ PyObject *__pyx_t_14 = NULL;
+ PyObject *__pyx_t_15 = NULL;
+ PyObject *__pyx_t_16 = NULL;
+ PyObject *__pyx_t_17 = NULL;
+ PyObject *__pyx_t_18 = NULL;
+ PyObject *__pyx_t_19 = NULL;
+ int __pyx_t_20;
+ PyObject *__pyx_t_21 = NULL;
+ __Pyx_RefNannySetupContext("__pyx_fuse_0_min_max", 0);
+
+ /* "silx/math/combo.pyx":127
+ * _number value, minimum, minpos, maximum
+ * unsigned int length
+ * unsigned int index = 0 # <<<<<<<<<<<<<<
+ * unsigned int min_index = 0
+ * unsigned int min_pos_index = 0
+ */
+ __pyx_v_index = 0;
+
+ /* "silx/math/combo.pyx":128
+ * unsigned int length
+ * unsigned int index = 0
+ * unsigned int min_index = 0 # <<<<<<<<<<<<<<
+ * unsigned int min_pos_index = 0
+ * unsigned int max_index = 0
+ */
+ __pyx_v_min_index = 0;
+
+ /* "silx/math/combo.pyx":129
+ * unsigned int index = 0
+ * unsigned int min_index = 0
+ * unsigned int min_pos_index = 0 # <<<<<<<<<<<<<<
+ * unsigned int max_index = 0
+ *
+ */
+ __pyx_v_min_pos_index = 0;
+
+ /* "silx/math/combo.pyx":130
+ * unsigned int min_index = 0
+ * unsigned int min_pos_index = 0
+ * unsigned int max_index = 0 # <<<<<<<<<<<<<<
+ *
+ * length = len(data)
+ */
+ __pyx_v_max_index = 0;
+
+ /* "silx/math/combo.pyx":132
+ * unsigned int max_index = 0
+ *
+ * length = len(data) # <<<<<<<<<<<<<<
+ *
+ * if length == 0:
+ */
+ __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_data, 1, (PyObject *(*)(char *)) __pyx_memview_get_float, (int (*)(char *, PyObject *)) __pyx_memview_set_float, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 132, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 132, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_v_length = __pyx_t_2;
+
+ /* "silx/math/combo.pyx":134
+ * length = len(data)
+ *
+ * if length == 0: # <<<<<<<<<<<<<<
+ * raise ValueError('Zero-size array')
+ *
+ */
+ __pyx_t_3 = ((__pyx_v_length == 0) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":135
+ *
+ * if length == 0:
+ * raise ValueError('Zero-size array') # <<<<<<<<<<<<<<
+ *
+ * with nogil:
+ */
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 135, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __PYX_ERR(0, 135, __pyx_L1_error)
+
+ /* "silx/math/combo.pyx":134
+ * length = len(data)
+ *
+ * if length == 0: # <<<<<<<<<<<<<<
+ * raise ValueError('Zero-size array')
+ *
+ */
+ }
+
+ /* "silx/math/combo.pyx":137
+ * raise ValueError('Zero-size array')
+ *
+ * with nogil: # <<<<<<<<<<<<<<
+ * # Init starting values
+ * value = data[0]
+ */
+ {
+ #ifdef WITH_THREAD
+ PyThreadState *_save;
+ Py_UNBLOCK_THREADS
+ #endif
+ /*try:*/ {
+
+ /* "silx/math/combo.pyx":139
+ * with nogil:
+ * # Init starting values
+ * value = data[0] # <<<<<<<<<<<<<<
+ * minimum = value
+ * maximum = value
+ */
+ __pyx_t_4 = 0;
+ __pyx_v_value = (*((float *) ( /* dim=0 */ ((char *) (((float *) __pyx_v_data.data) + __pyx_t_4)) )));
+
+ /* "silx/math/combo.pyx":140
+ * # Init starting values
+ * value = data[0]
+ * minimum = value # <<<<<<<<<<<<<<
+ * maximum = value
+ * if min_positive and value > 0:
+ */
+ __pyx_v_minimum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":141
+ * value = data[0]
+ * minimum = value
+ * maximum = value # <<<<<<<<<<<<<<
+ * if min_positive and value > 0:
+ * min_pos = value
+ */
+ __pyx_v_maximum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":142
+ * minimum = value
+ * maximum = value
+ * if min_positive and value > 0: # <<<<<<<<<<<<<<
+ * min_pos = value
+ * else:
+ */
+ __pyx_t_5 = (__pyx_v_min_positive != 0);
+ if (__pyx_t_5) {
+ } else {
+ __pyx_t_3 = __pyx_t_5;
+ goto __pyx_L8_bool_binop_done;
+ }
+ __pyx_t_5 = ((__pyx_v_value > 0.0) != 0);
+ __pyx_t_3 = __pyx_t_5;
+ __pyx_L8_bool_binop_done:;
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":143
+ * maximum = value
+ * if min_positive and value > 0:
+ * min_pos = value # <<<<<<<<<<<<<<
+ * else:
+ * min_pos = 0
+ */
+ __pyx_v_min_pos = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":142
+ * minimum = value
+ * maximum = value
+ * if min_positive and value > 0: # <<<<<<<<<<<<<<
+ * min_pos = value
+ * else:
+ */
+ goto __pyx_L7;
+ }
+
+ /* "silx/math/combo.pyx":145
+ * min_pos = value
+ * else:
+ * min_pos = 0 # <<<<<<<<<<<<<<
+ *
+ * if _number in cython.floating:
+ */
+ /*else*/ {
+ __pyx_v_min_pos = 0.0;
+ }
+ __pyx_L7:;
+
+ /* "silx/math/combo.pyx":149
+ * if _number in cython.floating:
+ * # For floating, loop until first not NaN value
+ * for index in range(length): # <<<<<<<<<<<<<<
+ * value = data[index]
+ * if not isnan(value):
+ */
+ __pyx_t_6 = __pyx_v_length;
+ for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
+ __pyx_v_index = __pyx_t_7;
+
+ /* "silx/math/combo.pyx":150
+ * # For floating, loop until first not NaN value
+ * for index in range(length):
+ * value = data[index] # <<<<<<<<<<<<<<
+ * if not isnan(value):
+ * minimum = value
+ */
+ __pyx_t_8 = __pyx_v_index;
+ __pyx_v_value = (*((float *) ( /* dim=0 */ ((char *) (((float *) __pyx_v_data.data) + __pyx_t_8)) )));
+
+ /* "silx/math/combo.pyx":151
+ * for index in range(length):
+ * value = data[index]
+ * if not isnan(value): # <<<<<<<<<<<<<<
+ * minimum = value
+ * min_index = index
+ */
+ __pyx_t_3 = ((!(isnan(__pyx_v_value) != 0)) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":152
+ * value = data[index]
+ * if not isnan(value):
+ * minimum = value # <<<<<<<<<<<<<<
+ * min_index = index
+ * maximum = value
+ */
+ __pyx_v_minimum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":153
+ * if not isnan(value):
+ * minimum = value
+ * min_index = index # <<<<<<<<<<<<<<
+ * maximum = value
+ * max_index = index
+ */
+ __pyx_v_min_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":154
+ * minimum = value
+ * min_index = index
+ * maximum = value # <<<<<<<<<<<<<<
+ * max_index = index
+ * break
+ */
+ __pyx_v_maximum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":155
+ * min_index = index
+ * maximum = value
+ * max_index = index # <<<<<<<<<<<<<<
+ * break
+ *
+ */
+ __pyx_v_max_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":156
+ * maximum = value
+ * max_index = index
+ * break # <<<<<<<<<<<<<<
+ *
+ * if not min_positive:
+ */
+ goto __pyx_L11_break;
+
+ /* "silx/math/combo.pyx":151
+ * for index in range(length):
+ * value = data[index]
+ * if not isnan(value): # <<<<<<<<<<<<<<
+ * minimum = value
+ * min_index = index
+ */
+ }
+ }
+ __pyx_L11_break:;
+
+ /* "silx/math/combo.pyx":158
+ * break
+ *
+ * if not min_positive: # <<<<<<<<<<<<<<
+ * for index in range(index, length):
+ * value = data[index]
+ */
+ __pyx_t_3 = ((!(__pyx_v_min_positive != 0)) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":159
+ *
+ * if not min_positive:
+ * for index in range(index, length): # <<<<<<<<<<<<<<
+ * value = data[index]
+ * if value > maximum:
+ */
+ __pyx_t_6 = __pyx_v_length;
+ for (__pyx_t_7 = __pyx_v_index; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
+ __pyx_v_index = __pyx_t_7;
+
+ /* "silx/math/combo.pyx":160
+ * if not min_positive:
+ * for index in range(index, length):
+ * value = data[index] # <<<<<<<<<<<<<<
+ * if value > maximum:
+ * maximum = value
+ */
+ __pyx_t_9 = __pyx_v_index;
+ __pyx_v_value = (*((float *) ( /* dim=0 */ ((char *) (((float *) __pyx_v_data.data) + __pyx_t_9)) )));
+
+ /* "silx/math/combo.pyx":161
+ * for index in range(index, length):
+ * value = data[index]
+ * if value > maximum: # <<<<<<<<<<<<<<
+ * maximum = value
+ * max_index = index
+ */
+ __pyx_t_3 = ((__pyx_v_value > __pyx_v_maximum) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":162
+ * value = data[index]
+ * if value > maximum:
+ * maximum = value # <<<<<<<<<<<<<<
+ * max_index = index
+ * elif value < minimum:
+ */
+ __pyx_v_maximum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":163
+ * if value > maximum:
+ * maximum = value
+ * max_index = index # <<<<<<<<<<<<<<
+ * elif value < minimum:
+ * minimum = value
+ */
+ __pyx_v_max_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":161
+ * for index in range(index, length):
+ * value = data[index]
+ * if value > maximum: # <<<<<<<<<<<<<<
+ * maximum = value
+ * max_index = index
+ */
+ goto __pyx_L16;
+ }
+
+ /* "silx/math/combo.pyx":164
+ * maximum = value
+ * max_index = index
+ * elif value < minimum: # <<<<<<<<<<<<<<
+ * minimum = value
+ * min_index = index
+ */
+ __pyx_t_3 = ((__pyx_v_value < __pyx_v_minimum) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":165
+ * max_index = index
+ * elif value < minimum:
+ * minimum = value # <<<<<<<<<<<<<<
+ * min_index = index
+ *
+ */
+ __pyx_v_minimum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":166
+ * elif value < minimum:
+ * minimum = value
+ * min_index = index # <<<<<<<<<<<<<<
+ *
+ * else:
+ */
+ __pyx_v_min_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":164
+ * maximum = value
+ * max_index = index
+ * elif value < minimum: # <<<<<<<<<<<<<<
+ * minimum = value
+ * min_index = index
+ */
+ }
+ __pyx_L16:;
+ }
+
+ /* "silx/math/combo.pyx":158
+ * break
+ *
+ * if not min_positive: # <<<<<<<<<<<<<<
+ * for index in range(index, length):
+ * value = data[index]
+ */
+ goto __pyx_L13;
+ }
+
+ /* "silx/math/combo.pyx":170
+ * else:
+ * # Loop until min_pos is defined
+ * for index in range(index, length): # <<<<<<<<<<<<<<
+ * value = data[index]
+ * if value > maximum:
+ */
+ /*else*/ {
+ __pyx_t_6 = __pyx_v_length;
+ for (__pyx_t_7 = __pyx_v_index; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
+ __pyx_v_index = __pyx_t_7;
+
+ /* "silx/math/combo.pyx":171
+ * # Loop until min_pos is defined
+ * for index in range(index, length):
+ * value = data[index] # <<<<<<<<<<<<<<
+ * if value > maximum:
+ * maximum = value
+ */
+ __pyx_t_10 = __pyx_v_index;
+ __pyx_v_value = (*((float *) ( /* dim=0 */ ((char *) (((float *) __pyx_v_data.data) + __pyx_t_10)) )));
+
+ /* "silx/math/combo.pyx":172
+ * for index in range(index, length):
+ * value = data[index]
+ * if value > maximum: # <<<<<<<<<<<<<<
+ * maximum = value
+ * max_index = index
+ */
+ __pyx_t_3 = ((__pyx_v_value > __pyx_v_maximum) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":173
+ * value = data[index]
+ * if value > maximum:
+ * maximum = value # <<<<<<<<<<<<<<
+ * max_index = index
+ * elif value < minimum:
+ */
+ __pyx_v_maximum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":174
+ * if value > maximum:
+ * maximum = value
+ * max_index = index # <<<<<<<<<<<<<<
+ * elif value < minimum:
+ * minimum = value
+ */
+ __pyx_v_max_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":172
+ * for index in range(index, length):
+ * value = data[index]
+ * if value > maximum: # <<<<<<<<<<<<<<
+ * maximum = value
+ * max_index = index
+ */
+ goto __pyx_L19;
+ }
+
+ /* "silx/math/combo.pyx":175
+ * maximum = value
+ * max_index = index
+ * elif value < minimum: # <<<<<<<<<<<<<<
+ * minimum = value
+ * min_index = index
+ */
+ __pyx_t_3 = ((__pyx_v_value < __pyx_v_minimum) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":176
+ * max_index = index
+ * elif value < minimum:
+ * minimum = value # <<<<<<<<<<<<<<
+ * min_index = index
+ *
+ */
+ __pyx_v_minimum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":177
+ * elif value < minimum:
+ * minimum = value
+ * min_index = index # <<<<<<<<<<<<<<
+ *
+ * if value > 0:
+ */
+ __pyx_v_min_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":175
+ * maximum = value
+ * max_index = index
+ * elif value < minimum: # <<<<<<<<<<<<<<
+ * minimum = value
+ * min_index = index
+ */
+ }
+ __pyx_L19:;
+
+ /* "silx/math/combo.pyx":179
+ * min_index = index
+ *
+ * if value > 0: # <<<<<<<<<<<<<<
+ * min_pos = value
+ * min_pos_index = index
+ */
+ __pyx_t_3 = ((__pyx_v_value > 0.0) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":180
+ *
+ * if value > 0:
+ * min_pos = value # <<<<<<<<<<<<<<
+ * min_pos_index = index
+ * break
+ */
+ __pyx_v_min_pos = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":181
+ * if value > 0:
+ * min_pos = value
+ * min_pos_index = index # <<<<<<<<<<<<<<
+ * break
+ *
+ */
+ __pyx_v_min_pos_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":182
+ * min_pos = value
+ * min_pos_index = index
+ * break # <<<<<<<<<<<<<<
+ *
+ * # Loop until the end
+ */
+ goto __pyx_L18_break;
+
+ /* "silx/math/combo.pyx":179
+ * min_index = index
+ *
+ * if value > 0: # <<<<<<<<<<<<<<
+ * min_pos = value
+ * min_pos_index = index
+ */
+ }
+ }
+ __pyx_L18_break:;
+
+ /* "silx/math/combo.pyx":185
+ *
+ * # Loop until the end
+ * for index in range(index+1, length): # <<<<<<<<<<<<<<
+ * value = data[index]
+ * if value > maximum:
+ */
+ __pyx_t_6 = __pyx_v_length;
+ for (__pyx_t_7 = (__pyx_v_index + 1); __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
+ __pyx_v_index = __pyx_t_7;
+
+ /* "silx/math/combo.pyx":186
+ * # Loop until the end
+ * for index in range(index+1, length):
+ * value = data[index] # <<<<<<<<<<<<<<
+ * if value > maximum:
+ * maximum = value
+ */
+ __pyx_t_11 = __pyx_v_index;
+ __pyx_v_value = (*((float *) ( /* dim=0 */ ((char *) (((float *) __pyx_v_data.data) + __pyx_t_11)) )));
+
+ /* "silx/math/combo.pyx":187
+ * for index in range(index+1, length):
+ * value = data[index]
+ * if value > maximum: # <<<<<<<<<<<<<<
+ * maximum = value
+ * max_index = index
+ */
+ __pyx_t_3 = ((__pyx_v_value > __pyx_v_maximum) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":188
+ * value = data[index]
+ * if value > maximum:
+ * maximum = value # <<<<<<<<<<<<<<
+ * max_index = index
+ * else:
+ */
+ __pyx_v_maximum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":189
+ * if value > maximum:
+ * maximum = value
+ * max_index = index # <<<<<<<<<<<<<<
+ * else:
+ * if value < minimum:
+ */
+ __pyx_v_max_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":187
+ * for index in range(index+1, length):
+ * value = data[index]
+ * if value > maximum: # <<<<<<<<<<<<<<
+ * maximum = value
+ * max_index = index
+ */
+ goto __pyx_L23;
+ }
+
+ /* "silx/math/combo.pyx":191
+ * max_index = index
+ * else:
+ * if value < minimum: # <<<<<<<<<<<<<<
+ * minimum = value
+ * min_index = index
+ */
+ /*else*/ {
+ __pyx_t_3 = ((__pyx_v_value < __pyx_v_minimum) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":192
+ * else:
+ * if value < minimum:
+ * minimum = value # <<<<<<<<<<<<<<
+ * min_index = index
+ *
+ */
+ __pyx_v_minimum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":193
+ * if value < minimum:
+ * minimum = value
+ * min_index = index # <<<<<<<<<<<<<<
+ *
+ * if 0 < value < min_pos:
+ */
+ __pyx_v_min_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":191
+ * max_index = index
+ * else:
+ * if value < minimum: # <<<<<<<<<<<<<<
+ * minimum = value
+ * min_index = index
+ */
+ }
+
+ /* "silx/math/combo.pyx":195
+ * min_index = index
+ *
+ * if 0 < value < min_pos: # <<<<<<<<<<<<<<
+ * min_pos = value
+ * min_pos_index = index
+ */
+ __pyx_t_3 = (0.0 < __pyx_v_value);
+ if (__pyx_t_3) {
+ __pyx_t_3 = (__pyx_v_value < __pyx_v_min_pos);
+ }
+ __pyx_t_5 = (__pyx_t_3 != 0);
+ if (__pyx_t_5) {
+
+ /* "silx/math/combo.pyx":196
+ *
+ * if 0 < value < min_pos:
+ * min_pos = value # <<<<<<<<<<<<<<
+ * min_pos_index = index
+ *
+ */
+ __pyx_v_min_pos = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":197
+ * if 0 < value < min_pos:
+ * min_pos = value
+ * min_pos_index = index # <<<<<<<<<<<<<<
+ *
+ * return _MinMaxResult(minimum,
+ */
+ __pyx_v_min_pos_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":195
+ * min_index = index
+ *
+ * if 0 < value < min_pos: # <<<<<<<<<<<<<<
+ * min_pos = value
+ * min_pos_index = index
+ */
+ }
+ }
+ __pyx_L23:;
+ }
+ }
+ __pyx_L13:;
+ }
+
+ /* "silx/math/combo.pyx":137
+ * raise ValueError('Zero-size array')
+ *
+ * with nogil: # <<<<<<<<<<<<<<
+ * # Init starting values
+ * value = data[0]
+ */
+ /*finally:*/ {
+ /*normal exit:*/{
+ #ifdef WITH_THREAD
+ Py_BLOCK_THREADS
+ #endif
+ goto __pyx_L6;
+ }
+ __pyx_L6:;
+ }
+ }
+
+ /* "silx/math/combo.pyx":199
+ * min_pos_index = index
+ *
+ * return _MinMaxResult(minimum, # <<<<<<<<<<<<<<
+ * min_pos if min_pos > 0 else None,
+ * maximum,
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_MinMaxResult); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __pyx_t_13 = PyFloat_FromDouble(__pyx_v_minimum); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_13);
+
+ /* "silx/math/combo.pyx":200
+ *
+ * return _MinMaxResult(minimum,
+ * min_pos if min_pos > 0 else None, # <<<<<<<<<<<<<<
+ * maximum,
+ * min_index,
+ */
+ if (((__pyx_v_min_pos > 0.0) != 0)) {
+ __pyx_t_15 = PyFloat_FromDouble(__pyx_v_min_pos); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 200, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_15);
+ __pyx_t_14 = __pyx_t_15;
+ __pyx_t_15 = 0;
+ } else {
+ __Pyx_INCREF(Py_None);
+ __pyx_t_14 = Py_None;
+ }
+
+ /* "silx/math/combo.pyx":201
+ * return _MinMaxResult(minimum,
+ * min_pos if min_pos > 0 else None,
+ * maximum, # <<<<<<<<<<<<<<
+ * min_index,
+ * min_pos_index if min_pos > 0 else None,
+ */
+ __pyx_t_15 = PyFloat_FromDouble(__pyx_v_maximum); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 201, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_15);
+
+ /* "silx/math/combo.pyx":202
+ * min_pos if min_pos > 0 else None,
+ * maximum,
+ * min_index, # <<<<<<<<<<<<<<
+ * min_pos_index if min_pos > 0 else None,
+ * max_index)
+ */
+ __pyx_t_16 = __Pyx_PyInt_From_unsigned_int(__pyx_v_min_index); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 202, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_16);
+
+ /* "silx/math/combo.pyx":203
+ * maximum,
+ * min_index,
+ * min_pos_index if min_pos > 0 else None, # <<<<<<<<<<<<<<
+ * max_index)
+ *
+ */
+ if (((__pyx_v_min_pos > 0.0) != 0)) {
+ __pyx_t_18 = __Pyx_PyInt_From_unsigned_int(__pyx_v_min_pos_index); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 203, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_18);
+ __pyx_t_17 = __pyx_t_18;
+ __pyx_t_18 = 0;
+ } else {
+ __Pyx_INCREF(Py_None);
+ __pyx_t_17 = Py_None;
+ }
+
+ /* "silx/math/combo.pyx":204
+ * min_index,
+ * min_pos_index if min_pos > 0 else None,
+ * max_index) # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __pyx_t_18 = __Pyx_PyInt_From_unsigned_int(__pyx_v_max_index); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 204, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_18);
+ __pyx_t_19 = NULL;
+ __pyx_t_20 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
+ __pyx_t_19 = PyMethod_GET_SELF(__pyx_t_12);
+ if (likely(__pyx_t_19)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
+ __Pyx_INCREF(__pyx_t_19);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_12, function);
+ __pyx_t_20 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_12)) {
+ PyObject *__pyx_temp[7] = {__pyx_t_19, __pyx_t_13, __pyx_t_14, __pyx_t_15, __pyx_t_16, __pyx_t_17, __pyx_t_18};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_20, 6+__pyx_t_20); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+ __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
+ __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
+ __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
+ PyObject *__pyx_temp[7] = {__pyx_t_19, __pyx_t_13, __pyx_t_14, __pyx_t_15, __pyx_t_16, __pyx_t_17, __pyx_t_18};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_20, 6+__pyx_t_20); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+ __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
+ __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
+ __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_21 = PyTuple_New(6+__pyx_t_20); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_21);
+ if (__pyx_t_19) {
+ __Pyx_GIVEREF(__pyx_t_19); PyTuple_SET_ITEM(__pyx_t_21, 0, __pyx_t_19); __pyx_t_19 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_13);
+ PyTuple_SET_ITEM(__pyx_t_21, 0+__pyx_t_20, __pyx_t_13);
+ __Pyx_GIVEREF(__pyx_t_14);
+ PyTuple_SET_ITEM(__pyx_t_21, 1+__pyx_t_20, __pyx_t_14);
+ __Pyx_GIVEREF(__pyx_t_15);
+ PyTuple_SET_ITEM(__pyx_t_21, 2+__pyx_t_20, __pyx_t_15);
+ __Pyx_GIVEREF(__pyx_t_16);
+ PyTuple_SET_ITEM(__pyx_t_21, 3+__pyx_t_20, __pyx_t_16);
+ __Pyx_GIVEREF(__pyx_t_17);
+ PyTuple_SET_ITEM(__pyx_t_21, 4+__pyx_t_20, __pyx_t_17);
+ __Pyx_GIVEREF(__pyx_t_18);
+ PyTuple_SET_ITEM(__pyx_t_21, 5+__pyx_t_20, __pyx_t_18);
+ __pyx_t_13 = 0;
+ __pyx_t_14 = 0;
+ __pyx_t_15 = 0;
+ __pyx_t_16 = 0;
+ __pyx_t_17 = 0;
+ __pyx_t_18 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_21, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "silx/math/combo.pyx":119
+ * @cython.boundscheck(False)
+ * @cython.wraparound(False)
+ * def _min_max(_number[::1] data, bint min_positive=False): # <<<<<<<<<<<<<<
+ * """:func:`min_max` implementation including infinite values
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_12);
+ __Pyx_XDECREF(__pyx_t_13);
+ __Pyx_XDECREF(__pyx_t_14);
+ __Pyx_XDECREF(__pyx_t_15);
+ __Pyx_XDECREF(__pyx_t_16);
+ __Pyx_XDECREF(__pyx_t_17);
+ __Pyx_XDECREF(__pyx_t_18);
+ __Pyx_XDECREF(__pyx_t_19);
+ __Pyx_XDECREF(__pyx_t_21);
+ __Pyx_AddTraceback("silx.math.combo._min_max", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __PYX_XDEC_MEMVIEW(&__pyx_v_data, 1);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_4silx_4math_5combo_64__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ __Pyx_RefNannySetupContext("__defaults__", 0);
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyBool_FromLong(__Pyx_CyFunction_Defaults(__pyx_defaults13, __pyx_self)->__pyx_arg_min_positive); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 119, __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 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
+ __Pyx_INCREF(Py_None);
+ __Pyx_GIVEREF(Py_None);
+ PyTuple_SET_ITEM(__pyx_t_1, 1, Py_None);
+ __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_AddTraceback("silx.math.combo.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_fuse_1__pyx_pw_4silx_4math_5combo_9_min_max(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_fuse_1__pyx_mdef_4silx_4math_5combo_9_min_max = {"__pyx_fuse_1_min_max", (PyCFunction)__pyx_fuse_1__pyx_pw_4silx_4math_5combo_9_min_max, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4silx_4math_5combo__min_max};
+static PyObject *__pyx_fuse_1__pyx_pw_4silx_4math_5combo_9_min_max(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ __Pyx_memviewslice __pyx_v_data = { 0, 0, { 0 }, { 0 }, { 0 } };
+ int __pyx_v_min_positive;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_min_max (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,&__pyx_n_s_min_positive_2,0};
+ PyObject* values[2] = {0,0};
+ __pyx_defaults13 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults13, __pyx_self);
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ case 1:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_min_positive_2);
+ if (value) { values[1] = value; kw_args--; }
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_min_max") < 0)) __PYX_ERR(0, 119, __pyx_L3_error)
+ }
+ } else {
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ }
+ __pyx_v_data = __Pyx_PyObject_to_MemoryviewSlice_dc_double(values[0]); if (unlikely(!__pyx_v_data.memview)) __PYX_ERR(0, 119, __pyx_L3_error)
+ if (values[1]) {
+ __pyx_v_min_positive = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_min_positive == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 119, __pyx_L3_error)
+ } else {
+ __pyx_v_min_positive = __pyx_dynamic_args->__pyx_arg_min_positive;
+ }
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("_min_max", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 119, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("silx.math.combo._min_max", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_4silx_4math_5combo_8_min_max(__pyx_self, __pyx_v_data, __pyx_v_min_positive);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_4silx_4math_5combo_8_min_max(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_data, int __pyx_v_min_positive) {
+ double __pyx_v_value;
+ double __pyx_v_minimum;
+ double __pyx_v_maximum;
+ unsigned int __pyx_v_length;
+ unsigned int __pyx_v_index;
+ unsigned int __pyx_v_min_index;
+ unsigned int __pyx_v_min_pos_index;
+ unsigned int __pyx_v_max_index;
+ double __pyx_v_min_pos;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ Py_ssize_t __pyx_t_2;
+ int __pyx_t_3;
+ Py_ssize_t __pyx_t_4;
+ int __pyx_t_5;
+ unsigned int __pyx_t_6;
+ unsigned int __pyx_t_7;
+ size_t __pyx_t_8;
+ size_t __pyx_t_9;
+ size_t __pyx_t_10;
+ size_t __pyx_t_11;
+ PyObject *__pyx_t_12 = NULL;
+ PyObject *__pyx_t_13 = NULL;
+ PyObject *__pyx_t_14 = NULL;
+ PyObject *__pyx_t_15 = NULL;
+ PyObject *__pyx_t_16 = NULL;
+ PyObject *__pyx_t_17 = NULL;
+ PyObject *__pyx_t_18 = NULL;
+ PyObject *__pyx_t_19 = NULL;
+ int __pyx_t_20;
+ PyObject *__pyx_t_21 = NULL;
+ __Pyx_RefNannySetupContext("__pyx_fuse_1_min_max", 0);
+
+ /* "silx/math/combo.pyx":127
+ * _number value, minimum, minpos, maximum
+ * unsigned int length
+ * unsigned int index = 0 # <<<<<<<<<<<<<<
+ * unsigned int min_index = 0
+ * unsigned int min_pos_index = 0
+ */
+ __pyx_v_index = 0;
+
+ /* "silx/math/combo.pyx":128
+ * unsigned int length
+ * unsigned int index = 0
+ * unsigned int min_index = 0 # <<<<<<<<<<<<<<
+ * unsigned int min_pos_index = 0
+ * unsigned int max_index = 0
+ */
+ __pyx_v_min_index = 0;
+
+ /* "silx/math/combo.pyx":129
+ * unsigned int index = 0
+ * unsigned int min_index = 0
+ * unsigned int min_pos_index = 0 # <<<<<<<<<<<<<<
+ * unsigned int max_index = 0
+ *
+ */
+ __pyx_v_min_pos_index = 0;
+
+ /* "silx/math/combo.pyx":130
+ * unsigned int min_index = 0
+ * unsigned int min_pos_index = 0
+ * unsigned int max_index = 0 # <<<<<<<<<<<<<<
+ *
+ * length = len(data)
+ */
+ __pyx_v_max_index = 0;
+
+ /* "silx/math/combo.pyx":132
+ * unsigned int max_index = 0
+ *
+ * length = len(data) # <<<<<<<<<<<<<<
+ *
+ * if length == 0:
+ */
+ __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_data, 1, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 132, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 132, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_v_length = __pyx_t_2;
+
+ /* "silx/math/combo.pyx":134
+ * length = len(data)
+ *
+ * if length == 0: # <<<<<<<<<<<<<<
+ * raise ValueError('Zero-size array')
+ *
+ */
+ __pyx_t_3 = ((__pyx_v_length == 0) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":135
+ *
+ * if length == 0:
+ * raise ValueError('Zero-size array') # <<<<<<<<<<<<<<
+ *
+ * with nogil:
+ */
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 135, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __PYX_ERR(0, 135, __pyx_L1_error)
+
+ /* "silx/math/combo.pyx":134
+ * length = len(data)
+ *
+ * if length == 0: # <<<<<<<<<<<<<<
+ * raise ValueError('Zero-size array')
+ *
+ */
+ }
+
+ /* "silx/math/combo.pyx":137
+ * raise ValueError('Zero-size array')
+ *
+ * with nogil: # <<<<<<<<<<<<<<
+ * # Init starting values
+ * value = data[0]
+ */
+ {
+ #ifdef WITH_THREAD
+ PyThreadState *_save;
+ Py_UNBLOCK_THREADS
+ #endif
+ /*try:*/ {
+
+ /* "silx/math/combo.pyx":139
+ * with nogil:
+ * # Init starting values
+ * value = data[0] # <<<<<<<<<<<<<<
+ * minimum = value
+ * maximum = value
+ */
+ __pyx_t_4 = 0;
+ __pyx_v_value = (*((double *) ( /* dim=0 */ ((char *) (((double *) __pyx_v_data.data) + __pyx_t_4)) )));
+
+ /* "silx/math/combo.pyx":140
+ * # Init starting values
+ * value = data[0]
+ * minimum = value # <<<<<<<<<<<<<<
+ * maximum = value
+ * if min_positive and value > 0:
+ */
+ __pyx_v_minimum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":141
+ * value = data[0]
+ * minimum = value
+ * maximum = value # <<<<<<<<<<<<<<
+ * if min_positive and value > 0:
+ * min_pos = value
+ */
+ __pyx_v_maximum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":142
+ * minimum = value
+ * maximum = value
+ * if min_positive and value > 0: # <<<<<<<<<<<<<<
+ * min_pos = value
+ * else:
+ */
+ __pyx_t_5 = (__pyx_v_min_positive != 0);
+ if (__pyx_t_5) {
+ } else {
+ __pyx_t_3 = __pyx_t_5;
+ goto __pyx_L8_bool_binop_done;
+ }
+ __pyx_t_5 = ((__pyx_v_value > 0.0) != 0);
+ __pyx_t_3 = __pyx_t_5;
+ __pyx_L8_bool_binop_done:;
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":143
+ * maximum = value
+ * if min_positive and value > 0:
+ * min_pos = value # <<<<<<<<<<<<<<
+ * else:
+ * min_pos = 0
+ */
+ __pyx_v_min_pos = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":142
+ * minimum = value
+ * maximum = value
+ * if min_positive and value > 0: # <<<<<<<<<<<<<<
+ * min_pos = value
+ * else:
+ */
+ goto __pyx_L7;
+ }
+
+ /* "silx/math/combo.pyx":145
+ * min_pos = value
+ * else:
+ * min_pos = 0 # <<<<<<<<<<<<<<
+ *
+ * if _number in cython.floating:
+ */
+ /*else*/ {
+ __pyx_v_min_pos = 0.0;
+ }
+ __pyx_L7:;
+
+ /* "silx/math/combo.pyx":149
+ * if _number in cython.floating:
+ * # For floating, loop until first not NaN value
+ * for index in range(length): # <<<<<<<<<<<<<<
+ * value = data[index]
+ * if not isnan(value):
+ */
+ __pyx_t_6 = __pyx_v_length;
+ for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
+ __pyx_v_index = __pyx_t_7;
+
+ /* "silx/math/combo.pyx":150
+ * # For floating, loop until first not NaN value
+ * for index in range(length):
+ * value = data[index] # <<<<<<<<<<<<<<
+ * if not isnan(value):
+ * minimum = value
+ */
+ __pyx_t_8 = __pyx_v_index;
+ __pyx_v_value = (*((double *) ( /* dim=0 */ ((char *) (((double *) __pyx_v_data.data) + __pyx_t_8)) )));
+
+ /* "silx/math/combo.pyx":151
+ * for index in range(length):
+ * value = data[index]
+ * if not isnan(value): # <<<<<<<<<<<<<<
+ * minimum = value
+ * min_index = index
+ */
+ __pyx_t_3 = ((!(isnan(__pyx_v_value) != 0)) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":152
+ * value = data[index]
+ * if not isnan(value):
+ * minimum = value # <<<<<<<<<<<<<<
+ * min_index = index
+ * maximum = value
+ */
+ __pyx_v_minimum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":153
+ * if not isnan(value):
+ * minimum = value
+ * min_index = index # <<<<<<<<<<<<<<
+ * maximum = value
+ * max_index = index
+ */
+ __pyx_v_min_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":154
+ * minimum = value
+ * min_index = index
+ * maximum = value # <<<<<<<<<<<<<<
+ * max_index = index
+ * break
+ */
+ __pyx_v_maximum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":155
+ * min_index = index
+ * maximum = value
+ * max_index = index # <<<<<<<<<<<<<<
+ * break
+ *
+ */
+ __pyx_v_max_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":156
+ * maximum = value
+ * max_index = index
+ * break # <<<<<<<<<<<<<<
+ *
+ * if not min_positive:
+ */
+ goto __pyx_L11_break;
+
+ /* "silx/math/combo.pyx":151
+ * for index in range(length):
+ * value = data[index]
+ * if not isnan(value): # <<<<<<<<<<<<<<
+ * minimum = value
+ * min_index = index
+ */
+ }
+ }
+ __pyx_L11_break:;
+
+ /* "silx/math/combo.pyx":158
+ * break
+ *
+ * if not min_positive: # <<<<<<<<<<<<<<
+ * for index in range(index, length):
+ * value = data[index]
+ */
+ __pyx_t_3 = ((!(__pyx_v_min_positive != 0)) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":159
+ *
+ * if not min_positive:
+ * for index in range(index, length): # <<<<<<<<<<<<<<
+ * value = data[index]
+ * if value > maximum:
+ */
+ __pyx_t_6 = __pyx_v_length;
+ for (__pyx_t_7 = __pyx_v_index; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
+ __pyx_v_index = __pyx_t_7;
+
+ /* "silx/math/combo.pyx":160
+ * if not min_positive:
+ * for index in range(index, length):
+ * value = data[index] # <<<<<<<<<<<<<<
+ * if value > maximum:
+ * maximum = value
+ */
+ __pyx_t_9 = __pyx_v_index;
+ __pyx_v_value = (*((double *) ( /* dim=0 */ ((char *) (((double *) __pyx_v_data.data) + __pyx_t_9)) )));
+
+ /* "silx/math/combo.pyx":161
+ * for index in range(index, length):
+ * value = data[index]
+ * if value > maximum: # <<<<<<<<<<<<<<
+ * maximum = value
+ * max_index = index
+ */
+ __pyx_t_3 = ((__pyx_v_value > __pyx_v_maximum) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":162
+ * value = data[index]
+ * if value > maximum:
+ * maximum = value # <<<<<<<<<<<<<<
+ * max_index = index
+ * elif value < minimum:
+ */
+ __pyx_v_maximum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":163
+ * if value > maximum:
+ * maximum = value
+ * max_index = index # <<<<<<<<<<<<<<
+ * elif value < minimum:
+ * minimum = value
+ */
+ __pyx_v_max_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":161
+ * for index in range(index, length):
+ * value = data[index]
+ * if value > maximum: # <<<<<<<<<<<<<<
+ * maximum = value
+ * max_index = index
+ */
+ goto __pyx_L16;
+ }
+
+ /* "silx/math/combo.pyx":164
+ * maximum = value
+ * max_index = index
+ * elif value < minimum: # <<<<<<<<<<<<<<
+ * minimum = value
+ * min_index = index
+ */
+ __pyx_t_3 = ((__pyx_v_value < __pyx_v_minimum) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":165
+ * max_index = index
+ * elif value < minimum:
+ * minimum = value # <<<<<<<<<<<<<<
+ * min_index = index
+ *
+ */
+ __pyx_v_minimum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":166
+ * elif value < minimum:
+ * minimum = value
+ * min_index = index # <<<<<<<<<<<<<<
+ *
+ * else:
+ */
+ __pyx_v_min_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":164
+ * maximum = value
+ * max_index = index
+ * elif value < minimum: # <<<<<<<<<<<<<<
+ * minimum = value
+ * min_index = index
+ */
+ }
+ __pyx_L16:;
+ }
+
+ /* "silx/math/combo.pyx":158
+ * break
+ *
+ * if not min_positive: # <<<<<<<<<<<<<<
+ * for index in range(index, length):
+ * value = data[index]
+ */
+ goto __pyx_L13;
+ }
+
+ /* "silx/math/combo.pyx":170
+ * else:
+ * # Loop until min_pos is defined
+ * for index in range(index, length): # <<<<<<<<<<<<<<
+ * value = data[index]
+ * if value > maximum:
+ */
+ /*else*/ {
+ __pyx_t_6 = __pyx_v_length;
+ for (__pyx_t_7 = __pyx_v_index; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
+ __pyx_v_index = __pyx_t_7;
+
+ /* "silx/math/combo.pyx":171
+ * # Loop until min_pos is defined
+ * for index in range(index, length):
+ * value = data[index] # <<<<<<<<<<<<<<
+ * if value > maximum:
+ * maximum = value
+ */
+ __pyx_t_10 = __pyx_v_index;
+ __pyx_v_value = (*((double *) ( /* dim=0 */ ((char *) (((double *) __pyx_v_data.data) + __pyx_t_10)) )));
+
+ /* "silx/math/combo.pyx":172
+ * for index in range(index, length):
+ * value = data[index]
+ * if value > maximum: # <<<<<<<<<<<<<<
+ * maximum = value
+ * max_index = index
+ */
+ __pyx_t_3 = ((__pyx_v_value > __pyx_v_maximum) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":173
+ * value = data[index]
+ * if value > maximum:
+ * maximum = value # <<<<<<<<<<<<<<
+ * max_index = index
+ * elif value < minimum:
+ */
+ __pyx_v_maximum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":174
+ * if value > maximum:
+ * maximum = value
+ * max_index = index # <<<<<<<<<<<<<<
+ * elif value < minimum:
+ * minimum = value
+ */
+ __pyx_v_max_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":172
+ * for index in range(index, length):
+ * value = data[index]
+ * if value > maximum: # <<<<<<<<<<<<<<
+ * maximum = value
+ * max_index = index
+ */
+ goto __pyx_L19;
+ }
+
+ /* "silx/math/combo.pyx":175
+ * maximum = value
+ * max_index = index
+ * elif value < minimum: # <<<<<<<<<<<<<<
+ * minimum = value
+ * min_index = index
+ */
+ __pyx_t_3 = ((__pyx_v_value < __pyx_v_minimum) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":176
+ * max_index = index
+ * elif value < minimum:
+ * minimum = value # <<<<<<<<<<<<<<
+ * min_index = index
+ *
+ */
+ __pyx_v_minimum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":177
+ * elif value < minimum:
+ * minimum = value
+ * min_index = index # <<<<<<<<<<<<<<
+ *
+ * if value > 0:
+ */
+ __pyx_v_min_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":175
+ * maximum = value
+ * max_index = index
+ * elif value < minimum: # <<<<<<<<<<<<<<
+ * minimum = value
+ * min_index = index
+ */
+ }
+ __pyx_L19:;
+
+ /* "silx/math/combo.pyx":179
+ * min_index = index
+ *
+ * if value > 0: # <<<<<<<<<<<<<<
+ * min_pos = value
+ * min_pos_index = index
+ */
+ __pyx_t_3 = ((__pyx_v_value > 0.0) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":180
+ *
+ * if value > 0:
+ * min_pos = value # <<<<<<<<<<<<<<
+ * min_pos_index = index
+ * break
+ */
+ __pyx_v_min_pos = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":181
+ * if value > 0:
+ * min_pos = value
+ * min_pos_index = index # <<<<<<<<<<<<<<
+ * break
+ *
+ */
+ __pyx_v_min_pos_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":182
+ * min_pos = value
+ * min_pos_index = index
+ * break # <<<<<<<<<<<<<<
+ *
+ * # Loop until the end
+ */
+ goto __pyx_L18_break;
+
+ /* "silx/math/combo.pyx":179
+ * min_index = index
+ *
+ * if value > 0: # <<<<<<<<<<<<<<
+ * min_pos = value
+ * min_pos_index = index
+ */
+ }
+ }
+ __pyx_L18_break:;
+
+ /* "silx/math/combo.pyx":185
+ *
+ * # Loop until the end
+ * for index in range(index+1, length): # <<<<<<<<<<<<<<
+ * value = data[index]
+ * if value > maximum:
+ */
+ __pyx_t_6 = __pyx_v_length;
+ for (__pyx_t_7 = (__pyx_v_index + 1); __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
+ __pyx_v_index = __pyx_t_7;
+
+ /* "silx/math/combo.pyx":186
+ * # Loop until the end
+ * for index in range(index+1, length):
+ * value = data[index] # <<<<<<<<<<<<<<
+ * if value > maximum:
+ * maximum = value
+ */
+ __pyx_t_11 = __pyx_v_index;
+ __pyx_v_value = (*((double *) ( /* dim=0 */ ((char *) (((double *) __pyx_v_data.data) + __pyx_t_11)) )));
+
+ /* "silx/math/combo.pyx":187
+ * for index in range(index+1, length):
+ * value = data[index]
+ * if value > maximum: # <<<<<<<<<<<<<<
+ * maximum = value
+ * max_index = index
+ */
+ __pyx_t_3 = ((__pyx_v_value > __pyx_v_maximum) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":188
+ * value = data[index]
+ * if value > maximum:
+ * maximum = value # <<<<<<<<<<<<<<
+ * max_index = index
+ * else:
+ */
+ __pyx_v_maximum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":189
+ * if value > maximum:
+ * maximum = value
+ * max_index = index # <<<<<<<<<<<<<<
+ * else:
+ * if value < minimum:
+ */
+ __pyx_v_max_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":187
+ * for index in range(index+1, length):
+ * value = data[index]
+ * if value > maximum: # <<<<<<<<<<<<<<
+ * maximum = value
+ * max_index = index
+ */
+ goto __pyx_L23;
+ }
+
+ /* "silx/math/combo.pyx":191
+ * max_index = index
+ * else:
+ * if value < minimum: # <<<<<<<<<<<<<<
+ * minimum = value
+ * min_index = index
+ */
+ /*else*/ {
+ __pyx_t_3 = ((__pyx_v_value < __pyx_v_minimum) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":192
+ * else:
+ * if value < minimum:
+ * minimum = value # <<<<<<<<<<<<<<
+ * min_index = index
+ *
+ */
+ __pyx_v_minimum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":193
+ * if value < minimum:
+ * minimum = value
+ * min_index = index # <<<<<<<<<<<<<<
+ *
+ * if 0 < value < min_pos:
+ */
+ __pyx_v_min_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":191
+ * max_index = index
+ * else:
+ * if value < minimum: # <<<<<<<<<<<<<<
+ * minimum = value
+ * min_index = index
+ */
+ }
+
+ /* "silx/math/combo.pyx":195
+ * min_index = index
+ *
+ * if 0 < value < min_pos: # <<<<<<<<<<<<<<
+ * min_pos = value
+ * min_pos_index = index
+ */
+ __pyx_t_3 = (0.0 < __pyx_v_value);
+ if (__pyx_t_3) {
+ __pyx_t_3 = (__pyx_v_value < __pyx_v_min_pos);
+ }
+ __pyx_t_5 = (__pyx_t_3 != 0);
+ if (__pyx_t_5) {
+
+ /* "silx/math/combo.pyx":196
+ *
+ * if 0 < value < min_pos:
+ * min_pos = value # <<<<<<<<<<<<<<
+ * min_pos_index = index
+ *
+ */
+ __pyx_v_min_pos = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":197
+ * if 0 < value < min_pos:
+ * min_pos = value
+ * min_pos_index = index # <<<<<<<<<<<<<<
+ *
+ * return _MinMaxResult(minimum,
+ */
+ __pyx_v_min_pos_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":195
+ * min_index = index
+ *
+ * if 0 < value < min_pos: # <<<<<<<<<<<<<<
+ * min_pos = value
+ * min_pos_index = index
+ */
+ }
+ }
+ __pyx_L23:;
+ }
+ }
+ __pyx_L13:;
+ }
+
+ /* "silx/math/combo.pyx":137
+ * raise ValueError('Zero-size array')
+ *
+ * with nogil: # <<<<<<<<<<<<<<
+ * # Init starting values
+ * value = data[0]
+ */
+ /*finally:*/ {
+ /*normal exit:*/{
+ #ifdef WITH_THREAD
+ Py_BLOCK_THREADS
+ #endif
+ goto __pyx_L6;
+ }
+ __pyx_L6:;
+ }
+ }
+
+ /* "silx/math/combo.pyx":199
+ * min_pos_index = index
+ *
+ * return _MinMaxResult(minimum, # <<<<<<<<<<<<<<
+ * min_pos if min_pos > 0 else None,
+ * maximum,
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_MinMaxResult); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __pyx_t_13 = PyFloat_FromDouble(__pyx_v_minimum); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_13);
+
+ /* "silx/math/combo.pyx":200
+ *
+ * return _MinMaxResult(minimum,
+ * min_pos if min_pos > 0 else None, # <<<<<<<<<<<<<<
+ * maximum,
+ * min_index,
+ */
+ if (((__pyx_v_min_pos > 0.0) != 0)) {
+ __pyx_t_15 = PyFloat_FromDouble(__pyx_v_min_pos); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 200, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_15);
+ __pyx_t_14 = __pyx_t_15;
+ __pyx_t_15 = 0;
+ } else {
+ __Pyx_INCREF(Py_None);
+ __pyx_t_14 = Py_None;
+ }
+
+ /* "silx/math/combo.pyx":201
+ * return _MinMaxResult(minimum,
+ * min_pos if min_pos > 0 else None,
+ * maximum, # <<<<<<<<<<<<<<
+ * min_index,
+ * min_pos_index if min_pos > 0 else None,
+ */
+ __pyx_t_15 = PyFloat_FromDouble(__pyx_v_maximum); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 201, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_15);
+
+ /* "silx/math/combo.pyx":202
+ * min_pos if min_pos > 0 else None,
+ * maximum,
+ * min_index, # <<<<<<<<<<<<<<
+ * min_pos_index if min_pos > 0 else None,
+ * max_index)
+ */
+ __pyx_t_16 = __Pyx_PyInt_From_unsigned_int(__pyx_v_min_index); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 202, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_16);
+
+ /* "silx/math/combo.pyx":203
+ * maximum,
+ * min_index,
+ * min_pos_index if min_pos > 0 else None, # <<<<<<<<<<<<<<
+ * max_index)
+ *
+ */
+ if (((__pyx_v_min_pos > 0.0) != 0)) {
+ __pyx_t_18 = __Pyx_PyInt_From_unsigned_int(__pyx_v_min_pos_index); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 203, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_18);
+ __pyx_t_17 = __pyx_t_18;
+ __pyx_t_18 = 0;
+ } else {
+ __Pyx_INCREF(Py_None);
+ __pyx_t_17 = Py_None;
+ }
+
+ /* "silx/math/combo.pyx":204
+ * min_index,
+ * min_pos_index if min_pos > 0 else None,
+ * max_index) # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __pyx_t_18 = __Pyx_PyInt_From_unsigned_int(__pyx_v_max_index); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 204, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_18);
+ __pyx_t_19 = NULL;
+ __pyx_t_20 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
+ __pyx_t_19 = PyMethod_GET_SELF(__pyx_t_12);
+ if (likely(__pyx_t_19)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
+ __Pyx_INCREF(__pyx_t_19);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_12, function);
+ __pyx_t_20 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_12)) {
+ PyObject *__pyx_temp[7] = {__pyx_t_19, __pyx_t_13, __pyx_t_14, __pyx_t_15, __pyx_t_16, __pyx_t_17, __pyx_t_18};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_20, 6+__pyx_t_20); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+ __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
+ __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
+ __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
+ PyObject *__pyx_temp[7] = {__pyx_t_19, __pyx_t_13, __pyx_t_14, __pyx_t_15, __pyx_t_16, __pyx_t_17, __pyx_t_18};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_20, 6+__pyx_t_20); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+ __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
+ __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
+ __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_21 = PyTuple_New(6+__pyx_t_20); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_21);
+ if (__pyx_t_19) {
+ __Pyx_GIVEREF(__pyx_t_19); PyTuple_SET_ITEM(__pyx_t_21, 0, __pyx_t_19); __pyx_t_19 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_13);
+ PyTuple_SET_ITEM(__pyx_t_21, 0+__pyx_t_20, __pyx_t_13);
+ __Pyx_GIVEREF(__pyx_t_14);
+ PyTuple_SET_ITEM(__pyx_t_21, 1+__pyx_t_20, __pyx_t_14);
+ __Pyx_GIVEREF(__pyx_t_15);
+ PyTuple_SET_ITEM(__pyx_t_21, 2+__pyx_t_20, __pyx_t_15);
+ __Pyx_GIVEREF(__pyx_t_16);
+ PyTuple_SET_ITEM(__pyx_t_21, 3+__pyx_t_20, __pyx_t_16);
+ __Pyx_GIVEREF(__pyx_t_17);
+ PyTuple_SET_ITEM(__pyx_t_21, 4+__pyx_t_20, __pyx_t_17);
+ __Pyx_GIVEREF(__pyx_t_18);
+ PyTuple_SET_ITEM(__pyx_t_21, 5+__pyx_t_20, __pyx_t_18);
+ __pyx_t_13 = 0;
+ __pyx_t_14 = 0;
+ __pyx_t_15 = 0;
+ __pyx_t_16 = 0;
+ __pyx_t_17 = 0;
+ __pyx_t_18 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_21, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "silx/math/combo.pyx":119
+ * @cython.boundscheck(False)
+ * @cython.wraparound(False)
+ * def _min_max(_number[::1] data, bint min_positive=False): # <<<<<<<<<<<<<<
+ * """:func:`min_max` implementation including infinite values
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_12);
+ __Pyx_XDECREF(__pyx_t_13);
+ __Pyx_XDECREF(__pyx_t_14);
+ __Pyx_XDECREF(__pyx_t_15);
+ __Pyx_XDECREF(__pyx_t_16);
+ __Pyx_XDECREF(__pyx_t_17);
+ __Pyx_XDECREF(__pyx_t_18);
+ __Pyx_XDECREF(__pyx_t_19);
+ __Pyx_XDECREF(__pyx_t_21);
+ __Pyx_AddTraceback("silx.math.combo._min_max", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __PYX_XDEC_MEMVIEW(&__pyx_v_data, 1);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_4silx_4math_5combo_66__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ __Pyx_RefNannySetupContext("__defaults__", 0);
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyBool_FromLong(__Pyx_CyFunction_Defaults(__pyx_defaults14, __pyx_self)->__pyx_arg_min_positive); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 119, __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 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
+ __Pyx_INCREF(Py_None);
+ __Pyx_GIVEREF(Py_None);
+ PyTuple_SET_ITEM(__pyx_t_1, 1, Py_None);
+ __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_AddTraceback("silx.math.combo.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_fuse_2__pyx_pw_4silx_4math_5combo_11_min_max(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_fuse_2__pyx_mdef_4silx_4math_5combo_11_min_max = {"__pyx_fuse_2_min_max", (PyCFunction)__pyx_fuse_2__pyx_pw_4silx_4math_5combo_11_min_max, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4silx_4math_5combo__min_max};
+static PyObject *__pyx_fuse_2__pyx_pw_4silx_4math_5combo_11_min_max(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ __Pyx_memviewslice __pyx_v_data = { 0, 0, { 0 }, { 0 }, { 0 } };
+ int __pyx_v_min_positive;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_min_max (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,&__pyx_n_s_min_positive_2,0};
+ PyObject* values[2] = {0,0};
+ __pyx_defaults14 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults14, __pyx_self);
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ case 1:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_min_positive_2);
+ if (value) { values[1] = value; kw_args--; }
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_min_max") < 0)) __PYX_ERR(0, 119, __pyx_L3_error)
+ }
+ } else {
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ }
+ __pyx_v_data = __Pyx_PyObject_to_MemoryviewSlice_dc_signed__char(values[0]); if (unlikely(!__pyx_v_data.memview)) __PYX_ERR(0, 119, __pyx_L3_error)
+ if (values[1]) {
+ __pyx_v_min_positive = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_min_positive == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 119, __pyx_L3_error)
+ } else {
+ __pyx_v_min_positive = __pyx_dynamic_args->__pyx_arg_min_positive;
+ }
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("_min_max", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 119, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("silx.math.combo._min_max", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_4silx_4math_5combo_10_min_max(__pyx_self, __pyx_v_data, __pyx_v_min_positive);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_4silx_4math_5combo_10_min_max(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_data, int __pyx_v_min_positive) {
+ signed char __pyx_v_value;
+ signed char __pyx_v_minimum;
+ signed char __pyx_v_maximum;
+ unsigned int __pyx_v_length;
+ unsigned int __pyx_v_index;
+ unsigned int __pyx_v_min_index;
+ unsigned int __pyx_v_min_pos_index;
+ unsigned int __pyx_v_max_index;
+ long __pyx_v_min_pos;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ Py_ssize_t __pyx_t_2;
+ int __pyx_t_3;
+ Py_ssize_t __pyx_t_4;
+ int __pyx_t_5;
+ unsigned int __pyx_t_6;
+ unsigned int __pyx_t_7;
+ size_t __pyx_t_8;
+ size_t __pyx_t_9;
+ size_t __pyx_t_10;
+ PyObject *__pyx_t_11 = NULL;
+ PyObject *__pyx_t_12 = NULL;
+ PyObject *__pyx_t_13 = NULL;
+ PyObject *__pyx_t_14 = NULL;
+ PyObject *__pyx_t_15 = NULL;
+ PyObject *__pyx_t_16 = NULL;
+ PyObject *__pyx_t_17 = NULL;
+ PyObject *__pyx_t_18 = NULL;
+ int __pyx_t_19;
+ PyObject *__pyx_t_20 = NULL;
+ __Pyx_RefNannySetupContext("__pyx_fuse_2_min_max", 0);
+
+ /* "silx/math/combo.pyx":127
+ * _number value, minimum, minpos, maximum
+ * unsigned int length
+ * unsigned int index = 0 # <<<<<<<<<<<<<<
+ * unsigned int min_index = 0
+ * unsigned int min_pos_index = 0
+ */
+ __pyx_v_index = 0;
+
+ /* "silx/math/combo.pyx":128
+ * unsigned int length
+ * unsigned int index = 0
+ * unsigned int min_index = 0 # <<<<<<<<<<<<<<
+ * unsigned int min_pos_index = 0
+ * unsigned int max_index = 0
+ */
+ __pyx_v_min_index = 0;
+
+ /* "silx/math/combo.pyx":129
+ * unsigned int index = 0
+ * unsigned int min_index = 0
+ * unsigned int min_pos_index = 0 # <<<<<<<<<<<<<<
+ * unsigned int max_index = 0
+ *
+ */
+ __pyx_v_min_pos_index = 0;
+
+ /* "silx/math/combo.pyx":130
+ * unsigned int min_index = 0
+ * unsigned int min_pos_index = 0
+ * unsigned int max_index = 0 # <<<<<<<<<<<<<<
+ *
+ * length = len(data)
+ */
+ __pyx_v_max_index = 0;
+
+ /* "silx/math/combo.pyx":132
+ * unsigned int max_index = 0
+ *
+ * length = len(data) # <<<<<<<<<<<<<<
+ *
+ * if length == 0:
+ */
+ __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_data, 1, (PyObject *(*)(char *)) __pyx_memview_get_signed__char, (int (*)(char *, PyObject *)) __pyx_memview_set_signed__char, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 132, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 132, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_v_length = __pyx_t_2;
+
+ /* "silx/math/combo.pyx":134
+ * length = len(data)
+ *
+ * if length == 0: # <<<<<<<<<<<<<<
+ * raise ValueError('Zero-size array')
+ *
+ */
+ __pyx_t_3 = ((__pyx_v_length == 0) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":135
+ *
+ * if length == 0:
+ * raise ValueError('Zero-size array') # <<<<<<<<<<<<<<
+ *
+ * with nogil:
+ */
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 135, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __PYX_ERR(0, 135, __pyx_L1_error)
+
+ /* "silx/math/combo.pyx":134
+ * length = len(data)
+ *
+ * if length == 0: # <<<<<<<<<<<<<<
+ * raise ValueError('Zero-size array')
+ *
+ */
+ }
+
+ /* "silx/math/combo.pyx":137
+ * raise ValueError('Zero-size array')
+ *
+ * with nogil: # <<<<<<<<<<<<<<
+ * # Init starting values
+ * value = data[0]
+ */
+ {
+ #ifdef WITH_THREAD
+ PyThreadState *_save;
+ Py_UNBLOCK_THREADS
+ #endif
+ /*try:*/ {
+
+ /* "silx/math/combo.pyx":139
+ * with nogil:
+ * # Init starting values
+ * value = data[0] # <<<<<<<<<<<<<<
+ * minimum = value
+ * maximum = value
+ */
+ __pyx_t_4 = 0;
+ __pyx_v_value = (*((signed char *) ( /* dim=0 */ ((char *) (((signed char *) __pyx_v_data.data) + __pyx_t_4)) )));
+
+ /* "silx/math/combo.pyx":140
+ * # Init starting values
+ * value = data[0]
+ * minimum = value # <<<<<<<<<<<<<<
+ * maximum = value
+ * if min_positive and value > 0:
+ */
+ __pyx_v_minimum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":141
+ * value = data[0]
+ * minimum = value
+ * maximum = value # <<<<<<<<<<<<<<
+ * if min_positive and value > 0:
+ * min_pos = value
+ */
+ __pyx_v_maximum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":142
+ * minimum = value
+ * maximum = value
+ * if min_positive and value > 0: # <<<<<<<<<<<<<<
+ * min_pos = value
+ * else:
+ */
+ __pyx_t_5 = (__pyx_v_min_positive != 0);
+ if (__pyx_t_5) {
+ } else {
+ __pyx_t_3 = __pyx_t_5;
+ goto __pyx_L8_bool_binop_done;
+ }
+ __pyx_t_5 = ((__pyx_v_value > 0) != 0);
+ __pyx_t_3 = __pyx_t_5;
+ __pyx_L8_bool_binop_done:;
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":143
+ * maximum = value
+ * if min_positive and value > 0:
+ * min_pos = value # <<<<<<<<<<<<<<
+ * else:
+ * min_pos = 0
+ */
+ __pyx_v_min_pos = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":142
+ * minimum = value
+ * maximum = value
+ * if min_positive and value > 0: # <<<<<<<<<<<<<<
+ * min_pos = value
+ * else:
+ */
+ goto __pyx_L7;
+ }
+
+ /* "silx/math/combo.pyx":145
+ * min_pos = value
+ * else:
+ * min_pos = 0 # <<<<<<<<<<<<<<
+ *
+ * if _number in cython.floating:
+ */
+ /*else*/ {
+ __pyx_v_min_pos = 0;
+ }
+ __pyx_L7:;
+
+ /* "silx/math/combo.pyx":158
+ * break
+ *
+ * if not min_positive: # <<<<<<<<<<<<<<
+ * for index in range(index, length):
+ * value = data[index]
+ */
+ __pyx_t_3 = ((!(__pyx_v_min_positive != 0)) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":159
+ *
+ * if not min_positive:
+ * for index in range(index, length): # <<<<<<<<<<<<<<
+ * value = data[index]
+ * if value > maximum:
+ */
+ __pyx_t_6 = __pyx_v_length;
+ for (__pyx_t_7 = __pyx_v_index; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
+ __pyx_v_index = __pyx_t_7;
+
+ /* "silx/math/combo.pyx":160
+ * if not min_positive:
+ * for index in range(index, length):
+ * value = data[index] # <<<<<<<<<<<<<<
+ * if value > maximum:
+ * maximum = value
+ */
+ __pyx_t_8 = __pyx_v_index;
+ __pyx_v_value = (*((signed char *) ( /* dim=0 */ ((char *) (((signed char *) __pyx_v_data.data) + __pyx_t_8)) )));
+
+ /* "silx/math/combo.pyx":161
+ * for index in range(index, length):
+ * value = data[index]
+ * if value > maximum: # <<<<<<<<<<<<<<
+ * maximum = value
+ * max_index = index
+ */
+ __pyx_t_3 = ((__pyx_v_value > __pyx_v_maximum) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":162
+ * value = data[index]
+ * if value > maximum:
+ * maximum = value # <<<<<<<<<<<<<<
+ * max_index = index
+ * elif value < minimum:
+ */
+ __pyx_v_maximum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":163
+ * if value > maximum:
+ * maximum = value
+ * max_index = index # <<<<<<<<<<<<<<
+ * elif value < minimum:
+ * minimum = value
+ */
+ __pyx_v_max_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":161
+ * for index in range(index, length):
+ * value = data[index]
+ * if value > maximum: # <<<<<<<<<<<<<<
+ * maximum = value
+ * max_index = index
+ */
+ goto __pyx_L13;
+ }
+
+ /* "silx/math/combo.pyx":164
+ * maximum = value
+ * max_index = index
+ * elif value < minimum: # <<<<<<<<<<<<<<
+ * minimum = value
+ * min_index = index
+ */
+ __pyx_t_3 = ((__pyx_v_value < __pyx_v_minimum) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":165
+ * max_index = index
+ * elif value < minimum:
+ * minimum = value # <<<<<<<<<<<<<<
+ * min_index = index
+ *
+ */
+ __pyx_v_minimum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":166
+ * elif value < minimum:
+ * minimum = value
+ * min_index = index # <<<<<<<<<<<<<<
+ *
+ * else:
+ */
+ __pyx_v_min_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":164
+ * maximum = value
+ * max_index = index
+ * elif value < minimum: # <<<<<<<<<<<<<<
+ * minimum = value
+ * min_index = index
+ */
+ }
+ __pyx_L13:;
+ }
+
+ /* "silx/math/combo.pyx":158
+ * break
+ *
+ * if not min_positive: # <<<<<<<<<<<<<<
+ * for index in range(index, length):
+ * value = data[index]
+ */
+ goto __pyx_L10;
+ }
+
+ /* "silx/math/combo.pyx":170
+ * else:
+ * # Loop until min_pos is defined
+ * for index in range(index, length): # <<<<<<<<<<<<<<
+ * value = data[index]
+ * if value > maximum:
+ */
+ /*else*/ {
+ __pyx_t_6 = __pyx_v_length;
+ for (__pyx_t_7 = __pyx_v_index; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
+ __pyx_v_index = __pyx_t_7;
+
+ /* "silx/math/combo.pyx":171
+ * # Loop until min_pos is defined
+ * for index in range(index, length):
+ * value = data[index] # <<<<<<<<<<<<<<
+ * if value > maximum:
+ * maximum = value
+ */
+ __pyx_t_9 = __pyx_v_index;
+ __pyx_v_value = (*((signed char *) ( /* dim=0 */ ((char *) (((signed char *) __pyx_v_data.data) + __pyx_t_9)) )));
+
+ /* "silx/math/combo.pyx":172
+ * for index in range(index, length):
+ * value = data[index]
+ * if value > maximum: # <<<<<<<<<<<<<<
+ * maximum = value
+ * max_index = index
+ */
+ __pyx_t_3 = ((__pyx_v_value > __pyx_v_maximum) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":173
+ * value = data[index]
+ * if value > maximum:
+ * maximum = value # <<<<<<<<<<<<<<
+ * max_index = index
+ * elif value < minimum:
+ */
+ __pyx_v_maximum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":174
+ * if value > maximum:
+ * maximum = value
+ * max_index = index # <<<<<<<<<<<<<<
+ * elif value < minimum:
+ * minimum = value
+ */
+ __pyx_v_max_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":172
+ * for index in range(index, length):
+ * value = data[index]
+ * if value > maximum: # <<<<<<<<<<<<<<
+ * maximum = value
+ * max_index = index
+ */
+ goto __pyx_L16;
+ }
+
+ /* "silx/math/combo.pyx":175
+ * maximum = value
+ * max_index = index
+ * elif value < minimum: # <<<<<<<<<<<<<<
+ * minimum = value
+ * min_index = index
+ */
+ __pyx_t_3 = ((__pyx_v_value < __pyx_v_minimum) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":176
+ * max_index = index
+ * elif value < minimum:
+ * minimum = value # <<<<<<<<<<<<<<
+ * min_index = index
+ *
+ */
+ __pyx_v_minimum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":177
+ * elif value < minimum:
+ * minimum = value
+ * min_index = index # <<<<<<<<<<<<<<
+ *
+ * if value > 0:
+ */
+ __pyx_v_min_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":175
+ * maximum = value
+ * max_index = index
+ * elif value < minimum: # <<<<<<<<<<<<<<
+ * minimum = value
+ * min_index = index
+ */
+ }
+ __pyx_L16:;
+
+ /* "silx/math/combo.pyx":179
+ * min_index = index
+ *
+ * if value > 0: # <<<<<<<<<<<<<<
+ * min_pos = value
+ * min_pos_index = index
+ */
+ __pyx_t_3 = ((__pyx_v_value > 0) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":180
+ *
+ * if value > 0:
+ * min_pos = value # <<<<<<<<<<<<<<
+ * min_pos_index = index
+ * break
+ */
+ __pyx_v_min_pos = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":181
+ * if value > 0:
+ * min_pos = value
+ * min_pos_index = index # <<<<<<<<<<<<<<
+ * break
+ *
+ */
+ __pyx_v_min_pos_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":182
+ * min_pos = value
+ * min_pos_index = index
+ * break # <<<<<<<<<<<<<<
+ *
+ * # Loop until the end
+ */
+ goto __pyx_L15_break;
+
+ /* "silx/math/combo.pyx":179
+ * min_index = index
+ *
+ * if value > 0: # <<<<<<<<<<<<<<
+ * min_pos = value
+ * min_pos_index = index
+ */
+ }
+ }
+ __pyx_L15_break:;
+
+ /* "silx/math/combo.pyx":185
+ *
+ * # Loop until the end
+ * for index in range(index+1, length): # <<<<<<<<<<<<<<
+ * value = data[index]
+ * if value > maximum:
+ */
+ __pyx_t_6 = __pyx_v_length;
+ for (__pyx_t_7 = (__pyx_v_index + 1); __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
+ __pyx_v_index = __pyx_t_7;
+
+ /* "silx/math/combo.pyx":186
+ * # Loop until the end
+ * for index in range(index+1, length):
+ * value = data[index] # <<<<<<<<<<<<<<
+ * if value > maximum:
+ * maximum = value
+ */
+ __pyx_t_10 = __pyx_v_index;
+ __pyx_v_value = (*((signed char *) ( /* dim=0 */ ((char *) (((signed char *) __pyx_v_data.data) + __pyx_t_10)) )));
+
+ /* "silx/math/combo.pyx":187
+ * for index in range(index+1, length):
+ * value = data[index]
+ * if value > maximum: # <<<<<<<<<<<<<<
+ * maximum = value
+ * max_index = index
+ */
+ __pyx_t_3 = ((__pyx_v_value > __pyx_v_maximum) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":188
+ * value = data[index]
+ * if value > maximum:
+ * maximum = value # <<<<<<<<<<<<<<
+ * max_index = index
+ * else:
+ */
+ __pyx_v_maximum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":189
+ * if value > maximum:
+ * maximum = value
+ * max_index = index # <<<<<<<<<<<<<<
+ * else:
+ * if value < minimum:
+ */
+ __pyx_v_max_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":187
+ * for index in range(index+1, length):
+ * value = data[index]
+ * if value > maximum: # <<<<<<<<<<<<<<
+ * maximum = value
+ * max_index = index
+ */
+ goto __pyx_L20;
+ }
+
+ /* "silx/math/combo.pyx":191
+ * max_index = index
+ * else:
+ * if value < minimum: # <<<<<<<<<<<<<<
+ * minimum = value
+ * min_index = index
+ */
+ /*else*/ {
+ __pyx_t_3 = ((__pyx_v_value < __pyx_v_minimum) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":192
+ * else:
+ * if value < minimum:
+ * minimum = value # <<<<<<<<<<<<<<
+ * min_index = index
+ *
+ */
+ __pyx_v_minimum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":193
+ * if value < minimum:
+ * minimum = value
+ * min_index = index # <<<<<<<<<<<<<<
+ *
+ * if 0 < value < min_pos:
+ */
+ __pyx_v_min_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":191
+ * max_index = index
+ * else:
+ * if value < minimum: # <<<<<<<<<<<<<<
+ * minimum = value
+ * min_index = index
+ */
+ }
+
+ /* "silx/math/combo.pyx":195
+ * min_index = index
+ *
+ * if 0 < value < min_pos: # <<<<<<<<<<<<<<
+ * min_pos = value
+ * min_pos_index = index
+ */
+ __pyx_t_3 = (0 < __pyx_v_value);
+ if (__pyx_t_3) {
+ __pyx_t_3 = (__pyx_v_value < __pyx_v_min_pos);
+ }
+ __pyx_t_5 = (__pyx_t_3 != 0);
+ if (__pyx_t_5) {
+
+ /* "silx/math/combo.pyx":196
+ *
+ * if 0 < value < min_pos:
+ * min_pos = value # <<<<<<<<<<<<<<
+ * min_pos_index = index
+ *
+ */
+ __pyx_v_min_pos = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":197
+ * if 0 < value < min_pos:
+ * min_pos = value
+ * min_pos_index = index # <<<<<<<<<<<<<<
+ *
+ * return _MinMaxResult(minimum,
+ */
+ __pyx_v_min_pos_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":195
+ * min_index = index
+ *
+ * if 0 < value < min_pos: # <<<<<<<<<<<<<<
+ * min_pos = value
+ * min_pos_index = index
+ */
+ }
+ }
+ __pyx_L20:;
+ }
+ }
+ __pyx_L10:;
+ }
+
+ /* "silx/math/combo.pyx":137
+ * raise ValueError('Zero-size array')
+ *
+ * with nogil: # <<<<<<<<<<<<<<
+ * # Init starting values
+ * value = data[0]
+ */
+ /*finally:*/ {
+ /*normal exit:*/{
+ #ifdef WITH_THREAD
+ Py_BLOCK_THREADS
+ #endif
+ goto __pyx_L6;
+ }
+ __pyx_L6:;
+ }
+ }
+
+ /* "silx/math/combo.pyx":199
+ * min_pos_index = index
+ *
+ * return _MinMaxResult(minimum, # <<<<<<<<<<<<<<
+ * min_pos if min_pos > 0 else None,
+ * maximum,
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_MinMaxResult); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __pyx_t_12 = __Pyx_PyInt_From_signed__char(__pyx_v_minimum); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+
+ /* "silx/math/combo.pyx":200
+ *
+ * return _MinMaxResult(minimum,
+ * min_pos if min_pos > 0 else None, # <<<<<<<<<<<<<<
+ * maximum,
+ * min_index,
+ */
+ if (((__pyx_v_min_pos > 0) != 0)) {
+ __pyx_t_14 = __Pyx_PyInt_From_long(__pyx_v_min_pos); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 200, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_14);
+ __pyx_t_13 = __pyx_t_14;
+ __pyx_t_14 = 0;
+ } else {
+ __Pyx_INCREF(Py_None);
+ __pyx_t_13 = Py_None;
+ }
+
+ /* "silx/math/combo.pyx":201
+ * return _MinMaxResult(minimum,
+ * min_pos if min_pos > 0 else None,
+ * maximum, # <<<<<<<<<<<<<<
+ * min_index,
+ * min_pos_index if min_pos > 0 else None,
+ */
+ __pyx_t_14 = __Pyx_PyInt_From_signed__char(__pyx_v_maximum); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 201, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_14);
+
+ /* "silx/math/combo.pyx":202
+ * min_pos if min_pos > 0 else None,
+ * maximum,
+ * min_index, # <<<<<<<<<<<<<<
+ * min_pos_index if min_pos > 0 else None,
+ * max_index)
+ */
+ __pyx_t_15 = __Pyx_PyInt_From_unsigned_int(__pyx_v_min_index); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 202, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_15);
+
+ /* "silx/math/combo.pyx":203
+ * maximum,
+ * min_index,
+ * min_pos_index if min_pos > 0 else None, # <<<<<<<<<<<<<<
+ * max_index)
+ *
+ */
+ if (((__pyx_v_min_pos > 0) != 0)) {
+ __pyx_t_17 = __Pyx_PyInt_From_unsigned_int(__pyx_v_min_pos_index); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 203, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_17);
+ __pyx_t_16 = __pyx_t_17;
+ __pyx_t_17 = 0;
+ } else {
+ __Pyx_INCREF(Py_None);
+ __pyx_t_16 = Py_None;
+ }
+
+ /* "silx/math/combo.pyx":204
+ * min_index,
+ * min_pos_index if min_pos > 0 else None,
+ * max_index) # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __pyx_t_17 = __Pyx_PyInt_From_unsigned_int(__pyx_v_max_index); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 204, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_17);
+ __pyx_t_18 = NULL;
+ __pyx_t_19 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
+ __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_11);
+ if (likely(__pyx_t_18)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
+ __Pyx_INCREF(__pyx_t_18);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_11, function);
+ __pyx_t_19 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_11)) {
+ PyObject *__pyx_temp[7] = {__pyx_t_18, __pyx_t_12, __pyx_t_13, __pyx_t_14, __pyx_t_15, __pyx_t_16, __pyx_t_17};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_19, 6+__pyx_t_19); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+ __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
+ __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) {
+ PyObject *__pyx_temp[7] = {__pyx_t_18, __pyx_t_12, __pyx_t_13, __pyx_t_14, __pyx_t_15, __pyx_t_16, __pyx_t_17};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_19, 6+__pyx_t_19); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+ __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
+ __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_20 = PyTuple_New(6+__pyx_t_19); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_20);
+ if (__pyx_t_18) {
+ __Pyx_GIVEREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_20, 0, __pyx_t_18); __pyx_t_18 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_12);
+ PyTuple_SET_ITEM(__pyx_t_20, 0+__pyx_t_19, __pyx_t_12);
+ __Pyx_GIVEREF(__pyx_t_13);
+ PyTuple_SET_ITEM(__pyx_t_20, 1+__pyx_t_19, __pyx_t_13);
+ __Pyx_GIVEREF(__pyx_t_14);
+ PyTuple_SET_ITEM(__pyx_t_20, 2+__pyx_t_19, __pyx_t_14);
+ __Pyx_GIVEREF(__pyx_t_15);
+ PyTuple_SET_ITEM(__pyx_t_20, 3+__pyx_t_19, __pyx_t_15);
+ __Pyx_GIVEREF(__pyx_t_16);
+ PyTuple_SET_ITEM(__pyx_t_20, 4+__pyx_t_19, __pyx_t_16);
+ __Pyx_GIVEREF(__pyx_t_17);
+ PyTuple_SET_ITEM(__pyx_t_20, 5+__pyx_t_19, __pyx_t_17);
+ __pyx_t_12 = 0;
+ __pyx_t_13 = 0;
+ __pyx_t_14 = 0;
+ __pyx_t_15 = 0;
+ __pyx_t_16 = 0;
+ __pyx_t_17 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_20, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "silx/math/combo.pyx":119
+ * @cython.boundscheck(False)
+ * @cython.wraparound(False)
+ * def _min_max(_number[::1] data, bint min_positive=False): # <<<<<<<<<<<<<<
+ * """:func:`min_max` implementation including infinite values
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_11);
+ __Pyx_XDECREF(__pyx_t_12);
+ __Pyx_XDECREF(__pyx_t_13);
+ __Pyx_XDECREF(__pyx_t_14);
+ __Pyx_XDECREF(__pyx_t_15);
+ __Pyx_XDECREF(__pyx_t_16);
+ __Pyx_XDECREF(__pyx_t_17);
+ __Pyx_XDECREF(__pyx_t_18);
+ __Pyx_XDECREF(__pyx_t_20);
+ __Pyx_AddTraceback("silx.math.combo._min_max", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __PYX_XDEC_MEMVIEW(&__pyx_v_data, 1);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_4silx_4math_5combo_68__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ __Pyx_RefNannySetupContext("__defaults__", 0);
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyBool_FromLong(__Pyx_CyFunction_Defaults(__pyx_defaults15, __pyx_self)->__pyx_arg_min_positive); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 119, __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 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
+ __Pyx_INCREF(Py_None);
+ __Pyx_GIVEREF(Py_None);
+ PyTuple_SET_ITEM(__pyx_t_1, 1, Py_None);
+ __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_AddTraceback("silx.math.combo.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_fuse_3__pyx_pw_4silx_4math_5combo_13_min_max(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_fuse_3__pyx_mdef_4silx_4math_5combo_13_min_max = {"__pyx_fuse_3_min_max", (PyCFunction)__pyx_fuse_3__pyx_pw_4silx_4math_5combo_13_min_max, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4silx_4math_5combo__min_max};
+static PyObject *__pyx_fuse_3__pyx_pw_4silx_4math_5combo_13_min_max(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ __Pyx_memviewslice __pyx_v_data = { 0, 0, { 0 }, { 0 }, { 0 } };
+ int __pyx_v_min_positive;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_min_max (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,&__pyx_n_s_min_positive_2,0};
+ PyObject* values[2] = {0,0};
+ __pyx_defaults15 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults15, __pyx_self);
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ case 1:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_min_positive_2);
+ if (value) { values[1] = value; kw_args--; }
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_min_max") < 0)) __PYX_ERR(0, 119, __pyx_L3_error)
+ }
+ } else {
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ }
+ __pyx_v_data = __Pyx_PyObject_to_MemoryviewSlice_dc_short(values[0]); if (unlikely(!__pyx_v_data.memview)) __PYX_ERR(0, 119, __pyx_L3_error)
+ if (values[1]) {
+ __pyx_v_min_positive = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_min_positive == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 119, __pyx_L3_error)
+ } else {
+ __pyx_v_min_positive = __pyx_dynamic_args->__pyx_arg_min_positive;
+ }
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("_min_max", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 119, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("silx.math.combo._min_max", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_4silx_4math_5combo_12_min_max(__pyx_self, __pyx_v_data, __pyx_v_min_positive);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_4silx_4math_5combo_12_min_max(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_data, int __pyx_v_min_positive) {
+ short __pyx_v_value;
+ short __pyx_v_minimum;
+ short __pyx_v_maximum;
+ unsigned int __pyx_v_length;
+ unsigned int __pyx_v_index;
+ unsigned int __pyx_v_min_index;
+ unsigned int __pyx_v_min_pos_index;
+ unsigned int __pyx_v_max_index;
+ long __pyx_v_min_pos;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ Py_ssize_t __pyx_t_2;
+ int __pyx_t_3;
+ Py_ssize_t __pyx_t_4;
+ int __pyx_t_5;
+ unsigned int __pyx_t_6;
+ unsigned int __pyx_t_7;
+ size_t __pyx_t_8;
+ size_t __pyx_t_9;
+ size_t __pyx_t_10;
+ PyObject *__pyx_t_11 = NULL;
+ PyObject *__pyx_t_12 = NULL;
+ PyObject *__pyx_t_13 = NULL;
+ PyObject *__pyx_t_14 = NULL;
+ PyObject *__pyx_t_15 = NULL;
+ PyObject *__pyx_t_16 = NULL;
+ PyObject *__pyx_t_17 = NULL;
+ PyObject *__pyx_t_18 = NULL;
+ int __pyx_t_19;
+ PyObject *__pyx_t_20 = NULL;
+ __Pyx_RefNannySetupContext("__pyx_fuse_3_min_max", 0);
+
+ /* "silx/math/combo.pyx":127
+ * _number value, minimum, minpos, maximum
+ * unsigned int length
+ * unsigned int index = 0 # <<<<<<<<<<<<<<
+ * unsigned int min_index = 0
+ * unsigned int min_pos_index = 0
+ */
+ __pyx_v_index = 0;
+
+ /* "silx/math/combo.pyx":128
+ * unsigned int length
+ * unsigned int index = 0
+ * unsigned int min_index = 0 # <<<<<<<<<<<<<<
+ * unsigned int min_pos_index = 0
+ * unsigned int max_index = 0
+ */
+ __pyx_v_min_index = 0;
+
+ /* "silx/math/combo.pyx":129
+ * unsigned int index = 0
+ * unsigned int min_index = 0
+ * unsigned int min_pos_index = 0 # <<<<<<<<<<<<<<
+ * unsigned int max_index = 0
+ *
+ */
+ __pyx_v_min_pos_index = 0;
+
+ /* "silx/math/combo.pyx":130
+ * unsigned int min_index = 0
+ * unsigned int min_pos_index = 0
+ * unsigned int max_index = 0 # <<<<<<<<<<<<<<
+ *
+ * length = len(data)
+ */
+ __pyx_v_max_index = 0;
+
+ /* "silx/math/combo.pyx":132
+ * unsigned int max_index = 0
+ *
+ * length = len(data) # <<<<<<<<<<<<<<
+ *
+ * if length == 0:
+ */
+ __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_data, 1, (PyObject *(*)(char *)) __pyx_memview_get_short, (int (*)(char *, PyObject *)) __pyx_memview_set_short, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 132, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 132, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_v_length = __pyx_t_2;
+
+ /* "silx/math/combo.pyx":134
+ * length = len(data)
+ *
+ * if length == 0: # <<<<<<<<<<<<<<
+ * raise ValueError('Zero-size array')
+ *
+ */
+ __pyx_t_3 = ((__pyx_v_length == 0) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":135
+ *
+ * if length == 0:
+ * raise ValueError('Zero-size array') # <<<<<<<<<<<<<<
+ *
+ * with nogil:
+ */
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 135, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __PYX_ERR(0, 135, __pyx_L1_error)
+
+ /* "silx/math/combo.pyx":134
+ * length = len(data)
+ *
+ * if length == 0: # <<<<<<<<<<<<<<
+ * raise ValueError('Zero-size array')
+ *
+ */
+ }
+
+ /* "silx/math/combo.pyx":137
+ * raise ValueError('Zero-size array')
+ *
+ * with nogil: # <<<<<<<<<<<<<<
+ * # Init starting values
+ * value = data[0]
+ */
+ {
+ #ifdef WITH_THREAD
+ PyThreadState *_save;
+ Py_UNBLOCK_THREADS
+ #endif
+ /*try:*/ {
+
+ /* "silx/math/combo.pyx":139
+ * with nogil:
+ * # Init starting values
+ * value = data[0] # <<<<<<<<<<<<<<
+ * minimum = value
+ * maximum = value
+ */
+ __pyx_t_4 = 0;
+ __pyx_v_value = (*((short *) ( /* dim=0 */ ((char *) (((short *) __pyx_v_data.data) + __pyx_t_4)) )));
+
+ /* "silx/math/combo.pyx":140
+ * # Init starting values
+ * value = data[0]
+ * minimum = value # <<<<<<<<<<<<<<
+ * maximum = value
+ * if min_positive and value > 0:
+ */
+ __pyx_v_minimum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":141
+ * value = data[0]
+ * minimum = value
+ * maximum = value # <<<<<<<<<<<<<<
+ * if min_positive and value > 0:
+ * min_pos = value
+ */
+ __pyx_v_maximum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":142
+ * minimum = value
+ * maximum = value
+ * if min_positive and value > 0: # <<<<<<<<<<<<<<
+ * min_pos = value
+ * else:
+ */
+ __pyx_t_5 = (__pyx_v_min_positive != 0);
+ if (__pyx_t_5) {
+ } else {
+ __pyx_t_3 = __pyx_t_5;
+ goto __pyx_L8_bool_binop_done;
+ }
+ __pyx_t_5 = ((__pyx_v_value > 0) != 0);
+ __pyx_t_3 = __pyx_t_5;
+ __pyx_L8_bool_binop_done:;
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":143
+ * maximum = value
+ * if min_positive and value > 0:
+ * min_pos = value # <<<<<<<<<<<<<<
+ * else:
+ * min_pos = 0
+ */
+ __pyx_v_min_pos = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":142
+ * minimum = value
+ * maximum = value
+ * if min_positive and value > 0: # <<<<<<<<<<<<<<
+ * min_pos = value
+ * else:
+ */
+ goto __pyx_L7;
+ }
+
+ /* "silx/math/combo.pyx":145
+ * min_pos = value
+ * else:
+ * min_pos = 0 # <<<<<<<<<<<<<<
+ *
+ * if _number in cython.floating:
+ */
+ /*else*/ {
+ __pyx_v_min_pos = 0;
+ }
+ __pyx_L7:;
+
+ /* "silx/math/combo.pyx":158
+ * break
+ *
+ * if not min_positive: # <<<<<<<<<<<<<<
+ * for index in range(index, length):
+ * value = data[index]
+ */
+ __pyx_t_3 = ((!(__pyx_v_min_positive != 0)) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":159
+ *
+ * if not min_positive:
+ * for index in range(index, length): # <<<<<<<<<<<<<<
+ * value = data[index]
+ * if value > maximum:
+ */
+ __pyx_t_6 = __pyx_v_length;
+ for (__pyx_t_7 = __pyx_v_index; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
+ __pyx_v_index = __pyx_t_7;
+
+ /* "silx/math/combo.pyx":160
+ * if not min_positive:
+ * for index in range(index, length):
+ * value = data[index] # <<<<<<<<<<<<<<
+ * if value > maximum:
+ * maximum = value
+ */
+ __pyx_t_8 = __pyx_v_index;
+ __pyx_v_value = (*((short *) ( /* dim=0 */ ((char *) (((short *) __pyx_v_data.data) + __pyx_t_8)) )));
+
+ /* "silx/math/combo.pyx":161
+ * for index in range(index, length):
+ * value = data[index]
+ * if value > maximum: # <<<<<<<<<<<<<<
+ * maximum = value
+ * max_index = index
+ */
+ __pyx_t_3 = ((__pyx_v_value > __pyx_v_maximum) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":162
+ * value = data[index]
+ * if value > maximum:
+ * maximum = value # <<<<<<<<<<<<<<
+ * max_index = index
+ * elif value < minimum:
+ */
+ __pyx_v_maximum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":163
+ * if value > maximum:
+ * maximum = value
+ * max_index = index # <<<<<<<<<<<<<<
+ * elif value < minimum:
+ * minimum = value
+ */
+ __pyx_v_max_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":161
+ * for index in range(index, length):
+ * value = data[index]
+ * if value > maximum: # <<<<<<<<<<<<<<
+ * maximum = value
+ * max_index = index
+ */
+ goto __pyx_L13;
+ }
+
+ /* "silx/math/combo.pyx":164
+ * maximum = value
+ * max_index = index
+ * elif value < minimum: # <<<<<<<<<<<<<<
+ * minimum = value
+ * min_index = index
+ */
+ __pyx_t_3 = ((__pyx_v_value < __pyx_v_minimum) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":165
+ * max_index = index
+ * elif value < minimum:
+ * minimum = value # <<<<<<<<<<<<<<
+ * min_index = index
+ *
+ */
+ __pyx_v_minimum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":166
+ * elif value < minimum:
+ * minimum = value
+ * min_index = index # <<<<<<<<<<<<<<
+ *
+ * else:
+ */
+ __pyx_v_min_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":164
+ * maximum = value
+ * max_index = index
+ * elif value < minimum: # <<<<<<<<<<<<<<
+ * minimum = value
+ * min_index = index
+ */
+ }
+ __pyx_L13:;
+ }
+
+ /* "silx/math/combo.pyx":158
+ * break
+ *
+ * if not min_positive: # <<<<<<<<<<<<<<
+ * for index in range(index, length):
+ * value = data[index]
+ */
+ goto __pyx_L10;
+ }
+
+ /* "silx/math/combo.pyx":170
+ * else:
+ * # Loop until min_pos is defined
+ * for index in range(index, length): # <<<<<<<<<<<<<<
+ * value = data[index]
+ * if value > maximum:
+ */
+ /*else*/ {
+ __pyx_t_6 = __pyx_v_length;
+ for (__pyx_t_7 = __pyx_v_index; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
+ __pyx_v_index = __pyx_t_7;
+
+ /* "silx/math/combo.pyx":171
+ * # Loop until min_pos is defined
+ * for index in range(index, length):
+ * value = data[index] # <<<<<<<<<<<<<<
+ * if value > maximum:
+ * maximum = value
+ */
+ __pyx_t_9 = __pyx_v_index;
+ __pyx_v_value = (*((short *) ( /* dim=0 */ ((char *) (((short *) __pyx_v_data.data) + __pyx_t_9)) )));
+
+ /* "silx/math/combo.pyx":172
+ * for index in range(index, length):
+ * value = data[index]
+ * if value > maximum: # <<<<<<<<<<<<<<
+ * maximum = value
+ * max_index = index
+ */
+ __pyx_t_3 = ((__pyx_v_value > __pyx_v_maximum) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":173
+ * value = data[index]
+ * if value > maximum:
+ * maximum = value # <<<<<<<<<<<<<<
+ * max_index = index
+ * elif value < minimum:
+ */
+ __pyx_v_maximum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":174
+ * if value > maximum:
+ * maximum = value
+ * max_index = index # <<<<<<<<<<<<<<
+ * elif value < minimum:
+ * minimum = value
+ */
+ __pyx_v_max_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":172
+ * for index in range(index, length):
+ * value = data[index]
+ * if value > maximum: # <<<<<<<<<<<<<<
+ * maximum = value
+ * max_index = index
+ */
+ goto __pyx_L16;
+ }
+
+ /* "silx/math/combo.pyx":175
+ * maximum = value
+ * max_index = index
+ * elif value < minimum: # <<<<<<<<<<<<<<
+ * minimum = value
+ * min_index = index
+ */
+ __pyx_t_3 = ((__pyx_v_value < __pyx_v_minimum) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":176
+ * max_index = index
+ * elif value < minimum:
+ * minimum = value # <<<<<<<<<<<<<<
+ * min_index = index
+ *
+ */
+ __pyx_v_minimum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":177
+ * elif value < minimum:
+ * minimum = value
+ * min_index = index # <<<<<<<<<<<<<<
+ *
+ * if value > 0:
+ */
+ __pyx_v_min_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":175
+ * maximum = value
+ * max_index = index
+ * elif value < minimum: # <<<<<<<<<<<<<<
+ * minimum = value
+ * min_index = index
+ */
+ }
+ __pyx_L16:;
+
+ /* "silx/math/combo.pyx":179
+ * min_index = index
+ *
+ * if value > 0: # <<<<<<<<<<<<<<
+ * min_pos = value
+ * min_pos_index = index
+ */
+ __pyx_t_3 = ((__pyx_v_value > 0) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":180
+ *
+ * if value > 0:
+ * min_pos = value # <<<<<<<<<<<<<<
+ * min_pos_index = index
+ * break
+ */
+ __pyx_v_min_pos = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":181
+ * if value > 0:
+ * min_pos = value
+ * min_pos_index = index # <<<<<<<<<<<<<<
+ * break
+ *
+ */
+ __pyx_v_min_pos_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":182
+ * min_pos = value
+ * min_pos_index = index
+ * break # <<<<<<<<<<<<<<
+ *
+ * # Loop until the end
+ */
+ goto __pyx_L15_break;
+
+ /* "silx/math/combo.pyx":179
+ * min_index = index
+ *
+ * if value > 0: # <<<<<<<<<<<<<<
+ * min_pos = value
+ * min_pos_index = index
+ */
+ }
+ }
+ __pyx_L15_break:;
+
+ /* "silx/math/combo.pyx":185
+ *
+ * # Loop until the end
+ * for index in range(index+1, length): # <<<<<<<<<<<<<<
+ * value = data[index]
+ * if value > maximum:
+ */
+ __pyx_t_6 = __pyx_v_length;
+ for (__pyx_t_7 = (__pyx_v_index + 1); __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
+ __pyx_v_index = __pyx_t_7;
+
+ /* "silx/math/combo.pyx":186
+ * # Loop until the end
+ * for index in range(index+1, length):
+ * value = data[index] # <<<<<<<<<<<<<<
+ * if value > maximum:
+ * maximum = value
+ */
+ __pyx_t_10 = __pyx_v_index;
+ __pyx_v_value = (*((short *) ( /* dim=0 */ ((char *) (((short *) __pyx_v_data.data) + __pyx_t_10)) )));
+
+ /* "silx/math/combo.pyx":187
+ * for index in range(index+1, length):
+ * value = data[index]
+ * if value > maximum: # <<<<<<<<<<<<<<
+ * maximum = value
+ * max_index = index
+ */
+ __pyx_t_3 = ((__pyx_v_value > __pyx_v_maximum) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":188
+ * value = data[index]
+ * if value > maximum:
+ * maximum = value # <<<<<<<<<<<<<<
+ * max_index = index
+ * else:
+ */
+ __pyx_v_maximum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":189
+ * if value > maximum:
+ * maximum = value
+ * max_index = index # <<<<<<<<<<<<<<
+ * else:
+ * if value < minimum:
+ */
+ __pyx_v_max_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":187
+ * for index in range(index+1, length):
+ * value = data[index]
+ * if value > maximum: # <<<<<<<<<<<<<<
+ * maximum = value
+ * max_index = index
+ */
+ goto __pyx_L20;
+ }
+
+ /* "silx/math/combo.pyx":191
+ * max_index = index
+ * else:
+ * if value < minimum: # <<<<<<<<<<<<<<
+ * minimum = value
+ * min_index = index
+ */
+ /*else*/ {
+ __pyx_t_3 = ((__pyx_v_value < __pyx_v_minimum) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":192
+ * else:
+ * if value < minimum:
+ * minimum = value # <<<<<<<<<<<<<<
+ * min_index = index
+ *
+ */
+ __pyx_v_minimum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":193
+ * if value < minimum:
+ * minimum = value
+ * min_index = index # <<<<<<<<<<<<<<
+ *
+ * if 0 < value < min_pos:
+ */
+ __pyx_v_min_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":191
+ * max_index = index
+ * else:
+ * if value < minimum: # <<<<<<<<<<<<<<
+ * minimum = value
+ * min_index = index
+ */
+ }
+
+ /* "silx/math/combo.pyx":195
+ * min_index = index
+ *
+ * if 0 < value < min_pos: # <<<<<<<<<<<<<<
+ * min_pos = value
+ * min_pos_index = index
+ */
+ __pyx_t_3 = (0 < __pyx_v_value);
+ if (__pyx_t_3) {
+ __pyx_t_3 = (__pyx_v_value < __pyx_v_min_pos);
+ }
+ __pyx_t_5 = (__pyx_t_3 != 0);
+ if (__pyx_t_5) {
+
+ /* "silx/math/combo.pyx":196
+ *
+ * if 0 < value < min_pos:
+ * min_pos = value # <<<<<<<<<<<<<<
+ * min_pos_index = index
+ *
+ */
+ __pyx_v_min_pos = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":197
+ * if 0 < value < min_pos:
+ * min_pos = value
+ * min_pos_index = index # <<<<<<<<<<<<<<
+ *
+ * return _MinMaxResult(minimum,
+ */
+ __pyx_v_min_pos_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":195
+ * min_index = index
+ *
+ * if 0 < value < min_pos: # <<<<<<<<<<<<<<
+ * min_pos = value
+ * min_pos_index = index
+ */
+ }
+ }
+ __pyx_L20:;
+ }
+ }
+ __pyx_L10:;
+ }
+
+ /* "silx/math/combo.pyx":137
+ * raise ValueError('Zero-size array')
+ *
+ * with nogil: # <<<<<<<<<<<<<<
+ * # Init starting values
+ * value = data[0]
+ */
+ /*finally:*/ {
+ /*normal exit:*/{
+ #ifdef WITH_THREAD
+ Py_BLOCK_THREADS
+ #endif
+ goto __pyx_L6;
+ }
+ __pyx_L6:;
+ }
+ }
+
+ /* "silx/math/combo.pyx":199
+ * min_pos_index = index
+ *
+ * return _MinMaxResult(minimum, # <<<<<<<<<<<<<<
+ * min_pos if min_pos > 0 else None,
+ * maximum,
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_MinMaxResult); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __pyx_t_12 = __Pyx_PyInt_From_short(__pyx_v_minimum); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+
+ /* "silx/math/combo.pyx":200
+ *
+ * return _MinMaxResult(minimum,
+ * min_pos if min_pos > 0 else None, # <<<<<<<<<<<<<<
+ * maximum,
+ * min_index,
+ */
+ if (((__pyx_v_min_pos > 0) != 0)) {
+ __pyx_t_14 = __Pyx_PyInt_From_long(__pyx_v_min_pos); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 200, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_14);
+ __pyx_t_13 = __pyx_t_14;
+ __pyx_t_14 = 0;
+ } else {
+ __Pyx_INCREF(Py_None);
+ __pyx_t_13 = Py_None;
+ }
+
+ /* "silx/math/combo.pyx":201
+ * return _MinMaxResult(minimum,
+ * min_pos if min_pos > 0 else None,
+ * maximum, # <<<<<<<<<<<<<<
+ * min_index,
+ * min_pos_index if min_pos > 0 else None,
+ */
+ __pyx_t_14 = __Pyx_PyInt_From_short(__pyx_v_maximum); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 201, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_14);
+
+ /* "silx/math/combo.pyx":202
+ * min_pos if min_pos > 0 else None,
+ * maximum,
+ * min_index, # <<<<<<<<<<<<<<
+ * min_pos_index if min_pos > 0 else None,
+ * max_index)
+ */
+ __pyx_t_15 = __Pyx_PyInt_From_unsigned_int(__pyx_v_min_index); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 202, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_15);
+
+ /* "silx/math/combo.pyx":203
+ * maximum,
+ * min_index,
+ * min_pos_index if min_pos > 0 else None, # <<<<<<<<<<<<<<
+ * max_index)
+ *
+ */
+ if (((__pyx_v_min_pos > 0) != 0)) {
+ __pyx_t_17 = __Pyx_PyInt_From_unsigned_int(__pyx_v_min_pos_index); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 203, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_17);
+ __pyx_t_16 = __pyx_t_17;
+ __pyx_t_17 = 0;
+ } else {
+ __Pyx_INCREF(Py_None);
+ __pyx_t_16 = Py_None;
+ }
+
+ /* "silx/math/combo.pyx":204
+ * min_index,
+ * min_pos_index if min_pos > 0 else None,
+ * max_index) # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __pyx_t_17 = __Pyx_PyInt_From_unsigned_int(__pyx_v_max_index); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 204, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_17);
+ __pyx_t_18 = NULL;
+ __pyx_t_19 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
+ __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_11);
+ if (likely(__pyx_t_18)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
+ __Pyx_INCREF(__pyx_t_18);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_11, function);
+ __pyx_t_19 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_11)) {
+ PyObject *__pyx_temp[7] = {__pyx_t_18, __pyx_t_12, __pyx_t_13, __pyx_t_14, __pyx_t_15, __pyx_t_16, __pyx_t_17};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_19, 6+__pyx_t_19); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+ __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
+ __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) {
+ PyObject *__pyx_temp[7] = {__pyx_t_18, __pyx_t_12, __pyx_t_13, __pyx_t_14, __pyx_t_15, __pyx_t_16, __pyx_t_17};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_19, 6+__pyx_t_19); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+ __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
+ __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_20 = PyTuple_New(6+__pyx_t_19); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_20);
+ if (__pyx_t_18) {
+ __Pyx_GIVEREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_20, 0, __pyx_t_18); __pyx_t_18 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_12);
+ PyTuple_SET_ITEM(__pyx_t_20, 0+__pyx_t_19, __pyx_t_12);
+ __Pyx_GIVEREF(__pyx_t_13);
+ PyTuple_SET_ITEM(__pyx_t_20, 1+__pyx_t_19, __pyx_t_13);
+ __Pyx_GIVEREF(__pyx_t_14);
+ PyTuple_SET_ITEM(__pyx_t_20, 2+__pyx_t_19, __pyx_t_14);
+ __Pyx_GIVEREF(__pyx_t_15);
+ PyTuple_SET_ITEM(__pyx_t_20, 3+__pyx_t_19, __pyx_t_15);
+ __Pyx_GIVEREF(__pyx_t_16);
+ PyTuple_SET_ITEM(__pyx_t_20, 4+__pyx_t_19, __pyx_t_16);
+ __Pyx_GIVEREF(__pyx_t_17);
+ PyTuple_SET_ITEM(__pyx_t_20, 5+__pyx_t_19, __pyx_t_17);
+ __pyx_t_12 = 0;
+ __pyx_t_13 = 0;
+ __pyx_t_14 = 0;
+ __pyx_t_15 = 0;
+ __pyx_t_16 = 0;
+ __pyx_t_17 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_20, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "silx/math/combo.pyx":119
+ * @cython.boundscheck(False)
+ * @cython.wraparound(False)
+ * def _min_max(_number[::1] data, bint min_positive=False): # <<<<<<<<<<<<<<
+ * """:func:`min_max` implementation including infinite values
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_11);
+ __Pyx_XDECREF(__pyx_t_12);
+ __Pyx_XDECREF(__pyx_t_13);
+ __Pyx_XDECREF(__pyx_t_14);
+ __Pyx_XDECREF(__pyx_t_15);
+ __Pyx_XDECREF(__pyx_t_16);
+ __Pyx_XDECREF(__pyx_t_17);
+ __Pyx_XDECREF(__pyx_t_18);
+ __Pyx_XDECREF(__pyx_t_20);
+ __Pyx_AddTraceback("silx.math.combo._min_max", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __PYX_XDEC_MEMVIEW(&__pyx_v_data, 1);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_4silx_4math_5combo_70__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ __Pyx_RefNannySetupContext("__defaults__", 0);
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyBool_FromLong(__Pyx_CyFunction_Defaults(__pyx_defaults16, __pyx_self)->__pyx_arg_min_positive); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 119, __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 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
+ __Pyx_INCREF(Py_None);
+ __Pyx_GIVEREF(Py_None);
+ PyTuple_SET_ITEM(__pyx_t_1, 1, Py_None);
+ __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_AddTraceback("silx.math.combo.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_fuse_4__pyx_pw_4silx_4math_5combo_15_min_max(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_fuse_4__pyx_mdef_4silx_4math_5combo_15_min_max = {"__pyx_fuse_4_min_max", (PyCFunction)__pyx_fuse_4__pyx_pw_4silx_4math_5combo_15_min_max, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4silx_4math_5combo__min_max};
+static PyObject *__pyx_fuse_4__pyx_pw_4silx_4math_5combo_15_min_max(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ __Pyx_memviewslice __pyx_v_data = { 0, 0, { 0 }, { 0 }, { 0 } };
+ int __pyx_v_min_positive;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_min_max (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,&__pyx_n_s_min_positive_2,0};
+ PyObject* values[2] = {0,0};
+ __pyx_defaults16 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults16, __pyx_self);
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ case 1:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_min_positive_2);
+ if (value) { values[1] = value; kw_args--; }
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_min_max") < 0)) __PYX_ERR(0, 119, __pyx_L3_error)
+ }
+ } else {
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ }
+ __pyx_v_data = __Pyx_PyObject_to_MemoryviewSlice_dc_int(values[0]); if (unlikely(!__pyx_v_data.memview)) __PYX_ERR(0, 119, __pyx_L3_error)
+ if (values[1]) {
+ __pyx_v_min_positive = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_min_positive == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 119, __pyx_L3_error)
+ } else {
+ __pyx_v_min_positive = __pyx_dynamic_args->__pyx_arg_min_positive;
+ }
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("_min_max", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 119, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("silx.math.combo._min_max", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_4silx_4math_5combo_14_min_max(__pyx_self, __pyx_v_data, __pyx_v_min_positive);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_4silx_4math_5combo_14_min_max(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_data, int __pyx_v_min_positive) {
+ int __pyx_v_value;
+ int __pyx_v_minimum;
+ int __pyx_v_maximum;
+ unsigned int __pyx_v_length;
+ unsigned int __pyx_v_index;
+ unsigned int __pyx_v_min_index;
+ unsigned int __pyx_v_min_pos_index;
+ unsigned int __pyx_v_max_index;
+ long __pyx_v_min_pos;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ Py_ssize_t __pyx_t_2;
+ int __pyx_t_3;
+ Py_ssize_t __pyx_t_4;
+ int __pyx_t_5;
+ unsigned int __pyx_t_6;
+ unsigned int __pyx_t_7;
+ size_t __pyx_t_8;
+ size_t __pyx_t_9;
+ size_t __pyx_t_10;
+ PyObject *__pyx_t_11 = NULL;
+ PyObject *__pyx_t_12 = NULL;
+ PyObject *__pyx_t_13 = NULL;
+ PyObject *__pyx_t_14 = NULL;
+ PyObject *__pyx_t_15 = NULL;
+ PyObject *__pyx_t_16 = NULL;
+ PyObject *__pyx_t_17 = NULL;
+ PyObject *__pyx_t_18 = NULL;
+ int __pyx_t_19;
+ PyObject *__pyx_t_20 = NULL;
+ __Pyx_RefNannySetupContext("__pyx_fuse_4_min_max", 0);
+
+ /* "silx/math/combo.pyx":127
+ * _number value, minimum, minpos, maximum
+ * unsigned int length
+ * unsigned int index = 0 # <<<<<<<<<<<<<<
+ * unsigned int min_index = 0
+ * unsigned int min_pos_index = 0
+ */
+ __pyx_v_index = 0;
+
+ /* "silx/math/combo.pyx":128
+ * unsigned int length
+ * unsigned int index = 0
+ * unsigned int min_index = 0 # <<<<<<<<<<<<<<
+ * unsigned int min_pos_index = 0
+ * unsigned int max_index = 0
+ */
+ __pyx_v_min_index = 0;
+
+ /* "silx/math/combo.pyx":129
+ * unsigned int index = 0
+ * unsigned int min_index = 0
+ * unsigned int min_pos_index = 0 # <<<<<<<<<<<<<<
+ * unsigned int max_index = 0
+ *
+ */
+ __pyx_v_min_pos_index = 0;
+
+ /* "silx/math/combo.pyx":130
+ * unsigned int min_index = 0
+ * unsigned int min_pos_index = 0
+ * unsigned int max_index = 0 # <<<<<<<<<<<<<<
+ *
+ * length = len(data)
+ */
+ __pyx_v_max_index = 0;
+
+ /* "silx/math/combo.pyx":132
+ * unsigned int max_index = 0
+ *
+ * length = len(data) # <<<<<<<<<<<<<<
+ *
+ * if length == 0:
+ */
+ __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_data, 1, (PyObject *(*)(char *)) __pyx_memview_get_int, (int (*)(char *, PyObject *)) __pyx_memview_set_int, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 132, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 132, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_v_length = __pyx_t_2;
+
+ /* "silx/math/combo.pyx":134
+ * length = len(data)
+ *
+ * if length == 0: # <<<<<<<<<<<<<<
+ * raise ValueError('Zero-size array')
+ *
+ */
+ __pyx_t_3 = ((__pyx_v_length == 0) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":135
+ *
+ * if length == 0:
+ * raise ValueError('Zero-size array') # <<<<<<<<<<<<<<
+ *
+ * with nogil:
+ */
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 135, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __PYX_ERR(0, 135, __pyx_L1_error)
+
+ /* "silx/math/combo.pyx":134
+ * length = len(data)
+ *
+ * if length == 0: # <<<<<<<<<<<<<<
+ * raise ValueError('Zero-size array')
+ *
+ */
+ }
+
+ /* "silx/math/combo.pyx":137
+ * raise ValueError('Zero-size array')
+ *
+ * with nogil: # <<<<<<<<<<<<<<
+ * # Init starting values
+ * value = data[0]
+ */
+ {
+ #ifdef WITH_THREAD
+ PyThreadState *_save;
+ Py_UNBLOCK_THREADS
+ #endif
+ /*try:*/ {
+
+ /* "silx/math/combo.pyx":139
+ * with nogil:
+ * # Init starting values
+ * value = data[0] # <<<<<<<<<<<<<<
+ * minimum = value
+ * maximum = value
+ */
+ __pyx_t_4 = 0;
+ __pyx_v_value = (*((int *) ( /* dim=0 */ ((char *) (((int *) __pyx_v_data.data) + __pyx_t_4)) )));
+
+ /* "silx/math/combo.pyx":140
+ * # Init starting values
+ * value = data[0]
+ * minimum = value # <<<<<<<<<<<<<<
+ * maximum = value
+ * if min_positive and value > 0:
+ */
+ __pyx_v_minimum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":141
+ * value = data[0]
+ * minimum = value
+ * maximum = value # <<<<<<<<<<<<<<
+ * if min_positive and value > 0:
+ * min_pos = value
+ */
+ __pyx_v_maximum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":142
+ * minimum = value
+ * maximum = value
+ * if min_positive and value > 0: # <<<<<<<<<<<<<<
+ * min_pos = value
+ * else:
+ */
+ __pyx_t_5 = (__pyx_v_min_positive != 0);
+ if (__pyx_t_5) {
+ } else {
+ __pyx_t_3 = __pyx_t_5;
+ goto __pyx_L8_bool_binop_done;
+ }
+ __pyx_t_5 = ((__pyx_v_value > 0) != 0);
+ __pyx_t_3 = __pyx_t_5;
+ __pyx_L8_bool_binop_done:;
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":143
+ * maximum = value
+ * if min_positive and value > 0:
+ * min_pos = value # <<<<<<<<<<<<<<
+ * else:
+ * min_pos = 0
+ */
+ __pyx_v_min_pos = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":142
+ * minimum = value
+ * maximum = value
+ * if min_positive and value > 0: # <<<<<<<<<<<<<<
+ * min_pos = value
+ * else:
+ */
+ goto __pyx_L7;
+ }
+
+ /* "silx/math/combo.pyx":145
+ * min_pos = value
+ * else:
+ * min_pos = 0 # <<<<<<<<<<<<<<
+ *
+ * if _number in cython.floating:
+ */
+ /*else*/ {
+ __pyx_v_min_pos = 0;
+ }
+ __pyx_L7:;
+
+ /* "silx/math/combo.pyx":158
+ * break
+ *
+ * if not min_positive: # <<<<<<<<<<<<<<
+ * for index in range(index, length):
+ * value = data[index]
+ */
+ __pyx_t_3 = ((!(__pyx_v_min_positive != 0)) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":159
+ *
+ * if not min_positive:
+ * for index in range(index, length): # <<<<<<<<<<<<<<
+ * value = data[index]
+ * if value > maximum:
+ */
+ __pyx_t_6 = __pyx_v_length;
+ for (__pyx_t_7 = __pyx_v_index; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
+ __pyx_v_index = __pyx_t_7;
+
+ /* "silx/math/combo.pyx":160
+ * if not min_positive:
+ * for index in range(index, length):
+ * value = data[index] # <<<<<<<<<<<<<<
+ * if value > maximum:
+ * maximum = value
+ */
+ __pyx_t_8 = __pyx_v_index;
+ __pyx_v_value = (*((int *) ( /* dim=0 */ ((char *) (((int *) __pyx_v_data.data) + __pyx_t_8)) )));
+
+ /* "silx/math/combo.pyx":161
+ * for index in range(index, length):
+ * value = data[index]
+ * if value > maximum: # <<<<<<<<<<<<<<
+ * maximum = value
+ * max_index = index
+ */
+ __pyx_t_3 = ((__pyx_v_value > __pyx_v_maximum) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":162
+ * value = data[index]
+ * if value > maximum:
+ * maximum = value # <<<<<<<<<<<<<<
+ * max_index = index
+ * elif value < minimum:
+ */
+ __pyx_v_maximum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":163
+ * if value > maximum:
+ * maximum = value
+ * max_index = index # <<<<<<<<<<<<<<
+ * elif value < minimum:
+ * minimum = value
+ */
+ __pyx_v_max_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":161
+ * for index in range(index, length):
+ * value = data[index]
+ * if value > maximum: # <<<<<<<<<<<<<<
+ * maximum = value
+ * max_index = index
+ */
+ goto __pyx_L13;
+ }
+
+ /* "silx/math/combo.pyx":164
+ * maximum = value
+ * max_index = index
+ * elif value < minimum: # <<<<<<<<<<<<<<
+ * minimum = value
+ * min_index = index
+ */
+ __pyx_t_3 = ((__pyx_v_value < __pyx_v_minimum) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":165
+ * max_index = index
+ * elif value < minimum:
+ * minimum = value # <<<<<<<<<<<<<<
+ * min_index = index
+ *
+ */
+ __pyx_v_minimum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":166
+ * elif value < minimum:
+ * minimum = value
+ * min_index = index # <<<<<<<<<<<<<<
+ *
+ * else:
+ */
+ __pyx_v_min_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":164
+ * maximum = value
+ * max_index = index
+ * elif value < minimum: # <<<<<<<<<<<<<<
+ * minimum = value
+ * min_index = index
+ */
+ }
+ __pyx_L13:;
+ }
+
+ /* "silx/math/combo.pyx":158
+ * break
+ *
+ * if not min_positive: # <<<<<<<<<<<<<<
+ * for index in range(index, length):
+ * value = data[index]
+ */
+ goto __pyx_L10;
+ }
+
+ /* "silx/math/combo.pyx":170
+ * else:
+ * # Loop until min_pos is defined
+ * for index in range(index, length): # <<<<<<<<<<<<<<
+ * value = data[index]
+ * if value > maximum:
+ */
+ /*else*/ {
+ __pyx_t_6 = __pyx_v_length;
+ for (__pyx_t_7 = __pyx_v_index; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
+ __pyx_v_index = __pyx_t_7;
+
+ /* "silx/math/combo.pyx":171
+ * # Loop until min_pos is defined
+ * for index in range(index, length):
+ * value = data[index] # <<<<<<<<<<<<<<
+ * if value > maximum:
+ * maximum = value
+ */
+ __pyx_t_9 = __pyx_v_index;
+ __pyx_v_value = (*((int *) ( /* dim=0 */ ((char *) (((int *) __pyx_v_data.data) + __pyx_t_9)) )));
+
+ /* "silx/math/combo.pyx":172
+ * for index in range(index, length):
+ * value = data[index]
+ * if value > maximum: # <<<<<<<<<<<<<<
+ * maximum = value
+ * max_index = index
+ */
+ __pyx_t_3 = ((__pyx_v_value > __pyx_v_maximum) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":173
+ * value = data[index]
+ * if value > maximum:
+ * maximum = value # <<<<<<<<<<<<<<
+ * max_index = index
+ * elif value < minimum:
+ */
+ __pyx_v_maximum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":174
+ * if value > maximum:
+ * maximum = value
+ * max_index = index # <<<<<<<<<<<<<<
+ * elif value < minimum:
+ * minimum = value
+ */
+ __pyx_v_max_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":172
+ * for index in range(index, length):
+ * value = data[index]
+ * if value > maximum: # <<<<<<<<<<<<<<
+ * maximum = value
+ * max_index = index
+ */
+ goto __pyx_L16;
+ }
+
+ /* "silx/math/combo.pyx":175
+ * maximum = value
+ * max_index = index
+ * elif value < minimum: # <<<<<<<<<<<<<<
+ * minimum = value
+ * min_index = index
+ */
+ __pyx_t_3 = ((__pyx_v_value < __pyx_v_minimum) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":176
+ * max_index = index
+ * elif value < minimum:
+ * minimum = value # <<<<<<<<<<<<<<
+ * min_index = index
+ *
+ */
+ __pyx_v_minimum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":177
+ * elif value < minimum:
+ * minimum = value
+ * min_index = index # <<<<<<<<<<<<<<
+ *
+ * if value > 0:
+ */
+ __pyx_v_min_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":175
+ * maximum = value
+ * max_index = index
+ * elif value < minimum: # <<<<<<<<<<<<<<
+ * minimum = value
+ * min_index = index
+ */
+ }
+ __pyx_L16:;
+
+ /* "silx/math/combo.pyx":179
+ * min_index = index
+ *
+ * if value > 0: # <<<<<<<<<<<<<<
+ * min_pos = value
+ * min_pos_index = index
+ */
+ __pyx_t_3 = ((__pyx_v_value > 0) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":180
+ *
+ * if value > 0:
+ * min_pos = value # <<<<<<<<<<<<<<
+ * min_pos_index = index
+ * break
+ */
+ __pyx_v_min_pos = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":181
+ * if value > 0:
+ * min_pos = value
+ * min_pos_index = index # <<<<<<<<<<<<<<
+ * break
+ *
+ */
+ __pyx_v_min_pos_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":182
+ * min_pos = value
+ * min_pos_index = index
+ * break # <<<<<<<<<<<<<<
+ *
+ * # Loop until the end
+ */
+ goto __pyx_L15_break;
+
+ /* "silx/math/combo.pyx":179
+ * min_index = index
+ *
+ * if value > 0: # <<<<<<<<<<<<<<
+ * min_pos = value
+ * min_pos_index = index
+ */
+ }
+ }
+ __pyx_L15_break:;
+
+ /* "silx/math/combo.pyx":185
+ *
+ * # Loop until the end
+ * for index in range(index+1, length): # <<<<<<<<<<<<<<
+ * value = data[index]
+ * if value > maximum:
+ */
+ __pyx_t_6 = __pyx_v_length;
+ for (__pyx_t_7 = (__pyx_v_index + 1); __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
+ __pyx_v_index = __pyx_t_7;
+
+ /* "silx/math/combo.pyx":186
+ * # Loop until the end
+ * for index in range(index+1, length):
+ * value = data[index] # <<<<<<<<<<<<<<
+ * if value > maximum:
+ * maximum = value
+ */
+ __pyx_t_10 = __pyx_v_index;
+ __pyx_v_value = (*((int *) ( /* dim=0 */ ((char *) (((int *) __pyx_v_data.data) + __pyx_t_10)) )));
+
+ /* "silx/math/combo.pyx":187
+ * for index in range(index+1, length):
+ * value = data[index]
+ * if value > maximum: # <<<<<<<<<<<<<<
+ * maximum = value
+ * max_index = index
+ */
+ __pyx_t_3 = ((__pyx_v_value > __pyx_v_maximum) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":188
+ * value = data[index]
+ * if value > maximum:
+ * maximum = value # <<<<<<<<<<<<<<
+ * max_index = index
+ * else:
+ */
+ __pyx_v_maximum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":189
+ * if value > maximum:
+ * maximum = value
+ * max_index = index # <<<<<<<<<<<<<<
+ * else:
+ * if value < minimum:
+ */
+ __pyx_v_max_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":187
+ * for index in range(index+1, length):
+ * value = data[index]
+ * if value > maximum: # <<<<<<<<<<<<<<
+ * maximum = value
+ * max_index = index
+ */
+ goto __pyx_L20;
+ }
+
+ /* "silx/math/combo.pyx":191
+ * max_index = index
+ * else:
+ * if value < minimum: # <<<<<<<<<<<<<<
+ * minimum = value
+ * min_index = index
+ */
+ /*else*/ {
+ __pyx_t_3 = ((__pyx_v_value < __pyx_v_minimum) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":192
+ * else:
+ * if value < minimum:
+ * minimum = value # <<<<<<<<<<<<<<
+ * min_index = index
+ *
+ */
+ __pyx_v_minimum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":193
+ * if value < minimum:
+ * minimum = value
+ * min_index = index # <<<<<<<<<<<<<<
+ *
+ * if 0 < value < min_pos:
+ */
+ __pyx_v_min_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":191
+ * max_index = index
+ * else:
+ * if value < minimum: # <<<<<<<<<<<<<<
+ * minimum = value
+ * min_index = index
+ */
+ }
+
+ /* "silx/math/combo.pyx":195
+ * min_index = index
+ *
+ * if 0 < value < min_pos: # <<<<<<<<<<<<<<
+ * min_pos = value
+ * min_pos_index = index
+ */
+ __pyx_t_3 = (0 < __pyx_v_value);
+ if (__pyx_t_3) {
+ __pyx_t_3 = (__pyx_v_value < __pyx_v_min_pos);
+ }
+ __pyx_t_5 = (__pyx_t_3 != 0);
+ if (__pyx_t_5) {
+
+ /* "silx/math/combo.pyx":196
+ *
+ * if 0 < value < min_pos:
+ * min_pos = value # <<<<<<<<<<<<<<
+ * min_pos_index = index
+ *
+ */
+ __pyx_v_min_pos = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":197
+ * if 0 < value < min_pos:
+ * min_pos = value
+ * min_pos_index = index # <<<<<<<<<<<<<<
+ *
+ * return _MinMaxResult(minimum,
+ */
+ __pyx_v_min_pos_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":195
+ * min_index = index
+ *
+ * if 0 < value < min_pos: # <<<<<<<<<<<<<<
+ * min_pos = value
+ * min_pos_index = index
+ */
+ }
+ }
+ __pyx_L20:;
+ }
+ }
+ __pyx_L10:;
+ }
+
+ /* "silx/math/combo.pyx":137
+ * raise ValueError('Zero-size array')
+ *
+ * with nogil: # <<<<<<<<<<<<<<
+ * # Init starting values
+ * value = data[0]
+ */
+ /*finally:*/ {
+ /*normal exit:*/{
+ #ifdef WITH_THREAD
+ Py_BLOCK_THREADS
+ #endif
+ goto __pyx_L6;
+ }
+ __pyx_L6:;
+ }
+ }
+
+ /* "silx/math/combo.pyx":199
+ * min_pos_index = index
+ *
+ * return _MinMaxResult(minimum, # <<<<<<<<<<<<<<
+ * min_pos if min_pos > 0 else None,
+ * maximum,
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_MinMaxResult); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __pyx_t_12 = __Pyx_PyInt_From_int(__pyx_v_minimum); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+
+ /* "silx/math/combo.pyx":200
+ *
+ * return _MinMaxResult(minimum,
+ * min_pos if min_pos > 0 else None, # <<<<<<<<<<<<<<
+ * maximum,
+ * min_index,
+ */
+ if (((__pyx_v_min_pos > 0) != 0)) {
+ __pyx_t_14 = __Pyx_PyInt_From_long(__pyx_v_min_pos); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 200, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_14);
+ __pyx_t_13 = __pyx_t_14;
+ __pyx_t_14 = 0;
+ } else {
+ __Pyx_INCREF(Py_None);
+ __pyx_t_13 = Py_None;
+ }
+
+ /* "silx/math/combo.pyx":201
+ * return _MinMaxResult(minimum,
+ * min_pos if min_pos > 0 else None,
+ * maximum, # <<<<<<<<<<<<<<
+ * min_index,
+ * min_pos_index if min_pos > 0 else None,
+ */
+ __pyx_t_14 = __Pyx_PyInt_From_int(__pyx_v_maximum); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 201, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_14);
+
+ /* "silx/math/combo.pyx":202
+ * min_pos if min_pos > 0 else None,
+ * maximum,
+ * min_index, # <<<<<<<<<<<<<<
+ * min_pos_index if min_pos > 0 else None,
+ * max_index)
+ */
+ __pyx_t_15 = __Pyx_PyInt_From_unsigned_int(__pyx_v_min_index); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 202, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_15);
+
+ /* "silx/math/combo.pyx":203
+ * maximum,
+ * min_index,
+ * min_pos_index if min_pos > 0 else None, # <<<<<<<<<<<<<<
+ * max_index)
+ *
+ */
+ if (((__pyx_v_min_pos > 0) != 0)) {
+ __pyx_t_17 = __Pyx_PyInt_From_unsigned_int(__pyx_v_min_pos_index); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 203, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_17);
+ __pyx_t_16 = __pyx_t_17;
+ __pyx_t_17 = 0;
+ } else {
+ __Pyx_INCREF(Py_None);
+ __pyx_t_16 = Py_None;
+ }
+
+ /* "silx/math/combo.pyx":204
+ * min_index,
+ * min_pos_index if min_pos > 0 else None,
+ * max_index) # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __pyx_t_17 = __Pyx_PyInt_From_unsigned_int(__pyx_v_max_index); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 204, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_17);
+ __pyx_t_18 = NULL;
+ __pyx_t_19 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
+ __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_11);
+ if (likely(__pyx_t_18)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
+ __Pyx_INCREF(__pyx_t_18);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_11, function);
+ __pyx_t_19 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_11)) {
+ PyObject *__pyx_temp[7] = {__pyx_t_18, __pyx_t_12, __pyx_t_13, __pyx_t_14, __pyx_t_15, __pyx_t_16, __pyx_t_17};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_19, 6+__pyx_t_19); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+ __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
+ __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) {
+ PyObject *__pyx_temp[7] = {__pyx_t_18, __pyx_t_12, __pyx_t_13, __pyx_t_14, __pyx_t_15, __pyx_t_16, __pyx_t_17};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_19, 6+__pyx_t_19); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+ __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
+ __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_20 = PyTuple_New(6+__pyx_t_19); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_20);
+ if (__pyx_t_18) {
+ __Pyx_GIVEREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_20, 0, __pyx_t_18); __pyx_t_18 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_12);
+ PyTuple_SET_ITEM(__pyx_t_20, 0+__pyx_t_19, __pyx_t_12);
+ __Pyx_GIVEREF(__pyx_t_13);
+ PyTuple_SET_ITEM(__pyx_t_20, 1+__pyx_t_19, __pyx_t_13);
+ __Pyx_GIVEREF(__pyx_t_14);
+ PyTuple_SET_ITEM(__pyx_t_20, 2+__pyx_t_19, __pyx_t_14);
+ __Pyx_GIVEREF(__pyx_t_15);
+ PyTuple_SET_ITEM(__pyx_t_20, 3+__pyx_t_19, __pyx_t_15);
+ __Pyx_GIVEREF(__pyx_t_16);
+ PyTuple_SET_ITEM(__pyx_t_20, 4+__pyx_t_19, __pyx_t_16);
+ __Pyx_GIVEREF(__pyx_t_17);
+ PyTuple_SET_ITEM(__pyx_t_20, 5+__pyx_t_19, __pyx_t_17);
+ __pyx_t_12 = 0;
+ __pyx_t_13 = 0;
+ __pyx_t_14 = 0;
+ __pyx_t_15 = 0;
+ __pyx_t_16 = 0;
+ __pyx_t_17 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_20, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "silx/math/combo.pyx":119
+ * @cython.boundscheck(False)
+ * @cython.wraparound(False)
+ * def _min_max(_number[::1] data, bint min_positive=False): # <<<<<<<<<<<<<<
+ * """:func:`min_max` implementation including infinite values
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_11);
+ __Pyx_XDECREF(__pyx_t_12);
+ __Pyx_XDECREF(__pyx_t_13);
+ __Pyx_XDECREF(__pyx_t_14);
+ __Pyx_XDECREF(__pyx_t_15);
+ __Pyx_XDECREF(__pyx_t_16);
+ __Pyx_XDECREF(__pyx_t_17);
+ __Pyx_XDECREF(__pyx_t_18);
+ __Pyx_XDECREF(__pyx_t_20);
+ __Pyx_AddTraceback("silx.math.combo._min_max", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __PYX_XDEC_MEMVIEW(&__pyx_v_data, 1);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_4silx_4math_5combo_72__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ __Pyx_RefNannySetupContext("__defaults__", 0);
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyBool_FromLong(__Pyx_CyFunction_Defaults(__pyx_defaults17, __pyx_self)->__pyx_arg_min_positive); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 119, __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 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
+ __Pyx_INCREF(Py_None);
+ __Pyx_GIVEREF(Py_None);
+ PyTuple_SET_ITEM(__pyx_t_1, 1, Py_None);
+ __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_AddTraceback("silx.math.combo.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_fuse_5__pyx_pw_4silx_4math_5combo_17_min_max(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_fuse_5__pyx_mdef_4silx_4math_5combo_17_min_max = {"__pyx_fuse_5_min_max", (PyCFunction)__pyx_fuse_5__pyx_pw_4silx_4math_5combo_17_min_max, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4silx_4math_5combo__min_max};
+static PyObject *__pyx_fuse_5__pyx_pw_4silx_4math_5combo_17_min_max(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ __Pyx_memviewslice __pyx_v_data = { 0, 0, { 0 }, { 0 }, { 0 } };
+ int __pyx_v_min_positive;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_min_max (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,&__pyx_n_s_min_positive_2,0};
+ PyObject* values[2] = {0,0};
+ __pyx_defaults17 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults17, __pyx_self);
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ case 1:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_min_positive_2);
+ if (value) { values[1] = value; kw_args--; }
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_min_max") < 0)) __PYX_ERR(0, 119, __pyx_L3_error)
+ }
+ } else {
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ }
+ __pyx_v_data = __Pyx_PyObject_to_MemoryviewSlice_dc_long(values[0]); if (unlikely(!__pyx_v_data.memview)) __PYX_ERR(0, 119, __pyx_L3_error)
+ if (values[1]) {
+ __pyx_v_min_positive = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_min_positive == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 119, __pyx_L3_error)
+ } else {
+ __pyx_v_min_positive = __pyx_dynamic_args->__pyx_arg_min_positive;
+ }
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("_min_max", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 119, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("silx.math.combo._min_max", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_4silx_4math_5combo_16_min_max(__pyx_self, __pyx_v_data, __pyx_v_min_positive);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_4silx_4math_5combo_16_min_max(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_data, int __pyx_v_min_positive) {
+ long __pyx_v_value;
+ long __pyx_v_minimum;
+ long __pyx_v_maximum;
+ unsigned int __pyx_v_length;
+ unsigned int __pyx_v_index;
+ unsigned int __pyx_v_min_index;
+ unsigned int __pyx_v_min_pos_index;
+ unsigned int __pyx_v_max_index;
+ long __pyx_v_min_pos;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ Py_ssize_t __pyx_t_2;
+ int __pyx_t_3;
+ Py_ssize_t __pyx_t_4;
+ int __pyx_t_5;
+ unsigned int __pyx_t_6;
+ unsigned int __pyx_t_7;
+ size_t __pyx_t_8;
+ size_t __pyx_t_9;
+ size_t __pyx_t_10;
+ PyObject *__pyx_t_11 = NULL;
+ PyObject *__pyx_t_12 = NULL;
+ PyObject *__pyx_t_13 = NULL;
+ PyObject *__pyx_t_14 = NULL;
+ PyObject *__pyx_t_15 = NULL;
+ PyObject *__pyx_t_16 = NULL;
+ PyObject *__pyx_t_17 = NULL;
+ PyObject *__pyx_t_18 = NULL;
+ int __pyx_t_19;
+ PyObject *__pyx_t_20 = NULL;
+ __Pyx_RefNannySetupContext("__pyx_fuse_5_min_max", 0);
+
+ /* "silx/math/combo.pyx":127
+ * _number value, minimum, minpos, maximum
+ * unsigned int length
+ * unsigned int index = 0 # <<<<<<<<<<<<<<
+ * unsigned int min_index = 0
+ * unsigned int min_pos_index = 0
+ */
+ __pyx_v_index = 0;
+
+ /* "silx/math/combo.pyx":128
+ * unsigned int length
+ * unsigned int index = 0
+ * unsigned int min_index = 0 # <<<<<<<<<<<<<<
+ * unsigned int min_pos_index = 0
+ * unsigned int max_index = 0
+ */
+ __pyx_v_min_index = 0;
+
+ /* "silx/math/combo.pyx":129
+ * unsigned int index = 0
+ * unsigned int min_index = 0
+ * unsigned int min_pos_index = 0 # <<<<<<<<<<<<<<
+ * unsigned int max_index = 0
+ *
+ */
+ __pyx_v_min_pos_index = 0;
+
+ /* "silx/math/combo.pyx":130
+ * unsigned int min_index = 0
+ * unsigned int min_pos_index = 0
+ * unsigned int max_index = 0 # <<<<<<<<<<<<<<
+ *
+ * length = len(data)
+ */
+ __pyx_v_max_index = 0;
+
+ /* "silx/math/combo.pyx":132
+ * unsigned int max_index = 0
+ *
+ * length = len(data) # <<<<<<<<<<<<<<
+ *
+ * if length == 0:
+ */
+ __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_data, 1, (PyObject *(*)(char *)) __pyx_memview_get_long, (int (*)(char *, PyObject *)) __pyx_memview_set_long, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 132, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 132, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_v_length = __pyx_t_2;
+
+ /* "silx/math/combo.pyx":134
+ * length = len(data)
+ *
+ * if length == 0: # <<<<<<<<<<<<<<
+ * raise ValueError('Zero-size array')
+ *
+ */
+ __pyx_t_3 = ((__pyx_v_length == 0) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":135
+ *
+ * if length == 0:
+ * raise ValueError('Zero-size array') # <<<<<<<<<<<<<<
+ *
+ * with nogil:
+ */
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 135, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __PYX_ERR(0, 135, __pyx_L1_error)
+
+ /* "silx/math/combo.pyx":134
+ * length = len(data)
+ *
+ * if length == 0: # <<<<<<<<<<<<<<
+ * raise ValueError('Zero-size array')
+ *
+ */
+ }
+
+ /* "silx/math/combo.pyx":137
+ * raise ValueError('Zero-size array')
+ *
+ * with nogil: # <<<<<<<<<<<<<<
+ * # Init starting values
+ * value = data[0]
+ */
+ {
+ #ifdef WITH_THREAD
+ PyThreadState *_save;
+ Py_UNBLOCK_THREADS
+ #endif
+ /*try:*/ {
+
+ /* "silx/math/combo.pyx":139
+ * with nogil:
+ * # Init starting values
+ * value = data[0] # <<<<<<<<<<<<<<
+ * minimum = value
+ * maximum = value
+ */
+ __pyx_t_4 = 0;
+ __pyx_v_value = (*((long *) ( /* dim=0 */ ((char *) (((long *) __pyx_v_data.data) + __pyx_t_4)) )));
+
+ /* "silx/math/combo.pyx":140
+ * # Init starting values
+ * value = data[0]
+ * minimum = value # <<<<<<<<<<<<<<
+ * maximum = value
+ * if min_positive and value > 0:
+ */
+ __pyx_v_minimum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":141
+ * value = data[0]
+ * minimum = value
+ * maximum = value # <<<<<<<<<<<<<<
+ * if min_positive and value > 0:
+ * min_pos = value
+ */
+ __pyx_v_maximum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":142
+ * minimum = value
+ * maximum = value
+ * if min_positive and value > 0: # <<<<<<<<<<<<<<
+ * min_pos = value
+ * else:
+ */
+ __pyx_t_5 = (__pyx_v_min_positive != 0);
+ if (__pyx_t_5) {
+ } else {
+ __pyx_t_3 = __pyx_t_5;
+ goto __pyx_L8_bool_binop_done;
+ }
+ __pyx_t_5 = ((__pyx_v_value > 0) != 0);
+ __pyx_t_3 = __pyx_t_5;
+ __pyx_L8_bool_binop_done:;
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":143
+ * maximum = value
+ * if min_positive and value > 0:
+ * min_pos = value # <<<<<<<<<<<<<<
+ * else:
+ * min_pos = 0
+ */
+ __pyx_v_min_pos = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":142
+ * minimum = value
+ * maximum = value
+ * if min_positive and value > 0: # <<<<<<<<<<<<<<
+ * min_pos = value
+ * else:
+ */
+ goto __pyx_L7;
+ }
+
+ /* "silx/math/combo.pyx":145
+ * min_pos = value
+ * else:
+ * min_pos = 0 # <<<<<<<<<<<<<<
+ *
+ * if _number in cython.floating:
+ */
+ /*else*/ {
+ __pyx_v_min_pos = 0;
+ }
+ __pyx_L7:;
+
+ /* "silx/math/combo.pyx":158
+ * break
+ *
+ * if not min_positive: # <<<<<<<<<<<<<<
+ * for index in range(index, length):
+ * value = data[index]
+ */
+ __pyx_t_3 = ((!(__pyx_v_min_positive != 0)) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":159
+ *
+ * if not min_positive:
+ * for index in range(index, length): # <<<<<<<<<<<<<<
+ * value = data[index]
+ * if value > maximum:
+ */
+ __pyx_t_6 = __pyx_v_length;
+ for (__pyx_t_7 = __pyx_v_index; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
+ __pyx_v_index = __pyx_t_7;
+
+ /* "silx/math/combo.pyx":160
+ * if not min_positive:
+ * for index in range(index, length):
+ * value = data[index] # <<<<<<<<<<<<<<
+ * if value > maximum:
+ * maximum = value
+ */
+ __pyx_t_8 = __pyx_v_index;
+ __pyx_v_value = (*((long *) ( /* dim=0 */ ((char *) (((long *) __pyx_v_data.data) + __pyx_t_8)) )));
+
+ /* "silx/math/combo.pyx":161
+ * for index in range(index, length):
+ * value = data[index]
+ * if value > maximum: # <<<<<<<<<<<<<<
+ * maximum = value
+ * max_index = index
+ */
+ __pyx_t_3 = ((__pyx_v_value > __pyx_v_maximum) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":162
+ * value = data[index]
+ * if value > maximum:
+ * maximum = value # <<<<<<<<<<<<<<
+ * max_index = index
+ * elif value < minimum:
+ */
+ __pyx_v_maximum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":163
+ * if value > maximum:
+ * maximum = value
+ * max_index = index # <<<<<<<<<<<<<<
+ * elif value < minimum:
+ * minimum = value
+ */
+ __pyx_v_max_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":161
+ * for index in range(index, length):
+ * value = data[index]
+ * if value > maximum: # <<<<<<<<<<<<<<
+ * maximum = value
+ * max_index = index
+ */
+ goto __pyx_L13;
+ }
+
+ /* "silx/math/combo.pyx":164
+ * maximum = value
+ * max_index = index
+ * elif value < minimum: # <<<<<<<<<<<<<<
+ * minimum = value
+ * min_index = index
+ */
+ __pyx_t_3 = ((__pyx_v_value < __pyx_v_minimum) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":165
+ * max_index = index
+ * elif value < minimum:
+ * minimum = value # <<<<<<<<<<<<<<
+ * min_index = index
+ *
+ */
+ __pyx_v_minimum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":166
+ * elif value < minimum:
+ * minimum = value
+ * min_index = index # <<<<<<<<<<<<<<
+ *
+ * else:
+ */
+ __pyx_v_min_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":164
+ * maximum = value
+ * max_index = index
+ * elif value < minimum: # <<<<<<<<<<<<<<
+ * minimum = value
+ * min_index = index
+ */
+ }
+ __pyx_L13:;
+ }
+
+ /* "silx/math/combo.pyx":158
+ * break
+ *
+ * if not min_positive: # <<<<<<<<<<<<<<
+ * for index in range(index, length):
+ * value = data[index]
+ */
+ goto __pyx_L10;
+ }
+
+ /* "silx/math/combo.pyx":170
+ * else:
+ * # Loop until min_pos is defined
+ * for index in range(index, length): # <<<<<<<<<<<<<<
+ * value = data[index]
+ * if value > maximum:
+ */
+ /*else*/ {
+ __pyx_t_6 = __pyx_v_length;
+ for (__pyx_t_7 = __pyx_v_index; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
+ __pyx_v_index = __pyx_t_7;
+
+ /* "silx/math/combo.pyx":171
+ * # Loop until min_pos is defined
+ * for index in range(index, length):
+ * value = data[index] # <<<<<<<<<<<<<<
+ * if value > maximum:
+ * maximum = value
+ */
+ __pyx_t_9 = __pyx_v_index;
+ __pyx_v_value = (*((long *) ( /* dim=0 */ ((char *) (((long *) __pyx_v_data.data) + __pyx_t_9)) )));
+
+ /* "silx/math/combo.pyx":172
+ * for index in range(index, length):
+ * value = data[index]
+ * if value > maximum: # <<<<<<<<<<<<<<
+ * maximum = value
+ * max_index = index
+ */
+ __pyx_t_3 = ((__pyx_v_value > __pyx_v_maximum) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":173
+ * value = data[index]
+ * if value > maximum:
+ * maximum = value # <<<<<<<<<<<<<<
+ * max_index = index
+ * elif value < minimum:
+ */
+ __pyx_v_maximum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":174
+ * if value > maximum:
+ * maximum = value
+ * max_index = index # <<<<<<<<<<<<<<
+ * elif value < minimum:
+ * minimum = value
+ */
+ __pyx_v_max_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":172
+ * for index in range(index, length):
+ * value = data[index]
+ * if value > maximum: # <<<<<<<<<<<<<<
+ * maximum = value
+ * max_index = index
+ */
+ goto __pyx_L16;
+ }
+
+ /* "silx/math/combo.pyx":175
+ * maximum = value
+ * max_index = index
+ * elif value < minimum: # <<<<<<<<<<<<<<
+ * minimum = value
+ * min_index = index
+ */
+ __pyx_t_3 = ((__pyx_v_value < __pyx_v_minimum) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":176
+ * max_index = index
+ * elif value < minimum:
+ * minimum = value # <<<<<<<<<<<<<<
+ * min_index = index
+ *
+ */
+ __pyx_v_minimum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":177
+ * elif value < minimum:
+ * minimum = value
+ * min_index = index # <<<<<<<<<<<<<<
+ *
+ * if value > 0:
+ */
+ __pyx_v_min_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":175
+ * maximum = value
+ * max_index = index
+ * elif value < minimum: # <<<<<<<<<<<<<<
+ * minimum = value
+ * min_index = index
+ */
+ }
+ __pyx_L16:;
+
+ /* "silx/math/combo.pyx":179
+ * min_index = index
+ *
+ * if value > 0: # <<<<<<<<<<<<<<
+ * min_pos = value
+ * min_pos_index = index
+ */
+ __pyx_t_3 = ((__pyx_v_value > 0) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":180
+ *
+ * if value > 0:
+ * min_pos = value # <<<<<<<<<<<<<<
+ * min_pos_index = index
+ * break
+ */
+ __pyx_v_min_pos = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":181
+ * if value > 0:
+ * min_pos = value
+ * min_pos_index = index # <<<<<<<<<<<<<<
+ * break
+ *
+ */
+ __pyx_v_min_pos_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":182
+ * min_pos = value
+ * min_pos_index = index
+ * break # <<<<<<<<<<<<<<
+ *
+ * # Loop until the end
+ */
+ goto __pyx_L15_break;
+
+ /* "silx/math/combo.pyx":179
+ * min_index = index
+ *
+ * if value > 0: # <<<<<<<<<<<<<<
+ * min_pos = value
+ * min_pos_index = index
+ */
+ }
+ }
+ __pyx_L15_break:;
+
+ /* "silx/math/combo.pyx":185
+ *
+ * # Loop until the end
+ * for index in range(index+1, length): # <<<<<<<<<<<<<<
+ * value = data[index]
+ * if value > maximum:
+ */
+ __pyx_t_6 = __pyx_v_length;
+ for (__pyx_t_7 = (__pyx_v_index + 1); __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
+ __pyx_v_index = __pyx_t_7;
+
+ /* "silx/math/combo.pyx":186
+ * # Loop until the end
+ * for index in range(index+1, length):
+ * value = data[index] # <<<<<<<<<<<<<<
+ * if value > maximum:
+ * maximum = value
+ */
+ __pyx_t_10 = __pyx_v_index;
+ __pyx_v_value = (*((long *) ( /* dim=0 */ ((char *) (((long *) __pyx_v_data.data) + __pyx_t_10)) )));
+
+ /* "silx/math/combo.pyx":187
+ * for index in range(index+1, length):
+ * value = data[index]
+ * if value > maximum: # <<<<<<<<<<<<<<
+ * maximum = value
+ * max_index = index
+ */
+ __pyx_t_3 = ((__pyx_v_value > __pyx_v_maximum) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":188
+ * value = data[index]
+ * if value > maximum:
+ * maximum = value # <<<<<<<<<<<<<<
+ * max_index = index
+ * else:
+ */
+ __pyx_v_maximum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":189
+ * if value > maximum:
+ * maximum = value
+ * max_index = index # <<<<<<<<<<<<<<
+ * else:
+ * if value < minimum:
+ */
+ __pyx_v_max_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":187
+ * for index in range(index+1, length):
+ * value = data[index]
+ * if value > maximum: # <<<<<<<<<<<<<<
+ * maximum = value
+ * max_index = index
+ */
+ goto __pyx_L20;
+ }
+
+ /* "silx/math/combo.pyx":191
+ * max_index = index
+ * else:
+ * if value < minimum: # <<<<<<<<<<<<<<
+ * minimum = value
+ * min_index = index
+ */
+ /*else*/ {
+ __pyx_t_3 = ((__pyx_v_value < __pyx_v_minimum) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":192
+ * else:
+ * if value < minimum:
+ * minimum = value # <<<<<<<<<<<<<<
+ * min_index = index
+ *
+ */
+ __pyx_v_minimum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":193
+ * if value < minimum:
+ * minimum = value
+ * min_index = index # <<<<<<<<<<<<<<
+ *
+ * if 0 < value < min_pos:
+ */
+ __pyx_v_min_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":191
+ * max_index = index
+ * else:
+ * if value < minimum: # <<<<<<<<<<<<<<
+ * minimum = value
+ * min_index = index
+ */
+ }
+
+ /* "silx/math/combo.pyx":195
+ * min_index = index
+ *
+ * if 0 < value < min_pos: # <<<<<<<<<<<<<<
+ * min_pos = value
+ * min_pos_index = index
+ */
+ __pyx_t_3 = (0 < __pyx_v_value);
+ if (__pyx_t_3) {
+ __pyx_t_3 = (__pyx_v_value < __pyx_v_min_pos);
+ }
+ __pyx_t_5 = (__pyx_t_3 != 0);
+ if (__pyx_t_5) {
+
+ /* "silx/math/combo.pyx":196
+ *
+ * if 0 < value < min_pos:
+ * min_pos = value # <<<<<<<<<<<<<<
+ * min_pos_index = index
+ *
+ */
+ __pyx_v_min_pos = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":197
+ * if 0 < value < min_pos:
+ * min_pos = value
+ * min_pos_index = index # <<<<<<<<<<<<<<
+ *
+ * return _MinMaxResult(minimum,
+ */
+ __pyx_v_min_pos_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":195
+ * min_index = index
+ *
+ * if 0 < value < min_pos: # <<<<<<<<<<<<<<
+ * min_pos = value
+ * min_pos_index = index
+ */
+ }
+ }
+ __pyx_L20:;
+ }
+ }
+ __pyx_L10:;
+ }
+
+ /* "silx/math/combo.pyx":137
+ * raise ValueError('Zero-size array')
+ *
+ * with nogil: # <<<<<<<<<<<<<<
+ * # Init starting values
+ * value = data[0]
+ */
+ /*finally:*/ {
+ /*normal exit:*/{
+ #ifdef WITH_THREAD
+ Py_BLOCK_THREADS
+ #endif
+ goto __pyx_L6;
+ }
+ __pyx_L6:;
+ }
+ }
+
+ /* "silx/math/combo.pyx":199
+ * min_pos_index = index
+ *
+ * return _MinMaxResult(minimum, # <<<<<<<<<<<<<<
+ * min_pos if min_pos > 0 else None,
+ * maximum,
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_MinMaxResult); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __pyx_t_12 = __Pyx_PyInt_From_long(__pyx_v_minimum); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+
+ /* "silx/math/combo.pyx":200
+ *
+ * return _MinMaxResult(minimum,
+ * min_pos if min_pos > 0 else None, # <<<<<<<<<<<<<<
+ * maximum,
+ * min_index,
+ */
+ if (((__pyx_v_min_pos > 0) != 0)) {
+ __pyx_t_14 = __Pyx_PyInt_From_long(__pyx_v_min_pos); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 200, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_14);
+ __pyx_t_13 = __pyx_t_14;
+ __pyx_t_14 = 0;
+ } else {
+ __Pyx_INCREF(Py_None);
+ __pyx_t_13 = Py_None;
+ }
+
+ /* "silx/math/combo.pyx":201
+ * return _MinMaxResult(minimum,
+ * min_pos if min_pos > 0 else None,
+ * maximum, # <<<<<<<<<<<<<<
+ * min_index,
+ * min_pos_index if min_pos > 0 else None,
+ */
+ __pyx_t_14 = __Pyx_PyInt_From_long(__pyx_v_maximum); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 201, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_14);
+
+ /* "silx/math/combo.pyx":202
+ * min_pos if min_pos > 0 else None,
+ * maximum,
+ * min_index, # <<<<<<<<<<<<<<
+ * min_pos_index if min_pos > 0 else None,
+ * max_index)
+ */
+ __pyx_t_15 = __Pyx_PyInt_From_unsigned_int(__pyx_v_min_index); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 202, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_15);
+
+ /* "silx/math/combo.pyx":203
+ * maximum,
+ * min_index,
+ * min_pos_index if min_pos > 0 else None, # <<<<<<<<<<<<<<
+ * max_index)
+ *
+ */
+ if (((__pyx_v_min_pos > 0) != 0)) {
+ __pyx_t_17 = __Pyx_PyInt_From_unsigned_int(__pyx_v_min_pos_index); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 203, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_17);
+ __pyx_t_16 = __pyx_t_17;
+ __pyx_t_17 = 0;
+ } else {
+ __Pyx_INCREF(Py_None);
+ __pyx_t_16 = Py_None;
+ }
+
+ /* "silx/math/combo.pyx":204
+ * min_index,
+ * min_pos_index if min_pos > 0 else None,
+ * max_index) # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __pyx_t_17 = __Pyx_PyInt_From_unsigned_int(__pyx_v_max_index); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 204, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_17);
+ __pyx_t_18 = NULL;
+ __pyx_t_19 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
+ __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_11);
+ if (likely(__pyx_t_18)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
+ __Pyx_INCREF(__pyx_t_18);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_11, function);
+ __pyx_t_19 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_11)) {
+ PyObject *__pyx_temp[7] = {__pyx_t_18, __pyx_t_12, __pyx_t_13, __pyx_t_14, __pyx_t_15, __pyx_t_16, __pyx_t_17};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_19, 6+__pyx_t_19); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+ __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
+ __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) {
+ PyObject *__pyx_temp[7] = {__pyx_t_18, __pyx_t_12, __pyx_t_13, __pyx_t_14, __pyx_t_15, __pyx_t_16, __pyx_t_17};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_19, 6+__pyx_t_19); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+ __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
+ __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_20 = PyTuple_New(6+__pyx_t_19); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_20);
+ if (__pyx_t_18) {
+ __Pyx_GIVEREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_20, 0, __pyx_t_18); __pyx_t_18 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_12);
+ PyTuple_SET_ITEM(__pyx_t_20, 0+__pyx_t_19, __pyx_t_12);
+ __Pyx_GIVEREF(__pyx_t_13);
+ PyTuple_SET_ITEM(__pyx_t_20, 1+__pyx_t_19, __pyx_t_13);
+ __Pyx_GIVEREF(__pyx_t_14);
+ PyTuple_SET_ITEM(__pyx_t_20, 2+__pyx_t_19, __pyx_t_14);
+ __Pyx_GIVEREF(__pyx_t_15);
+ PyTuple_SET_ITEM(__pyx_t_20, 3+__pyx_t_19, __pyx_t_15);
+ __Pyx_GIVEREF(__pyx_t_16);
+ PyTuple_SET_ITEM(__pyx_t_20, 4+__pyx_t_19, __pyx_t_16);
+ __Pyx_GIVEREF(__pyx_t_17);
+ PyTuple_SET_ITEM(__pyx_t_20, 5+__pyx_t_19, __pyx_t_17);
+ __pyx_t_12 = 0;
+ __pyx_t_13 = 0;
+ __pyx_t_14 = 0;
+ __pyx_t_15 = 0;
+ __pyx_t_16 = 0;
+ __pyx_t_17 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_20, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "silx/math/combo.pyx":119
+ * @cython.boundscheck(False)
+ * @cython.wraparound(False)
+ * def _min_max(_number[::1] data, bint min_positive=False): # <<<<<<<<<<<<<<
+ * """:func:`min_max` implementation including infinite values
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_11);
+ __Pyx_XDECREF(__pyx_t_12);
+ __Pyx_XDECREF(__pyx_t_13);
+ __Pyx_XDECREF(__pyx_t_14);
+ __Pyx_XDECREF(__pyx_t_15);
+ __Pyx_XDECREF(__pyx_t_16);
+ __Pyx_XDECREF(__pyx_t_17);
+ __Pyx_XDECREF(__pyx_t_18);
+ __Pyx_XDECREF(__pyx_t_20);
+ __Pyx_AddTraceback("silx.math.combo._min_max", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __PYX_XDEC_MEMVIEW(&__pyx_v_data, 1);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_4silx_4math_5combo_74__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ __Pyx_RefNannySetupContext("__defaults__", 0);
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyBool_FromLong(__Pyx_CyFunction_Defaults(__pyx_defaults18, __pyx_self)->__pyx_arg_min_positive); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 119, __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 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
+ __Pyx_INCREF(Py_None);
+ __Pyx_GIVEREF(Py_None);
+ PyTuple_SET_ITEM(__pyx_t_1, 1, Py_None);
+ __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_AddTraceback("silx.math.combo.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_fuse_6__pyx_pw_4silx_4math_5combo_19_min_max(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_fuse_6__pyx_mdef_4silx_4math_5combo_19_min_max = {"__pyx_fuse_6_min_max", (PyCFunction)__pyx_fuse_6__pyx_pw_4silx_4math_5combo_19_min_max, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4silx_4math_5combo__min_max};
+static PyObject *__pyx_fuse_6__pyx_pw_4silx_4math_5combo_19_min_max(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ __Pyx_memviewslice __pyx_v_data = { 0, 0, { 0 }, { 0 }, { 0 } };
+ int __pyx_v_min_positive;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_min_max (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,&__pyx_n_s_min_positive_2,0};
+ PyObject* values[2] = {0,0};
+ __pyx_defaults18 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults18, __pyx_self);
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ case 1:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_min_positive_2);
+ if (value) { values[1] = value; kw_args--; }
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_min_max") < 0)) __PYX_ERR(0, 119, __pyx_L3_error)
+ }
+ } else {
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ }
+ __pyx_v_data = __Pyx_PyObject_to_MemoryviewSlice_dc_PY_LONG_LONG(values[0]); if (unlikely(!__pyx_v_data.memview)) __PYX_ERR(0, 119, __pyx_L3_error)
+ if (values[1]) {
+ __pyx_v_min_positive = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_min_positive == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 119, __pyx_L3_error)
+ } else {
+ __pyx_v_min_positive = __pyx_dynamic_args->__pyx_arg_min_positive;
+ }
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("_min_max", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 119, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("silx.math.combo._min_max", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_4silx_4math_5combo_18_min_max(__pyx_self, __pyx_v_data, __pyx_v_min_positive);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_4silx_4math_5combo_18_min_max(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_data, int __pyx_v_min_positive) {
+ PY_LONG_LONG __pyx_v_value;
+ PY_LONG_LONG __pyx_v_minimum;
+ PY_LONG_LONG __pyx_v_maximum;
+ unsigned int __pyx_v_length;
+ unsigned int __pyx_v_index;
+ unsigned int __pyx_v_min_index;
+ unsigned int __pyx_v_min_pos_index;
+ unsigned int __pyx_v_max_index;
+ PY_LONG_LONG __pyx_v_min_pos;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ Py_ssize_t __pyx_t_2;
+ int __pyx_t_3;
+ Py_ssize_t __pyx_t_4;
+ int __pyx_t_5;
+ unsigned int __pyx_t_6;
+ unsigned int __pyx_t_7;
+ size_t __pyx_t_8;
+ size_t __pyx_t_9;
+ size_t __pyx_t_10;
+ PyObject *__pyx_t_11 = NULL;
+ PyObject *__pyx_t_12 = NULL;
+ PyObject *__pyx_t_13 = NULL;
+ PyObject *__pyx_t_14 = NULL;
+ PyObject *__pyx_t_15 = NULL;
+ PyObject *__pyx_t_16 = NULL;
+ PyObject *__pyx_t_17 = NULL;
+ PyObject *__pyx_t_18 = NULL;
+ int __pyx_t_19;
+ PyObject *__pyx_t_20 = NULL;
+ __Pyx_RefNannySetupContext("__pyx_fuse_6_min_max", 0);
+
+ /* "silx/math/combo.pyx":127
+ * _number value, minimum, minpos, maximum
+ * unsigned int length
+ * unsigned int index = 0 # <<<<<<<<<<<<<<
+ * unsigned int min_index = 0
+ * unsigned int min_pos_index = 0
+ */
+ __pyx_v_index = 0;
+
+ /* "silx/math/combo.pyx":128
+ * unsigned int length
+ * unsigned int index = 0
+ * unsigned int min_index = 0 # <<<<<<<<<<<<<<
+ * unsigned int min_pos_index = 0
+ * unsigned int max_index = 0
+ */
+ __pyx_v_min_index = 0;
+
+ /* "silx/math/combo.pyx":129
+ * unsigned int index = 0
+ * unsigned int min_index = 0
+ * unsigned int min_pos_index = 0 # <<<<<<<<<<<<<<
+ * unsigned int max_index = 0
+ *
+ */
+ __pyx_v_min_pos_index = 0;
+
+ /* "silx/math/combo.pyx":130
+ * unsigned int min_index = 0
+ * unsigned int min_pos_index = 0
+ * unsigned int max_index = 0 # <<<<<<<<<<<<<<
+ *
+ * length = len(data)
+ */
+ __pyx_v_max_index = 0;
+
+ /* "silx/math/combo.pyx":132
+ * unsigned int max_index = 0
+ *
+ * length = len(data) # <<<<<<<<<<<<<<
+ *
+ * if length == 0:
+ */
+ __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_data, 1, (PyObject *(*)(char *)) __pyx_memview_get_PY_LONG_LONG, (int (*)(char *, PyObject *)) __pyx_memview_set_PY_LONG_LONG, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 132, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 132, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_v_length = __pyx_t_2;
+
+ /* "silx/math/combo.pyx":134
+ * length = len(data)
+ *
+ * if length == 0: # <<<<<<<<<<<<<<
+ * raise ValueError('Zero-size array')
+ *
+ */
+ __pyx_t_3 = ((__pyx_v_length == 0) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":135
+ *
+ * if length == 0:
+ * raise ValueError('Zero-size array') # <<<<<<<<<<<<<<
+ *
+ * with nogil:
+ */
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 135, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __PYX_ERR(0, 135, __pyx_L1_error)
+
+ /* "silx/math/combo.pyx":134
+ * length = len(data)
+ *
+ * if length == 0: # <<<<<<<<<<<<<<
+ * raise ValueError('Zero-size array')
+ *
+ */
+ }
+
+ /* "silx/math/combo.pyx":137
+ * raise ValueError('Zero-size array')
+ *
+ * with nogil: # <<<<<<<<<<<<<<
+ * # Init starting values
+ * value = data[0]
+ */
+ {
+ #ifdef WITH_THREAD
+ PyThreadState *_save;
+ Py_UNBLOCK_THREADS
+ #endif
+ /*try:*/ {
+
+ /* "silx/math/combo.pyx":139
+ * with nogil:
+ * # Init starting values
+ * value = data[0] # <<<<<<<<<<<<<<
+ * minimum = value
+ * maximum = value
+ */
+ __pyx_t_4 = 0;
+ __pyx_v_value = (*((PY_LONG_LONG *) ( /* dim=0 */ ((char *) (((PY_LONG_LONG *) __pyx_v_data.data) + __pyx_t_4)) )));
+
+ /* "silx/math/combo.pyx":140
+ * # Init starting values
+ * value = data[0]
+ * minimum = value # <<<<<<<<<<<<<<
+ * maximum = value
+ * if min_positive and value > 0:
+ */
+ __pyx_v_minimum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":141
+ * value = data[0]
+ * minimum = value
+ * maximum = value # <<<<<<<<<<<<<<
+ * if min_positive and value > 0:
+ * min_pos = value
+ */
+ __pyx_v_maximum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":142
+ * minimum = value
+ * maximum = value
+ * if min_positive and value > 0: # <<<<<<<<<<<<<<
+ * min_pos = value
+ * else:
+ */
+ __pyx_t_5 = (__pyx_v_min_positive != 0);
+ if (__pyx_t_5) {
+ } else {
+ __pyx_t_3 = __pyx_t_5;
+ goto __pyx_L8_bool_binop_done;
+ }
+ __pyx_t_5 = ((__pyx_v_value > 0) != 0);
+ __pyx_t_3 = __pyx_t_5;
+ __pyx_L8_bool_binop_done:;
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":143
+ * maximum = value
+ * if min_positive and value > 0:
+ * min_pos = value # <<<<<<<<<<<<<<
+ * else:
+ * min_pos = 0
+ */
+ __pyx_v_min_pos = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":142
+ * minimum = value
+ * maximum = value
+ * if min_positive and value > 0: # <<<<<<<<<<<<<<
+ * min_pos = value
+ * else:
+ */
+ goto __pyx_L7;
+ }
+
+ /* "silx/math/combo.pyx":145
+ * min_pos = value
+ * else:
+ * min_pos = 0 # <<<<<<<<<<<<<<
+ *
+ * if _number in cython.floating:
+ */
+ /*else*/ {
+ __pyx_v_min_pos = 0;
+ }
+ __pyx_L7:;
+
+ /* "silx/math/combo.pyx":158
+ * break
+ *
+ * if not min_positive: # <<<<<<<<<<<<<<
+ * for index in range(index, length):
+ * value = data[index]
+ */
+ __pyx_t_3 = ((!(__pyx_v_min_positive != 0)) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":159
+ *
+ * if not min_positive:
+ * for index in range(index, length): # <<<<<<<<<<<<<<
+ * value = data[index]
+ * if value > maximum:
+ */
+ __pyx_t_6 = __pyx_v_length;
+ for (__pyx_t_7 = __pyx_v_index; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
+ __pyx_v_index = __pyx_t_7;
+
+ /* "silx/math/combo.pyx":160
+ * if not min_positive:
+ * for index in range(index, length):
+ * value = data[index] # <<<<<<<<<<<<<<
+ * if value > maximum:
+ * maximum = value
+ */
+ __pyx_t_8 = __pyx_v_index;
+ __pyx_v_value = (*((PY_LONG_LONG *) ( /* dim=0 */ ((char *) (((PY_LONG_LONG *) __pyx_v_data.data) + __pyx_t_8)) )));
+
+ /* "silx/math/combo.pyx":161
+ * for index in range(index, length):
+ * value = data[index]
+ * if value > maximum: # <<<<<<<<<<<<<<
+ * maximum = value
+ * max_index = index
+ */
+ __pyx_t_3 = ((__pyx_v_value > __pyx_v_maximum) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":162
+ * value = data[index]
+ * if value > maximum:
+ * maximum = value # <<<<<<<<<<<<<<
+ * max_index = index
+ * elif value < minimum:
+ */
+ __pyx_v_maximum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":163
+ * if value > maximum:
+ * maximum = value
+ * max_index = index # <<<<<<<<<<<<<<
+ * elif value < minimum:
+ * minimum = value
+ */
+ __pyx_v_max_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":161
+ * for index in range(index, length):
+ * value = data[index]
+ * if value > maximum: # <<<<<<<<<<<<<<
+ * maximum = value
+ * max_index = index
+ */
+ goto __pyx_L13;
+ }
+
+ /* "silx/math/combo.pyx":164
+ * maximum = value
+ * max_index = index
+ * elif value < minimum: # <<<<<<<<<<<<<<
+ * minimum = value
+ * min_index = index
+ */
+ __pyx_t_3 = ((__pyx_v_value < __pyx_v_minimum) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":165
+ * max_index = index
+ * elif value < minimum:
+ * minimum = value # <<<<<<<<<<<<<<
+ * min_index = index
+ *
+ */
+ __pyx_v_minimum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":166
+ * elif value < minimum:
+ * minimum = value
+ * min_index = index # <<<<<<<<<<<<<<
+ *
+ * else:
+ */
+ __pyx_v_min_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":164
+ * maximum = value
+ * max_index = index
+ * elif value < minimum: # <<<<<<<<<<<<<<
+ * minimum = value
+ * min_index = index
+ */
+ }
+ __pyx_L13:;
+ }
+
+ /* "silx/math/combo.pyx":158
+ * break
+ *
+ * if not min_positive: # <<<<<<<<<<<<<<
+ * for index in range(index, length):
+ * value = data[index]
+ */
+ goto __pyx_L10;
+ }
+
+ /* "silx/math/combo.pyx":170
+ * else:
+ * # Loop until min_pos is defined
+ * for index in range(index, length): # <<<<<<<<<<<<<<
+ * value = data[index]
+ * if value > maximum:
+ */
+ /*else*/ {
+ __pyx_t_6 = __pyx_v_length;
+ for (__pyx_t_7 = __pyx_v_index; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
+ __pyx_v_index = __pyx_t_7;
+
+ /* "silx/math/combo.pyx":171
+ * # Loop until min_pos is defined
+ * for index in range(index, length):
+ * value = data[index] # <<<<<<<<<<<<<<
+ * if value > maximum:
+ * maximum = value
+ */
+ __pyx_t_9 = __pyx_v_index;
+ __pyx_v_value = (*((PY_LONG_LONG *) ( /* dim=0 */ ((char *) (((PY_LONG_LONG *) __pyx_v_data.data) + __pyx_t_9)) )));
+
+ /* "silx/math/combo.pyx":172
+ * for index in range(index, length):
+ * value = data[index]
+ * if value > maximum: # <<<<<<<<<<<<<<
+ * maximum = value
+ * max_index = index
+ */
+ __pyx_t_3 = ((__pyx_v_value > __pyx_v_maximum) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":173
+ * value = data[index]
+ * if value > maximum:
+ * maximum = value # <<<<<<<<<<<<<<
+ * max_index = index
+ * elif value < minimum:
+ */
+ __pyx_v_maximum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":174
+ * if value > maximum:
+ * maximum = value
+ * max_index = index # <<<<<<<<<<<<<<
+ * elif value < minimum:
+ * minimum = value
+ */
+ __pyx_v_max_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":172
+ * for index in range(index, length):
+ * value = data[index]
+ * if value > maximum: # <<<<<<<<<<<<<<
+ * maximum = value
+ * max_index = index
+ */
+ goto __pyx_L16;
+ }
+
+ /* "silx/math/combo.pyx":175
+ * maximum = value
+ * max_index = index
+ * elif value < minimum: # <<<<<<<<<<<<<<
+ * minimum = value
+ * min_index = index
+ */
+ __pyx_t_3 = ((__pyx_v_value < __pyx_v_minimum) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":176
+ * max_index = index
+ * elif value < minimum:
+ * minimum = value # <<<<<<<<<<<<<<
+ * min_index = index
+ *
+ */
+ __pyx_v_minimum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":177
+ * elif value < minimum:
+ * minimum = value
+ * min_index = index # <<<<<<<<<<<<<<
+ *
+ * if value > 0:
+ */
+ __pyx_v_min_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":175
+ * maximum = value
+ * max_index = index
+ * elif value < minimum: # <<<<<<<<<<<<<<
+ * minimum = value
+ * min_index = index
+ */
+ }
+ __pyx_L16:;
+
+ /* "silx/math/combo.pyx":179
+ * min_index = index
+ *
+ * if value > 0: # <<<<<<<<<<<<<<
+ * min_pos = value
+ * min_pos_index = index
+ */
+ __pyx_t_3 = ((__pyx_v_value > 0) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":180
+ *
+ * if value > 0:
+ * min_pos = value # <<<<<<<<<<<<<<
+ * min_pos_index = index
+ * break
+ */
+ __pyx_v_min_pos = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":181
+ * if value > 0:
+ * min_pos = value
+ * min_pos_index = index # <<<<<<<<<<<<<<
+ * break
+ *
+ */
+ __pyx_v_min_pos_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":182
+ * min_pos = value
+ * min_pos_index = index
+ * break # <<<<<<<<<<<<<<
+ *
+ * # Loop until the end
+ */
+ goto __pyx_L15_break;
+
+ /* "silx/math/combo.pyx":179
+ * min_index = index
+ *
+ * if value > 0: # <<<<<<<<<<<<<<
+ * min_pos = value
+ * min_pos_index = index
+ */
+ }
+ }
+ __pyx_L15_break:;
+
+ /* "silx/math/combo.pyx":185
+ *
+ * # Loop until the end
+ * for index in range(index+1, length): # <<<<<<<<<<<<<<
+ * value = data[index]
+ * if value > maximum:
+ */
+ __pyx_t_6 = __pyx_v_length;
+ for (__pyx_t_7 = (__pyx_v_index + 1); __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
+ __pyx_v_index = __pyx_t_7;
+
+ /* "silx/math/combo.pyx":186
+ * # Loop until the end
+ * for index in range(index+1, length):
+ * value = data[index] # <<<<<<<<<<<<<<
+ * if value > maximum:
+ * maximum = value
+ */
+ __pyx_t_10 = __pyx_v_index;
+ __pyx_v_value = (*((PY_LONG_LONG *) ( /* dim=0 */ ((char *) (((PY_LONG_LONG *) __pyx_v_data.data) + __pyx_t_10)) )));
+
+ /* "silx/math/combo.pyx":187
+ * for index in range(index+1, length):
+ * value = data[index]
+ * if value > maximum: # <<<<<<<<<<<<<<
+ * maximum = value
+ * max_index = index
+ */
+ __pyx_t_3 = ((__pyx_v_value > __pyx_v_maximum) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":188
+ * value = data[index]
+ * if value > maximum:
+ * maximum = value # <<<<<<<<<<<<<<
+ * max_index = index
+ * else:
+ */
+ __pyx_v_maximum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":189
+ * if value > maximum:
+ * maximum = value
+ * max_index = index # <<<<<<<<<<<<<<
+ * else:
+ * if value < minimum:
+ */
+ __pyx_v_max_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":187
+ * for index in range(index+1, length):
+ * value = data[index]
+ * if value > maximum: # <<<<<<<<<<<<<<
+ * maximum = value
+ * max_index = index
+ */
+ goto __pyx_L20;
+ }
+
+ /* "silx/math/combo.pyx":191
+ * max_index = index
+ * else:
+ * if value < minimum: # <<<<<<<<<<<<<<
+ * minimum = value
+ * min_index = index
+ */
+ /*else*/ {
+ __pyx_t_3 = ((__pyx_v_value < __pyx_v_minimum) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":192
+ * else:
+ * if value < minimum:
+ * minimum = value # <<<<<<<<<<<<<<
+ * min_index = index
+ *
+ */
+ __pyx_v_minimum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":193
+ * if value < minimum:
+ * minimum = value
+ * min_index = index # <<<<<<<<<<<<<<
+ *
+ * if 0 < value < min_pos:
+ */
+ __pyx_v_min_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":191
+ * max_index = index
+ * else:
+ * if value < minimum: # <<<<<<<<<<<<<<
+ * minimum = value
+ * min_index = index
+ */
+ }
+
+ /* "silx/math/combo.pyx":195
+ * min_index = index
+ *
+ * if 0 < value < min_pos: # <<<<<<<<<<<<<<
+ * min_pos = value
+ * min_pos_index = index
+ */
+ __pyx_t_3 = (0 < __pyx_v_value);
+ if (__pyx_t_3) {
+ __pyx_t_3 = (__pyx_v_value < __pyx_v_min_pos);
+ }
+ __pyx_t_5 = (__pyx_t_3 != 0);
+ if (__pyx_t_5) {
+
+ /* "silx/math/combo.pyx":196
+ *
+ * if 0 < value < min_pos:
+ * min_pos = value # <<<<<<<<<<<<<<
+ * min_pos_index = index
+ *
+ */
+ __pyx_v_min_pos = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":197
+ * if 0 < value < min_pos:
+ * min_pos = value
+ * min_pos_index = index # <<<<<<<<<<<<<<
+ *
+ * return _MinMaxResult(minimum,
+ */
+ __pyx_v_min_pos_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":195
+ * min_index = index
+ *
+ * if 0 < value < min_pos: # <<<<<<<<<<<<<<
+ * min_pos = value
+ * min_pos_index = index
+ */
+ }
+ }
+ __pyx_L20:;
+ }
+ }
+ __pyx_L10:;
+ }
+
+ /* "silx/math/combo.pyx":137
+ * raise ValueError('Zero-size array')
+ *
+ * with nogil: # <<<<<<<<<<<<<<
+ * # Init starting values
+ * value = data[0]
+ */
+ /*finally:*/ {
+ /*normal exit:*/{
+ #ifdef WITH_THREAD
+ Py_BLOCK_THREADS
+ #endif
+ goto __pyx_L6;
+ }
+ __pyx_L6:;
+ }
+ }
+
+ /* "silx/math/combo.pyx":199
+ * min_pos_index = index
+ *
+ * return _MinMaxResult(minimum, # <<<<<<<<<<<<<<
+ * min_pos if min_pos > 0 else None,
+ * maximum,
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_MinMaxResult); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __pyx_t_12 = __Pyx_PyInt_From_PY_LONG_LONG(__pyx_v_minimum); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+
+ /* "silx/math/combo.pyx":200
+ *
+ * return _MinMaxResult(minimum,
+ * min_pos if min_pos > 0 else None, # <<<<<<<<<<<<<<
+ * maximum,
+ * min_index,
+ */
+ if (((__pyx_v_min_pos > 0) != 0)) {
+ __pyx_t_14 = __Pyx_PyInt_From_PY_LONG_LONG(__pyx_v_min_pos); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 200, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_14);
+ __pyx_t_13 = __pyx_t_14;
+ __pyx_t_14 = 0;
+ } else {
+ __Pyx_INCREF(Py_None);
+ __pyx_t_13 = Py_None;
+ }
+
+ /* "silx/math/combo.pyx":201
+ * return _MinMaxResult(minimum,
+ * min_pos if min_pos > 0 else None,
+ * maximum, # <<<<<<<<<<<<<<
+ * min_index,
+ * min_pos_index if min_pos > 0 else None,
+ */
+ __pyx_t_14 = __Pyx_PyInt_From_PY_LONG_LONG(__pyx_v_maximum); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 201, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_14);
+
+ /* "silx/math/combo.pyx":202
+ * min_pos if min_pos > 0 else None,
+ * maximum,
+ * min_index, # <<<<<<<<<<<<<<
+ * min_pos_index if min_pos > 0 else None,
+ * max_index)
+ */
+ __pyx_t_15 = __Pyx_PyInt_From_unsigned_int(__pyx_v_min_index); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 202, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_15);
+
+ /* "silx/math/combo.pyx":203
+ * maximum,
+ * min_index,
+ * min_pos_index if min_pos > 0 else None, # <<<<<<<<<<<<<<
+ * max_index)
+ *
+ */
+ if (((__pyx_v_min_pos > 0) != 0)) {
+ __pyx_t_17 = __Pyx_PyInt_From_unsigned_int(__pyx_v_min_pos_index); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 203, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_17);
+ __pyx_t_16 = __pyx_t_17;
+ __pyx_t_17 = 0;
+ } else {
+ __Pyx_INCREF(Py_None);
+ __pyx_t_16 = Py_None;
+ }
+
+ /* "silx/math/combo.pyx":204
+ * min_index,
+ * min_pos_index if min_pos > 0 else None,
+ * max_index) # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __pyx_t_17 = __Pyx_PyInt_From_unsigned_int(__pyx_v_max_index); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 204, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_17);
+ __pyx_t_18 = NULL;
+ __pyx_t_19 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
+ __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_11);
+ if (likely(__pyx_t_18)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
+ __Pyx_INCREF(__pyx_t_18);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_11, function);
+ __pyx_t_19 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_11)) {
+ PyObject *__pyx_temp[7] = {__pyx_t_18, __pyx_t_12, __pyx_t_13, __pyx_t_14, __pyx_t_15, __pyx_t_16, __pyx_t_17};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_19, 6+__pyx_t_19); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+ __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
+ __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) {
+ PyObject *__pyx_temp[7] = {__pyx_t_18, __pyx_t_12, __pyx_t_13, __pyx_t_14, __pyx_t_15, __pyx_t_16, __pyx_t_17};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_19, 6+__pyx_t_19); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+ __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
+ __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_20 = PyTuple_New(6+__pyx_t_19); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_20);
+ if (__pyx_t_18) {
+ __Pyx_GIVEREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_20, 0, __pyx_t_18); __pyx_t_18 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_12);
+ PyTuple_SET_ITEM(__pyx_t_20, 0+__pyx_t_19, __pyx_t_12);
+ __Pyx_GIVEREF(__pyx_t_13);
+ PyTuple_SET_ITEM(__pyx_t_20, 1+__pyx_t_19, __pyx_t_13);
+ __Pyx_GIVEREF(__pyx_t_14);
+ PyTuple_SET_ITEM(__pyx_t_20, 2+__pyx_t_19, __pyx_t_14);
+ __Pyx_GIVEREF(__pyx_t_15);
+ PyTuple_SET_ITEM(__pyx_t_20, 3+__pyx_t_19, __pyx_t_15);
+ __Pyx_GIVEREF(__pyx_t_16);
+ PyTuple_SET_ITEM(__pyx_t_20, 4+__pyx_t_19, __pyx_t_16);
+ __Pyx_GIVEREF(__pyx_t_17);
+ PyTuple_SET_ITEM(__pyx_t_20, 5+__pyx_t_19, __pyx_t_17);
+ __pyx_t_12 = 0;
+ __pyx_t_13 = 0;
+ __pyx_t_14 = 0;
+ __pyx_t_15 = 0;
+ __pyx_t_16 = 0;
+ __pyx_t_17 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_20, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "silx/math/combo.pyx":119
+ * @cython.boundscheck(False)
+ * @cython.wraparound(False)
+ * def _min_max(_number[::1] data, bint min_positive=False): # <<<<<<<<<<<<<<
+ * """:func:`min_max` implementation including infinite values
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_11);
+ __Pyx_XDECREF(__pyx_t_12);
+ __Pyx_XDECREF(__pyx_t_13);
+ __Pyx_XDECREF(__pyx_t_14);
+ __Pyx_XDECREF(__pyx_t_15);
+ __Pyx_XDECREF(__pyx_t_16);
+ __Pyx_XDECREF(__pyx_t_17);
+ __Pyx_XDECREF(__pyx_t_18);
+ __Pyx_XDECREF(__pyx_t_20);
+ __Pyx_AddTraceback("silx.math.combo._min_max", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __PYX_XDEC_MEMVIEW(&__pyx_v_data, 1);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_4silx_4math_5combo_76__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ __Pyx_RefNannySetupContext("__defaults__", 0);
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyBool_FromLong(__Pyx_CyFunction_Defaults(__pyx_defaults19, __pyx_self)->__pyx_arg_min_positive); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 119, __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 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
+ __Pyx_INCREF(Py_None);
+ __Pyx_GIVEREF(Py_None);
+ PyTuple_SET_ITEM(__pyx_t_1, 1, Py_None);
+ __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_AddTraceback("silx.math.combo.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_fuse_7__pyx_pw_4silx_4math_5combo_21_min_max(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_fuse_7__pyx_mdef_4silx_4math_5combo_21_min_max = {"__pyx_fuse_7_min_max", (PyCFunction)__pyx_fuse_7__pyx_pw_4silx_4math_5combo_21_min_max, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4silx_4math_5combo__min_max};
+static PyObject *__pyx_fuse_7__pyx_pw_4silx_4math_5combo_21_min_max(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ __Pyx_memviewslice __pyx_v_data = { 0, 0, { 0 }, { 0 }, { 0 } };
+ int __pyx_v_min_positive;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_min_max (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,&__pyx_n_s_min_positive_2,0};
+ PyObject* values[2] = {0,0};
+ __pyx_defaults19 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults19, __pyx_self);
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ case 1:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_min_positive_2);
+ if (value) { values[1] = value; kw_args--; }
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_min_max") < 0)) __PYX_ERR(0, 119, __pyx_L3_error)
+ }
+ } else {
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ }
+ __pyx_v_data = __Pyx_PyObject_to_MemoryviewSlice_dc_unsigned_char(values[0]); if (unlikely(!__pyx_v_data.memview)) __PYX_ERR(0, 119, __pyx_L3_error)
+ if (values[1]) {
+ __pyx_v_min_positive = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_min_positive == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 119, __pyx_L3_error)
+ } else {
+ __pyx_v_min_positive = __pyx_dynamic_args->__pyx_arg_min_positive;
+ }
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("_min_max", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 119, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("silx.math.combo._min_max", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_4silx_4math_5combo_20_min_max(__pyx_self, __pyx_v_data, __pyx_v_min_positive);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_4silx_4math_5combo_20_min_max(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_data, int __pyx_v_min_positive) {
+ unsigned char __pyx_v_value;
+ unsigned char __pyx_v_minimum;
+ unsigned char __pyx_v_maximum;
+ unsigned int __pyx_v_length;
+ unsigned int __pyx_v_index;
+ unsigned int __pyx_v_min_index;
+ unsigned int __pyx_v_min_pos_index;
+ unsigned int __pyx_v_max_index;
+ long __pyx_v_min_pos;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ Py_ssize_t __pyx_t_2;
+ int __pyx_t_3;
+ Py_ssize_t __pyx_t_4;
+ int __pyx_t_5;
+ unsigned int __pyx_t_6;
+ unsigned int __pyx_t_7;
+ size_t __pyx_t_8;
+ size_t __pyx_t_9;
+ size_t __pyx_t_10;
+ PyObject *__pyx_t_11 = NULL;
+ PyObject *__pyx_t_12 = NULL;
+ PyObject *__pyx_t_13 = NULL;
+ PyObject *__pyx_t_14 = NULL;
+ PyObject *__pyx_t_15 = NULL;
+ PyObject *__pyx_t_16 = NULL;
+ PyObject *__pyx_t_17 = NULL;
+ PyObject *__pyx_t_18 = NULL;
+ int __pyx_t_19;
+ PyObject *__pyx_t_20 = NULL;
+ __Pyx_RefNannySetupContext("__pyx_fuse_7_min_max", 0);
+
+ /* "silx/math/combo.pyx":127
+ * _number value, minimum, minpos, maximum
+ * unsigned int length
+ * unsigned int index = 0 # <<<<<<<<<<<<<<
+ * unsigned int min_index = 0
+ * unsigned int min_pos_index = 0
+ */
+ __pyx_v_index = 0;
+
+ /* "silx/math/combo.pyx":128
+ * unsigned int length
+ * unsigned int index = 0
+ * unsigned int min_index = 0 # <<<<<<<<<<<<<<
+ * unsigned int min_pos_index = 0
+ * unsigned int max_index = 0
+ */
+ __pyx_v_min_index = 0;
+
+ /* "silx/math/combo.pyx":129
+ * unsigned int index = 0
+ * unsigned int min_index = 0
+ * unsigned int min_pos_index = 0 # <<<<<<<<<<<<<<
+ * unsigned int max_index = 0
+ *
+ */
+ __pyx_v_min_pos_index = 0;
+
+ /* "silx/math/combo.pyx":130
+ * unsigned int min_index = 0
+ * unsigned int min_pos_index = 0
+ * unsigned int max_index = 0 # <<<<<<<<<<<<<<
+ *
+ * length = len(data)
+ */
+ __pyx_v_max_index = 0;
+
+ /* "silx/math/combo.pyx":132
+ * unsigned int max_index = 0
+ *
+ * length = len(data) # <<<<<<<<<<<<<<
+ *
+ * if length == 0:
+ */
+ __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_data, 1, (PyObject *(*)(char *)) __pyx_memview_get_unsigned_char, (int (*)(char *, PyObject *)) __pyx_memview_set_unsigned_char, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 132, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 132, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_v_length = __pyx_t_2;
+
+ /* "silx/math/combo.pyx":134
+ * length = len(data)
+ *
+ * if length == 0: # <<<<<<<<<<<<<<
+ * raise ValueError('Zero-size array')
+ *
+ */
+ __pyx_t_3 = ((__pyx_v_length == 0) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":135
+ *
+ * if length == 0:
+ * raise ValueError('Zero-size array') # <<<<<<<<<<<<<<
+ *
+ * with nogil:
+ */
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 135, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __PYX_ERR(0, 135, __pyx_L1_error)
+
+ /* "silx/math/combo.pyx":134
+ * length = len(data)
+ *
+ * if length == 0: # <<<<<<<<<<<<<<
+ * raise ValueError('Zero-size array')
+ *
+ */
+ }
+
+ /* "silx/math/combo.pyx":137
+ * raise ValueError('Zero-size array')
+ *
+ * with nogil: # <<<<<<<<<<<<<<
+ * # Init starting values
+ * value = data[0]
+ */
+ {
+ #ifdef WITH_THREAD
+ PyThreadState *_save;
+ Py_UNBLOCK_THREADS
+ #endif
+ /*try:*/ {
+
+ /* "silx/math/combo.pyx":139
+ * with nogil:
+ * # Init starting values
+ * value = data[0] # <<<<<<<<<<<<<<
+ * minimum = value
+ * maximum = value
+ */
+ __pyx_t_4 = 0;
+ __pyx_v_value = (*((unsigned char *) ( /* dim=0 */ ((char *) (((unsigned char *) __pyx_v_data.data) + __pyx_t_4)) )));
+
+ /* "silx/math/combo.pyx":140
+ * # Init starting values
+ * value = data[0]
+ * minimum = value # <<<<<<<<<<<<<<
+ * maximum = value
+ * if min_positive and value > 0:
+ */
+ __pyx_v_minimum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":141
+ * value = data[0]
+ * minimum = value
+ * maximum = value # <<<<<<<<<<<<<<
+ * if min_positive and value > 0:
+ * min_pos = value
+ */
+ __pyx_v_maximum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":142
+ * minimum = value
+ * maximum = value
+ * if min_positive and value > 0: # <<<<<<<<<<<<<<
+ * min_pos = value
+ * else:
+ */
+ __pyx_t_5 = (__pyx_v_min_positive != 0);
+ if (__pyx_t_5) {
+ } else {
+ __pyx_t_3 = __pyx_t_5;
+ goto __pyx_L8_bool_binop_done;
+ }
+ __pyx_t_5 = ((__pyx_v_value > 0) != 0);
+ __pyx_t_3 = __pyx_t_5;
+ __pyx_L8_bool_binop_done:;
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":143
+ * maximum = value
+ * if min_positive and value > 0:
+ * min_pos = value # <<<<<<<<<<<<<<
+ * else:
+ * min_pos = 0
+ */
+ __pyx_v_min_pos = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":142
+ * minimum = value
+ * maximum = value
+ * if min_positive and value > 0: # <<<<<<<<<<<<<<
+ * min_pos = value
+ * else:
+ */
+ goto __pyx_L7;
+ }
+
+ /* "silx/math/combo.pyx":145
+ * min_pos = value
+ * else:
+ * min_pos = 0 # <<<<<<<<<<<<<<
+ *
+ * if _number in cython.floating:
+ */
+ /*else*/ {
+ __pyx_v_min_pos = 0;
+ }
+ __pyx_L7:;
+
+ /* "silx/math/combo.pyx":158
+ * break
+ *
+ * if not min_positive: # <<<<<<<<<<<<<<
+ * for index in range(index, length):
+ * value = data[index]
+ */
+ __pyx_t_3 = ((!(__pyx_v_min_positive != 0)) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":159
+ *
+ * if not min_positive:
+ * for index in range(index, length): # <<<<<<<<<<<<<<
+ * value = data[index]
+ * if value > maximum:
+ */
+ __pyx_t_6 = __pyx_v_length;
+ for (__pyx_t_7 = __pyx_v_index; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
+ __pyx_v_index = __pyx_t_7;
+
+ /* "silx/math/combo.pyx":160
+ * if not min_positive:
+ * for index in range(index, length):
+ * value = data[index] # <<<<<<<<<<<<<<
+ * if value > maximum:
+ * maximum = value
+ */
+ __pyx_t_8 = __pyx_v_index;
+ __pyx_v_value = (*((unsigned char *) ( /* dim=0 */ ((char *) (((unsigned char *) __pyx_v_data.data) + __pyx_t_8)) )));
+
+ /* "silx/math/combo.pyx":161
+ * for index in range(index, length):
+ * value = data[index]
+ * if value > maximum: # <<<<<<<<<<<<<<
+ * maximum = value
+ * max_index = index
+ */
+ __pyx_t_3 = ((__pyx_v_value > __pyx_v_maximum) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":162
+ * value = data[index]
+ * if value > maximum:
+ * maximum = value # <<<<<<<<<<<<<<
+ * max_index = index
+ * elif value < minimum:
+ */
+ __pyx_v_maximum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":163
+ * if value > maximum:
+ * maximum = value
+ * max_index = index # <<<<<<<<<<<<<<
+ * elif value < minimum:
+ * minimum = value
+ */
+ __pyx_v_max_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":161
+ * for index in range(index, length):
+ * value = data[index]
+ * if value > maximum: # <<<<<<<<<<<<<<
+ * maximum = value
+ * max_index = index
+ */
+ goto __pyx_L13;
+ }
+
+ /* "silx/math/combo.pyx":164
+ * maximum = value
+ * max_index = index
+ * elif value < minimum: # <<<<<<<<<<<<<<
+ * minimum = value
+ * min_index = index
+ */
+ __pyx_t_3 = ((__pyx_v_value < __pyx_v_minimum) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":165
+ * max_index = index
+ * elif value < minimum:
+ * minimum = value # <<<<<<<<<<<<<<
+ * min_index = index
+ *
+ */
+ __pyx_v_minimum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":166
+ * elif value < minimum:
+ * minimum = value
+ * min_index = index # <<<<<<<<<<<<<<
+ *
+ * else:
+ */
+ __pyx_v_min_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":164
+ * maximum = value
+ * max_index = index
+ * elif value < minimum: # <<<<<<<<<<<<<<
+ * minimum = value
+ * min_index = index
+ */
+ }
+ __pyx_L13:;
+ }
+
+ /* "silx/math/combo.pyx":158
+ * break
+ *
+ * if not min_positive: # <<<<<<<<<<<<<<
+ * for index in range(index, length):
+ * value = data[index]
+ */
+ goto __pyx_L10;
+ }
+
+ /* "silx/math/combo.pyx":170
+ * else:
+ * # Loop until min_pos is defined
+ * for index in range(index, length): # <<<<<<<<<<<<<<
+ * value = data[index]
+ * if value > maximum:
+ */
+ /*else*/ {
+ __pyx_t_6 = __pyx_v_length;
+ for (__pyx_t_7 = __pyx_v_index; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
+ __pyx_v_index = __pyx_t_7;
+
+ /* "silx/math/combo.pyx":171
+ * # Loop until min_pos is defined
+ * for index in range(index, length):
+ * value = data[index] # <<<<<<<<<<<<<<
+ * if value > maximum:
+ * maximum = value
+ */
+ __pyx_t_9 = __pyx_v_index;
+ __pyx_v_value = (*((unsigned char *) ( /* dim=0 */ ((char *) (((unsigned char *) __pyx_v_data.data) + __pyx_t_9)) )));
+
+ /* "silx/math/combo.pyx":172
+ * for index in range(index, length):
+ * value = data[index]
+ * if value > maximum: # <<<<<<<<<<<<<<
+ * maximum = value
+ * max_index = index
+ */
+ __pyx_t_3 = ((__pyx_v_value > __pyx_v_maximum) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":173
+ * value = data[index]
+ * if value > maximum:
+ * maximum = value # <<<<<<<<<<<<<<
+ * max_index = index
+ * elif value < minimum:
+ */
+ __pyx_v_maximum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":174
+ * if value > maximum:
+ * maximum = value
+ * max_index = index # <<<<<<<<<<<<<<
+ * elif value < minimum:
+ * minimum = value
+ */
+ __pyx_v_max_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":172
+ * for index in range(index, length):
+ * value = data[index]
+ * if value > maximum: # <<<<<<<<<<<<<<
+ * maximum = value
+ * max_index = index
+ */
+ goto __pyx_L16;
+ }
+
+ /* "silx/math/combo.pyx":175
+ * maximum = value
+ * max_index = index
+ * elif value < minimum: # <<<<<<<<<<<<<<
+ * minimum = value
+ * min_index = index
+ */
+ __pyx_t_3 = ((__pyx_v_value < __pyx_v_minimum) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":176
+ * max_index = index
+ * elif value < minimum:
+ * minimum = value # <<<<<<<<<<<<<<
+ * min_index = index
+ *
+ */
+ __pyx_v_minimum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":177
+ * elif value < minimum:
+ * minimum = value
+ * min_index = index # <<<<<<<<<<<<<<
+ *
+ * if value > 0:
+ */
+ __pyx_v_min_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":175
+ * maximum = value
+ * max_index = index
+ * elif value < minimum: # <<<<<<<<<<<<<<
+ * minimum = value
+ * min_index = index
+ */
+ }
+ __pyx_L16:;
+
+ /* "silx/math/combo.pyx":179
+ * min_index = index
+ *
+ * if value > 0: # <<<<<<<<<<<<<<
+ * min_pos = value
+ * min_pos_index = index
+ */
+ __pyx_t_3 = ((__pyx_v_value > 0) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":180
+ *
+ * if value > 0:
+ * min_pos = value # <<<<<<<<<<<<<<
+ * min_pos_index = index
+ * break
+ */
+ __pyx_v_min_pos = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":181
+ * if value > 0:
+ * min_pos = value
+ * min_pos_index = index # <<<<<<<<<<<<<<
+ * break
+ *
+ */
+ __pyx_v_min_pos_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":182
+ * min_pos = value
+ * min_pos_index = index
+ * break # <<<<<<<<<<<<<<
+ *
+ * # Loop until the end
+ */
+ goto __pyx_L15_break;
+
+ /* "silx/math/combo.pyx":179
+ * min_index = index
+ *
+ * if value > 0: # <<<<<<<<<<<<<<
+ * min_pos = value
+ * min_pos_index = index
+ */
+ }
+ }
+ __pyx_L15_break:;
+
+ /* "silx/math/combo.pyx":185
+ *
+ * # Loop until the end
+ * for index in range(index+1, length): # <<<<<<<<<<<<<<
+ * value = data[index]
+ * if value > maximum:
+ */
+ __pyx_t_6 = __pyx_v_length;
+ for (__pyx_t_7 = (__pyx_v_index + 1); __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
+ __pyx_v_index = __pyx_t_7;
+
+ /* "silx/math/combo.pyx":186
+ * # Loop until the end
+ * for index in range(index+1, length):
+ * value = data[index] # <<<<<<<<<<<<<<
+ * if value > maximum:
+ * maximum = value
+ */
+ __pyx_t_10 = __pyx_v_index;
+ __pyx_v_value = (*((unsigned char *) ( /* dim=0 */ ((char *) (((unsigned char *) __pyx_v_data.data) + __pyx_t_10)) )));
+
+ /* "silx/math/combo.pyx":187
+ * for index in range(index+1, length):
+ * value = data[index]
+ * if value > maximum: # <<<<<<<<<<<<<<
+ * maximum = value
+ * max_index = index
+ */
+ __pyx_t_3 = ((__pyx_v_value > __pyx_v_maximum) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":188
+ * value = data[index]
+ * if value > maximum:
+ * maximum = value # <<<<<<<<<<<<<<
+ * max_index = index
+ * else:
+ */
+ __pyx_v_maximum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":189
+ * if value > maximum:
+ * maximum = value
+ * max_index = index # <<<<<<<<<<<<<<
+ * else:
+ * if value < minimum:
+ */
+ __pyx_v_max_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":187
+ * for index in range(index+1, length):
+ * value = data[index]
+ * if value > maximum: # <<<<<<<<<<<<<<
+ * maximum = value
+ * max_index = index
+ */
+ goto __pyx_L20;
+ }
+
+ /* "silx/math/combo.pyx":191
+ * max_index = index
+ * else:
+ * if value < minimum: # <<<<<<<<<<<<<<
+ * minimum = value
+ * min_index = index
+ */
+ /*else*/ {
+ __pyx_t_3 = ((__pyx_v_value < __pyx_v_minimum) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":192
+ * else:
+ * if value < minimum:
+ * minimum = value # <<<<<<<<<<<<<<
+ * min_index = index
+ *
+ */
+ __pyx_v_minimum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":193
+ * if value < minimum:
+ * minimum = value
+ * min_index = index # <<<<<<<<<<<<<<
+ *
+ * if 0 < value < min_pos:
+ */
+ __pyx_v_min_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":191
+ * max_index = index
+ * else:
+ * if value < minimum: # <<<<<<<<<<<<<<
+ * minimum = value
+ * min_index = index
+ */
+ }
+
+ /* "silx/math/combo.pyx":195
+ * min_index = index
+ *
+ * if 0 < value < min_pos: # <<<<<<<<<<<<<<
+ * min_pos = value
+ * min_pos_index = index
+ */
+ __pyx_t_3 = (0 < __pyx_v_value);
+ if (__pyx_t_3) {
+ __pyx_t_3 = (__pyx_v_value < __pyx_v_min_pos);
+ }
+ __pyx_t_5 = (__pyx_t_3 != 0);
+ if (__pyx_t_5) {
+
+ /* "silx/math/combo.pyx":196
+ *
+ * if 0 < value < min_pos:
+ * min_pos = value # <<<<<<<<<<<<<<
+ * min_pos_index = index
+ *
+ */
+ __pyx_v_min_pos = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":197
+ * if 0 < value < min_pos:
+ * min_pos = value
+ * min_pos_index = index # <<<<<<<<<<<<<<
+ *
+ * return _MinMaxResult(minimum,
+ */
+ __pyx_v_min_pos_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":195
+ * min_index = index
+ *
+ * if 0 < value < min_pos: # <<<<<<<<<<<<<<
+ * min_pos = value
+ * min_pos_index = index
+ */
+ }
+ }
+ __pyx_L20:;
+ }
+ }
+ __pyx_L10:;
+ }
+
+ /* "silx/math/combo.pyx":137
+ * raise ValueError('Zero-size array')
+ *
+ * with nogil: # <<<<<<<<<<<<<<
+ * # Init starting values
+ * value = data[0]
+ */
+ /*finally:*/ {
+ /*normal exit:*/{
+ #ifdef WITH_THREAD
+ Py_BLOCK_THREADS
+ #endif
+ goto __pyx_L6;
+ }
+ __pyx_L6:;
+ }
+ }
+
+ /* "silx/math/combo.pyx":199
+ * min_pos_index = index
+ *
+ * return _MinMaxResult(minimum, # <<<<<<<<<<<<<<
+ * min_pos if min_pos > 0 else None,
+ * maximum,
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_MinMaxResult); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __pyx_t_12 = __Pyx_PyInt_From_unsigned_char(__pyx_v_minimum); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+
+ /* "silx/math/combo.pyx":200
+ *
+ * return _MinMaxResult(minimum,
+ * min_pos if min_pos > 0 else None, # <<<<<<<<<<<<<<
+ * maximum,
+ * min_index,
+ */
+ if (((__pyx_v_min_pos > 0) != 0)) {
+ __pyx_t_14 = __Pyx_PyInt_From_long(__pyx_v_min_pos); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 200, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_14);
+ __pyx_t_13 = __pyx_t_14;
+ __pyx_t_14 = 0;
+ } else {
+ __Pyx_INCREF(Py_None);
+ __pyx_t_13 = Py_None;
+ }
+
+ /* "silx/math/combo.pyx":201
+ * return _MinMaxResult(minimum,
+ * min_pos if min_pos > 0 else None,
+ * maximum, # <<<<<<<<<<<<<<
+ * min_index,
+ * min_pos_index if min_pos > 0 else None,
+ */
+ __pyx_t_14 = __Pyx_PyInt_From_unsigned_char(__pyx_v_maximum); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 201, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_14);
+
+ /* "silx/math/combo.pyx":202
+ * min_pos if min_pos > 0 else None,
+ * maximum,
+ * min_index, # <<<<<<<<<<<<<<
+ * min_pos_index if min_pos > 0 else None,
+ * max_index)
+ */
+ __pyx_t_15 = __Pyx_PyInt_From_unsigned_int(__pyx_v_min_index); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 202, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_15);
+
+ /* "silx/math/combo.pyx":203
+ * maximum,
+ * min_index,
+ * min_pos_index if min_pos > 0 else None, # <<<<<<<<<<<<<<
+ * max_index)
+ *
+ */
+ if (((__pyx_v_min_pos > 0) != 0)) {
+ __pyx_t_17 = __Pyx_PyInt_From_unsigned_int(__pyx_v_min_pos_index); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 203, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_17);
+ __pyx_t_16 = __pyx_t_17;
+ __pyx_t_17 = 0;
+ } else {
+ __Pyx_INCREF(Py_None);
+ __pyx_t_16 = Py_None;
+ }
+
+ /* "silx/math/combo.pyx":204
+ * min_index,
+ * min_pos_index if min_pos > 0 else None,
+ * max_index) # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __pyx_t_17 = __Pyx_PyInt_From_unsigned_int(__pyx_v_max_index); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 204, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_17);
+ __pyx_t_18 = NULL;
+ __pyx_t_19 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
+ __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_11);
+ if (likely(__pyx_t_18)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
+ __Pyx_INCREF(__pyx_t_18);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_11, function);
+ __pyx_t_19 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_11)) {
+ PyObject *__pyx_temp[7] = {__pyx_t_18, __pyx_t_12, __pyx_t_13, __pyx_t_14, __pyx_t_15, __pyx_t_16, __pyx_t_17};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_19, 6+__pyx_t_19); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+ __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
+ __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) {
+ PyObject *__pyx_temp[7] = {__pyx_t_18, __pyx_t_12, __pyx_t_13, __pyx_t_14, __pyx_t_15, __pyx_t_16, __pyx_t_17};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_19, 6+__pyx_t_19); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+ __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
+ __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_20 = PyTuple_New(6+__pyx_t_19); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_20);
+ if (__pyx_t_18) {
+ __Pyx_GIVEREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_20, 0, __pyx_t_18); __pyx_t_18 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_12);
+ PyTuple_SET_ITEM(__pyx_t_20, 0+__pyx_t_19, __pyx_t_12);
+ __Pyx_GIVEREF(__pyx_t_13);
+ PyTuple_SET_ITEM(__pyx_t_20, 1+__pyx_t_19, __pyx_t_13);
+ __Pyx_GIVEREF(__pyx_t_14);
+ PyTuple_SET_ITEM(__pyx_t_20, 2+__pyx_t_19, __pyx_t_14);
+ __Pyx_GIVEREF(__pyx_t_15);
+ PyTuple_SET_ITEM(__pyx_t_20, 3+__pyx_t_19, __pyx_t_15);
+ __Pyx_GIVEREF(__pyx_t_16);
+ PyTuple_SET_ITEM(__pyx_t_20, 4+__pyx_t_19, __pyx_t_16);
+ __Pyx_GIVEREF(__pyx_t_17);
+ PyTuple_SET_ITEM(__pyx_t_20, 5+__pyx_t_19, __pyx_t_17);
+ __pyx_t_12 = 0;
+ __pyx_t_13 = 0;
+ __pyx_t_14 = 0;
+ __pyx_t_15 = 0;
+ __pyx_t_16 = 0;
+ __pyx_t_17 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_20, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "silx/math/combo.pyx":119
+ * @cython.boundscheck(False)
+ * @cython.wraparound(False)
+ * def _min_max(_number[::1] data, bint min_positive=False): # <<<<<<<<<<<<<<
+ * """:func:`min_max` implementation including infinite values
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_11);
+ __Pyx_XDECREF(__pyx_t_12);
+ __Pyx_XDECREF(__pyx_t_13);
+ __Pyx_XDECREF(__pyx_t_14);
+ __Pyx_XDECREF(__pyx_t_15);
+ __Pyx_XDECREF(__pyx_t_16);
+ __Pyx_XDECREF(__pyx_t_17);
+ __Pyx_XDECREF(__pyx_t_18);
+ __Pyx_XDECREF(__pyx_t_20);
+ __Pyx_AddTraceback("silx.math.combo._min_max", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __PYX_XDEC_MEMVIEW(&__pyx_v_data, 1);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_4silx_4math_5combo_78__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ __Pyx_RefNannySetupContext("__defaults__", 0);
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyBool_FromLong(__Pyx_CyFunction_Defaults(__pyx_defaults20, __pyx_self)->__pyx_arg_min_positive); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 119, __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 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
+ __Pyx_INCREF(Py_None);
+ __Pyx_GIVEREF(Py_None);
+ PyTuple_SET_ITEM(__pyx_t_1, 1, Py_None);
+ __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_AddTraceback("silx.math.combo.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_fuse_8__pyx_pw_4silx_4math_5combo_23_min_max(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_fuse_8__pyx_mdef_4silx_4math_5combo_23_min_max = {"__pyx_fuse_8_min_max", (PyCFunction)__pyx_fuse_8__pyx_pw_4silx_4math_5combo_23_min_max, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4silx_4math_5combo__min_max};
+static PyObject *__pyx_fuse_8__pyx_pw_4silx_4math_5combo_23_min_max(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ __Pyx_memviewslice __pyx_v_data = { 0, 0, { 0 }, { 0 }, { 0 } };
+ int __pyx_v_min_positive;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_min_max (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,&__pyx_n_s_min_positive_2,0};
+ PyObject* values[2] = {0,0};
+ __pyx_defaults20 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults20, __pyx_self);
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ case 1:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_min_positive_2);
+ if (value) { values[1] = value; kw_args--; }
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_min_max") < 0)) __PYX_ERR(0, 119, __pyx_L3_error)
+ }
+ } else {
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ }
+ __pyx_v_data = __Pyx_PyObject_to_MemoryviewSlice_dc_unsigned_short(values[0]); if (unlikely(!__pyx_v_data.memview)) __PYX_ERR(0, 119, __pyx_L3_error)
+ if (values[1]) {
+ __pyx_v_min_positive = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_min_positive == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 119, __pyx_L3_error)
+ } else {
+ __pyx_v_min_positive = __pyx_dynamic_args->__pyx_arg_min_positive;
+ }
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("_min_max", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 119, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("silx.math.combo._min_max", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_4silx_4math_5combo_22_min_max(__pyx_self, __pyx_v_data, __pyx_v_min_positive);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_4silx_4math_5combo_22_min_max(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_data, int __pyx_v_min_positive) {
+ unsigned short __pyx_v_value;
+ unsigned short __pyx_v_minimum;
+ unsigned short __pyx_v_maximum;
+ unsigned int __pyx_v_length;
+ unsigned int __pyx_v_index;
+ unsigned int __pyx_v_min_index;
+ unsigned int __pyx_v_min_pos_index;
+ unsigned int __pyx_v_max_index;
+ long __pyx_v_min_pos;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ Py_ssize_t __pyx_t_2;
+ int __pyx_t_3;
+ Py_ssize_t __pyx_t_4;
+ int __pyx_t_5;
+ unsigned int __pyx_t_6;
+ unsigned int __pyx_t_7;
+ size_t __pyx_t_8;
+ size_t __pyx_t_9;
+ size_t __pyx_t_10;
+ PyObject *__pyx_t_11 = NULL;
+ PyObject *__pyx_t_12 = NULL;
+ PyObject *__pyx_t_13 = NULL;
+ PyObject *__pyx_t_14 = NULL;
+ PyObject *__pyx_t_15 = NULL;
+ PyObject *__pyx_t_16 = NULL;
+ PyObject *__pyx_t_17 = NULL;
+ PyObject *__pyx_t_18 = NULL;
+ int __pyx_t_19;
+ PyObject *__pyx_t_20 = NULL;
+ __Pyx_RefNannySetupContext("__pyx_fuse_8_min_max", 0);
+
+ /* "silx/math/combo.pyx":127
+ * _number value, minimum, minpos, maximum
+ * unsigned int length
+ * unsigned int index = 0 # <<<<<<<<<<<<<<
+ * unsigned int min_index = 0
+ * unsigned int min_pos_index = 0
+ */
+ __pyx_v_index = 0;
+
+ /* "silx/math/combo.pyx":128
+ * unsigned int length
+ * unsigned int index = 0
+ * unsigned int min_index = 0 # <<<<<<<<<<<<<<
+ * unsigned int min_pos_index = 0
+ * unsigned int max_index = 0
+ */
+ __pyx_v_min_index = 0;
+
+ /* "silx/math/combo.pyx":129
+ * unsigned int index = 0
+ * unsigned int min_index = 0
+ * unsigned int min_pos_index = 0 # <<<<<<<<<<<<<<
+ * unsigned int max_index = 0
+ *
+ */
+ __pyx_v_min_pos_index = 0;
+
+ /* "silx/math/combo.pyx":130
+ * unsigned int min_index = 0
+ * unsigned int min_pos_index = 0
+ * unsigned int max_index = 0 # <<<<<<<<<<<<<<
+ *
+ * length = len(data)
+ */
+ __pyx_v_max_index = 0;
+
+ /* "silx/math/combo.pyx":132
+ * unsigned int max_index = 0
+ *
+ * length = len(data) # <<<<<<<<<<<<<<
+ *
+ * if length == 0:
+ */
+ __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_data, 1, (PyObject *(*)(char *)) __pyx_memview_get_unsigned_short, (int (*)(char *, PyObject *)) __pyx_memview_set_unsigned_short, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 132, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 132, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_v_length = __pyx_t_2;
+
+ /* "silx/math/combo.pyx":134
+ * length = len(data)
+ *
+ * if length == 0: # <<<<<<<<<<<<<<
+ * raise ValueError('Zero-size array')
+ *
+ */
+ __pyx_t_3 = ((__pyx_v_length == 0) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":135
+ *
+ * if length == 0:
+ * raise ValueError('Zero-size array') # <<<<<<<<<<<<<<
+ *
+ * with nogil:
+ */
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 135, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __PYX_ERR(0, 135, __pyx_L1_error)
+
+ /* "silx/math/combo.pyx":134
+ * length = len(data)
+ *
+ * if length == 0: # <<<<<<<<<<<<<<
+ * raise ValueError('Zero-size array')
+ *
+ */
+ }
+
+ /* "silx/math/combo.pyx":137
+ * raise ValueError('Zero-size array')
+ *
+ * with nogil: # <<<<<<<<<<<<<<
+ * # Init starting values
+ * value = data[0]
+ */
+ {
+ #ifdef WITH_THREAD
+ PyThreadState *_save;
+ Py_UNBLOCK_THREADS
+ #endif
+ /*try:*/ {
+
+ /* "silx/math/combo.pyx":139
+ * with nogil:
+ * # Init starting values
+ * value = data[0] # <<<<<<<<<<<<<<
+ * minimum = value
+ * maximum = value
+ */
+ __pyx_t_4 = 0;
+ __pyx_v_value = (*((unsigned short *) ( /* dim=0 */ ((char *) (((unsigned short *) __pyx_v_data.data) + __pyx_t_4)) )));
+
+ /* "silx/math/combo.pyx":140
+ * # Init starting values
+ * value = data[0]
+ * minimum = value # <<<<<<<<<<<<<<
+ * maximum = value
+ * if min_positive and value > 0:
+ */
+ __pyx_v_minimum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":141
+ * value = data[0]
+ * minimum = value
+ * maximum = value # <<<<<<<<<<<<<<
+ * if min_positive and value > 0:
+ * min_pos = value
+ */
+ __pyx_v_maximum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":142
+ * minimum = value
+ * maximum = value
+ * if min_positive and value > 0: # <<<<<<<<<<<<<<
+ * min_pos = value
+ * else:
+ */
+ __pyx_t_5 = (__pyx_v_min_positive != 0);
+ if (__pyx_t_5) {
+ } else {
+ __pyx_t_3 = __pyx_t_5;
+ goto __pyx_L8_bool_binop_done;
+ }
+ __pyx_t_5 = ((__pyx_v_value > 0) != 0);
+ __pyx_t_3 = __pyx_t_5;
+ __pyx_L8_bool_binop_done:;
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":143
+ * maximum = value
+ * if min_positive and value > 0:
+ * min_pos = value # <<<<<<<<<<<<<<
+ * else:
+ * min_pos = 0
+ */
+ __pyx_v_min_pos = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":142
+ * minimum = value
+ * maximum = value
+ * if min_positive and value > 0: # <<<<<<<<<<<<<<
+ * min_pos = value
+ * else:
+ */
+ goto __pyx_L7;
+ }
+
+ /* "silx/math/combo.pyx":145
+ * min_pos = value
+ * else:
+ * min_pos = 0 # <<<<<<<<<<<<<<
+ *
+ * if _number in cython.floating:
+ */
+ /*else*/ {
+ __pyx_v_min_pos = 0;
+ }
+ __pyx_L7:;
+
+ /* "silx/math/combo.pyx":158
+ * break
+ *
+ * if not min_positive: # <<<<<<<<<<<<<<
+ * for index in range(index, length):
+ * value = data[index]
+ */
+ __pyx_t_3 = ((!(__pyx_v_min_positive != 0)) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":159
+ *
+ * if not min_positive:
+ * for index in range(index, length): # <<<<<<<<<<<<<<
+ * value = data[index]
+ * if value > maximum:
+ */
+ __pyx_t_6 = __pyx_v_length;
+ for (__pyx_t_7 = __pyx_v_index; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
+ __pyx_v_index = __pyx_t_7;
+
+ /* "silx/math/combo.pyx":160
+ * if not min_positive:
+ * for index in range(index, length):
+ * value = data[index] # <<<<<<<<<<<<<<
+ * if value > maximum:
+ * maximum = value
+ */
+ __pyx_t_8 = __pyx_v_index;
+ __pyx_v_value = (*((unsigned short *) ( /* dim=0 */ ((char *) (((unsigned short *) __pyx_v_data.data) + __pyx_t_8)) )));
+
+ /* "silx/math/combo.pyx":161
+ * for index in range(index, length):
+ * value = data[index]
+ * if value > maximum: # <<<<<<<<<<<<<<
+ * maximum = value
+ * max_index = index
+ */
+ __pyx_t_3 = ((__pyx_v_value > __pyx_v_maximum) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":162
+ * value = data[index]
+ * if value > maximum:
+ * maximum = value # <<<<<<<<<<<<<<
+ * max_index = index
+ * elif value < minimum:
+ */
+ __pyx_v_maximum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":163
+ * if value > maximum:
+ * maximum = value
+ * max_index = index # <<<<<<<<<<<<<<
+ * elif value < minimum:
+ * minimum = value
+ */
+ __pyx_v_max_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":161
+ * for index in range(index, length):
+ * value = data[index]
+ * if value > maximum: # <<<<<<<<<<<<<<
+ * maximum = value
+ * max_index = index
+ */
+ goto __pyx_L13;
+ }
+
+ /* "silx/math/combo.pyx":164
+ * maximum = value
+ * max_index = index
+ * elif value < minimum: # <<<<<<<<<<<<<<
+ * minimum = value
+ * min_index = index
+ */
+ __pyx_t_3 = ((__pyx_v_value < __pyx_v_minimum) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":165
+ * max_index = index
+ * elif value < minimum:
+ * minimum = value # <<<<<<<<<<<<<<
+ * min_index = index
+ *
+ */
+ __pyx_v_minimum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":166
+ * elif value < minimum:
+ * minimum = value
+ * min_index = index # <<<<<<<<<<<<<<
+ *
+ * else:
+ */
+ __pyx_v_min_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":164
+ * maximum = value
+ * max_index = index
+ * elif value < minimum: # <<<<<<<<<<<<<<
+ * minimum = value
+ * min_index = index
+ */
+ }
+ __pyx_L13:;
+ }
+
+ /* "silx/math/combo.pyx":158
+ * break
+ *
+ * if not min_positive: # <<<<<<<<<<<<<<
+ * for index in range(index, length):
+ * value = data[index]
+ */
+ goto __pyx_L10;
+ }
+
+ /* "silx/math/combo.pyx":170
+ * else:
+ * # Loop until min_pos is defined
+ * for index in range(index, length): # <<<<<<<<<<<<<<
+ * value = data[index]
+ * if value > maximum:
+ */
+ /*else*/ {
+ __pyx_t_6 = __pyx_v_length;
+ for (__pyx_t_7 = __pyx_v_index; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
+ __pyx_v_index = __pyx_t_7;
+
+ /* "silx/math/combo.pyx":171
+ * # Loop until min_pos is defined
+ * for index in range(index, length):
+ * value = data[index] # <<<<<<<<<<<<<<
+ * if value > maximum:
+ * maximum = value
+ */
+ __pyx_t_9 = __pyx_v_index;
+ __pyx_v_value = (*((unsigned short *) ( /* dim=0 */ ((char *) (((unsigned short *) __pyx_v_data.data) + __pyx_t_9)) )));
+
+ /* "silx/math/combo.pyx":172
+ * for index in range(index, length):
+ * value = data[index]
+ * if value > maximum: # <<<<<<<<<<<<<<
+ * maximum = value
+ * max_index = index
+ */
+ __pyx_t_3 = ((__pyx_v_value > __pyx_v_maximum) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":173
+ * value = data[index]
+ * if value > maximum:
+ * maximum = value # <<<<<<<<<<<<<<
+ * max_index = index
+ * elif value < minimum:
+ */
+ __pyx_v_maximum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":174
+ * if value > maximum:
+ * maximum = value
+ * max_index = index # <<<<<<<<<<<<<<
+ * elif value < minimum:
+ * minimum = value
+ */
+ __pyx_v_max_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":172
+ * for index in range(index, length):
+ * value = data[index]
+ * if value > maximum: # <<<<<<<<<<<<<<
+ * maximum = value
+ * max_index = index
+ */
+ goto __pyx_L16;
+ }
+
+ /* "silx/math/combo.pyx":175
+ * maximum = value
+ * max_index = index
+ * elif value < minimum: # <<<<<<<<<<<<<<
+ * minimum = value
+ * min_index = index
+ */
+ __pyx_t_3 = ((__pyx_v_value < __pyx_v_minimum) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":176
+ * max_index = index
+ * elif value < minimum:
+ * minimum = value # <<<<<<<<<<<<<<
+ * min_index = index
+ *
+ */
+ __pyx_v_minimum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":177
+ * elif value < minimum:
+ * minimum = value
+ * min_index = index # <<<<<<<<<<<<<<
+ *
+ * if value > 0:
+ */
+ __pyx_v_min_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":175
+ * maximum = value
+ * max_index = index
+ * elif value < minimum: # <<<<<<<<<<<<<<
+ * minimum = value
+ * min_index = index
+ */
+ }
+ __pyx_L16:;
+
+ /* "silx/math/combo.pyx":179
+ * min_index = index
+ *
+ * if value > 0: # <<<<<<<<<<<<<<
+ * min_pos = value
+ * min_pos_index = index
+ */
+ __pyx_t_3 = ((__pyx_v_value > 0) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":180
+ *
+ * if value > 0:
+ * min_pos = value # <<<<<<<<<<<<<<
+ * min_pos_index = index
+ * break
+ */
+ __pyx_v_min_pos = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":181
+ * if value > 0:
+ * min_pos = value
+ * min_pos_index = index # <<<<<<<<<<<<<<
+ * break
+ *
+ */
+ __pyx_v_min_pos_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":182
+ * min_pos = value
+ * min_pos_index = index
+ * break # <<<<<<<<<<<<<<
+ *
+ * # Loop until the end
+ */
+ goto __pyx_L15_break;
+
+ /* "silx/math/combo.pyx":179
+ * min_index = index
+ *
+ * if value > 0: # <<<<<<<<<<<<<<
+ * min_pos = value
+ * min_pos_index = index
+ */
+ }
+ }
+ __pyx_L15_break:;
+
+ /* "silx/math/combo.pyx":185
+ *
+ * # Loop until the end
+ * for index in range(index+1, length): # <<<<<<<<<<<<<<
+ * value = data[index]
+ * if value > maximum:
+ */
+ __pyx_t_6 = __pyx_v_length;
+ for (__pyx_t_7 = (__pyx_v_index + 1); __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
+ __pyx_v_index = __pyx_t_7;
+
+ /* "silx/math/combo.pyx":186
+ * # Loop until the end
+ * for index in range(index+1, length):
+ * value = data[index] # <<<<<<<<<<<<<<
+ * if value > maximum:
+ * maximum = value
+ */
+ __pyx_t_10 = __pyx_v_index;
+ __pyx_v_value = (*((unsigned short *) ( /* dim=0 */ ((char *) (((unsigned short *) __pyx_v_data.data) + __pyx_t_10)) )));
+
+ /* "silx/math/combo.pyx":187
+ * for index in range(index+1, length):
+ * value = data[index]
+ * if value > maximum: # <<<<<<<<<<<<<<
+ * maximum = value
+ * max_index = index
+ */
+ __pyx_t_3 = ((__pyx_v_value > __pyx_v_maximum) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":188
+ * value = data[index]
+ * if value > maximum:
+ * maximum = value # <<<<<<<<<<<<<<
+ * max_index = index
+ * else:
+ */
+ __pyx_v_maximum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":189
+ * if value > maximum:
+ * maximum = value
+ * max_index = index # <<<<<<<<<<<<<<
+ * else:
+ * if value < minimum:
+ */
+ __pyx_v_max_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":187
+ * for index in range(index+1, length):
+ * value = data[index]
+ * if value > maximum: # <<<<<<<<<<<<<<
+ * maximum = value
+ * max_index = index
+ */
+ goto __pyx_L20;
+ }
+
+ /* "silx/math/combo.pyx":191
+ * max_index = index
+ * else:
+ * if value < minimum: # <<<<<<<<<<<<<<
+ * minimum = value
+ * min_index = index
+ */
+ /*else*/ {
+ __pyx_t_3 = ((__pyx_v_value < __pyx_v_minimum) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":192
+ * else:
+ * if value < minimum:
+ * minimum = value # <<<<<<<<<<<<<<
+ * min_index = index
+ *
+ */
+ __pyx_v_minimum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":193
+ * if value < minimum:
+ * minimum = value
+ * min_index = index # <<<<<<<<<<<<<<
+ *
+ * if 0 < value < min_pos:
+ */
+ __pyx_v_min_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":191
+ * max_index = index
+ * else:
+ * if value < minimum: # <<<<<<<<<<<<<<
+ * minimum = value
+ * min_index = index
+ */
+ }
+
+ /* "silx/math/combo.pyx":195
+ * min_index = index
+ *
+ * if 0 < value < min_pos: # <<<<<<<<<<<<<<
+ * min_pos = value
+ * min_pos_index = index
+ */
+ __pyx_t_3 = (0 < __pyx_v_value);
+ if (__pyx_t_3) {
+ __pyx_t_3 = (__pyx_v_value < __pyx_v_min_pos);
+ }
+ __pyx_t_5 = (__pyx_t_3 != 0);
+ if (__pyx_t_5) {
+
+ /* "silx/math/combo.pyx":196
+ *
+ * if 0 < value < min_pos:
+ * min_pos = value # <<<<<<<<<<<<<<
+ * min_pos_index = index
+ *
+ */
+ __pyx_v_min_pos = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":197
+ * if 0 < value < min_pos:
+ * min_pos = value
+ * min_pos_index = index # <<<<<<<<<<<<<<
+ *
+ * return _MinMaxResult(minimum,
+ */
+ __pyx_v_min_pos_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":195
+ * min_index = index
+ *
+ * if 0 < value < min_pos: # <<<<<<<<<<<<<<
+ * min_pos = value
+ * min_pos_index = index
+ */
+ }
+ }
+ __pyx_L20:;
+ }
+ }
+ __pyx_L10:;
+ }
+
+ /* "silx/math/combo.pyx":137
+ * raise ValueError('Zero-size array')
+ *
+ * with nogil: # <<<<<<<<<<<<<<
+ * # Init starting values
+ * value = data[0]
+ */
+ /*finally:*/ {
+ /*normal exit:*/{
+ #ifdef WITH_THREAD
+ Py_BLOCK_THREADS
+ #endif
+ goto __pyx_L6;
+ }
+ __pyx_L6:;
+ }
+ }
+
+ /* "silx/math/combo.pyx":199
+ * min_pos_index = index
+ *
+ * return _MinMaxResult(minimum, # <<<<<<<<<<<<<<
+ * min_pos if min_pos > 0 else None,
+ * maximum,
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_MinMaxResult); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __pyx_t_12 = __Pyx_PyInt_From_unsigned_short(__pyx_v_minimum); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+
+ /* "silx/math/combo.pyx":200
+ *
+ * return _MinMaxResult(minimum,
+ * min_pos if min_pos > 0 else None, # <<<<<<<<<<<<<<
+ * maximum,
+ * min_index,
+ */
+ if (((__pyx_v_min_pos > 0) != 0)) {
+ __pyx_t_14 = __Pyx_PyInt_From_long(__pyx_v_min_pos); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 200, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_14);
+ __pyx_t_13 = __pyx_t_14;
+ __pyx_t_14 = 0;
+ } else {
+ __Pyx_INCREF(Py_None);
+ __pyx_t_13 = Py_None;
+ }
+
+ /* "silx/math/combo.pyx":201
+ * return _MinMaxResult(minimum,
+ * min_pos if min_pos > 0 else None,
+ * maximum, # <<<<<<<<<<<<<<
+ * min_index,
+ * min_pos_index if min_pos > 0 else None,
+ */
+ __pyx_t_14 = __Pyx_PyInt_From_unsigned_short(__pyx_v_maximum); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 201, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_14);
+
+ /* "silx/math/combo.pyx":202
+ * min_pos if min_pos > 0 else None,
+ * maximum,
+ * min_index, # <<<<<<<<<<<<<<
+ * min_pos_index if min_pos > 0 else None,
+ * max_index)
+ */
+ __pyx_t_15 = __Pyx_PyInt_From_unsigned_int(__pyx_v_min_index); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 202, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_15);
+
+ /* "silx/math/combo.pyx":203
+ * maximum,
+ * min_index,
+ * min_pos_index if min_pos > 0 else None, # <<<<<<<<<<<<<<
+ * max_index)
+ *
+ */
+ if (((__pyx_v_min_pos > 0) != 0)) {
+ __pyx_t_17 = __Pyx_PyInt_From_unsigned_int(__pyx_v_min_pos_index); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 203, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_17);
+ __pyx_t_16 = __pyx_t_17;
+ __pyx_t_17 = 0;
+ } else {
+ __Pyx_INCREF(Py_None);
+ __pyx_t_16 = Py_None;
+ }
+
+ /* "silx/math/combo.pyx":204
+ * min_index,
+ * min_pos_index if min_pos > 0 else None,
+ * max_index) # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __pyx_t_17 = __Pyx_PyInt_From_unsigned_int(__pyx_v_max_index); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 204, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_17);
+ __pyx_t_18 = NULL;
+ __pyx_t_19 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
+ __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_11);
+ if (likely(__pyx_t_18)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
+ __Pyx_INCREF(__pyx_t_18);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_11, function);
+ __pyx_t_19 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_11)) {
+ PyObject *__pyx_temp[7] = {__pyx_t_18, __pyx_t_12, __pyx_t_13, __pyx_t_14, __pyx_t_15, __pyx_t_16, __pyx_t_17};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_19, 6+__pyx_t_19); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+ __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
+ __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) {
+ PyObject *__pyx_temp[7] = {__pyx_t_18, __pyx_t_12, __pyx_t_13, __pyx_t_14, __pyx_t_15, __pyx_t_16, __pyx_t_17};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_19, 6+__pyx_t_19); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+ __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
+ __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_20 = PyTuple_New(6+__pyx_t_19); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_20);
+ if (__pyx_t_18) {
+ __Pyx_GIVEREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_20, 0, __pyx_t_18); __pyx_t_18 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_12);
+ PyTuple_SET_ITEM(__pyx_t_20, 0+__pyx_t_19, __pyx_t_12);
+ __Pyx_GIVEREF(__pyx_t_13);
+ PyTuple_SET_ITEM(__pyx_t_20, 1+__pyx_t_19, __pyx_t_13);
+ __Pyx_GIVEREF(__pyx_t_14);
+ PyTuple_SET_ITEM(__pyx_t_20, 2+__pyx_t_19, __pyx_t_14);
+ __Pyx_GIVEREF(__pyx_t_15);
+ PyTuple_SET_ITEM(__pyx_t_20, 3+__pyx_t_19, __pyx_t_15);
+ __Pyx_GIVEREF(__pyx_t_16);
+ PyTuple_SET_ITEM(__pyx_t_20, 4+__pyx_t_19, __pyx_t_16);
+ __Pyx_GIVEREF(__pyx_t_17);
+ PyTuple_SET_ITEM(__pyx_t_20, 5+__pyx_t_19, __pyx_t_17);
+ __pyx_t_12 = 0;
+ __pyx_t_13 = 0;
+ __pyx_t_14 = 0;
+ __pyx_t_15 = 0;
+ __pyx_t_16 = 0;
+ __pyx_t_17 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_20, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "silx/math/combo.pyx":119
+ * @cython.boundscheck(False)
+ * @cython.wraparound(False)
+ * def _min_max(_number[::1] data, bint min_positive=False): # <<<<<<<<<<<<<<
+ * """:func:`min_max` implementation including infinite values
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_11);
+ __Pyx_XDECREF(__pyx_t_12);
+ __Pyx_XDECREF(__pyx_t_13);
+ __Pyx_XDECREF(__pyx_t_14);
+ __Pyx_XDECREF(__pyx_t_15);
+ __Pyx_XDECREF(__pyx_t_16);
+ __Pyx_XDECREF(__pyx_t_17);
+ __Pyx_XDECREF(__pyx_t_18);
+ __Pyx_XDECREF(__pyx_t_20);
+ __Pyx_AddTraceback("silx.math.combo._min_max", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __PYX_XDEC_MEMVIEW(&__pyx_v_data, 1);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_4silx_4math_5combo_80__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ __Pyx_RefNannySetupContext("__defaults__", 0);
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyBool_FromLong(__Pyx_CyFunction_Defaults(__pyx_defaults21, __pyx_self)->__pyx_arg_min_positive); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 119, __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 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
+ __Pyx_INCREF(Py_None);
+ __Pyx_GIVEREF(Py_None);
+ PyTuple_SET_ITEM(__pyx_t_1, 1, Py_None);
+ __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_AddTraceback("silx.math.combo.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_fuse_9__pyx_pw_4silx_4math_5combo_25_min_max(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_fuse_9__pyx_mdef_4silx_4math_5combo_25_min_max = {"__pyx_fuse_9_min_max", (PyCFunction)__pyx_fuse_9__pyx_pw_4silx_4math_5combo_25_min_max, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4silx_4math_5combo__min_max};
+static PyObject *__pyx_fuse_9__pyx_pw_4silx_4math_5combo_25_min_max(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ __Pyx_memviewslice __pyx_v_data = { 0, 0, { 0 }, { 0 }, { 0 } };
+ int __pyx_v_min_positive;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_min_max (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,&__pyx_n_s_min_positive_2,0};
+ PyObject* values[2] = {0,0};
+ __pyx_defaults21 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults21, __pyx_self);
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ case 1:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_min_positive_2);
+ if (value) { values[1] = value; kw_args--; }
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_min_max") < 0)) __PYX_ERR(0, 119, __pyx_L3_error)
+ }
+ } else {
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ }
+ __pyx_v_data = __Pyx_PyObject_to_MemoryviewSlice_dc_unsigned_int(values[0]); if (unlikely(!__pyx_v_data.memview)) __PYX_ERR(0, 119, __pyx_L3_error)
+ if (values[1]) {
+ __pyx_v_min_positive = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_min_positive == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 119, __pyx_L3_error)
+ } else {
+ __pyx_v_min_positive = __pyx_dynamic_args->__pyx_arg_min_positive;
+ }
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("_min_max", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 119, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("silx.math.combo._min_max", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_4silx_4math_5combo_24_min_max(__pyx_self, __pyx_v_data, __pyx_v_min_positive);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_4silx_4math_5combo_24_min_max(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_data, int __pyx_v_min_positive) {
+ unsigned int __pyx_v_value;
+ unsigned int __pyx_v_minimum;
+ unsigned int __pyx_v_maximum;
+ unsigned int __pyx_v_length;
+ unsigned int __pyx_v_index;
+ unsigned int __pyx_v_min_index;
+ unsigned int __pyx_v_min_pos_index;
+ unsigned int __pyx_v_max_index;
+ long __pyx_v_min_pos;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ Py_ssize_t __pyx_t_2;
+ int __pyx_t_3;
+ Py_ssize_t __pyx_t_4;
+ int __pyx_t_5;
+ unsigned int __pyx_t_6;
+ unsigned int __pyx_t_7;
+ size_t __pyx_t_8;
+ size_t __pyx_t_9;
+ size_t __pyx_t_10;
+ PyObject *__pyx_t_11 = NULL;
+ PyObject *__pyx_t_12 = NULL;
+ PyObject *__pyx_t_13 = NULL;
+ PyObject *__pyx_t_14 = NULL;
+ PyObject *__pyx_t_15 = NULL;
+ PyObject *__pyx_t_16 = NULL;
+ PyObject *__pyx_t_17 = NULL;
+ PyObject *__pyx_t_18 = NULL;
+ int __pyx_t_19;
+ PyObject *__pyx_t_20 = NULL;
+ __Pyx_RefNannySetupContext("__pyx_fuse_9_min_max", 0);
+
+ /* "silx/math/combo.pyx":127
+ * _number value, minimum, minpos, maximum
+ * unsigned int length
+ * unsigned int index = 0 # <<<<<<<<<<<<<<
+ * unsigned int min_index = 0
+ * unsigned int min_pos_index = 0
+ */
+ __pyx_v_index = 0;
+
+ /* "silx/math/combo.pyx":128
+ * unsigned int length
+ * unsigned int index = 0
+ * unsigned int min_index = 0 # <<<<<<<<<<<<<<
+ * unsigned int min_pos_index = 0
+ * unsigned int max_index = 0
+ */
+ __pyx_v_min_index = 0;
+
+ /* "silx/math/combo.pyx":129
+ * unsigned int index = 0
+ * unsigned int min_index = 0
+ * unsigned int min_pos_index = 0 # <<<<<<<<<<<<<<
+ * unsigned int max_index = 0
+ *
+ */
+ __pyx_v_min_pos_index = 0;
+
+ /* "silx/math/combo.pyx":130
+ * unsigned int min_index = 0
+ * unsigned int min_pos_index = 0
+ * unsigned int max_index = 0 # <<<<<<<<<<<<<<
+ *
+ * length = len(data)
+ */
+ __pyx_v_max_index = 0;
+
+ /* "silx/math/combo.pyx":132
+ * unsigned int max_index = 0
+ *
+ * length = len(data) # <<<<<<<<<<<<<<
+ *
+ * if length == 0:
+ */
+ __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_data, 1, (PyObject *(*)(char *)) __pyx_memview_get_unsigned_int, (int (*)(char *, PyObject *)) __pyx_memview_set_unsigned_int, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 132, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 132, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_v_length = __pyx_t_2;
+
+ /* "silx/math/combo.pyx":134
+ * length = len(data)
+ *
+ * if length == 0: # <<<<<<<<<<<<<<
+ * raise ValueError('Zero-size array')
+ *
+ */
+ __pyx_t_3 = ((__pyx_v_length == 0) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":135
+ *
+ * if length == 0:
+ * raise ValueError('Zero-size array') # <<<<<<<<<<<<<<
+ *
+ * with nogil:
+ */
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 135, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __PYX_ERR(0, 135, __pyx_L1_error)
+
+ /* "silx/math/combo.pyx":134
+ * length = len(data)
+ *
+ * if length == 0: # <<<<<<<<<<<<<<
+ * raise ValueError('Zero-size array')
+ *
+ */
+ }
+
+ /* "silx/math/combo.pyx":137
+ * raise ValueError('Zero-size array')
+ *
+ * with nogil: # <<<<<<<<<<<<<<
+ * # Init starting values
+ * value = data[0]
+ */
+ {
+ #ifdef WITH_THREAD
+ PyThreadState *_save;
+ Py_UNBLOCK_THREADS
+ #endif
+ /*try:*/ {
+
+ /* "silx/math/combo.pyx":139
+ * with nogil:
+ * # Init starting values
+ * value = data[0] # <<<<<<<<<<<<<<
+ * minimum = value
+ * maximum = value
+ */
+ __pyx_t_4 = 0;
+ __pyx_v_value = (*((unsigned int *) ( /* dim=0 */ ((char *) (((unsigned int *) __pyx_v_data.data) + __pyx_t_4)) )));
+
+ /* "silx/math/combo.pyx":140
+ * # Init starting values
+ * value = data[0]
+ * minimum = value # <<<<<<<<<<<<<<
+ * maximum = value
+ * if min_positive and value > 0:
+ */
+ __pyx_v_minimum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":141
+ * value = data[0]
+ * minimum = value
+ * maximum = value # <<<<<<<<<<<<<<
+ * if min_positive and value > 0:
+ * min_pos = value
+ */
+ __pyx_v_maximum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":142
+ * minimum = value
+ * maximum = value
+ * if min_positive and value > 0: # <<<<<<<<<<<<<<
+ * min_pos = value
+ * else:
+ */
+ __pyx_t_5 = (__pyx_v_min_positive != 0);
+ if (__pyx_t_5) {
+ } else {
+ __pyx_t_3 = __pyx_t_5;
+ goto __pyx_L8_bool_binop_done;
+ }
+ __pyx_t_5 = ((__pyx_v_value > 0) != 0);
+ __pyx_t_3 = __pyx_t_5;
+ __pyx_L8_bool_binop_done:;
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":143
+ * maximum = value
+ * if min_positive and value > 0:
+ * min_pos = value # <<<<<<<<<<<<<<
+ * else:
+ * min_pos = 0
+ */
+ __pyx_v_min_pos = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":142
+ * minimum = value
+ * maximum = value
+ * if min_positive and value > 0: # <<<<<<<<<<<<<<
+ * min_pos = value
+ * else:
+ */
+ goto __pyx_L7;
+ }
+
+ /* "silx/math/combo.pyx":145
+ * min_pos = value
+ * else:
+ * min_pos = 0 # <<<<<<<<<<<<<<
+ *
+ * if _number in cython.floating:
+ */
+ /*else*/ {
+ __pyx_v_min_pos = 0;
+ }
+ __pyx_L7:;
+
+ /* "silx/math/combo.pyx":158
+ * break
+ *
+ * if not min_positive: # <<<<<<<<<<<<<<
+ * for index in range(index, length):
+ * value = data[index]
+ */
+ __pyx_t_3 = ((!(__pyx_v_min_positive != 0)) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":159
+ *
+ * if not min_positive:
+ * for index in range(index, length): # <<<<<<<<<<<<<<
+ * value = data[index]
+ * if value > maximum:
+ */
+ __pyx_t_6 = __pyx_v_length;
+ for (__pyx_t_7 = __pyx_v_index; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
+ __pyx_v_index = __pyx_t_7;
+
+ /* "silx/math/combo.pyx":160
+ * if not min_positive:
+ * for index in range(index, length):
+ * value = data[index] # <<<<<<<<<<<<<<
+ * if value > maximum:
+ * maximum = value
+ */
+ __pyx_t_8 = __pyx_v_index;
+ __pyx_v_value = (*((unsigned int *) ( /* dim=0 */ ((char *) (((unsigned int *) __pyx_v_data.data) + __pyx_t_8)) )));
+
+ /* "silx/math/combo.pyx":161
+ * for index in range(index, length):
+ * value = data[index]
+ * if value > maximum: # <<<<<<<<<<<<<<
+ * maximum = value
+ * max_index = index
+ */
+ __pyx_t_3 = ((__pyx_v_value > __pyx_v_maximum) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":162
+ * value = data[index]
+ * if value > maximum:
+ * maximum = value # <<<<<<<<<<<<<<
+ * max_index = index
+ * elif value < minimum:
+ */
+ __pyx_v_maximum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":163
+ * if value > maximum:
+ * maximum = value
+ * max_index = index # <<<<<<<<<<<<<<
+ * elif value < minimum:
+ * minimum = value
+ */
+ __pyx_v_max_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":161
+ * for index in range(index, length):
+ * value = data[index]
+ * if value > maximum: # <<<<<<<<<<<<<<
+ * maximum = value
+ * max_index = index
+ */
+ goto __pyx_L13;
+ }
+
+ /* "silx/math/combo.pyx":164
+ * maximum = value
+ * max_index = index
+ * elif value < minimum: # <<<<<<<<<<<<<<
+ * minimum = value
+ * min_index = index
+ */
+ __pyx_t_3 = ((__pyx_v_value < __pyx_v_minimum) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":165
+ * max_index = index
+ * elif value < minimum:
+ * minimum = value # <<<<<<<<<<<<<<
+ * min_index = index
+ *
+ */
+ __pyx_v_minimum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":166
+ * elif value < minimum:
+ * minimum = value
+ * min_index = index # <<<<<<<<<<<<<<
+ *
+ * else:
+ */
+ __pyx_v_min_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":164
+ * maximum = value
+ * max_index = index
+ * elif value < minimum: # <<<<<<<<<<<<<<
+ * minimum = value
+ * min_index = index
+ */
+ }
+ __pyx_L13:;
+ }
+
+ /* "silx/math/combo.pyx":158
+ * break
+ *
+ * if not min_positive: # <<<<<<<<<<<<<<
+ * for index in range(index, length):
+ * value = data[index]
+ */
+ goto __pyx_L10;
+ }
+
+ /* "silx/math/combo.pyx":170
+ * else:
+ * # Loop until min_pos is defined
+ * for index in range(index, length): # <<<<<<<<<<<<<<
+ * value = data[index]
+ * if value > maximum:
+ */
+ /*else*/ {
+ __pyx_t_6 = __pyx_v_length;
+ for (__pyx_t_7 = __pyx_v_index; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
+ __pyx_v_index = __pyx_t_7;
+
+ /* "silx/math/combo.pyx":171
+ * # Loop until min_pos is defined
+ * for index in range(index, length):
+ * value = data[index] # <<<<<<<<<<<<<<
+ * if value > maximum:
+ * maximum = value
+ */
+ __pyx_t_9 = __pyx_v_index;
+ __pyx_v_value = (*((unsigned int *) ( /* dim=0 */ ((char *) (((unsigned int *) __pyx_v_data.data) + __pyx_t_9)) )));
+
+ /* "silx/math/combo.pyx":172
+ * for index in range(index, length):
+ * value = data[index]
+ * if value > maximum: # <<<<<<<<<<<<<<
+ * maximum = value
+ * max_index = index
+ */
+ __pyx_t_3 = ((__pyx_v_value > __pyx_v_maximum) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":173
+ * value = data[index]
+ * if value > maximum:
+ * maximum = value # <<<<<<<<<<<<<<
+ * max_index = index
+ * elif value < minimum:
+ */
+ __pyx_v_maximum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":174
+ * if value > maximum:
+ * maximum = value
+ * max_index = index # <<<<<<<<<<<<<<
+ * elif value < minimum:
+ * minimum = value
+ */
+ __pyx_v_max_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":172
+ * for index in range(index, length):
+ * value = data[index]
+ * if value > maximum: # <<<<<<<<<<<<<<
+ * maximum = value
+ * max_index = index
+ */
+ goto __pyx_L16;
+ }
+
+ /* "silx/math/combo.pyx":175
+ * maximum = value
+ * max_index = index
+ * elif value < minimum: # <<<<<<<<<<<<<<
+ * minimum = value
+ * min_index = index
+ */
+ __pyx_t_3 = ((__pyx_v_value < __pyx_v_minimum) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":176
+ * max_index = index
+ * elif value < minimum:
+ * minimum = value # <<<<<<<<<<<<<<
+ * min_index = index
+ *
+ */
+ __pyx_v_minimum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":177
+ * elif value < minimum:
+ * minimum = value
+ * min_index = index # <<<<<<<<<<<<<<
+ *
+ * if value > 0:
+ */
+ __pyx_v_min_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":175
+ * maximum = value
+ * max_index = index
+ * elif value < minimum: # <<<<<<<<<<<<<<
+ * minimum = value
+ * min_index = index
+ */
+ }
+ __pyx_L16:;
+
+ /* "silx/math/combo.pyx":179
+ * min_index = index
+ *
+ * if value > 0: # <<<<<<<<<<<<<<
+ * min_pos = value
+ * min_pos_index = index
+ */
+ __pyx_t_3 = ((__pyx_v_value > 0) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":180
+ *
+ * if value > 0:
+ * min_pos = value # <<<<<<<<<<<<<<
+ * min_pos_index = index
+ * break
+ */
+ __pyx_v_min_pos = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":181
+ * if value > 0:
+ * min_pos = value
+ * min_pos_index = index # <<<<<<<<<<<<<<
+ * break
+ *
+ */
+ __pyx_v_min_pos_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":182
+ * min_pos = value
+ * min_pos_index = index
+ * break # <<<<<<<<<<<<<<
+ *
+ * # Loop until the end
+ */
+ goto __pyx_L15_break;
+
+ /* "silx/math/combo.pyx":179
+ * min_index = index
+ *
+ * if value > 0: # <<<<<<<<<<<<<<
+ * min_pos = value
+ * min_pos_index = index
+ */
+ }
+ }
+ __pyx_L15_break:;
+
+ /* "silx/math/combo.pyx":185
+ *
+ * # Loop until the end
+ * for index in range(index+1, length): # <<<<<<<<<<<<<<
+ * value = data[index]
+ * if value > maximum:
+ */
+ __pyx_t_6 = __pyx_v_length;
+ for (__pyx_t_7 = (__pyx_v_index + 1); __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
+ __pyx_v_index = __pyx_t_7;
+
+ /* "silx/math/combo.pyx":186
+ * # Loop until the end
+ * for index in range(index+1, length):
+ * value = data[index] # <<<<<<<<<<<<<<
+ * if value > maximum:
+ * maximum = value
+ */
+ __pyx_t_10 = __pyx_v_index;
+ __pyx_v_value = (*((unsigned int *) ( /* dim=0 */ ((char *) (((unsigned int *) __pyx_v_data.data) + __pyx_t_10)) )));
+
+ /* "silx/math/combo.pyx":187
+ * for index in range(index+1, length):
+ * value = data[index]
+ * if value > maximum: # <<<<<<<<<<<<<<
+ * maximum = value
+ * max_index = index
+ */
+ __pyx_t_3 = ((__pyx_v_value > __pyx_v_maximum) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":188
+ * value = data[index]
+ * if value > maximum:
+ * maximum = value # <<<<<<<<<<<<<<
+ * max_index = index
+ * else:
+ */
+ __pyx_v_maximum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":189
+ * if value > maximum:
+ * maximum = value
+ * max_index = index # <<<<<<<<<<<<<<
+ * else:
+ * if value < minimum:
+ */
+ __pyx_v_max_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":187
+ * for index in range(index+1, length):
+ * value = data[index]
+ * if value > maximum: # <<<<<<<<<<<<<<
+ * maximum = value
+ * max_index = index
+ */
+ goto __pyx_L20;
+ }
+
+ /* "silx/math/combo.pyx":191
+ * max_index = index
+ * else:
+ * if value < minimum: # <<<<<<<<<<<<<<
+ * minimum = value
+ * min_index = index
+ */
+ /*else*/ {
+ __pyx_t_3 = ((__pyx_v_value < __pyx_v_minimum) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":192
+ * else:
+ * if value < minimum:
+ * minimum = value # <<<<<<<<<<<<<<
+ * min_index = index
+ *
+ */
+ __pyx_v_minimum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":193
+ * if value < minimum:
+ * minimum = value
+ * min_index = index # <<<<<<<<<<<<<<
+ *
+ * if 0 < value < min_pos:
+ */
+ __pyx_v_min_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":191
+ * max_index = index
+ * else:
+ * if value < minimum: # <<<<<<<<<<<<<<
+ * minimum = value
+ * min_index = index
+ */
+ }
+
+ /* "silx/math/combo.pyx":195
+ * min_index = index
+ *
+ * if 0 < value < min_pos: # <<<<<<<<<<<<<<
+ * min_pos = value
+ * min_pos_index = index
+ */
+ __pyx_t_3 = (0 < __pyx_v_value);
+ if (__pyx_t_3) {
+ __pyx_t_3 = (__pyx_v_value < __pyx_v_min_pos);
+ }
+ __pyx_t_5 = (__pyx_t_3 != 0);
+ if (__pyx_t_5) {
+
+ /* "silx/math/combo.pyx":196
+ *
+ * if 0 < value < min_pos:
+ * min_pos = value # <<<<<<<<<<<<<<
+ * min_pos_index = index
+ *
+ */
+ __pyx_v_min_pos = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":197
+ * if 0 < value < min_pos:
+ * min_pos = value
+ * min_pos_index = index # <<<<<<<<<<<<<<
+ *
+ * return _MinMaxResult(minimum,
+ */
+ __pyx_v_min_pos_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":195
+ * min_index = index
+ *
+ * if 0 < value < min_pos: # <<<<<<<<<<<<<<
+ * min_pos = value
+ * min_pos_index = index
+ */
+ }
+ }
+ __pyx_L20:;
+ }
+ }
+ __pyx_L10:;
+ }
+
+ /* "silx/math/combo.pyx":137
+ * raise ValueError('Zero-size array')
+ *
+ * with nogil: # <<<<<<<<<<<<<<
+ * # Init starting values
+ * value = data[0]
+ */
+ /*finally:*/ {
+ /*normal exit:*/{
+ #ifdef WITH_THREAD
+ Py_BLOCK_THREADS
+ #endif
+ goto __pyx_L6;
+ }
+ __pyx_L6:;
+ }
+ }
+
+ /* "silx/math/combo.pyx":199
+ * min_pos_index = index
+ *
+ * return _MinMaxResult(minimum, # <<<<<<<<<<<<<<
+ * min_pos if min_pos > 0 else None,
+ * maximum,
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_MinMaxResult); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __pyx_t_12 = __Pyx_PyInt_From_unsigned_int(__pyx_v_minimum); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+
+ /* "silx/math/combo.pyx":200
+ *
+ * return _MinMaxResult(minimum,
+ * min_pos if min_pos > 0 else None, # <<<<<<<<<<<<<<
+ * maximum,
+ * min_index,
+ */
+ if (((__pyx_v_min_pos > 0) != 0)) {
+ __pyx_t_14 = __Pyx_PyInt_From_long(__pyx_v_min_pos); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 200, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_14);
+ __pyx_t_13 = __pyx_t_14;
+ __pyx_t_14 = 0;
+ } else {
+ __Pyx_INCREF(Py_None);
+ __pyx_t_13 = Py_None;
+ }
+
+ /* "silx/math/combo.pyx":201
+ * return _MinMaxResult(minimum,
+ * min_pos if min_pos > 0 else None,
+ * maximum, # <<<<<<<<<<<<<<
+ * min_index,
+ * min_pos_index if min_pos > 0 else None,
+ */
+ __pyx_t_14 = __Pyx_PyInt_From_unsigned_int(__pyx_v_maximum); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 201, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_14);
+
+ /* "silx/math/combo.pyx":202
+ * min_pos if min_pos > 0 else None,
+ * maximum,
+ * min_index, # <<<<<<<<<<<<<<
+ * min_pos_index if min_pos > 0 else None,
+ * max_index)
+ */
+ __pyx_t_15 = __Pyx_PyInt_From_unsigned_int(__pyx_v_min_index); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 202, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_15);
+
+ /* "silx/math/combo.pyx":203
+ * maximum,
+ * min_index,
+ * min_pos_index if min_pos > 0 else None, # <<<<<<<<<<<<<<
+ * max_index)
+ *
+ */
+ if (((__pyx_v_min_pos > 0) != 0)) {
+ __pyx_t_17 = __Pyx_PyInt_From_unsigned_int(__pyx_v_min_pos_index); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 203, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_17);
+ __pyx_t_16 = __pyx_t_17;
+ __pyx_t_17 = 0;
+ } else {
+ __Pyx_INCREF(Py_None);
+ __pyx_t_16 = Py_None;
+ }
+
+ /* "silx/math/combo.pyx":204
+ * min_index,
+ * min_pos_index if min_pos > 0 else None,
+ * max_index) # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __pyx_t_17 = __Pyx_PyInt_From_unsigned_int(__pyx_v_max_index); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 204, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_17);
+ __pyx_t_18 = NULL;
+ __pyx_t_19 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
+ __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_11);
+ if (likely(__pyx_t_18)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
+ __Pyx_INCREF(__pyx_t_18);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_11, function);
+ __pyx_t_19 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_11)) {
+ PyObject *__pyx_temp[7] = {__pyx_t_18, __pyx_t_12, __pyx_t_13, __pyx_t_14, __pyx_t_15, __pyx_t_16, __pyx_t_17};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_19, 6+__pyx_t_19); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+ __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
+ __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) {
+ PyObject *__pyx_temp[7] = {__pyx_t_18, __pyx_t_12, __pyx_t_13, __pyx_t_14, __pyx_t_15, __pyx_t_16, __pyx_t_17};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_19, 6+__pyx_t_19); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+ __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
+ __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_20 = PyTuple_New(6+__pyx_t_19); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_20);
+ if (__pyx_t_18) {
+ __Pyx_GIVEREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_20, 0, __pyx_t_18); __pyx_t_18 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_12);
+ PyTuple_SET_ITEM(__pyx_t_20, 0+__pyx_t_19, __pyx_t_12);
+ __Pyx_GIVEREF(__pyx_t_13);
+ PyTuple_SET_ITEM(__pyx_t_20, 1+__pyx_t_19, __pyx_t_13);
+ __Pyx_GIVEREF(__pyx_t_14);
+ PyTuple_SET_ITEM(__pyx_t_20, 2+__pyx_t_19, __pyx_t_14);
+ __Pyx_GIVEREF(__pyx_t_15);
+ PyTuple_SET_ITEM(__pyx_t_20, 3+__pyx_t_19, __pyx_t_15);
+ __Pyx_GIVEREF(__pyx_t_16);
+ PyTuple_SET_ITEM(__pyx_t_20, 4+__pyx_t_19, __pyx_t_16);
+ __Pyx_GIVEREF(__pyx_t_17);
+ PyTuple_SET_ITEM(__pyx_t_20, 5+__pyx_t_19, __pyx_t_17);
+ __pyx_t_12 = 0;
+ __pyx_t_13 = 0;
+ __pyx_t_14 = 0;
+ __pyx_t_15 = 0;
+ __pyx_t_16 = 0;
+ __pyx_t_17 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_20, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "silx/math/combo.pyx":119
+ * @cython.boundscheck(False)
+ * @cython.wraparound(False)
+ * def _min_max(_number[::1] data, bint min_positive=False): # <<<<<<<<<<<<<<
+ * """:func:`min_max` implementation including infinite values
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_11);
+ __Pyx_XDECREF(__pyx_t_12);
+ __Pyx_XDECREF(__pyx_t_13);
+ __Pyx_XDECREF(__pyx_t_14);
+ __Pyx_XDECREF(__pyx_t_15);
+ __Pyx_XDECREF(__pyx_t_16);
+ __Pyx_XDECREF(__pyx_t_17);
+ __Pyx_XDECREF(__pyx_t_18);
+ __Pyx_XDECREF(__pyx_t_20);
+ __Pyx_AddTraceback("silx.math.combo._min_max", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __PYX_XDEC_MEMVIEW(&__pyx_v_data, 1);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_4silx_4math_5combo_82__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ __Pyx_RefNannySetupContext("__defaults__", 0);
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyBool_FromLong(__Pyx_CyFunction_Defaults(__pyx_defaults22, __pyx_self)->__pyx_arg_min_positive); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 119, __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 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
+ __Pyx_INCREF(Py_None);
+ __Pyx_GIVEREF(Py_None);
+ PyTuple_SET_ITEM(__pyx_t_1, 1, Py_None);
+ __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_AddTraceback("silx.math.combo.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_fuse_10__pyx_pw_4silx_4math_5combo_27_min_max(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_fuse_10__pyx_mdef_4silx_4math_5combo_27_min_max = {"__pyx_fuse_10_min_max", (PyCFunction)__pyx_fuse_10__pyx_pw_4silx_4math_5combo_27_min_max, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4silx_4math_5combo__min_max};
+static PyObject *__pyx_fuse_10__pyx_pw_4silx_4math_5combo_27_min_max(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ __Pyx_memviewslice __pyx_v_data = { 0, 0, { 0 }, { 0 }, { 0 } };
+ int __pyx_v_min_positive;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_min_max (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,&__pyx_n_s_min_positive_2,0};
+ PyObject* values[2] = {0,0};
+ __pyx_defaults22 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults22, __pyx_self);
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ case 1:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_min_positive_2);
+ if (value) { values[1] = value; kw_args--; }
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_min_max") < 0)) __PYX_ERR(0, 119, __pyx_L3_error)
+ }
+ } else {
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ }
+ __pyx_v_data = __Pyx_PyObject_to_MemoryviewSlice_dc_unsigned_long(values[0]); if (unlikely(!__pyx_v_data.memview)) __PYX_ERR(0, 119, __pyx_L3_error)
+ if (values[1]) {
+ __pyx_v_min_positive = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_min_positive == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 119, __pyx_L3_error)
+ } else {
+ __pyx_v_min_positive = __pyx_dynamic_args->__pyx_arg_min_positive;
+ }
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("_min_max", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 119, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("silx.math.combo._min_max", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_4silx_4math_5combo_26_min_max(__pyx_self, __pyx_v_data, __pyx_v_min_positive);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_4silx_4math_5combo_26_min_max(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_data, int __pyx_v_min_positive) {
+ unsigned long __pyx_v_value;
+ unsigned long __pyx_v_minimum;
+ unsigned long __pyx_v_maximum;
+ unsigned int __pyx_v_length;
+ unsigned int __pyx_v_index;
+ unsigned int __pyx_v_min_index;
+ unsigned int __pyx_v_min_pos_index;
+ unsigned int __pyx_v_max_index;
+ unsigned long __pyx_v_min_pos;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ Py_ssize_t __pyx_t_2;
+ int __pyx_t_3;
+ Py_ssize_t __pyx_t_4;
+ int __pyx_t_5;
+ unsigned int __pyx_t_6;
+ unsigned int __pyx_t_7;
+ size_t __pyx_t_8;
+ size_t __pyx_t_9;
+ size_t __pyx_t_10;
+ PyObject *__pyx_t_11 = NULL;
+ PyObject *__pyx_t_12 = NULL;
+ PyObject *__pyx_t_13 = NULL;
+ PyObject *__pyx_t_14 = NULL;
+ PyObject *__pyx_t_15 = NULL;
+ PyObject *__pyx_t_16 = NULL;
+ PyObject *__pyx_t_17 = NULL;
+ PyObject *__pyx_t_18 = NULL;
+ int __pyx_t_19;
+ PyObject *__pyx_t_20 = NULL;
+ __Pyx_RefNannySetupContext("__pyx_fuse_10_min_max", 0);
+
+ /* "silx/math/combo.pyx":127
+ * _number value, minimum, minpos, maximum
+ * unsigned int length
+ * unsigned int index = 0 # <<<<<<<<<<<<<<
+ * unsigned int min_index = 0
+ * unsigned int min_pos_index = 0
+ */
+ __pyx_v_index = 0;
+
+ /* "silx/math/combo.pyx":128
+ * unsigned int length
+ * unsigned int index = 0
+ * unsigned int min_index = 0 # <<<<<<<<<<<<<<
+ * unsigned int min_pos_index = 0
+ * unsigned int max_index = 0
+ */
+ __pyx_v_min_index = 0;
+
+ /* "silx/math/combo.pyx":129
+ * unsigned int index = 0
+ * unsigned int min_index = 0
+ * unsigned int min_pos_index = 0 # <<<<<<<<<<<<<<
+ * unsigned int max_index = 0
+ *
+ */
+ __pyx_v_min_pos_index = 0;
+
+ /* "silx/math/combo.pyx":130
+ * unsigned int min_index = 0
+ * unsigned int min_pos_index = 0
+ * unsigned int max_index = 0 # <<<<<<<<<<<<<<
+ *
+ * length = len(data)
+ */
+ __pyx_v_max_index = 0;
+
+ /* "silx/math/combo.pyx":132
+ * unsigned int max_index = 0
+ *
+ * length = len(data) # <<<<<<<<<<<<<<
+ *
+ * if length == 0:
+ */
+ __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_data, 1, (PyObject *(*)(char *)) __pyx_memview_get_unsigned_long, (int (*)(char *, PyObject *)) __pyx_memview_set_unsigned_long, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 132, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 132, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_v_length = __pyx_t_2;
+
+ /* "silx/math/combo.pyx":134
+ * length = len(data)
+ *
+ * if length == 0: # <<<<<<<<<<<<<<
+ * raise ValueError('Zero-size array')
+ *
+ */
+ __pyx_t_3 = ((__pyx_v_length == 0) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":135
+ *
+ * if length == 0:
+ * raise ValueError('Zero-size array') # <<<<<<<<<<<<<<
+ *
+ * with nogil:
+ */
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 135, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __PYX_ERR(0, 135, __pyx_L1_error)
+
+ /* "silx/math/combo.pyx":134
+ * length = len(data)
+ *
+ * if length == 0: # <<<<<<<<<<<<<<
+ * raise ValueError('Zero-size array')
+ *
+ */
+ }
+
+ /* "silx/math/combo.pyx":137
+ * raise ValueError('Zero-size array')
+ *
+ * with nogil: # <<<<<<<<<<<<<<
+ * # Init starting values
+ * value = data[0]
+ */
+ {
+ #ifdef WITH_THREAD
+ PyThreadState *_save;
+ Py_UNBLOCK_THREADS
+ #endif
+ /*try:*/ {
+
+ /* "silx/math/combo.pyx":139
+ * with nogil:
+ * # Init starting values
+ * value = data[0] # <<<<<<<<<<<<<<
+ * minimum = value
+ * maximum = value
+ */
+ __pyx_t_4 = 0;
+ __pyx_v_value = (*((unsigned long *) ( /* dim=0 */ ((char *) (((unsigned long *) __pyx_v_data.data) + __pyx_t_4)) )));
+
+ /* "silx/math/combo.pyx":140
+ * # Init starting values
+ * value = data[0]
+ * minimum = value # <<<<<<<<<<<<<<
+ * maximum = value
+ * if min_positive and value > 0:
+ */
+ __pyx_v_minimum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":141
+ * value = data[0]
+ * minimum = value
+ * maximum = value # <<<<<<<<<<<<<<
+ * if min_positive and value > 0:
+ * min_pos = value
+ */
+ __pyx_v_maximum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":142
+ * minimum = value
+ * maximum = value
+ * if min_positive and value > 0: # <<<<<<<<<<<<<<
+ * min_pos = value
+ * else:
+ */
+ __pyx_t_5 = (__pyx_v_min_positive != 0);
+ if (__pyx_t_5) {
+ } else {
+ __pyx_t_3 = __pyx_t_5;
+ goto __pyx_L8_bool_binop_done;
+ }
+ __pyx_t_5 = ((__pyx_v_value > 0) != 0);
+ __pyx_t_3 = __pyx_t_5;
+ __pyx_L8_bool_binop_done:;
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":143
+ * maximum = value
+ * if min_positive and value > 0:
+ * min_pos = value # <<<<<<<<<<<<<<
+ * else:
+ * min_pos = 0
+ */
+ __pyx_v_min_pos = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":142
+ * minimum = value
+ * maximum = value
+ * if min_positive and value > 0: # <<<<<<<<<<<<<<
+ * min_pos = value
+ * else:
+ */
+ goto __pyx_L7;
+ }
+
+ /* "silx/math/combo.pyx":145
+ * min_pos = value
+ * else:
+ * min_pos = 0 # <<<<<<<<<<<<<<
+ *
+ * if _number in cython.floating:
+ */
+ /*else*/ {
+ __pyx_v_min_pos = 0;
+ }
+ __pyx_L7:;
+
+ /* "silx/math/combo.pyx":158
+ * break
+ *
+ * if not min_positive: # <<<<<<<<<<<<<<
+ * for index in range(index, length):
+ * value = data[index]
+ */
+ __pyx_t_3 = ((!(__pyx_v_min_positive != 0)) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":159
+ *
+ * if not min_positive:
+ * for index in range(index, length): # <<<<<<<<<<<<<<
+ * value = data[index]
+ * if value > maximum:
+ */
+ __pyx_t_6 = __pyx_v_length;
+ for (__pyx_t_7 = __pyx_v_index; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
+ __pyx_v_index = __pyx_t_7;
+
+ /* "silx/math/combo.pyx":160
+ * if not min_positive:
+ * for index in range(index, length):
+ * value = data[index] # <<<<<<<<<<<<<<
+ * if value > maximum:
+ * maximum = value
+ */
+ __pyx_t_8 = __pyx_v_index;
+ __pyx_v_value = (*((unsigned long *) ( /* dim=0 */ ((char *) (((unsigned long *) __pyx_v_data.data) + __pyx_t_8)) )));
+
+ /* "silx/math/combo.pyx":161
+ * for index in range(index, length):
+ * value = data[index]
+ * if value > maximum: # <<<<<<<<<<<<<<
+ * maximum = value
+ * max_index = index
+ */
+ __pyx_t_3 = ((__pyx_v_value > __pyx_v_maximum) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":162
+ * value = data[index]
+ * if value > maximum:
+ * maximum = value # <<<<<<<<<<<<<<
+ * max_index = index
+ * elif value < minimum:
+ */
+ __pyx_v_maximum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":163
+ * if value > maximum:
+ * maximum = value
+ * max_index = index # <<<<<<<<<<<<<<
+ * elif value < minimum:
+ * minimum = value
+ */
+ __pyx_v_max_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":161
+ * for index in range(index, length):
+ * value = data[index]
+ * if value > maximum: # <<<<<<<<<<<<<<
+ * maximum = value
+ * max_index = index
+ */
+ goto __pyx_L13;
+ }
+
+ /* "silx/math/combo.pyx":164
+ * maximum = value
+ * max_index = index
+ * elif value < minimum: # <<<<<<<<<<<<<<
+ * minimum = value
+ * min_index = index
+ */
+ __pyx_t_3 = ((__pyx_v_value < __pyx_v_minimum) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":165
+ * max_index = index
+ * elif value < minimum:
+ * minimum = value # <<<<<<<<<<<<<<
+ * min_index = index
+ *
+ */
+ __pyx_v_minimum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":166
+ * elif value < minimum:
+ * minimum = value
+ * min_index = index # <<<<<<<<<<<<<<
+ *
+ * else:
+ */
+ __pyx_v_min_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":164
+ * maximum = value
+ * max_index = index
+ * elif value < minimum: # <<<<<<<<<<<<<<
+ * minimum = value
+ * min_index = index
+ */
+ }
+ __pyx_L13:;
+ }
+
+ /* "silx/math/combo.pyx":158
+ * break
+ *
+ * if not min_positive: # <<<<<<<<<<<<<<
+ * for index in range(index, length):
+ * value = data[index]
+ */
+ goto __pyx_L10;
+ }
+
+ /* "silx/math/combo.pyx":170
+ * else:
+ * # Loop until min_pos is defined
+ * for index in range(index, length): # <<<<<<<<<<<<<<
+ * value = data[index]
+ * if value > maximum:
+ */
+ /*else*/ {
+ __pyx_t_6 = __pyx_v_length;
+ for (__pyx_t_7 = __pyx_v_index; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
+ __pyx_v_index = __pyx_t_7;
+
+ /* "silx/math/combo.pyx":171
+ * # Loop until min_pos is defined
+ * for index in range(index, length):
+ * value = data[index] # <<<<<<<<<<<<<<
+ * if value > maximum:
+ * maximum = value
+ */
+ __pyx_t_9 = __pyx_v_index;
+ __pyx_v_value = (*((unsigned long *) ( /* dim=0 */ ((char *) (((unsigned long *) __pyx_v_data.data) + __pyx_t_9)) )));
+
+ /* "silx/math/combo.pyx":172
+ * for index in range(index, length):
+ * value = data[index]
+ * if value > maximum: # <<<<<<<<<<<<<<
+ * maximum = value
+ * max_index = index
+ */
+ __pyx_t_3 = ((__pyx_v_value > __pyx_v_maximum) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":173
+ * value = data[index]
+ * if value > maximum:
+ * maximum = value # <<<<<<<<<<<<<<
+ * max_index = index
+ * elif value < minimum:
+ */
+ __pyx_v_maximum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":174
+ * if value > maximum:
+ * maximum = value
+ * max_index = index # <<<<<<<<<<<<<<
+ * elif value < minimum:
+ * minimum = value
+ */
+ __pyx_v_max_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":172
+ * for index in range(index, length):
+ * value = data[index]
+ * if value > maximum: # <<<<<<<<<<<<<<
+ * maximum = value
+ * max_index = index
+ */
+ goto __pyx_L16;
+ }
+
+ /* "silx/math/combo.pyx":175
+ * maximum = value
+ * max_index = index
+ * elif value < minimum: # <<<<<<<<<<<<<<
+ * minimum = value
+ * min_index = index
+ */
+ __pyx_t_3 = ((__pyx_v_value < __pyx_v_minimum) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":176
+ * max_index = index
+ * elif value < minimum:
+ * minimum = value # <<<<<<<<<<<<<<
+ * min_index = index
+ *
+ */
+ __pyx_v_minimum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":177
+ * elif value < minimum:
+ * minimum = value
+ * min_index = index # <<<<<<<<<<<<<<
+ *
+ * if value > 0:
+ */
+ __pyx_v_min_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":175
+ * maximum = value
+ * max_index = index
+ * elif value < minimum: # <<<<<<<<<<<<<<
+ * minimum = value
+ * min_index = index
+ */
+ }
+ __pyx_L16:;
+
+ /* "silx/math/combo.pyx":179
+ * min_index = index
+ *
+ * if value > 0: # <<<<<<<<<<<<<<
+ * min_pos = value
+ * min_pos_index = index
+ */
+ __pyx_t_3 = ((__pyx_v_value > 0) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":180
+ *
+ * if value > 0:
+ * min_pos = value # <<<<<<<<<<<<<<
+ * min_pos_index = index
+ * break
+ */
+ __pyx_v_min_pos = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":181
+ * if value > 0:
+ * min_pos = value
+ * min_pos_index = index # <<<<<<<<<<<<<<
+ * break
+ *
+ */
+ __pyx_v_min_pos_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":182
+ * min_pos = value
+ * min_pos_index = index
+ * break # <<<<<<<<<<<<<<
+ *
+ * # Loop until the end
+ */
+ goto __pyx_L15_break;
+
+ /* "silx/math/combo.pyx":179
+ * min_index = index
+ *
+ * if value > 0: # <<<<<<<<<<<<<<
+ * min_pos = value
+ * min_pos_index = index
+ */
+ }
+ }
+ __pyx_L15_break:;
+
+ /* "silx/math/combo.pyx":185
+ *
+ * # Loop until the end
+ * for index in range(index+1, length): # <<<<<<<<<<<<<<
+ * value = data[index]
+ * if value > maximum:
+ */
+ __pyx_t_6 = __pyx_v_length;
+ for (__pyx_t_7 = (__pyx_v_index + 1); __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
+ __pyx_v_index = __pyx_t_7;
+
+ /* "silx/math/combo.pyx":186
+ * # Loop until the end
+ * for index in range(index+1, length):
+ * value = data[index] # <<<<<<<<<<<<<<
+ * if value > maximum:
+ * maximum = value
+ */
+ __pyx_t_10 = __pyx_v_index;
+ __pyx_v_value = (*((unsigned long *) ( /* dim=0 */ ((char *) (((unsigned long *) __pyx_v_data.data) + __pyx_t_10)) )));
+
+ /* "silx/math/combo.pyx":187
+ * for index in range(index+1, length):
+ * value = data[index]
+ * if value > maximum: # <<<<<<<<<<<<<<
+ * maximum = value
+ * max_index = index
+ */
+ __pyx_t_3 = ((__pyx_v_value > __pyx_v_maximum) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":188
+ * value = data[index]
+ * if value > maximum:
+ * maximum = value # <<<<<<<<<<<<<<
+ * max_index = index
+ * else:
+ */
+ __pyx_v_maximum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":189
+ * if value > maximum:
+ * maximum = value
+ * max_index = index # <<<<<<<<<<<<<<
+ * else:
+ * if value < minimum:
+ */
+ __pyx_v_max_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":187
+ * for index in range(index+1, length):
+ * value = data[index]
+ * if value > maximum: # <<<<<<<<<<<<<<
+ * maximum = value
+ * max_index = index
+ */
+ goto __pyx_L20;
+ }
+
+ /* "silx/math/combo.pyx":191
+ * max_index = index
+ * else:
+ * if value < minimum: # <<<<<<<<<<<<<<
+ * minimum = value
+ * min_index = index
+ */
+ /*else*/ {
+ __pyx_t_3 = ((__pyx_v_value < __pyx_v_minimum) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":192
+ * else:
+ * if value < minimum:
+ * minimum = value # <<<<<<<<<<<<<<
+ * min_index = index
+ *
+ */
+ __pyx_v_minimum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":193
+ * if value < minimum:
+ * minimum = value
+ * min_index = index # <<<<<<<<<<<<<<
+ *
+ * if 0 < value < min_pos:
+ */
+ __pyx_v_min_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":191
+ * max_index = index
+ * else:
+ * if value < minimum: # <<<<<<<<<<<<<<
+ * minimum = value
+ * min_index = index
+ */
+ }
+
+ /* "silx/math/combo.pyx":195
+ * min_index = index
+ *
+ * if 0 < value < min_pos: # <<<<<<<<<<<<<<
+ * min_pos = value
+ * min_pos_index = index
+ */
+ __pyx_t_3 = (0 < __pyx_v_value);
+ if (__pyx_t_3) {
+ __pyx_t_3 = (__pyx_v_value < __pyx_v_min_pos);
+ }
+ __pyx_t_5 = (__pyx_t_3 != 0);
+ if (__pyx_t_5) {
+
+ /* "silx/math/combo.pyx":196
+ *
+ * if 0 < value < min_pos:
+ * min_pos = value # <<<<<<<<<<<<<<
+ * min_pos_index = index
+ *
+ */
+ __pyx_v_min_pos = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":197
+ * if 0 < value < min_pos:
+ * min_pos = value
+ * min_pos_index = index # <<<<<<<<<<<<<<
+ *
+ * return _MinMaxResult(minimum,
+ */
+ __pyx_v_min_pos_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":195
+ * min_index = index
+ *
+ * if 0 < value < min_pos: # <<<<<<<<<<<<<<
+ * min_pos = value
+ * min_pos_index = index
+ */
+ }
+ }
+ __pyx_L20:;
+ }
+ }
+ __pyx_L10:;
+ }
+
+ /* "silx/math/combo.pyx":137
+ * raise ValueError('Zero-size array')
+ *
+ * with nogil: # <<<<<<<<<<<<<<
+ * # Init starting values
+ * value = data[0]
+ */
+ /*finally:*/ {
+ /*normal exit:*/{
+ #ifdef WITH_THREAD
+ Py_BLOCK_THREADS
+ #endif
+ goto __pyx_L6;
+ }
+ __pyx_L6:;
+ }
+ }
+
+ /* "silx/math/combo.pyx":199
+ * min_pos_index = index
+ *
+ * return _MinMaxResult(minimum, # <<<<<<<<<<<<<<
+ * min_pos if min_pos > 0 else None,
+ * maximum,
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_MinMaxResult); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __pyx_t_12 = __Pyx_PyInt_From_unsigned_long(__pyx_v_minimum); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+
+ /* "silx/math/combo.pyx":200
+ *
+ * return _MinMaxResult(minimum,
+ * min_pos if min_pos > 0 else None, # <<<<<<<<<<<<<<
+ * maximum,
+ * min_index,
+ */
+ if (((__pyx_v_min_pos > 0) != 0)) {
+ __pyx_t_14 = __Pyx_PyInt_From_unsigned_long(__pyx_v_min_pos); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 200, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_14);
+ __pyx_t_13 = __pyx_t_14;
+ __pyx_t_14 = 0;
+ } else {
+ __Pyx_INCREF(Py_None);
+ __pyx_t_13 = Py_None;
+ }
+
+ /* "silx/math/combo.pyx":201
+ * return _MinMaxResult(minimum,
+ * min_pos if min_pos > 0 else None,
+ * maximum, # <<<<<<<<<<<<<<
+ * min_index,
+ * min_pos_index if min_pos > 0 else None,
+ */
+ __pyx_t_14 = __Pyx_PyInt_From_unsigned_long(__pyx_v_maximum); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 201, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_14);
+
+ /* "silx/math/combo.pyx":202
+ * min_pos if min_pos > 0 else None,
+ * maximum,
+ * min_index, # <<<<<<<<<<<<<<
+ * min_pos_index if min_pos > 0 else None,
+ * max_index)
+ */
+ __pyx_t_15 = __Pyx_PyInt_From_unsigned_int(__pyx_v_min_index); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 202, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_15);
+
+ /* "silx/math/combo.pyx":203
+ * maximum,
+ * min_index,
+ * min_pos_index if min_pos > 0 else None, # <<<<<<<<<<<<<<
+ * max_index)
+ *
+ */
+ if (((__pyx_v_min_pos > 0) != 0)) {
+ __pyx_t_17 = __Pyx_PyInt_From_unsigned_int(__pyx_v_min_pos_index); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 203, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_17);
+ __pyx_t_16 = __pyx_t_17;
+ __pyx_t_17 = 0;
+ } else {
+ __Pyx_INCREF(Py_None);
+ __pyx_t_16 = Py_None;
+ }
+
+ /* "silx/math/combo.pyx":204
+ * min_index,
+ * min_pos_index if min_pos > 0 else None,
+ * max_index) # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __pyx_t_17 = __Pyx_PyInt_From_unsigned_int(__pyx_v_max_index); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 204, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_17);
+ __pyx_t_18 = NULL;
+ __pyx_t_19 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
+ __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_11);
+ if (likely(__pyx_t_18)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
+ __Pyx_INCREF(__pyx_t_18);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_11, function);
+ __pyx_t_19 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_11)) {
+ PyObject *__pyx_temp[7] = {__pyx_t_18, __pyx_t_12, __pyx_t_13, __pyx_t_14, __pyx_t_15, __pyx_t_16, __pyx_t_17};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_19, 6+__pyx_t_19); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+ __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
+ __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) {
+ PyObject *__pyx_temp[7] = {__pyx_t_18, __pyx_t_12, __pyx_t_13, __pyx_t_14, __pyx_t_15, __pyx_t_16, __pyx_t_17};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_19, 6+__pyx_t_19); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+ __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
+ __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_20 = PyTuple_New(6+__pyx_t_19); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_20);
+ if (__pyx_t_18) {
+ __Pyx_GIVEREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_20, 0, __pyx_t_18); __pyx_t_18 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_12);
+ PyTuple_SET_ITEM(__pyx_t_20, 0+__pyx_t_19, __pyx_t_12);
+ __Pyx_GIVEREF(__pyx_t_13);
+ PyTuple_SET_ITEM(__pyx_t_20, 1+__pyx_t_19, __pyx_t_13);
+ __Pyx_GIVEREF(__pyx_t_14);
+ PyTuple_SET_ITEM(__pyx_t_20, 2+__pyx_t_19, __pyx_t_14);
+ __Pyx_GIVEREF(__pyx_t_15);
+ PyTuple_SET_ITEM(__pyx_t_20, 3+__pyx_t_19, __pyx_t_15);
+ __Pyx_GIVEREF(__pyx_t_16);
+ PyTuple_SET_ITEM(__pyx_t_20, 4+__pyx_t_19, __pyx_t_16);
+ __Pyx_GIVEREF(__pyx_t_17);
+ PyTuple_SET_ITEM(__pyx_t_20, 5+__pyx_t_19, __pyx_t_17);
+ __pyx_t_12 = 0;
+ __pyx_t_13 = 0;
+ __pyx_t_14 = 0;
+ __pyx_t_15 = 0;
+ __pyx_t_16 = 0;
+ __pyx_t_17 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_20, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "silx/math/combo.pyx":119
+ * @cython.boundscheck(False)
+ * @cython.wraparound(False)
+ * def _min_max(_number[::1] data, bint min_positive=False): # <<<<<<<<<<<<<<
+ * """:func:`min_max` implementation including infinite values
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_11);
+ __Pyx_XDECREF(__pyx_t_12);
+ __Pyx_XDECREF(__pyx_t_13);
+ __Pyx_XDECREF(__pyx_t_14);
+ __Pyx_XDECREF(__pyx_t_15);
+ __Pyx_XDECREF(__pyx_t_16);
+ __Pyx_XDECREF(__pyx_t_17);
+ __Pyx_XDECREF(__pyx_t_18);
+ __Pyx_XDECREF(__pyx_t_20);
+ __Pyx_AddTraceback("silx.math.combo._min_max", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __PYX_XDEC_MEMVIEW(&__pyx_v_data, 1);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_4silx_4math_5combo_84__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ __Pyx_RefNannySetupContext("__defaults__", 0);
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyBool_FromLong(__Pyx_CyFunction_Defaults(__pyx_defaults23, __pyx_self)->__pyx_arg_min_positive); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 119, __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 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
+ __Pyx_INCREF(Py_None);
+ __Pyx_GIVEREF(Py_None);
+ PyTuple_SET_ITEM(__pyx_t_1, 1, Py_None);
+ __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_AddTraceback("silx.math.combo.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_fuse_11__pyx_pw_4silx_4math_5combo_29_min_max(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_fuse_11__pyx_mdef_4silx_4math_5combo_29_min_max = {"__pyx_fuse_11_min_max", (PyCFunction)__pyx_fuse_11__pyx_pw_4silx_4math_5combo_29_min_max, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4silx_4math_5combo__min_max};
+static PyObject *__pyx_fuse_11__pyx_pw_4silx_4math_5combo_29_min_max(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ __Pyx_memviewslice __pyx_v_data = { 0, 0, { 0 }, { 0 }, { 0 } };
+ int __pyx_v_min_positive;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_min_max (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,&__pyx_n_s_min_positive_2,0};
+ PyObject* values[2] = {0,0};
+ __pyx_defaults23 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults23, __pyx_self);
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ case 1:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_min_positive_2);
+ if (value) { values[1] = value; kw_args--; }
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_min_max") < 0)) __PYX_ERR(0, 119, __pyx_L3_error)
+ }
+ } else {
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ }
+ __pyx_v_data = __Pyx_PyObject_to_MemoryviewSlice_dc_unsigned_PY_LONG_LONG(values[0]); if (unlikely(!__pyx_v_data.memview)) __PYX_ERR(0, 119, __pyx_L3_error)
+ if (values[1]) {
+ __pyx_v_min_positive = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_min_positive == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 119, __pyx_L3_error)
+ } else {
+ __pyx_v_min_positive = __pyx_dynamic_args->__pyx_arg_min_positive;
+ }
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("_min_max", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 119, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("silx.math.combo._min_max", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_4silx_4math_5combo_28_min_max(__pyx_self, __pyx_v_data, __pyx_v_min_positive);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_4silx_4math_5combo_28_min_max(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_data, int __pyx_v_min_positive) {
+ unsigned PY_LONG_LONG __pyx_v_value;
+ unsigned PY_LONG_LONG __pyx_v_minimum;
+ unsigned PY_LONG_LONG __pyx_v_maximum;
+ unsigned int __pyx_v_length;
+ unsigned int __pyx_v_index;
+ unsigned int __pyx_v_min_index;
+ unsigned int __pyx_v_min_pos_index;
+ unsigned int __pyx_v_max_index;
+ unsigned PY_LONG_LONG __pyx_v_min_pos;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ Py_ssize_t __pyx_t_2;
+ int __pyx_t_3;
+ Py_ssize_t __pyx_t_4;
+ int __pyx_t_5;
+ unsigned int __pyx_t_6;
+ unsigned int __pyx_t_7;
+ size_t __pyx_t_8;
+ size_t __pyx_t_9;
+ size_t __pyx_t_10;
+ PyObject *__pyx_t_11 = NULL;
+ PyObject *__pyx_t_12 = NULL;
+ PyObject *__pyx_t_13 = NULL;
+ PyObject *__pyx_t_14 = NULL;
+ PyObject *__pyx_t_15 = NULL;
+ PyObject *__pyx_t_16 = NULL;
+ PyObject *__pyx_t_17 = NULL;
+ PyObject *__pyx_t_18 = NULL;
+ int __pyx_t_19;
+ PyObject *__pyx_t_20 = NULL;
+ __Pyx_RefNannySetupContext("__pyx_fuse_11_min_max", 0);
+
+ /* "silx/math/combo.pyx":127
+ * _number value, minimum, minpos, maximum
+ * unsigned int length
+ * unsigned int index = 0 # <<<<<<<<<<<<<<
+ * unsigned int min_index = 0
+ * unsigned int min_pos_index = 0
+ */
+ __pyx_v_index = 0;
+
+ /* "silx/math/combo.pyx":128
+ * unsigned int length
+ * unsigned int index = 0
+ * unsigned int min_index = 0 # <<<<<<<<<<<<<<
+ * unsigned int min_pos_index = 0
+ * unsigned int max_index = 0
+ */
+ __pyx_v_min_index = 0;
+
+ /* "silx/math/combo.pyx":129
+ * unsigned int index = 0
+ * unsigned int min_index = 0
+ * unsigned int min_pos_index = 0 # <<<<<<<<<<<<<<
+ * unsigned int max_index = 0
+ *
+ */
+ __pyx_v_min_pos_index = 0;
+
+ /* "silx/math/combo.pyx":130
+ * unsigned int min_index = 0
+ * unsigned int min_pos_index = 0
+ * unsigned int max_index = 0 # <<<<<<<<<<<<<<
+ *
+ * length = len(data)
+ */
+ __pyx_v_max_index = 0;
+
+ /* "silx/math/combo.pyx":132
+ * unsigned int max_index = 0
+ *
+ * length = len(data) # <<<<<<<<<<<<<<
+ *
+ * if length == 0:
+ */
+ __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_data, 1, (PyObject *(*)(char *)) __pyx_memview_get_unsigned_PY_LONG_LONG, (int (*)(char *, PyObject *)) __pyx_memview_set_unsigned_PY_LONG_LONG, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 132, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 132, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_v_length = __pyx_t_2;
+
+ /* "silx/math/combo.pyx":134
+ * length = len(data)
+ *
+ * if length == 0: # <<<<<<<<<<<<<<
+ * raise ValueError('Zero-size array')
+ *
+ */
+ __pyx_t_3 = ((__pyx_v_length == 0) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":135
+ *
+ * if length == 0:
+ * raise ValueError('Zero-size array') # <<<<<<<<<<<<<<
+ *
+ * with nogil:
+ */
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 135, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __PYX_ERR(0, 135, __pyx_L1_error)
+
+ /* "silx/math/combo.pyx":134
+ * length = len(data)
+ *
+ * if length == 0: # <<<<<<<<<<<<<<
+ * raise ValueError('Zero-size array')
+ *
+ */
+ }
+
+ /* "silx/math/combo.pyx":137
+ * raise ValueError('Zero-size array')
+ *
+ * with nogil: # <<<<<<<<<<<<<<
+ * # Init starting values
+ * value = data[0]
+ */
+ {
+ #ifdef WITH_THREAD
+ PyThreadState *_save;
+ Py_UNBLOCK_THREADS
+ #endif
+ /*try:*/ {
+
+ /* "silx/math/combo.pyx":139
+ * with nogil:
+ * # Init starting values
+ * value = data[0] # <<<<<<<<<<<<<<
+ * minimum = value
+ * maximum = value
+ */
+ __pyx_t_4 = 0;
+ __pyx_v_value = (*((unsigned PY_LONG_LONG *) ( /* dim=0 */ ((char *) (((unsigned PY_LONG_LONG *) __pyx_v_data.data) + __pyx_t_4)) )));
+
+ /* "silx/math/combo.pyx":140
+ * # Init starting values
+ * value = data[0]
+ * minimum = value # <<<<<<<<<<<<<<
+ * maximum = value
+ * if min_positive and value > 0:
+ */
+ __pyx_v_minimum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":141
+ * value = data[0]
+ * minimum = value
+ * maximum = value # <<<<<<<<<<<<<<
+ * if min_positive and value > 0:
+ * min_pos = value
+ */
+ __pyx_v_maximum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":142
+ * minimum = value
+ * maximum = value
+ * if min_positive and value > 0: # <<<<<<<<<<<<<<
+ * min_pos = value
+ * else:
+ */
+ __pyx_t_5 = (__pyx_v_min_positive != 0);
+ if (__pyx_t_5) {
+ } else {
+ __pyx_t_3 = __pyx_t_5;
+ goto __pyx_L8_bool_binop_done;
+ }
+ __pyx_t_5 = ((__pyx_v_value > 0) != 0);
+ __pyx_t_3 = __pyx_t_5;
+ __pyx_L8_bool_binop_done:;
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":143
+ * maximum = value
+ * if min_positive and value > 0:
+ * min_pos = value # <<<<<<<<<<<<<<
+ * else:
+ * min_pos = 0
+ */
+ __pyx_v_min_pos = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":142
+ * minimum = value
+ * maximum = value
+ * if min_positive and value > 0: # <<<<<<<<<<<<<<
+ * min_pos = value
+ * else:
+ */
+ goto __pyx_L7;
+ }
+
+ /* "silx/math/combo.pyx":145
+ * min_pos = value
+ * else:
+ * min_pos = 0 # <<<<<<<<<<<<<<
+ *
+ * if _number in cython.floating:
+ */
+ /*else*/ {
+ __pyx_v_min_pos = 0;
+ }
+ __pyx_L7:;
+
+ /* "silx/math/combo.pyx":158
+ * break
+ *
+ * if not min_positive: # <<<<<<<<<<<<<<
+ * for index in range(index, length):
+ * value = data[index]
+ */
+ __pyx_t_3 = ((!(__pyx_v_min_positive != 0)) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":159
+ *
+ * if not min_positive:
+ * for index in range(index, length): # <<<<<<<<<<<<<<
+ * value = data[index]
+ * if value > maximum:
+ */
+ __pyx_t_6 = __pyx_v_length;
+ for (__pyx_t_7 = __pyx_v_index; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
+ __pyx_v_index = __pyx_t_7;
+
+ /* "silx/math/combo.pyx":160
+ * if not min_positive:
+ * for index in range(index, length):
+ * value = data[index] # <<<<<<<<<<<<<<
+ * if value > maximum:
+ * maximum = value
+ */
+ __pyx_t_8 = __pyx_v_index;
+ __pyx_v_value = (*((unsigned PY_LONG_LONG *) ( /* dim=0 */ ((char *) (((unsigned PY_LONG_LONG *) __pyx_v_data.data) + __pyx_t_8)) )));
+
+ /* "silx/math/combo.pyx":161
+ * for index in range(index, length):
+ * value = data[index]
+ * if value > maximum: # <<<<<<<<<<<<<<
+ * maximum = value
+ * max_index = index
+ */
+ __pyx_t_3 = ((__pyx_v_value > __pyx_v_maximum) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":162
+ * value = data[index]
+ * if value > maximum:
+ * maximum = value # <<<<<<<<<<<<<<
+ * max_index = index
+ * elif value < minimum:
+ */
+ __pyx_v_maximum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":163
+ * if value > maximum:
+ * maximum = value
+ * max_index = index # <<<<<<<<<<<<<<
+ * elif value < minimum:
+ * minimum = value
+ */
+ __pyx_v_max_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":161
+ * for index in range(index, length):
+ * value = data[index]
+ * if value > maximum: # <<<<<<<<<<<<<<
+ * maximum = value
+ * max_index = index
+ */
+ goto __pyx_L13;
+ }
+
+ /* "silx/math/combo.pyx":164
+ * maximum = value
+ * max_index = index
+ * elif value < minimum: # <<<<<<<<<<<<<<
+ * minimum = value
+ * min_index = index
+ */
+ __pyx_t_3 = ((__pyx_v_value < __pyx_v_minimum) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":165
+ * max_index = index
+ * elif value < minimum:
+ * minimum = value # <<<<<<<<<<<<<<
+ * min_index = index
+ *
+ */
+ __pyx_v_minimum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":166
+ * elif value < minimum:
+ * minimum = value
+ * min_index = index # <<<<<<<<<<<<<<
+ *
+ * else:
+ */
+ __pyx_v_min_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":164
+ * maximum = value
+ * max_index = index
+ * elif value < minimum: # <<<<<<<<<<<<<<
+ * minimum = value
+ * min_index = index
+ */
+ }
+ __pyx_L13:;
+ }
+
+ /* "silx/math/combo.pyx":158
+ * break
+ *
+ * if not min_positive: # <<<<<<<<<<<<<<
+ * for index in range(index, length):
+ * value = data[index]
+ */
+ goto __pyx_L10;
+ }
+
+ /* "silx/math/combo.pyx":170
+ * else:
+ * # Loop until min_pos is defined
+ * for index in range(index, length): # <<<<<<<<<<<<<<
+ * value = data[index]
+ * if value > maximum:
+ */
+ /*else*/ {
+ __pyx_t_6 = __pyx_v_length;
+ for (__pyx_t_7 = __pyx_v_index; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
+ __pyx_v_index = __pyx_t_7;
+
+ /* "silx/math/combo.pyx":171
+ * # Loop until min_pos is defined
+ * for index in range(index, length):
+ * value = data[index] # <<<<<<<<<<<<<<
+ * if value > maximum:
+ * maximum = value
+ */
+ __pyx_t_9 = __pyx_v_index;
+ __pyx_v_value = (*((unsigned PY_LONG_LONG *) ( /* dim=0 */ ((char *) (((unsigned PY_LONG_LONG *) __pyx_v_data.data) + __pyx_t_9)) )));
+
+ /* "silx/math/combo.pyx":172
+ * for index in range(index, length):
+ * value = data[index]
+ * if value > maximum: # <<<<<<<<<<<<<<
+ * maximum = value
+ * max_index = index
+ */
+ __pyx_t_3 = ((__pyx_v_value > __pyx_v_maximum) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":173
+ * value = data[index]
+ * if value > maximum:
+ * maximum = value # <<<<<<<<<<<<<<
+ * max_index = index
+ * elif value < minimum:
+ */
+ __pyx_v_maximum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":174
+ * if value > maximum:
+ * maximum = value
+ * max_index = index # <<<<<<<<<<<<<<
+ * elif value < minimum:
+ * minimum = value
+ */
+ __pyx_v_max_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":172
+ * for index in range(index, length):
+ * value = data[index]
+ * if value > maximum: # <<<<<<<<<<<<<<
+ * maximum = value
+ * max_index = index
+ */
+ goto __pyx_L16;
+ }
+
+ /* "silx/math/combo.pyx":175
+ * maximum = value
+ * max_index = index
+ * elif value < minimum: # <<<<<<<<<<<<<<
+ * minimum = value
+ * min_index = index
+ */
+ __pyx_t_3 = ((__pyx_v_value < __pyx_v_minimum) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":176
+ * max_index = index
+ * elif value < minimum:
+ * minimum = value # <<<<<<<<<<<<<<
+ * min_index = index
+ *
+ */
+ __pyx_v_minimum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":177
+ * elif value < minimum:
+ * minimum = value
+ * min_index = index # <<<<<<<<<<<<<<
+ *
+ * if value > 0:
+ */
+ __pyx_v_min_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":175
+ * maximum = value
+ * max_index = index
+ * elif value < minimum: # <<<<<<<<<<<<<<
+ * minimum = value
+ * min_index = index
+ */
+ }
+ __pyx_L16:;
+
+ /* "silx/math/combo.pyx":179
+ * min_index = index
+ *
+ * if value > 0: # <<<<<<<<<<<<<<
+ * min_pos = value
+ * min_pos_index = index
+ */
+ __pyx_t_3 = ((__pyx_v_value > 0) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":180
+ *
+ * if value > 0:
+ * min_pos = value # <<<<<<<<<<<<<<
+ * min_pos_index = index
+ * break
+ */
+ __pyx_v_min_pos = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":181
+ * if value > 0:
+ * min_pos = value
+ * min_pos_index = index # <<<<<<<<<<<<<<
+ * break
+ *
+ */
+ __pyx_v_min_pos_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":182
+ * min_pos = value
+ * min_pos_index = index
+ * break # <<<<<<<<<<<<<<
+ *
+ * # Loop until the end
+ */
+ goto __pyx_L15_break;
+
+ /* "silx/math/combo.pyx":179
+ * min_index = index
+ *
+ * if value > 0: # <<<<<<<<<<<<<<
+ * min_pos = value
+ * min_pos_index = index
+ */
+ }
+ }
+ __pyx_L15_break:;
+
+ /* "silx/math/combo.pyx":185
+ *
+ * # Loop until the end
+ * for index in range(index+1, length): # <<<<<<<<<<<<<<
+ * value = data[index]
+ * if value > maximum:
+ */
+ __pyx_t_6 = __pyx_v_length;
+ for (__pyx_t_7 = (__pyx_v_index + 1); __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
+ __pyx_v_index = __pyx_t_7;
+
+ /* "silx/math/combo.pyx":186
+ * # Loop until the end
+ * for index in range(index+1, length):
+ * value = data[index] # <<<<<<<<<<<<<<
+ * if value > maximum:
+ * maximum = value
+ */
+ __pyx_t_10 = __pyx_v_index;
+ __pyx_v_value = (*((unsigned PY_LONG_LONG *) ( /* dim=0 */ ((char *) (((unsigned PY_LONG_LONG *) __pyx_v_data.data) + __pyx_t_10)) )));
+
+ /* "silx/math/combo.pyx":187
+ * for index in range(index+1, length):
+ * value = data[index]
+ * if value > maximum: # <<<<<<<<<<<<<<
+ * maximum = value
+ * max_index = index
+ */
+ __pyx_t_3 = ((__pyx_v_value > __pyx_v_maximum) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":188
+ * value = data[index]
+ * if value > maximum:
+ * maximum = value # <<<<<<<<<<<<<<
+ * max_index = index
+ * else:
+ */
+ __pyx_v_maximum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":189
+ * if value > maximum:
+ * maximum = value
+ * max_index = index # <<<<<<<<<<<<<<
+ * else:
+ * if value < minimum:
+ */
+ __pyx_v_max_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":187
+ * for index in range(index+1, length):
+ * value = data[index]
+ * if value > maximum: # <<<<<<<<<<<<<<
+ * maximum = value
+ * max_index = index
+ */
+ goto __pyx_L20;
+ }
+
+ /* "silx/math/combo.pyx":191
+ * max_index = index
+ * else:
+ * if value < minimum: # <<<<<<<<<<<<<<
+ * minimum = value
+ * min_index = index
+ */
+ /*else*/ {
+ __pyx_t_3 = ((__pyx_v_value < __pyx_v_minimum) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":192
+ * else:
+ * if value < minimum:
+ * minimum = value # <<<<<<<<<<<<<<
+ * min_index = index
+ *
+ */
+ __pyx_v_minimum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":193
+ * if value < minimum:
+ * minimum = value
+ * min_index = index # <<<<<<<<<<<<<<
+ *
+ * if 0 < value < min_pos:
+ */
+ __pyx_v_min_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":191
+ * max_index = index
+ * else:
+ * if value < minimum: # <<<<<<<<<<<<<<
+ * minimum = value
+ * min_index = index
+ */
+ }
+
+ /* "silx/math/combo.pyx":195
+ * min_index = index
+ *
+ * if 0 < value < min_pos: # <<<<<<<<<<<<<<
+ * min_pos = value
+ * min_pos_index = index
+ */
+ __pyx_t_3 = (0 < __pyx_v_value);
+ if (__pyx_t_3) {
+ __pyx_t_3 = (__pyx_v_value < __pyx_v_min_pos);
+ }
+ __pyx_t_5 = (__pyx_t_3 != 0);
+ if (__pyx_t_5) {
+
+ /* "silx/math/combo.pyx":196
+ *
+ * if 0 < value < min_pos:
+ * min_pos = value # <<<<<<<<<<<<<<
+ * min_pos_index = index
+ *
+ */
+ __pyx_v_min_pos = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":197
+ * if 0 < value < min_pos:
+ * min_pos = value
+ * min_pos_index = index # <<<<<<<<<<<<<<
+ *
+ * return _MinMaxResult(minimum,
+ */
+ __pyx_v_min_pos_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":195
+ * min_index = index
+ *
+ * if 0 < value < min_pos: # <<<<<<<<<<<<<<
+ * min_pos = value
+ * min_pos_index = index
+ */
+ }
+ }
+ __pyx_L20:;
+ }
+ }
+ __pyx_L10:;
+ }
+
+ /* "silx/math/combo.pyx":137
+ * raise ValueError('Zero-size array')
+ *
+ * with nogil: # <<<<<<<<<<<<<<
+ * # Init starting values
+ * value = data[0]
+ */
+ /*finally:*/ {
+ /*normal exit:*/{
+ #ifdef WITH_THREAD
+ Py_BLOCK_THREADS
+ #endif
+ goto __pyx_L6;
+ }
+ __pyx_L6:;
+ }
+ }
+
+ /* "silx/math/combo.pyx":199
+ * min_pos_index = index
+ *
+ * return _MinMaxResult(minimum, # <<<<<<<<<<<<<<
+ * min_pos if min_pos > 0 else None,
+ * maximum,
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_MinMaxResult); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __pyx_t_12 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(__pyx_v_minimum); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+
+ /* "silx/math/combo.pyx":200
+ *
+ * return _MinMaxResult(minimum,
+ * min_pos if min_pos > 0 else None, # <<<<<<<<<<<<<<
+ * maximum,
+ * min_index,
+ */
+ if (((__pyx_v_min_pos > 0) != 0)) {
+ __pyx_t_14 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(__pyx_v_min_pos); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 200, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_14);
+ __pyx_t_13 = __pyx_t_14;
+ __pyx_t_14 = 0;
+ } else {
+ __Pyx_INCREF(Py_None);
+ __pyx_t_13 = Py_None;
+ }
+
+ /* "silx/math/combo.pyx":201
+ * return _MinMaxResult(minimum,
+ * min_pos if min_pos > 0 else None,
+ * maximum, # <<<<<<<<<<<<<<
+ * min_index,
+ * min_pos_index if min_pos > 0 else None,
+ */
+ __pyx_t_14 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(__pyx_v_maximum); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 201, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_14);
+
+ /* "silx/math/combo.pyx":202
+ * min_pos if min_pos > 0 else None,
+ * maximum,
+ * min_index, # <<<<<<<<<<<<<<
+ * min_pos_index if min_pos > 0 else None,
+ * max_index)
+ */
+ __pyx_t_15 = __Pyx_PyInt_From_unsigned_int(__pyx_v_min_index); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 202, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_15);
+
+ /* "silx/math/combo.pyx":203
+ * maximum,
+ * min_index,
+ * min_pos_index if min_pos > 0 else None, # <<<<<<<<<<<<<<
+ * max_index)
+ *
+ */
+ if (((__pyx_v_min_pos > 0) != 0)) {
+ __pyx_t_17 = __Pyx_PyInt_From_unsigned_int(__pyx_v_min_pos_index); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 203, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_17);
+ __pyx_t_16 = __pyx_t_17;
+ __pyx_t_17 = 0;
+ } else {
+ __Pyx_INCREF(Py_None);
+ __pyx_t_16 = Py_None;
+ }
+
+ /* "silx/math/combo.pyx":204
+ * min_index,
+ * min_pos_index if min_pos > 0 else None,
+ * max_index) # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __pyx_t_17 = __Pyx_PyInt_From_unsigned_int(__pyx_v_max_index); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 204, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_17);
+ __pyx_t_18 = NULL;
+ __pyx_t_19 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
+ __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_11);
+ if (likely(__pyx_t_18)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
+ __Pyx_INCREF(__pyx_t_18);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_11, function);
+ __pyx_t_19 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_11)) {
+ PyObject *__pyx_temp[7] = {__pyx_t_18, __pyx_t_12, __pyx_t_13, __pyx_t_14, __pyx_t_15, __pyx_t_16, __pyx_t_17};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_19, 6+__pyx_t_19); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+ __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
+ __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) {
+ PyObject *__pyx_temp[7] = {__pyx_t_18, __pyx_t_12, __pyx_t_13, __pyx_t_14, __pyx_t_15, __pyx_t_16, __pyx_t_17};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_19, 6+__pyx_t_19); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+ __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
+ __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_20 = PyTuple_New(6+__pyx_t_19); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_20);
+ if (__pyx_t_18) {
+ __Pyx_GIVEREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_20, 0, __pyx_t_18); __pyx_t_18 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_12);
+ PyTuple_SET_ITEM(__pyx_t_20, 0+__pyx_t_19, __pyx_t_12);
+ __Pyx_GIVEREF(__pyx_t_13);
+ PyTuple_SET_ITEM(__pyx_t_20, 1+__pyx_t_19, __pyx_t_13);
+ __Pyx_GIVEREF(__pyx_t_14);
+ PyTuple_SET_ITEM(__pyx_t_20, 2+__pyx_t_19, __pyx_t_14);
+ __Pyx_GIVEREF(__pyx_t_15);
+ PyTuple_SET_ITEM(__pyx_t_20, 3+__pyx_t_19, __pyx_t_15);
+ __Pyx_GIVEREF(__pyx_t_16);
+ PyTuple_SET_ITEM(__pyx_t_20, 4+__pyx_t_19, __pyx_t_16);
+ __Pyx_GIVEREF(__pyx_t_17);
+ PyTuple_SET_ITEM(__pyx_t_20, 5+__pyx_t_19, __pyx_t_17);
+ __pyx_t_12 = 0;
+ __pyx_t_13 = 0;
+ __pyx_t_14 = 0;
+ __pyx_t_15 = 0;
+ __pyx_t_16 = 0;
+ __pyx_t_17 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_20, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "silx/math/combo.pyx":119
+ * @cython.boundscheck(False)
+ * @cython.wraparound(False)
+ * def _min_max(_number[::1] data, bint min_positive=False): # <<<<<<<<<<<<<<
+ * """:func:`min_max` implementation including infinite values
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_11);
+ __Pyx_XDECREF(__pyx_t_12);
+ __Pyx_XDECREF(__pyx_t_13);
+ __Pyx_XDECREF(__pyx_t_14);
+ __Pyx_XDECREF(__pyx_t_15);
+ __Pyx_XDECREF(__pyx_t_16);
+ __Pyx_XDECREF(__pyx_t_17);
+ __Pyx_XDECREF(__pyx_t_18);
+ __Pyx_XDECREF(__pyx_t_20);
+ __Pyx_AddTraceback("silx.math.combo._min_max", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __PYX_XDEC_MEMVIEW(&__pyx_v_data, 1);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "silx/math/combo.pyx":210
+ * @cython.boundscheck(False)
+ * @cython.wraparound(False)
+ * def _finite_min_max(cython.floating[::1] data, bint min_positive=False): # <<<<<<<<<<<<<<
+ * """:func:`min_max` implementation for floats skipping infinite values
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_4silx_4math_5combo_3_finite_min_max(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_4silx_4math_5combo_2_finite_min_max[] = "_finite_min_max(signatures, args, kwargs, defaults)\n:func:`min_max` implementation for floats skipping infinite values\n\n See :func:`min_max` for documentation.\n ";
+static PyMethodDef __pyx_mdef_4silx_4math_5combo_3_finite_min_max = {"_finite_min_max", (PyCFunction)__pyx_pw_4silx_4math_5combo_3_finite_min_max, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4silx_4math_5combo_2_finite_min_max};
+static PyObject *__pyx_pw_4silx_4math_5combo_3_finite_min_max(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_signatures = 0;
+ PyObject *__pyx_v_args = 0;
+ PyObject *__pyx_v_kwargs = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_defaults = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__pyx_fused_cpdef (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_signatures,&__pyx_n_s_args,&__pyx_n_s_kwargs,&__pyx_n_s_defaults,0};
+ PyObject* values[4] = {0,0,0,0};
+ values[1] = __pyx_k__21;
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_signatures)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ case 1:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_args);
+ if (value) { values[1] = value; kw_args--; }
+ }
+ case 2:
+ if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_kwargs)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 1, 4, 4, 2); __PYX_ERR(0, 210, __pyx_L3_error)
+ }
+ case 3:
+ if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_defaults)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 1, 4, 4, 3); __PYX_ERR(0, 210, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_fused_cpdef") < 0)) __PYX_ERR(0, 210, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ }
+ __pyx_v_signatures = values[0];
+ __pyx_v_args = values[1];
+ __pyx_v_kwargs = values[2];
+ __pyx_v_defaults = values[3];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 210, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("silx.math.combo.__pyx_fused_cpdef", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_4silx_4math_5combo_2_finite_min_max(__pyx_self, __pyx_v_signatures, __pyx_v_args, __pyx_v_kwargs, __pyx_v_defaults);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_4silx_4math_5combo_2_finite_min_max(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_signatures, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs, CYTHON_UNUSED PyObject *__pyx_v_defaults) {
+ PyObject *__pyx_v_dest_sig = NULL;
+ PyTypeObject *__pyx_v_ndarray = 0;
+ PyObject *__pyx_v_numpy = NULL;
+ __Pyx_memviewslice __pyx_v_memslice;
+ Py_ssize_t __pyx_v_itemsize;
+ CYTHON_UNUSED int __pyx_v_dtype_signed;
+ char __pyx_v_kind;
+ PyObject *__pyx_v_arg = NULL;
+ PyObject *__pyx_v_dtype = NULL;
+ PyObject *__pyx_v_arg_base = NULL;
+ PyObject *__pyx_v_candidates = NULL;
+ PyObject *__pyx_v_sig = NULL;
+ int __pyx_v_match_found;
+ PyObject *__pyx_v_src_type = NULL;
+ PyObject *__pyx_v_dst_type = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ int __pyx_t_2;
+ int __pyx_t_3;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ int __pyx_t_7;
+ PyObject *__pyx_t_8 = NULL;
+ PyObject *__pyx_t_9 = NULL;
+ Py_ssize_t __pyx_t_10;
+ long __pyx_t_11;
+ __Pyx_memviewslice __pyx_t_12;
+ Py_ssize_t __pyx_t_13;
+ int __pyx_t_14;
+ Py_ssize_t __pyx_t_15;
+ PyObject *(*__pyx_t_16)(PyObject *);
+ PyObject *__pyx_t_17 = NULL;
+ PyObject *__pyx_t_18 = NULL;
+ PyObject *__pyx_t_19 = NULL;
+ PyObject *(*__pyx_t_20)(PyObject *);
+ int __pyx_t_21;
+ __Pyx_RefNannySetupContext("_finite_min_max", 0);
+ __Pyx_INCREF(__pyx_v_kwargs);
+ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 210, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(Py_None);
+ __Pyx_GIVEREF(Py_None);
+ PyList_SET_ITEM(__pyx_t_1, 0, Py_None);
+ __pyx_v_dest_sig = ((PyObject*)__pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_2 = (__pyx_v_kwargs == Py_None);
+ __pyx_t_3 = (__pyx_t_2 != 0);
+ if (__pyx_t_3) {
+ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 210, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF_SET(__pyx_v_kwargs, __pyx_t_1);
+ __pyx_t_1 = 0;
+ }
+ {
+ __Pyx_PyThreadState_declare
+ __Pyx_PyThreadState_assign
+ __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
+ __Pyx_XGOTREF(__pyx_t_4);
+ __Pyx_XGOTREF(__pyx_t_5);
+ __Pyx_XGOTREF(__pyx_t_6);
+ /*try:*/ {
+ __pyx_t_1 = __Pyx_Import(__pyx_n_s_numpy, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 210, __pyx_L4_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_v_numpy = __pyx_t_1;
+ __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_numpy, __pyx_n_s_ndarray); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 210, __pyx_L4_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (!(likely(PyType_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "type", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 210, __pyx_L4_error)
+ __pyx_v_ndarray = ((PyTypeObject*)__pyx_t_1);
+ __pyx_t_1 = 0;
+ }
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ goto __pyx_L11_try_end;
+ __pyx_L4_error:;
+ __Pyx_PyThreadState_assign
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ImportError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError);
+ if (__pyx_t_7) {
+ __Pyx_AddTraceback("silx.math.combo.__pyx_fused_cpdef", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_8, &__pyx_t_9) < 0) __PYX_ERR(0, 210, __pyx_L6_except_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_INCREF(Py_None);
+ __Pyx_XDECREF_SET(__pyx_v_ndarray, ((PyTypeObject*)Py_None));
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ goto __pyx_L5_exception_handled;
+ }
+ goto __pyx_L6_except_error;
+ __pyx_L6_except_error:;
+ __Pyx_PyThreadState_assign
+ __Pyx_XGIVEREF(__pyx_t_4);
+ __Pyx_XGIVEREF(__pyx_t_5);
+ __Pyx_XGIVEREF(__pyx_t_6);
+ __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
+ goto __pyx_L1_error;
+ __pyx_L5_exception_handled:;
+ __Pyx_PyThreadState_assign
+ __Pyx_XGIVEREF(__pyx_t_4);
+ __Pyx_XGIVEREF(__pyx_t_5);
+ __Pyx_XGIVEREF(__pyx_t_6);
+ __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
+ __pyx_L11_try_end:;
+ }
+ __pyx_v_itemsize = -1L;
+ if (unlikely(__pyx_v_args == Py_None)) {
+ PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
+ __PYX_ERR(0, 210, __pyx_L1_error)
+ }
+ __pyx_t_10 = PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(0, 210, __pyx_L1_error)
+ __pyx_t_3 = ((0 < __pyx_t_10) != 0);
+ if (__pyx_t_3) {
+ if (unlikely(__pyx_v_args == Py_None)) {
+ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
+ __PYX_ERR(0, 210, __pyx_L1_error)
+ }
+ __pyx_t_9 = PyTuple_GET_ITEM(((PyObject*)__pyx_v_args), 0);
+ __Pyx_INCREF(__pyx_t_9);
+ __pyx_v_arg = __pyx_t_9;
+ __pyx_t_9 = 0;
+ goto __pyx_L14;
+ }
+ if (unlikely(__pyx_v_kwargs == Py_None)) {
+ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
+ __PYX_ERR(0, 210, __pyx_L1_error)
+ }
+ __pyx_t_3 = (__Pyx_PyDict_ContainsTF(__pyx_n_s_data, ((PyObject*)__pyx_v_kwargs), Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 210, __pyx_L1_error)
+ __pyx_t_2 = (__pyx_t_3 != 0);
+ if (__pyx_t_2) {
+ if (unlikely(__pyx_v_kwargs == Py_None)) {
+ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
+ __PYX_ERR(0, 210, __pyx_L1_error)
+ }
+ __pyx_t_9 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_kwargs), __pyx_n_s_data); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 210, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_v_arg = __pyx_t_9;
+ __pyx_t_9 = 0;
+ goto __pyx_L14;
+ }
+ /*else*/ {
+ if (unlikely(__pyx_v_args == Py_None)) {
+ PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
+ __PYX_ERR(0, 210, __pyx_L1_error)
+ }
+ __pyx_t_10 = PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(0, 210, __pyx_L1_error)
+ __pyx_t_9 = PyInt_FromSsize_t(__pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 210, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_8 = __Pyx_PyString_Format(__pyx_kp_s_Expected_at_least_d_arguments, __pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 210, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 210, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_GIVEREF(__pyx_t_8);
+ PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8);
+ __pyx_t_8 = 0;
+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_9, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 210, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_Raise(__pyx_t_8, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __PYX_ERR(0, 210, __pyx_L1_error)
+ }
+ __pyx_L14:;
+ while (1) {
+ __pyx_t_2 = (__pyx_v_ndarray != ((PyTypeObject*)Py_None));
+ __pyx_t_3 = (__pyx_t_2 != 0);
+ if (__pyx_t_3) {
+ __pyx_t_3 = __Pyx_TypeCheck(__pyx_v_arg, __pyx_v_ndarray);
+ __pyx_t_2 = (__pyx_t_3 != 0);
+ if (__pyx_t_2) {
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_dtype); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 210, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_v_dtype = __pyx_t_8;
+ __pyx_t_8 = 0;
+ goto __pyx_L18;
+ }
+ __pyx_t_2 = __pyx_memoryview_check(__pyx_v_arg);
+ __pyx_t_3 = (__pyx_t_2 != 0);
+ if (__pyx_t_3) {
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_base); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 210, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_v_arg_base = __pyx_t_8;
+ __pyx_t_8 = 0;
+ __pyx_t_3 = __Pyx_TypeCheck(__pyx_v_arg_base, __pyx_v_ndarray);
+ __pyx_t_2 = (__pyx_t_3 != 0);
+ if (__pyx_t_2) {
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg_base, __pyx_n_s_dtype); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 210, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_v_dtype = __pyx_t_8;
+ __pyx_t_8 = 0;
+ goto __pyx_L19;
+ }
+ /*else*/ {
+ __Pyx_INCREF(Py_None);
+ __pyx_v_dtype = Py_None;
+ }
+ __pyx_L19:;
+ goto __pyx_L18;
+ }
+ /*else*/ {
+ __Pyx_INCREF(Py_None);
+ __pyx_v_dtype = Py_None;
+ }
+ __pyx_L18:;
+ __pyx_v_itemsize = -1L;
+ __pyx_t_2 = (__pyx_v_dtype != Py_None);
+ __pyx_t_3 = (__pyx_t_2 != 0);
+ if (__pyx_t_3) {
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_itemsize); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 210, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 210, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_v_itemsize = __pyx_t_10;
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_kind); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 210, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_11 = __Pyx_PyObject_Ord(__pyx_t_8); if (unlikely(__pyx_t_11 == (long)(Py_UCS4)-1)) __PYX_ERR(0, 210, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_v_kind = __pyx_t_11;
+ __pyx_v_dtype_signed = (__pyx_v_kind == 'i');
+ switch (__pyx_v_kind) {
+ case 'i':
+ case 'u':
+ break;
+ case 'f':
+ __pyx_t_2 = (((sizeof(float)) == __pyx_v_itemsize) != 0);
+ if (__pyx_t_2) {
+ } else {
+ __pyx_t_3 = __pyx_t_2;
+ goto __pyx_L22_bool_binop_done;
+ }
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 210, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 210, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_2 = ((((Py_ssize_t)__pyx_t_10) == 1) != 0);
+ __pyx_t_3 = __pyx_t_2;
+ __pyx_L22_bool_binop_done:;
+ if (__pyx_t_3) {
+ if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_float, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 210, __pyx_L1_error)
+ goto __pyx_L16_break;
+ }
+ __pyx_t_2 = (((sizeof(double)) == __pyx_v_itemsize) != 0);
+ if (__pyx_t_2) {
+ } else {
+ __pyx_t_3 = __pyx_t_2;
+ goto __pyx_L25_bool_binop_done;
+ }
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 210, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 210, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_2 = ((((Py_ssize_t)__pyx_t_10) == 1) != 0);
+ __pyx_t_3 = __pyx_t_2;
+ __pyx_L25_bool_binop_done:;
+ if (__pyx_t_3) {
+ if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_double, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 210, __pyx_L1_error)
+ goto __pyx_L16_break;
+ }
+ break;
+ case 'c':
+ break;
+ case 'O':
+ break;
+ default: break;
+ }
+ }
+ }
+ __pyx_t_2 = ((__pyx_v_itemsize == -1L) != 0);
+ if (!__pyx_t_2) {
+ } else {
+ __pyx_t_3 = __pyx_t_2;
+ goto __pyx_L28_bool_binop_done;
+ }
+ __pyx_t_2 = ((__pyx_v_itemsize == (sizeof(float))) != 0);
+ __pyx_t_3 = __pyx_t_2;
+ __pyx_L28_bool_binop_done:;
+ if (__pyx_t_3) {
+ __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_dc_float(__pyx_v_arg);
+ __pyx_v_memslice = __pyx_t_12;
+ __pyx_t_3 = (__pyx_v_memslice.memview != 0);
+ if (__pyx_t_3) {
+ __PYX_XDEC_MEMVIEW((&__pyx_v_memslice), 1);
+ if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_float, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 210, __pyx_L1_error)
+ goto __pyx_L16_break;
+ }
+ /*else*/ {
+ PyErr_Clear();
+ }
+ }
+ __pyx_t_2 = ((__pyx_v_itemsize == -1L) != 0);
+ if (!__pyx_t_2) {
+ } else {
+ __pyx_t_3 = __pyx_t_2;
+ goto __pyx_L32_bool_binop_done;
+ }
+ __pyx_t_2 = ((__pyx_v_itemsize == (sizeof(double))) != 0);
+ __pyx_t_3 = __pyx_t_2;
+ __pyx_L32_bool_binop_done:;
+ if (__pyx_t_3) {
+ __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_dc_double(__pyx_v_arg);
+ __pyx_v_memslice = __pyx_t_12;
+ __pyx_t_3 = (__pyx_v_memslice.memview != 0);
+ if (__pyx_t_3) {
+ __PYX_XDEC_MEMVIEW((&__pyx_v_memslice), 1);
+ if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_double, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 210, __pyx_L1_error)
+ goto __pyx_L16_break;
+ }
+ /*else*/ {
+ PyErr_Clear();
+ }
+ }
+ if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, Py_None, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 210, __pyx_L1_error)
+ goto __pyx_L16_break;
+ }
+ __pyx_L16_break:;
+ __pyx_t_8 = PyList_New(0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 210, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_v_candidates = ((PyObject*)__pyx_t_8);
+ __pyx_t_8 = 0;
+ __pyx_t_10 = 0;
+ if (unlikely(__pyx_v_signatures == Py_None)) {
+ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
+ __PYX_ERR(0, 210, __pyx_L1_error)
+ }
+ __pyx_t_9 = __Pyx_dict_iterator(((PyObject*)__pyx_v_signatures), 1, ((PyObject *)NULL), (&__pyx_t_13), (&__pyx_t_7)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 210, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_XDECREF(__pyx_t_8);
+ __pyx_t_8 = __pyx_t_9;
+ __pyx_t_9 = 0;
+ while (1) {
+ __pyx_t_14 = __Pyx_dict_iter_next(__pyx_t_8, __pyx_t_13, &__pyx_t_10, &__pyx_t_9, NULL, NULL, __pyx_t_7);
+ if (unlikely(__pyx_t_14 == 0)) break;
+ if (unlikely(__pyx_t_14 == -1)) __PYX_ERR(0, 210, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_XDECREF_SET(__pyx_v_sig, __pyx_t_9);
+ __pyx_t_9 = 0;
+ __pyx_v_match_found = 0;
+ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_sig, __pyx_n_s_strip); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 210, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 210, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_split); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 210, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_tuple__23, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 210, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 210, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_1);
+ __Pyx_INCREF(__pyx_v_dest_sig);
+ __Pyx_GIVEREF(__pyx_v_dest_sig);
+ PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v_dest_sig);
+ __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 210, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
+ __pyx_t_9 = __pyx_t_1; __Pyx_INCREF(__pyx_t_9); __pyx_t_15 = 0;
+ __pyx_t_16 = NULL;
+ } else {
+ __pyx_t_15 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 210, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_16 = Py_TYPE(__pyx_t_9)->tp_iternext; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 210, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_16)) {
+ if (likely(PyList_CheckExact(__pyx_t_9))) {
+ if (__pyx_t_15 >= PyList_GET_SIZE(__pyx_t_9)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_1 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_15); __Pyx_INCREF(__pyx_t_1); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 210, __pyx_L1_error)
+ #else
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_9, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 210, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ #endif
+ } else {
+ if (__pyx_t_15 >= PyTuple_GET_SIZE(__pyx_t_9)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_9, __pyx_t_15); __Pyx_INCREF(__pyx_t_1); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 210, __pyx_L1_error)
+ #else
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_9, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 210, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ #endif
+ }
+ } else {
+ __pyx_t_1 = __pyx_t_16(__pyx_t_9);
+ if (unlikely(!__pyx_t_1)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 210, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ }
+ if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
+ PyObject* sequence = __pyx_t_1;
+ #if !CYTHON_COMPILING_IN_PYPY
+ 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_ERR(0, 210, __pyx_L1_error)
+ }
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ if (likely(PyTuple_CheckExact(sequence))) {
+ __pyx_t_17 = PyTuple_GET_ITEM(sequence, 0);
+ __pyx_t_18 = PyTuple_GET_ITEM(sequence, 1);
+ } else {
+ __pyx_t_17 = PyList_GET_ITEM(sequence, 0);
+ __pyx_t_18 = PyList_GET_ITEM(sequence, 1);
+ }
+ __Pyx_INCREF(__pyx_t_17);
+ __Pyx_INCREF(__pyx_t_18);
+ #else
+ __pyx_t_17 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 210, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_17);
+ __pyx_t_18 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 210, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_18);
+ #endif
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ } else {
+ Py_ssize_t index = -1;
+ __pyx_t_19 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 210, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_19);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_20 = Py_TYPE(__pyx_t_19)->tp_iternext;
+ index = 0; __pyx_t_17 = __pyx_t_20(__pyx_t_19); if (unlikely(!__pyx_t_17)) goto __pyx_L39_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_17);
+ index = 1; __pyx_t_18 = __pyx_t_20(__pyx_t_19); if (unlikely(!__pyx_t_18)) goto __pyx_L39_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_18);
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_20(__pyx_t_19), 2) < 0) __PYX_ERR(0, 210, __pyx_L1_error)
+ __pyx_t_20 = NULL;
+ __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
+ goto __pyx_L40_unpacking_done;
+ __pyx_L39_unpacking_failed:;
+ __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
+ __pyx_t_20 = NULL;
+ if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+ __PYX_ERR(0, 210, __pyx_L1_error)
+ __pyx_L40_unpacking_done:;
+ }
+ __Pyx_XDECREF_SET(__pyx_v_src_type, __pyx_t_17);
+ __pyx_t_17 = 0;
+ __Pyx_XDECREF_SET(__pyx_v_dst_type, __pyx_t_18);
+ __pyx_t_18 = 0;
+ __pyx_t_3 = (__pyx_v_dst_type != Py_None);
+ __pyx_t_2 = (__pyx_t_3 != 0);
+ if (__pyx_t_2) {
+ __pyx_t_1 = PyObject_RichCompare(__pyx_v_src_type, __pyx_v_dst_type, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 210, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 210, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (__pyx_t_2) {
+ __pyx_v_match_found = 1;
+ goto __pyx_L42;
+ }
+ /*else*/ {
+ __pyx_v_match_found = 0;
+ goto __pyx_L38_break;
+ }
+ __pyx_L42:;
+ }
+ }
+ __pyx_L38_break:;
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __pyx_t_2 = (__pyx_v_match_found != 0);
+ if (__pyx_t_2) {
+ __pyx_t_21 = __Pyx_PyList_Append(__pyx_v_candidates, __pyx_v_sig); if (unlikely(__pyx_t_21 == -1)) __PYX_ERR(0, 210, __pyx_L1_error)
+ }
+ }
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_2 = (__pyx_v_candidates != Py_None) && (PyList_GET_SIZE(__pyx_v_candidates) != 0);
+ __pyx_t_3 = ((!__pyx_t_2) != 0);
+ if (__pyx_t_3) {
+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__24, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 210, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_Raise(__pyx_t_8, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __PYX_ERR(0, 210, __pyx_L1_error)
+ }
+ __pyx_t_13 = PyList_GET_SIZE(__pyx_v_candidates); if (unlikely(__pyx_t_13 == -1)) __PYX_ERR(0, 210, __pyx_L1_error)
+ __pyx_t_3 = ((__pyx_t_13 > 1) != 0);
+ if (__pyx_t_3) {
+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__25, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 210, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_Raise(__pyx_t_8, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __PYX_ERR(0, 210, __pyx_L1_error)
+ }
+ /*else*/ {
+ __Pyx_XDECREF(__pyx_r);
+ if (unlikely(__pyx_v_signatures == Py_None)) {
+ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
+ __PYX_ERR(0, 210, __pyx_L1_error)
+ }
+ __pyx_t_8 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_signatures), PyList_GET_ITEM(__pyx_v_candidates, 0)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 210, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_r = __pyx_t_8;
+ __pyx_t_8 = 0;
+ goto __pyx_L0;
+ }
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_8);
+ __Pyx_XDECREF(__pyx_t_9);
+ __Pyx_XDECREF(__pyx_t_17);
+ __Pyx_XDECREF(__pyx_t_18);
+ __Pyx_XDECREF(__pyx_t_19);
+ __Pyx_AddTraceback("silx.math.combo.__pyx_fused_cpdef", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_dest_sig);
+ __Pyx_XDECREF(__pyx_v_ndarray);
+ __Pyx_XDECREF(__pyx_v_numpy);
+ __Pyx_XDECREF(__pyx_v_arg);
+ __Pyx_XDECREF(__pyx_v_dtype);
+ __Pyx_XDECREF(__pyx_v_arg_base);
+ __Pyx_XDECREF(__pyx_v_candidates);
+ __Pyx_XDECREF(__pyx_v_sig);
+ __Pyx_XDECREF(__pyx_v_src_type);
+ __Pyx_XDECREF(__pyx_v_dst_type);
+ __Pyx_XDECREF(__pyx_v_kwargs);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_4silx_4math_5combo_90__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ __Pyx_RefNannySetupContext("__defaults__", 0);
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyBool_FromLong(__Pyx_CyFunction_Defaults(__pyx_defaults26, __pyx_self)->__pyx_arg_min_positive); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 210, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 210, __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 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 210, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
+ __Pyx_INCREF(Py_None);
+ __Pyx_GIVEREF(Py_None);
+ PyTuple_SET_ITEM(__pyx_t_1, 1, Py_None);
+ __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_AddTraceback("silx.math.combo.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_fuse_0__pyx_pw_4silx_4math_5combo_33_finite_min_max(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_fuse_0__pyx_mdef_4silx_4math_5combo_33_finite_min_max = {"__pyx_fuse_0_finite_min_max", (PyCFunction)__pyx_fuse_0__pyx_pw_4silx_4math_5combo_33_finite_min_max, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4silx_4math_5combo_2_finite_min_max};
+static PyObject *__pyx_fuse_0__pyx_pw_4silx_4math_5combo_33_finite_min_max(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ __Pyx_memviewslice __pyx_v_data = { 0, 0, { 0 }, { 0 }, { 0 } };
+ int __pyx_v_min_positive;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_finite_min_max (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,&__pyx_n_s_min_positive_2,0};
+ PyObject* values[2] = {0,0};
+ __pyx_defaults26 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults26, __pyx_self);
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ case 1:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_min_positive_2);
+ if (value) { values[1] = value; kw_args--; }
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_finite_min_max") < 0)) __PYX_ERR(0, 210, __pyx_L3_error)
+ }
+ } else {
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ }
+ __pyx_v_data = __Pyx_PyObject_to_MemoryviewSlice_dc_float(values[0]); if (unlikely(!__pyx_v_data.memview)) __PYX_ERR(0, 210, __pyx_L3_error)
+ if (values[1]) {
+ __pyx_v_min_positive = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_min_positive == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 210, __pyx_L3_error)
+ } else {
+ __pyx_v_min_positive = __pyx_dynamic_args->__pyx_arg_min_positive;
+ }
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("_finite_min_max", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 210, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("silx.math.combo._finite_min_max", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_4silx_4math_5combo_32_finite_min_max(__pyx_self, __pyx_v_data, __pyx_v_min_positive);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_4silx_4math_5combo_32_finite_min_max(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_data, int __pyx_v_min_positive) {
+ float __pyx_v_value;
+ float __pyx_v_minimum;
+ float __pyx_v_maximum;
+ unsigned int __pyx_v_length;
+ unsigned int __pyx_v_index;
+ unsigned int __pyx_v_min_index;
+ unsigned int __pyx_v_min_pos_index;
+ unsigned int __pyx_v_max_index;
+ double __pyx_v_min_pos;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ Py_ssize_t __pyx_t_2;
+ int __pyx_t_3;
+ unsigned int __pyx_t_4;
+ unsigned int __pyx_t_5;
+ size_t __pyx_t_6;
+ size_t __pyx_t_7;
+ int __pyx_t_8;
+ PyObject *__pyx_t_9 = NULL;
+ PyObject *__pyx_t_10 = NULL;
+ PyObject *__pyx_t_11 = NULL;
+ PyObject *__pyx_t_12 = NULL;
+ PyObject *__pyx_t_13 = NULL;
+ PyObject *__pyx_t_14 = NULL;
+ PyObject *__pyx_t_15 = NULL;
+ PyObject *__pyx_t_16 = NULL;
+ int __pyx_t_17;
+ PyObject *__pyx_t_18 = NULL;
+ __Pyx_RefNannySetupContext("__pyx_fuse_0_finite_min_max", 0);
+
+ /* "silx/math/combo.pyx":218
+ * cython.floating value, minimum, minpos, maximum
+ * unsigned int length
+ * unsigned int index = 0 # <<<<<<<<<<<<<<
+ * unsigned int min_index = 0
+ * unsigned int min_pos_index = 0
+ */
+ __pyx_v_index = 0;
+
+ /* "silx/math/combo.pyx":219
+ * unsigned int length
+ * unsigned int index = 0
+ * unsigned int min_index = 0 # <<<<<<<<<<<<<<
+ * unsigned int min_pos_index = 0
+ * unsigned int max_index = 0
+ */
+ __pyx_v_min_index = 0;
+
+ /* "silx/math/combo.pyx":220
+ * unsigned int index = 0
+ * unsigned int min_index = 0
+ * unsigned int min_pos_index = 0 # <<<<<<<<<<<<<<
+ * unsigned int max_index = 0
+ *
+ */
+ __pyx_v_min_pos_index = 0;
+
+ /* "silx/math/combo.pyx":221
+ * unsigned int min_index = 0
+ * unsigned int min_pos_index = 0
+ * unsigned int max_index = 0 # <<<<<<<<<<<<<<
+ *
+ * length = len(data)
+ */
+ __pyx_v_max_index = 0;
+
+ /* "silx/math/combo.pyx":223
+ * unsigned int max_index = 0
+ *
+ * length = len(data) # <<<<<<<<<<<<<<
+ *
+ * if length == 0:
+ */
+ __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_data, 1, (PyObject *(*)(char *)) __pyx_memview_get_float, (int (*)(char *, PyObject *)) __pyx_memview_set_float, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 223, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 223, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_v_length = __pyx_t_2;
+
+ /* "silx/math/combo.pyx":225
+ * length = len(data)
+ *
+ * if length == 0: # <<<<<<<<<<<<<<
+ * raise ValueError('Zero-size array')
+ *
+ */
+ __pyx_t_3 = ((__pyx_v_length == 0) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":226
+ *
+ * if length == 0:
+ * raise ValueError('Zero-size array') # <<<<<<<<<<<<<<
+ *
+ * with nogil:
+ */
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__26, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 226, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __PYX_ERR(0, 226, __pyx_L1_error)
+
+ /* "silx/math/combo.pyx":225
+ * length = len(data)
+ *
+ * if length == 0: # <<<<<<<<<<<<<<
+ * raise ValueError('Zero-size array')
+ *
+ */
+ }
+
+ /* "silx/math/combo.pyx":228
+ * raise ValueError('Zero-size array')
+ *
+ * with nogil: # <<<<<<<<<<<<<<
+ * minimum = INFINITY
+ * maximum = -INFINITY
+ */
+ {
+ #ifdef WITH_THREAD
+ PyThreadState *_save;
+ Py_UNBLOCK_THREADS
+ #endif
+ /*try:*/ {
+
+ /* "silx/math/combo.pyx":229
+ *
+ * with nogil:
+ * minimum = INFINITY # <<<<<<<<<<<<<<
+ * maximum = -INFINITY
+ * min_pos = INFINITY
+ */
+ __pyx_v_minimum = __pyx_v_4silx_4math_5combo_INFINITY;
+
+ /* "silx/math/combo.pyx":230
+ * with nogil:
+ * minimum = INFINITY
+ * maximum = -INFINITY # <<<<<<<<<<<<<<
+ * min_pos = INFINITY
+ *
+ */
+ __pyx_v_maximum = (-__pyx_v_4silx_4math_5combo_INFINITY);
+
+ /* "silx/math/combo.pyx":231
+ * minimum = INFINITY
+ * maximum = -INFINITY
+ * min_pos = INFINITY # <<<<<<<<<<<<<<
+ *
+ * if not min_positive:
+ */
+ __pyx_v_min_pos = __pyx_v_4silx_4math_5combo_INFINITY;
+
+ /* "silx/math/combo.pyx":233
+ * min_pos = INFINITY
+ *
+ * if not min_positive: # <<<<<<<<<<<<<<
+ * for index in range(length):
+ * value = data[index]
+ */
+ __pyx_t_3 = ((!(__pyx_v_min_positive != 0)) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":234
+ *
+ * if not min_positive:
+ * for index in range(length): # <<<<<<<<<<<<<<
+ * value = data[index]
+ * if isfinite(value):
+ */
+ __pyx_t_4 = __pyx_v_length;
+ for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
+ __pyx_v_index = __pyx_t_5;
+
+ /* "silx/math/combo.pyx":235
+ * if not min_positive:
+ * for index in range(length):
+ * value = data[index] # <<<<<<<<<<<<<<
+ * if isfinite(value):
+ * if value > maximum:
+ */
+ __pyx_t_6 = __pyx_v_index;
+ __pyx_v_value = (*((float *) ( /* dim=0 */ ((char *) (((float *) __pyx_v_data.data) + __pyx_t_6)) )));
+
+ /* "silx/math/combo.pyx":236
+ * for index in range(length):
+ * value = data[index]
+ * if isfinite(value): # <<<<<<<<<<<<<<
+ * if value > maximum:
+ * maximum = value
+ */
+ __pyx_t_3 = (isfinite(__pyx_v_value) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":237
+ * value = data[index]
+ * if isfinite(value):
+ * if value > maximum: # <<<<<<<<<<<<<<
+ * maximum = value
+ * max_index = index
+ */
+ __pyx_t_3 = ((__pyx_v_value > __pyx_v_maximum) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":238
+ * if isfinite(value):
+ * if value > maximum:
+ * maximum = value # <<<<<<<<<<<<<<
+ * max_index = index
+ * if value < minimum:
+ */
+ __pyx_v_maximum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":239
+ * if value > maximum:
+ * maximum = value
+ * max_index = index # <<<<<<<<<<<<<<
+ * if value < minimum:
+ * minimum = value
+ */
+ __pyx_v_max_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":237
+ * value = data[index]
+ * if isfinite(value):
+ * if value > maximum: # <<<<<<<<<<<<<<
+ * maximum = value
+ * max_index = index
+ */
+ }
+
+ /* "silx/math/combo.pyx":240
+ * maximum = value
+ * max_index = index
+ * if value < minimum: # <<<<<<<<<<<<<<
+ * minimum = value
+ * min_index = index
+ */
+ __pyx_t_3 = ((__pyx_v_value < __pyx_v_minimum) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":241
+ * max_index = index
+ * if value < minimum:
+ * minimum = value # <<<<<<<<<<<<<<
+ * min_index = index
+ *
+ */
+ __pyx_v_minimum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":242
+ * if value < minimum:
+ * minimum = value
+ * min_index = index # <<<<<<<<<<<<<<
+ *
+ * else:
+ */
+ __pyx_v_min_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":240
+ * maximum = value
+ * max_index = index
+ * if value < minimum: # <<<<<<<<<<<<<<
+ * minimum = value
+ * min_index = index
+ */
+ }
+
+ /* "silx/math/combo.pyx":236
+ * for index in range(length):
+ * value = data[index]
+ * if isfinite(value): # <<<<<<<<<<<<<<
+ * if value > maximum:
+ * maximum = value
+ */
+ }
+ }
+
+ /* "silx/math/combo.pyx":233
+ * min_pos = INFINITY
+ *
+ * if not min_positive: # <<<<<<<<<<<<<<
+ * for index in range(length):
+ * value = data[index]
+ */
+ goto __pyx_L7;
+ }
+
+ /* "silx/math/combo.pyx":245
+ *
+ * else:
+ * for index in range(index, length): # <<<<<<<<<<<<<<
+ * value = data[index]
+ * if isfinite(value):
+ */
+ /*else*/ {
+ __pyx_t_4 = __pyx_v_length;
+ for (__pyx_t_5 = __pyx_v_index; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
+ __pyx_v_index = __pyx_t_5;
+
+ /* "silx/math/combo.pyx":246
+ * else:
+ * for index in range(index, length):
+ * value = data[index] # <<<<<<<<<<<<<<
+ * if isfinite(value):
+ * if value > maximum:
+ */
+ __pyx_t_7 = __pyx_v_index;
+ __pyx_v_value = (*((float *) ( /* dim=0 */ ((char *) (((float *) __pyx_v_data.data) + __pyx_t_7)) )));
+
+ /* "silx/math/combo.pyx":247
+ * for index in range(index, length):
+ * value = data[index]
+ * if isfinite(value): # <<<<<<<<<<<<<<
+ * if value > maximum:
+ * maximum = value
+ */
+ __pyx_t_3 = (isfinite(__pyx_v_value) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":248
+ * value = data[index]
+ * if isfinite(value):
+ * if value > maximum: # <<<<<<<<<<<<<<
+ * maximum = value
+ * max_index = index
+ */
+ __pyx_t_3 = ((__pyx_v_value > __pyx_v_maximum) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":249
+ * if isfinite(value):
+ * if value > maximum:
+ * maximum = value # <<<<<<<<<<<<<<
+ * max_index = index
+ * if value < minimum:
+ */
+ __pyx_v_maximum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":250
+ * if value > maximum:
+ * maximum = value
+ * max_index = index # <<<<<<<<<<<<<<
+ * if value < minimum:
+ * minimum = value
+ */
+ __pyx_v_max_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":248
+ * value = data[index]
+ * if isfinite(value):
+ * if value > maximum: # <<<<<<<<<<<<<<
+ * maximum = value
+ * max_index = index
+ */
+ }
+
+ /* "silx/math/combo.pyx":251
+ * maximum = value
+ * max_index = index
+ * if value < minimum: # <<<<<<<<<<<<<<
+ * minimum = value
+ * min_index = index
+ */
+ __pyx_t_3 = ((__pyx_v_value < __pyx_v_minimum) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":252
+ * max_index = index
+ * if value < minimum:
+ * minimum = value # <<<<<<<<<<<<<<
+ * min_index = index
+ *
+ */
+ __pyx_v_minimum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":253
+ * if value < minimum:
+ * minimum = value
+ * min_index = index # <<<<<<<<<<<<<<
+ *
+ * if 0. < value < min_pos:
+ */
+ __pyx_v_min_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":251
+ * maximum = value
+ * max_index = index
+ * if value < minimum: # <<<<<<<<<<<<<<
+ * minimum = value
+ * min_index = index
+ */
+ }
+
+ /* "silx/math/combo.pyx":255
+ * min_index = index
+ *
+ * if 0. < value < min_pos: # <<<<<<<<<<<<<<
+ * min_pos = value
+ * min_pos_index = index
+ */
+ __pyx_t_3 = (0. < __pyx_v_value);
+ if (__pyx_t_3) {
+ __pyx_t_3 = (__pyx_v_value < __pyx_v_min_pos);
+ }
+ __pyx_t_8 = (__pyx_t_3 != 0);
+ if (__pyx_t_8) {
+
+ /* "silx/math/combo.pyx":256
+ *
+ * if 0. < value < min_pos:
+ * min_pos = value # <<<<<<<<<<<<<<
+ * min_pos_index = index
+ *
+ */
+ __pyx_v_min_pos = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":257
+ * if 0. < value < min_pos:
+ * min_pos = value
+ * min_pos_index = index # <<<<<<<<<<<<<<
+ *
+ * return _MinMaxResult(minimum if isfinite(minimum) else None,
+ */
+ __pyx_v_min_pos_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":255
+ * min_index = index
+ *
+ * if 0. < value < min_pos: # <<<<<<<<<<<<<<
+ * min_pos = value
+ * min_pos_index = index
+ */
+ }
+
+ /* "silx/math/combo.pyx":247
+ * for index in range(index, length):
+ * value = data[index]
+ * if isfinite(value): # <<<<<<<<<<<<<<
+ * if value > maximum:
+ * maximum = value
+ */
+ }
+ }
+ }
+ __pyx_L7:;
+ }
+
+ /* "silx/math/combo.pyx":228
+ * raise ValueError('Zero-size array')
+ *
+ * with nogil: # <<<<<<<<<<<<<<
+ * minimum = INFINITY
+ * maximum = -INFINITY
+ */
+ /*finally:*/ {
+ /*normal exit:*/{
+ #ifdef WITH_THREAD
+ Py_BLOCK_THREADS
+ #endif
+ goto __pyx_L6;
+ }
+ __pyx_L6:;
+ }
+ }
+
+ /* "silx/math/combo.pyx":259
+ * min_pos_index = index
+ *
+ * return _MinMaxResult(minimum if isfinite(minimum) else None, # <<<<<<<<<<<<<<
+ * min_pos if isfinite(min_pos) else None,
+ * maximum if isfinite(maximum) else None,
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_MinMaxResult); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 259, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ if ((isfinite(__pyx_v_minimum) != 0)) {
+ __pyx_t_11 = PyFloat_FromDouble(__pyx_v_minimum); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 259, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __pyx_t_10 = __pyx_t_11;
+ __pyx_t_11 = 0;
+ } else {
+ __Pyx_INCREF(Py_None);
+ __pyx_t_10 = Py_None;
+ }
+
+ /* "silx/math/combo.pyx":260
+ *
+ * return _MinMaxResult(minimum if isfinite(minimum) else None,
+ * min_pos if isfinite(min_pos) else None, # <<<<<<<<<<<<<<
+ * maximum if isfinite(maximum) else None,
+ * min_index if isfinite(minimum) else None,
+ */
+ if ((isfinite(__pyx_v_min_pos) != 0)) {
+ __pyx_t_12 = PyFloat_FromDouble(__pyx_v_min_pos); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 260, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __pyx_t_11 = __pyx_t_12;
+ __pyx_t_12 = 0;
+ } else {
+ __Pyx_INCREF(Py_None);
+ __pyx_t_11 = Py_None;
+ }
+
+ /* "silx/math/combo.pyx":261
+ * return _MinMaxResult(minimum if isfinite(minimum) else None,
+ * min_pos if isfinite(min_pos) else None,
+ * maximum if isfinite(maximum) else None, # <<<<<<<<<<<<<<
+ * min_index if isfinite(minimum) else None,
+ * min_pos_index if isfinite(min_pos) else None,
+ */
+ if ((isfinite(__pyx_v_maximum) != 0)) {
+ __pyx_t_13 = PyFloat_FromDouble(__pyx_v_maximum); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 261, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_13);
+ __pyx_t_12 = __pyx_t_13;
+ __pyx_t_13 = 0;
+ } else {
+ __Pyx_INCREF(Py_None);
+ __pyx_t_12 = Py_None;
+ }
+
+ /* "silx/math/combo.pyx":262
+ * min_pos if isfinite(min_pos) else None,
+ * maximum if isfinite(maximum) else None,
+ * min_index if isfinite(minimum) else None, # <<<<<<<<<<<<<<
+ * min_pos_index if isfinite(min_pos) else None,
+ * max_index if isfinite(maximum) else None)
+ */
+ if ((isfinite(__pyx_v_minimum) != 0)) {
+ __pyx_t_14 = __Pyx_PyInt_From_unsigned_int(__pyx_v_min_index); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 262, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_14);
+ __pyx_t_13 = __pyx_t_14;
+ __pyx_t_14 = 0;
+ } else {
+ __Pyx_INCREF(Py_None);
+ __pyx_t_13 = Py_None;
+ }
+
+ /* "silx/math/combo.pyx":263
+ * maximum if isfinite(maximum) else None,
+ * min_index if isfinite(minimum) else None,
+ * min_pos_index if isfinite(min_pos) else None, # <<<<<<<<<<<<<<
+ * max_index if isfinite(maximum) else None)
+ *
+ */
+ if ((isfinite(__pyx_v_min_pos) != 0)) {
+ __pyx_t_15 = __Pyx_PyInt_From_unsigned_int(