summaryrefslogtreecommitdiff
path: root/silx/math/chistogramnd.c
diff options
context:
space:
mode:
Diffstat (limited to 'silx/math/chistogramnd.c')
-rw-r--r--silx/math/chistogramnd.c32408
1 files changed, 32408 insertions, 0 deletions
diff --git a/silx/math/chistogramnd.c b/silx/math/chistogramnd.c
new file mode 100644
index 0000000..ec40935
--- /dev/null
+++ b/silx/math/chistogramnd.c
@@ -0,0 +1,32408 @@
+/* Generated by Cython 0.25.2 */
+
+/* BEGIN: Cython Metadata
+{
+ "distutils": {
+ "depends": [
+ "/usr/lib/python2.7/dist-packages/numpy/core/include/numpy/arrayobject.h",
+ "/usr/lib/python2.7/dist-packages/numpy/core/include/numpy/ufuncobject.h",
+ "silx/math/histogramnd/include/histogramnd_c.h"
+ ],
+ "include_dirs": [
+ "silx/math/histogramnd/include",
+ "/usr/lib/python2.7/dist-packages/numpy/core/include"
+ ],
+ "language": "c"
+ },
+ "module_name": "silx.math.chistogramnd"
+}
+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__chistogramnd
+#define __PYX_HAVE_API__silx__math__chistogramnd
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include "numpy/arrayobject.h"
+#include "numpy/ufuncobject.h"
+#include "histogramnd_c.h"
+#include "pythread.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;
+
+/* Header.proto */
+#if !defined(CYTHON_CCOMPLEX)
+ #if defined(__cplusplus)
+ #define CYTHON_CCOMPLEX 1
+ #elif defined(_Complex_I)
+ #define CYTHON_CCOMPLEX 1
+ #else
+ #define CYTHON_CCOMPLEX 0
+ #endif
+#endif
+#if CYTHON_CCOMPLEX
+ #ifdef __cplusplus
+ #include <complex>
+ #else
+ #include <complex.h>
+ #endif
+#endif
+#if CYTHON_CCOMPLEX && !defined(__cplusplus) && defined(__sun__) && defined(__GNUC__)
+ #undef _Complex_I
+ #define _Complex_I 1.0fj
+#endif
+
+
+static const char *__pyx_f[] = {
+ "silx/math/chistogramnd.pyx",
+ "__init__.pxd",
+ "stringsource",
+ "type.pxd",
+};
+/* 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
+
+
+/* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":725
+ * # in Cython to enable them only on the right systems.
+ *
+ * ctypedef npy_int8 int8_t # <<<<<<<<<<<<<<
+ * ctypedef npy_int16 int16_t
+ * ctypedef npy_int32 int32_t
+ */
+typedef npy_int8 __pyx_t_5numpy_int8_t;
+
+/* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":726
+ *
+ * ctypedef npy_int8 int8_t
+ * ctypedef npy_int16 int16_t # <<<<<<<<<<<<<<
+ * ctypedef npy_int32 int32_t
+ * ctypedef npy_int64 int64_t
+ */
+typedef npy_int16 __pyx_t_5numpy_int16_t;
+
+/* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":727
+ * ctypedef npy_int8 int8_t
+ * ctypedef npy_int16 int16_t
+ * ctypedef npy_int32 int32_t # <<<<<<<<<<<<<<
+ * ctypedef npy_int64 int64_t
+ * #ctypedef npy_int96 int96_t
+ */
+typedef npy_int32 __pyx_t_5numpy_int32_t;
+
+/* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":728
+ * ctypedef npy_int16 int16_t
+ * ctypedef npy_int32 int32_t
+ * ctypedef npy_int64 int64_t # <<<<<<<<<<<<<<
+ * #ctypedef npy_int96 int96_t
+ * #ctypedef npy_int128 int128_t
+ */
+typedef npy_int64 __pyx_t_5numpy_int64_t;
+
+/* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":732
+ * #ctypedef npy_int128 int128_t
+ *
+ * ctypedef npy_uint8 uint8_t # <<<<<<<<<<<<<<
+ * ctypedef npy_uint16 uint16_t
+ * ctypedef npy_uint32 uint32_t
+ */
+typedef npy_uint8 __pyx_t_5numpy_uint8_t;
+
+/* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":733
+ *
+ * ctypedef npy_uint8 uint8_t
+ * ctypedef npy_uint16 uint16_t # <<<<<<<<<<<<<<
+ * ctypedef npy_uint32 uint32_t
+ * ctypedef npy_uint64 uint64_t
+ */
+typedef npy_uint16 __pyx_t_5numpy_uint16_t;
+
+/* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":734
+ * ctypedef npy_uint8 uint8_t
+ * ctypedef npy_uint16 uint16_t
+ * ctypedef npy_uint32 uint32_t # <<<<<<<<<<<<<<
+ * ctypedef npy_uint64 uint64_t
+ * #ctypedef npy_uint96 uint96_t
+ */
+typedef npy_uint32 __pyx_t_5numpy_uint32_t;
+
+/* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":735
+ * ctypedef npy_uint16 uint16_t
+ * ctypedef npy_uint32 uint32_t
+ * ctypedef npy_uint64 uint64_t # <<<<<<<<<<<<<<
+ * #ctypedef npy_uint96 uint96_t
+ * #ctypedef npy_uint128 uint128_t
+ */
+typedef npy_uint64 __pyx_t_5numpy_uint64_t;
+
+/* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":739
+ * #ctypedef npy_uint128 uint128_t
+ *
+ * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<<
+ * ctypedef npy_float64 float64_t
+ * #ctypedef npy_float80 float80_t
+ */
+typedef npy_float32 __pyx_t_5numpy_float32_t;
+
+/* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":740
+ *
+ * ctypedef npy_float32 float32_t
+ * ctypedef npy_float64 float64_t # <<<<<<<<<<<<<<
+ * #ctypedef npy_float80 float80_t
+ * #ctypedef npy_float128 float128_t
+ */
+typedef npy_float64 __pyx_t_5numpy_float64_t;
+
+/* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":749
+ * # The int types are mapped a bit surprising --
+ * # numpy.int corresponds to 'l' and numpy.long to 'q'
+ * ctypedef npy_long int_t # <<<<<<<<<<<<<<
+ * ctypedef npy_longlong long_t
+ * ctypedef npy_longlong longlong_t
+ */
+typedef npy_long __pyx_t_5numpy_int_t;
+
+/* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":750
+ * # numpy.int corresponds to 'l' and numpy.long to 'q'
+ * ctypedef npy_long int_t
+ * ctypedef npy_longlong long_t # <<<<<<<<<<<<<<
+ * ctypedef npy_longlong longlong_t
+ *
+ */
+typedef npy_longlong __pyx_t_5numpy_long_t;
+
+/* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":751
+ * ctypedef npy_long int_t
+ * ctypedef npy_longlong long_t
+ * ctypedef npy_longlong longlong_t # <<<<<<<<<<<<<<
+ *
+ * ctypedef npy_ulong uint_t
+ */
+typedef npy_longlong __pyx_t_5numpy_longlong_t;
+
+/* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":753
+ * ctypedef npy_longlong longlong_t
+ *
+ * ctypedef npy_ulong uint_t # <<<<<<<<<<<<<<
+ * ctypedef npy_ulonglong ulong_t
+ * ctypedef npy_ulonglong ulonglong_t
+ */
+typedef npy_ulong __pyx_t_5numpy_uint_t;
+
+/* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":754
+ *
+ * ctypedef npy_ulong uint_t
+ * ctypedef npy_ulonglong ulong_t # <<<<<<<<<<<<<<
+ * ctypedef npy_ulonglong ulonglong_t
+ *
+ */
+typedef npy_ulonglong __pyx_t_5numpy_ulong_t;
+
+/* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":755
+ * ctypedef npy_ulong uint_t
+ * ctypedef npy_ulonglong ulong_t
+ * ctypedef npy_ulonglong ulonglong_t # <<<<<<<<<<<<<<
+ *
+ * ctypedef npy_intp intp_t
+ */
+typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t;
+
+/* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":757
+ * ctypedef npy_ulonglong ulonglong_t
+ *
+ * ctypedef npy_intp intp_t # <<<<<<<<<<<<<<
+ * ctypedef npy_uintp uintp_t
+ *
+ */
+typedef npy_intp __pyx_t_5numpy_intp_t;
+
+/* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":758
+ *
+ * ctypedef npy_intp intp_t
+ * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<<
+ *
+ * ctypedef npy_double float_t
+ */
+typedef npy_uintp __pyx_t_5numpy_uintp_t;
+
+/* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":760
+ * ctypedef npy_uintp uintp_t
+ *
+ * ctypedef npy_double float_t # <<<<<<<<<<<<<<
+ * ctypedef npy_double double_t
+ * ctypedef npy_longdouble longdouble_t
+ */
+typedef npy_double __pyx_t_5numpy_float_t;
+
+/* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":761
+ *
+ * ctypedef npy_double float_t
+ * ctypedef npy_double double_t # <<<<<<<<<<<<<<
+ * ctypedef npy_longdouble longdouble_t
+ *
+ */
+typedef npy_double __pyx_t_5numpy_double_t;
+
+/* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":762
+ * ctypedef npy_double float_t
+ * ctypedef npy_double double_t
+ * ctypedef npy_longdouble longdouble_t # <<<<<<<<<<<<<<
+ *
+ * ctypedef npy_cfloat cfloat_t
+ */
+typedef npy_longdouble __pyx_t_5numpy_longdouble_t;
+/* Declarations.proto */
+#if CYTHON_CCOMPLEX
+ #ifdef __cplusplus
+ typedef ::std::complex< float > __pyx_t_float_complex;
+ #else
+ typedef float _Complex __pyx_t_float_complex;
+ #endif
+#else
+ typedef struct { float real, imag; } __pyx_t_float_complex;
+#endif
+static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float);
+
+/* Declarations.proto */
+#if CYTHON_CCOMPLEX
+ #ifdef __cplusplus
+ typedef ::std::complex< double > __pyx_t_double_complex;
+ #else
+ typedef double _Complex __pyx_t_double_complex;
+ #endif
+#else
+ typedef struct { double real, imag; } __pyx_t_double_complex;
+#endif
+static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double);
+
+
+/*--- Type declarations ---*/
+struct __pyx_obj_4silx_4math_12chistogramnd___pyx_scope_struct__chistogramnd;
+struct __pyx_array_obj;
+struct __pyx_MemviewEnum_obj;
+struct __pyx_memoryview_obj;
+struct __pyx_memoryviewslice_obj;
+
+/* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":764
+ * ctypedef npy_longdouble longdouble_t
+ *
+ * ctypedef npy_cfloat cfloat_t # <<<<<<<<<<<<<<
+ * ctypedef npy_cdouble cdouble_t
+ * ctypedef npy_clongdouble clongdouble_t
+ */
+typedef npy_cfloat __pyx_t_5numpy_cfloat_t;
+
+/* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":765
+ *
+ * ctypedef npy_cfloat cfloat_t
+ * ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<<
+ * ctypedef npy_clongdouble clongdouble_t
+ *
+ */
+typedef npy_cdouble __pyx_t_5numpy_cdouble_t;
+
+/* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":766
+ * ctypedef npy_cfloat cfloat_t
+ * ctypedef npy_cdouble cdouble_t
+ * ctypedef npy_clongdouble clongdouble_t # <<<<<<<<<<<<<<
+ *
+ * ctypedef npy_cdouble complex_t
+ */
+typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t;
+
+/* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":768
+ * ctypedef npy_clongdouble clongdouble_t
+ *
+ * ctypedef npy_cdouble complex_t # <<<<<<<<<<<<<<
+ *
+ * cdef inline object PyArray_MultiIterNew1(a):
+ */
+typedef npy_cdouble __pyx_t_5numpy_complex_t;
+
+/* "silx/math/chistogramnd.pyx":36
+ *
+ *
+ * def chistogramnd(sample, # <<<<<<<<<<<<<<
+ * histo_range,
+ * n_bins,
+ */
+struct __pyx_obj_4silx_4math_12chistogramnd___pyx_scope_struct__chistogramnd {
+ PyObject_HEAD
+ PyObject *__pyx_v_sample_type;
+ PyObject *__pyx_v_weights_type;
+};
+
+
+/* "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);
+
+/* None.proto */
+static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname);
+
+/* 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
+
+/* 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
+
+/* 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);
+
+/* GetModuleGlobalName.proto */
+static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name);
+
+/* PyObjectCallMethO.proto */
+#if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
+#endif
+
+/* PyObjectCallOneArg.proto */
+static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
+
+/* 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);
+
+/* 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
+
+/* 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
+
+/* PySequenceContains.proto */
+static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) {
+ int result = PySequence_Contains(seq, item);
+ return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
+}
+
+/* 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
+
+/* 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);
+
+/* 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);
+
+/* 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
+
+/* 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
+
+/* SliceObject.proto */
+static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(
+ PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop,
+ PyObject** py_start, PyObject** py_stop, PyObject** py_slice,
+ int has_cstart, int has_cstop, int wraparound);
+
+/* 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
+
+/* RaiseTooManyValuesToUnpack.proto */
+static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
+
+/* RaiseNeedMoreValuesToUnpack.proto */
+static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
+
+/* RaiseNoneIterError.proto */
+static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void);
+
+/* ExtTypeTest.proto */
+static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type);
+
+/* 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
+
+/* ArgTypeTest.proto */
+static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
+ const char *name, int exact);
+
+/* 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
+
+/* 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));
+
+/* 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
+
+/* Import.proto */
+static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);
+
+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
+
+/* 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);
+
+/* 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);
+
+/* CIntToPy.proto */
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
+
+/* CIntToPy.proto */
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_histo_opt_type(histo_opt_type value);
+
+/* RealImag.proto */
+#if CYTHON_CCOMPLEX
+ #ifdef __cplusplus
+ #define __Pyx_CREAL(z) ((z).real())
+ #define __Pyx_CIMAG(z) ((z).imag())
+ #else
+ #define __Pyx_CREAL(z) (__real__(z))
+ #define __Pyx_CIMAG(z) (__imag__(z))
+ #endif
+#else
+ #define __Pyx_CREAL(z) ((z).real)
+ #define __Pyx_CIMAG(z) ((z).imag)
+#endif
+#if defined(__cplusplus) && CYTHON_CCOMPLEX\
+ && (defined(_WIN32) || defined(__clang__) || (defined(__GNUC__) && (__GNUC__ >= 5 || __GNUC__ == 4 && __GNUC_MINOR__ >= 4 )) || __cplusplus >= 201103)
+ #define __Pyx_SET_CREAL(z,x) ((z).real(x))
+ #define __Pyx_SET_CIMAG(z,y) ((z).imag(y))
+#else
+ #define __Pyx_SET_CREAL(z,x) __Pyx_CREAL(z) = (x)
+ #define __Pyx_SET_CIMAG(z,y) __Pyx_CIMAG(z) = (y)
+#endif
+
+/* Arithmetic.proto */
+#if CYTHON_CCOMPLEX
+ #define __Pyx_c_eq_float(a, b) ((a)==(b))
+ #define __Pyx_c_sum_float(a, b) ((a)+(b))
+ #define __Pyx_c_diff_float(a, b) ((a)-(b))
+ #define __Pyx_c_prod_float(a, b) ((a)*(b))
+ #define __Pyx_c_quot_float(a, b) ((a)/(b))
+ #define __Pyx_c_neg_float(a) (-(a))
+ #ifdef __cplusplus
+ #define __Pyx_c_is_zero_float(z) ((z)==(float)0)
+ #define __Pyx_c_conj_float(z) (::std::conj(z))
+ #if 1
+ #define __Pyx_c_abs_float(z) (::std::abs(z))
+ #define __Pyx_c_pow_float(a, b) (::std::pow(a, b))
+ #endif
+ #else
+ #define __Pyx_c_is_zero_float(z) ((z)==0)
+ #define __Pyx_c_conj_float(z) (conjf(z))
+ #if 1
+ #define __Pyx_c_abs_float(z) (cabsf(z))
+ #define __Pyx_c_pow_float(a, b) (cpowf(a, b))
+ #endif
+ #endif
+#else
+ static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex, __pyx_t_float_complex);
+ static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex, __pyx_t_float_complex);
+ static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex, __pyx_t_float_complex);
+ static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex, __pyx_t_float_complex);
+ static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex, __pyx_t_float_complex);
+ static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex);
+ static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex);
+ static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex);
+ #if 1
+ static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex);
+ static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex, __pyx_t_float_complex);
+ #endif
+#endif
+
+/* Arithmetic.proto */
+#if CYTHON_CCOMPLEX
+ #define __Pyx_c_eq_double(a, b) ((a)==(b))
+ #define __Pyx_c_sum_double(a, b) ((a)+(b))
+ #define __Pyx_c_diff_double(a, b) ((a)-(b))
+ #define __Pyx_c_prod_double(a, b) ((a)*(b))
+ #define __Pyx_c_quot_double(a, b) ((a)/(b))
+ #define __Pyx_c_neg_double(a) (-(a))
+ #ifdef __cplusplus
+ #define __Pyx_c_is_zero_double(z) ((z)==(double)0)
+ #define __Pyx_c_conj_double(z) (::std::conj(z))
+ #if 1
+ #define __Pyx_c_abs_double(z) (::std::abs(z))
+ #define __Pyx_c_pow_double(a, b) (::std::pow(a, b))
+ #endif
+ #else
+ #define __Pyx_c_is_zero_double(z) ((z)==0)
+ #define __Pyx_c_conj_double(z) (conj(z))
+ #if 1
+ #define __Pyx_c_abs_double(z) (cabs(z))
+ #define __Pyx_c_pow_double(a, b) (cpow(a, b))
+ #endif
+ #endif
+#else
+ static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex, __pyx_t_double_complex);
+ static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex, __pyx_t_double_complex);
+ static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex, __pyx_t_double_complex);
+ static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex, __pyx_t_double_complex);
+ static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex, __pyx_t_double_complex);
+ static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex);
+ static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex);
+ static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex);
+ #if 1
+ static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex);
+ static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex, __pyx_t_double_complex);
+ #endif
+#endif
+
+/* CIntToPy.proto */
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);
+
+/* CIntToPy.proto */
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value);
+
+/* 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);
+
+/* CIntFromPy.proto */
+static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
+
+/* CIntFromPy.proto */
+static CYTHON_INLINE npy_int32 __Pyx_PyInt_As_npy_int32(PyObject *);
+
+/* CIntFromPy.proto */
+static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *);
+
+/* CIntFromPy.proto */
+static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
+
+/* 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_ds_double(PyObject *);
+
+/* ObjectToMemviewSlice.proto */
+static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_int(PyObject *);
+
+/* ObjectToMemviewSlice.proto */
+static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(PyObject *);
+
+/* ObjectToMemviewSlice.proto */
+static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_float(PyObject *);
+
+/* ObjectToMemviewSlice.proto */
+static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(PyObject *);
+
+/* CheckBinaryVersion.proto */
+static int __Pyx_check_binary_version(void);
+
+/* PyIdentifierFromString.proto */
+#if !defined(__Pyx_PyIdentifier_FromString)
+#if PY_MAJOR_VERSION < 3
+ #define __Pyx_PyIdentifier_FromString(s) PyString_FromString(s)
+#else
+ #define __Pyx_PyIdentifier_FromString(s) PyUnicode_FromString(s)
+#endif
+#endif
+
+/* ModuleImport.proto */
+static PyObject *__Pyx_ImportModule(const char *name);
+
+/* TypeImport.proto */
+static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, size_t size, int strict);
+
+/* InitStrings.proto */
+static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
+
+static 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 'cpython.buffer' */
+
+/* Module declarations from 'libc.string' */
+
+/* Module declarations from 'libc.stdio' */
+
+/* Module declarations from '__builtin__' */
+
+/* Module declarations from 'cpython.type' */
+static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0;
+
+/* Module declarations from 'cpython' */
+
+/* Module declarations from 'cpython.object' */
+
+/* Module declarations from 'cpython.ref' */
+
+/* Module declarations from 'libc.stdlib' */
+
+/* Module declarations from 'numpy' */
+
+/* Module declarations from 'numpy' */
+static PyTypeObject *__pyx_ptype_5numpy_dtype = 0;
+static PyTypeObject *__pyx_ptype_5numpy_flatiter = 0;
+static PyTypeObject *__pyx_ptype_5numpy_broadcast = 0;
+static PyTypeObject *__pyx_ptype_5numpy_ndarray = 0;
+static PyTypeObject *__pyx_ptype_5numpy_ufunc = 0;
+static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *, char *, char *, int *); /*proto*/
+
+/* Module declarations from 'cython.view' */
+
+/* Module declarations from 'cython' */
+
+/* Module declarations from 'silx.math.histogramnd_c' */
+
+/* Module declarations from 'silx.math.chistogramnd' */
+static PyTypeObject *__pyx_ptype_4silx_4math_12chistogramnd___pyx_scope_struct__chistogramnd = 0;
+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 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 int __pyx_f_4silx_4math_12chistogramnd__histogramnd_double_double_double(__Pyx_memviewslice, __Pyx_memviewslice, int, int, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, int, double, double); /*proto*/
+static int __pyx_f_4silx_4math_12chistogramnd__histogramnd_double_float_double(__Pyx_memviewslice, __Pyx_memviewslice, int, int, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, int, float, float); /*proto*/
+static int __pyx_f_4silx_4math_12chistogramnd__histogramnd_double_int32_t_double(__Pyx_memviewslice, __Pyx_memviewslice, int, int, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, int, __pyx_t_5numpy_int32_t, __pyx_t_5numpy_int32_t); /*proto*/
+static int __pyx_f_4silx_4math_12chistogramnd__histogramnd_float_double_double(__Pyx_memviewslice, __Pyx_memviewslice, int, int, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, int, double, double); /*proto*/
+static int __pyx_f_4silx_4math_12chistogramnd__histogramnd_float_float_double(__Pyx_memviewslice, __Pyx_memviewslice, int, int, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, int, float, float); /*proto*/
+static int __pyx_f_4silx_4math_12chistogramnd__histogramnd_float_int32_t_double(__Pyx_memviewslice, __Pyx_memviewslice, int, int, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, int, __pyx_t_5numpy_int32_t, __pyx_t_5numpy_int32_t); /*proto*/
+static int __pyx_f_4silx_4math_12chistogramnd__histogramnd_int32_t_double_double(__Pyx_memviewslice, __Pyx_memviewslice, int, int, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, int, double, double); /*proto*/
+static int __pyx_f_4silx_4math_12chistogramnd__histogramnd_int32_t_float_double(__Pyx_memviewslice, __Pyx_memviewslice, int, int, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, int, float, float); /*proto*/
+static int __pyx_f_4silx_4math_12chistogramnd__histogramnd_int32_t_int32_t_double(__Pyx_memviewslice, __Pyx_memviewslice, int, int, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, int, __pyx_t_5numpy_int32_t, __pyx_t_5numpy_int32_t); /*proto*/
+static int __pyx_f_4silx_4math_12chistogramnd__histogramnd_double_double_float(__Pyx_memviewslice, __Pyx_memviewslice, int, int, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, int, double, double); /*proto*/
+static int __pyx_f_4silx_4math_12chistogramnd__histogramnd_double_float_float(__Pyx_memviewslice, __Pyx_memviewslice, int, int, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, int, float, float); /*proto*/
+static int __pyx_f_4silx_4math_12chistogramnd__histogramnd_double_int32_t_float(__Pyx_memviewslice, __Pyx_memviewslice, int, int, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, int, __pyx_t_5numpy_int32_t, __pyx_t_5numpy_int32_t); /*proto*/
+static int __pyx_f_4silx_4math_12chistogramnd__histogramnd_float_double_float(__Pyx_memviewslice, __Pyx_memviewslice, int, int, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, int, double, double); /*proto*/
+static int __pyx_f_4silx_4math_12chistogramnd__histogramnd_float_float_float(__Pyx_memviewslice, __Pyx_memviewslice, int, int, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, int, float, float); /*proto*/
+static int __pyx_f_4silx_4math_12chistogramnd__histogramnd_float_int32_t_float(__Pyx_memviewslice, __Pyx_memviewslice, int, int, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, int, __pyx_t_5numpy_int32_t, __pyx_t_5numpy_int32_t); /*proto*/
+static int __pyx_f_4silx_4math_12chistogramnd__histogramnd_int32_t_double_float(__Pyx_memviewslice, __Pyx_memviewslice, int, int, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, int, double, double); /*proto*/
+static int __pyx_f_4silx_4math_12chistogramnd__histogramnd_int32_t_float_float(__Pyx_memviewslice, __Pyx_memviewslice, int, int, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, int, float, float); /*proto*/
+static int __pyx_f_4silx_4math_12chistogramnd__histogramnd_int32_t_int32_t_float(__Pyx_memviewslice, __Pyx_memviewslice, int, int, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, int, __pyx_t_5numpy_int32_t, __pyx_t_5numpy_int32_t); /*proto*/
+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_double = { "double", NULL, sizeof(double), { 0 }, 0, 'R', 0, 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_nn___pyx_t_5numpy_uint32_t = { "uint32_t", NULL, sizeof(__pyx_t_5numpy_uint32_t), { 0 }, 0, IS_UNSIGNED(__pyx_t_5numpy_uint32_t) ? 'U' : 'I', IS_UNSIGNED(__pyx_t_5numpy_uint32_t), 0 };
+static __Pyx_TypeInfo __Pyx_TypeInfo_float = { "float", NULL, sizeof(float), { 0 }, 0, 'R', 0, 0 };
+static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t = { "int32_t", NULL, sizeof(__pyx_t_5numpy_int32_t), { 0 }, 0, IS_UNSIGNED(__pyx_t_5numpy_int32_t) ? 'U' : 'I', IS_UNSIGNED(__pyx_t_5numpy_int32_t), 0 };
+#define __Pyx_MODULE_NAME "silx.math.chistogramnd"
+int __pyx_module_is_main_silx__math__chistogramnd = 0;
+
+/* Implementation of 'silx.math.chistogramnd' */
+static PyObject *__pyx_builtin_ValueError;
+static PyObject *__pyx_builtin_MemoryError;
+static PyObject *__pyx_builtin_range;
+static PyObject *__pyx_builtin_TypeError;
+static PyObject *__pyx_builtin_RuntimeError;
+static PyObject *__pyx_builtin_ImportError;
+static PyObject *__pyx_builtin_enumerate;
+static PyObject *__pyx_builtin_Ellipsis;
+static PyObject *__pyx_builtin_id;
+static PyObject *__pyx_builtin_IndexError;
+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_id[] = "id";
+static const char __pyx_k_np[] = "np";
+static const char __pyx_k_rc[] = "rc";
+static const char __pyx_k_MIT[] = "MIT";
+static const char __pyx_k_any[] = "any";
+static const char __pyx_k_inf[] = "inf";
+static const char __pyx_k_nan[] = "nan";
+static const char __pyx_k_obj[] = "obj";
+static const char __pyx_k_sum[] = "sum";
+static const char __pyx_k_base[] = "base";
+static const char __pyx_k_date[] = "__date__";
+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_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_tile[] = "tile";
+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_dtype[] = "dtype";
+static const char __pyx_k_edges[] = "edges";
+static const char __pyx_k_equal[] = "equal";
+static const char __pyx_k_error[] = "error";
+static const char __pyx_k_flags[] = "flags";
+static const char __pyx_k_histo[] = "histo";
+static const char __pyx_k_i_dim[] = "i_dim";
+static const char __pyx_k_int32[] = "int32";
+static const char __pyx_k_ndmin[] = "ndmin";
+static const char __pyx_k_numpy[] = "numpy";
+static const char __pyx_k_range[] = "range";
+static const char __pyx_k_shape[] = "shape";
+static const char __pyx_k_start[] = "start";
+static const char __pyx_k_zeros[] = "zeros";
+static const char __pyx_k_double[] = "double";
+static const char __pyx_k_encode[] = "encode";
+static const char __pyx_k_format[] = "format";
+static const char __pyx_k_import[] = "__import__";
+static const char __pyx_k_n_bins[] = "n_bins";
+static const char __pyx_k_n_dims[] = "n_dims";
+static const char __pyx_k_n_elem[] = "n_elem";
+static const char __pyx_k_name_2[] = "__name__";
+static const char __pyx_k_offset[] = "offset";
+static const char __pyx_k_sample[] = "sample";
+static const char __pyx_k_struct[] = "struct";
+static const char __pyx_k_uint32[] = "uint32";
+static const char __pyx_k_unpack[] = "unpack";
+static const char __pyx_k_authors[] = "__authors__";
+static const char __pyx_k_cumul_c[] = "cumul_c";
+static const char __pyx_k_float32[] = "float32";
+static const char __pyx_k_float64[] = "float64";
+static const char __pyx_k_fortran[] = "fortran";
+static const char __pyx_k_histo_c[] = "histo_c";
+static const char __pyx_k_license[] = "__license__";
+static const char __pyx_k_memview[] = "memview";
+static const char __pyx_k_reshape[] = "reshape";
+static const char __pyx_k_s_shape[] = "s_shape";
+static const char __pyx_k_w_shape[] = "w_shape";
+static const char __pyx_k_weights[] = "weights";
+static const char __pyx_k_D_Naudet[] = "D. Naudet";
+static const char __pyx_k_Ellipsis[] = "Ellipsis";
+static const char __pyx_k_itemsize[] = "itemsize";
+static const char __pyx_k_n_bins_c[] = "n_bins_c";
+static const char __pyx_k_sample_c[] = "sample_c";
+static const char __pyx_k_wh_dtype[] = "wh_dtype";
+static const char __pyx_k_TypeError[] = "TypeError";
+static const char __pyx_k_bin_edges[] = "bin_edges";
+static const char __pyx_k_enumerate[] = "enumerate";
+static const char __pyx_k_weights_c[] = "weights_c";
+static const char __pyx_k_02_10_2017[] = "02/10/2017";
+static const char __pyx_k_IndexError[] = "IndexError";
+static const char __pyx_k_ValueError[] = "ValueError";
+static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
+static const char __pyx_k_weight_max[] = "weight_max";
+static const char __pyx_k_weight_min[] = "weight_min";
+static const char __pyx_k_ImportError[] = "ImportError";
+static const char __pyx_k_MemoryError[] = "MemoryError";
+static const char __pyx_k_bin_edges_c[] = "bin_edges_c";
+static const char __pyx_k_histo_range[] = "histo_range";
+static const char __pyx_k_sample_type[] = "sample_type";
+static const char __pyx_k_C_CONTIGUOUS[] = "C_CONTIGUOUS";
+static const char __pyx_k_RuntimeError[] = "RuntimeError";
+static const char __pyx_k_chistogramnd[] = "chistogramnd";
+static const char __pyx_k_newbyteorder[] = "newbyteorder";
+static const char __pyx_k_option_flags[] = "option_flags";
+static const char __pyx_k_output_shape[] = "output_shape";
+static const char __pyx_k_weights_type[] = "weights_type";
+static const char __pyx_k_histo_range_c[] = "histo_range_c";
+static const char __pyx_k_i_histo_range[] = "i_histo_range";
+static const char __pyx_k_pyx_getbuffer[] = "__pyx_getbuffer";
+static const char __pyx_k_weighted_histo[] = "weighted_histo";
+static const char __pyx_k_allocate_buffer[] = "allocate_buffer";
+static const char __pyx_k_dtype_is_object[] = "dtype_is_object";
+static const char __pyx_k_err_histo_range[] = "err_histo_range";
+static const char __pyx_k_last_bin_closed[] = "last_bin_closed";
+static const char __pyx_k_ascontiguousarray[] = "ascontiguousarray";
+static const char __pyx_k_strided_and_direct[] = "<strided and direct>";
+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_raise_unsupported_type[] = "raise_unsupported_type";
+static const char __pyx_k_silx_math_chistogramnd[] = "silx.math.chistogramnd";
+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_Range_value_can_t_be_nan[] = "Range value can't be nan";
+static const char __pyx_k_Invalid_shape_in_axis_d_d[] = "Invalid shape in axis %d: %d.";
+static const char __pyx_k_itemsize_0_for_cython_array[] = "itemsize <= 0 for cython.array";
+static const char __pyx_k_ndarray_is_not_C_contiguous[] = "ndarray is not C contiguous";
+static const char __pyx_k_unable_to_allocate_array_data[] = "unable to allocate array data.";
+static const char __pyx_k_wh_dtype_type_not_supported_0[] = "<wh_dtype> type not supported : {0}.";
+static const char __pyx_k_strided_and_direct_or_indirect[] = "<strided and direct or indirect>";
+static const char __pyx_k_weights_must_be_an_array_whose[] = "<weights> must be an array whose length is equal to the number of samples.";
+static const char __pyx_k_Case_not_supported_sample_0_and[] = "Case not supported - sample:{0} and weights:{1}.";
+static const char __pyx_k_histo_must_be_a_C_CONTIGUOUS_nu[] = "<histo> must be a C_CONTIGUOUS numpy array.";
+static const char __pyx_k_histo_range_error_expected_n_di[] = "<histo_range> error : expected {n_dims} sets of lower and upper bin edges, got the following instead : {histo_range}. (provided <sample> contains {n_dims}D values)";
+static const char __pyx_k_histogramnd_returned_an_error_0[] = "histogramnd returned an error : {0}";
+static const char __pyx_k_n_bins_only_positive_values_all[] = "<n_bins> : only positive values allowed.";
+static const char __pyx_k_numpy_core_multiarray_failed_to[] = "numpy.core.multiarray failed to import";
+static const char __pyx_k_unknown_dtype_code_in_numpy_pxd[] = "unknown dtype code in numpy.pxd (%d)";
+static const char __pyx_k_users_kieffer_workspace_400_rel[] = "/users/kieffer/workspace-400/release/silx/silx/math/chistogramnd.pyx";
+static const char __pyx_k_weighted_histo_must_be_a_C_CONT[] = "<weighted_histo> must be a C_CONTIGUOUS numpy array.";
+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_Format_string_allocated_too_shor[] = "Format string allocated too short, see comment in numpy.pxd";
+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_Non_native_byte_order_not_suppor[] = "Non-native byte order not supported";
+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_Provided_histo_array_doesn_t_hav[] = "Provided <histo> array doesn't have a shape compatible with <n_bins> : should be {0} instead of {1}.";
+static const char __pyx_k_Provided_weighted_histo_array_do[] = "Provided <weighted_histo> array doesn't have a shape compatible with <n_bins> : should be {0} instead of {1}.";
+static const char __pyx_k_Range_parameter_should_be_finite[] = "Range parameter should be finite value";
+static const char __pyx_k_Unable_to_convert_item_to_object[] = "Unable to convert item to object";
+static const char __pyx_k_chistogramnd_locals_raise_unsupp[] = "chistogramnd.<locals>.raise_unsupported_type";
+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_histogramnd_failed_to_allocate_m[] = "histogramnd failed to allocate memory.";
+static const char __pyx_k_n_bins_must_be_either_a_scalar_s[] = "n_bins must be either a scalar (same number of bins for all dimensions) or an array (number of bins for each dimension).";
+static const char __pyx_k_ndarray_is_not_Fortran_contiguou[] = "ndarray is not Fortran contiguous";
+static const char __pyx_k_numpy_core_umath_failed_to_impor[] = "numpy.core.umath failed to import";
+static const char __pyx_k_unable_to_allocate_shape_and_str[] = "unable to allocate shape and strides.";
+static const char __pyx_k_Format_string_allocated_too_shor_2[] = "Format string allocated too short.";
+static const char __pyx_k_Provided_histo_array_doesn_t_hav_2[] = "Provided <histo> array doesn't have the expected type : should be {0} instead of {1}.";
+static const char __pyx_k_Provided_weighted_histo_array_do_2[] = "Provided <weighted_histo> array doesn't have the expected type : should be {0} or {1} instead of {2}.";
+static PyObject *__pyx_kp_s_02_10_2017;
+static PyObject *__pyx_n_s_ASCII;
+static PyObject *__pyx_kp_s_Buffer_view_does_not_expose_stri;
+static PyObject *__pyx_n_s_C_CONTIGUOUS;
+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_kp_s_Case_not_supported_sample_0_and;
+static PyObject *__pyx_kp_s_D_Naudet;
+static PyObject *__pyx_n_s_Ellipsis;
+static PyObject *__pyx_kp_s_Empty_shape_tuple_for_cython_arr;
+static PyObject *__pyx_kp_u_Format_string_allocated_too_shor;
+static PyObject *__pyx_kp_u_Format_string_allocated_too_shor_2;
+static PyObject *__pyx_n_s_ImportError;
+static PyObject *__pyx_n_s_IndexError;
+static PyObject *__pyx_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_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_N;
+static PyObject *__pyx_kp_u_Non_native_byte_order_not_suppor;
+static PyObject *__pyx_n_b_O;
+static PyObject *__pyx_kp_s_Out_of_bounds_on_buffer_access_a;
+static PyObject *__pyx_kp_s_Provided_histo_array_doesn_t_hav;
+static PyObject *__pyx_kp_s_Provided_histo_array_doesn_t_hav_2;
+static PyObject *__pyx_kp_s_Provided_weighted_histo_array_do;
+static PyObject *__pyx_kp_s_Provided_weighted_histo_array_do_2;
+static PyObject *__pyx_kp_s_Range_parameter_should_be_finite;
+static PyObject *__pyx_kp_s_Range_value_can_t_be_nan;
+static PyObject *__pyx_n_s_RuntimeError;
+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_n_s_allocate_buffer;
+static PyObject *__pyx_n_s_any;
+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_bin_edges;
+static PyObject *__pyx_n_s_bin_edges_c;
+static PyObject *__pyx_n_s_c;
+static PyObject *__pyx_n_u_c;
+static PyObject *__pyx_n_s_chistogramnd;
+static PyObject *__pyx_n_s_chistogramnd_locals_raise_unsupp;
+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_cumul_c;
+static PyObject *__pyx_n_s_date;
+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_edges;
+static PyObject *__pyx_n_s_encode;
+static PyObject *__pyx_n_s_enumerate;
+static PyObject *__pyx_n_s_equal;
+static PyObject *__pyx_n_s_err_histo_range;
+static PyObject *__pyx_n_s_error;
+static PyObject *__pyx_n_s_flags;
+static PyObject *__pyx_n_s_float32;
+static PyObject *__pyx_n_s_float64;
+static PyObject *__pyx_n_s_format;
+static PyObject *__pyx_n_s_fortran;
+static PyObject *__pyx_n_u_fortran;
+static PyObject *__pyx_kp_s_got_differing_extents_in_dimensi;
+static PyObject *__pyx_n_s_histo;
+static PyObject *__pyx_n_s_histo_c;
+static PyObject *__pyx_kp_s_histo_must_be_a_C_CONTIGUOUS_nu;
+static PyObject *__pyx_n_s_histo_range;
+static PyObject *__pyx_n_s_histo_range_c;
+static PyObject *__pyx_kp_s_histo_range_error_expected_n_di;
+static PyObject *__pyx_kp_s_histogramnd_failed_to_allocate_m;
+static PyObject *__pyx_kp_s_histogramnd_returned_an_error_0;
+static PyObject *__pyx_n_s_i_dim;
+static PyObject *__pyx_n_s_i_histo_range;
+static PyObject *__pyx_n_s_id;
+static PyObject *__pyx_n_s_import;
+static PyObject *__pyx_n_s_inf;
+static PyObject *__pyx_n_s_int32;
+static PyObject *__pyx_n_s_itemsize;
+static PyObject *__pyx_kp_s_itemsize_0_for_cython_array;
+static PyObject *__pyx_n_s_last_bin_closed;
+static PyObject *__pyx_n_s_license;
+static PyObject *__pyx_n_s_main;
+static PyObject *__pyx_n_s_memview;
+static PyObject *__pyx_n_s_mode;
+static PyObject *__pyx_n_s_n_bins;
+static PyObject *__pyx_n_s_n_bins_c;
+static PyObject *__pyx_kp_s_n_bins_must_be_either_a_scalar_s;
+static PyObject *__pyx_kp_s_n_bins_only_positive_values_all;
+static PyObject *__pyx_n_s_n_dims;
+static PyObject *__pyx_n_s_n_elem;
+static PyObject *__pyx_n_s_name;
+static PyObject *__pyx_n_s_name_2;
+static PyObject *__pyx_n_s_nan;
+static PyObject *__pyx_kp_u_ndarray_is_not_C_contiguous;
+static PyObject *__pyx_kp_u_ndarray_is_not_Fortran_contiguou;
+static PyObject *__pyx_n_s_ndim;
+static PyObject *__pyx_n_s_ndmin;
+static PyObject *__pyx_n_s_newbyteorder;
+static PyObject *__pyx_n_s_np;
+static PyObject *__pyx_n_s_numpy;
+static PyObject *__pyx_kp_s_numpy_core_multiarray_failed_to;
+static PyObject *__pyx_kp_s_numpy_core_umath_failed_to_impor;
+static PyObject *__pyx_n_s_obj;
+static PyObject *__pyx_n_s_offset;
+static PyObject *__pyx_n_s_option_flags;
+static PyObject *__pyx_n_s_output_shape;
+static PyObject *__pyx_n_s_pack;
+static PyObject *__pyx_n_s_pyx_getbuffer;
+static PyObject *__pyx_n_s_pyx_vtable;
+static PyObject *__pyx_n_s_raise_unsupported_type;
+static PyObject *__pyx_n_s_range;
+static PyObject *__pyx_n_s_rc;
+static PyObject *__pyx_n_s_reshape;
+static PyObject *__pyx_n_s_s_shape;
+static PyObject *__pyx_n_s_sample;
+static PyObject *__pyx_n_s_sample_c;
+static PyObject *__pyx_n_s_sample_type;
+static PyObject *__pyx_n_s_shape;
+static PyObject *__pyx_n_s_silx_math_chistogramnd;
+static PyObject *__pyx_n_s_size;
+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_struct;
+static PyObject *__pyx_n_s_sum;
+static PyObject *__pyx_n_s_test;
+static PyObject *__pyx_n_s_tile;
+static PyObject *__pyx_n_s_uint32;
+static PyObject *__pyx_kp_s_unable_to_allocate_array_data;
+static PyObject *__pyx_kp_s_unable_to_allocate_shape_and_str;
+static PyObject *__pyx_kp_u_unknown_dtype_code_in_numpy_pxd;
+static PyObject *__pyx_n_s_unpack;
+static PyObject *__pyx_kp_s_users_kieffer_workspace_400_rel;
+static PyObject *__pyx_n_s_w_shape;
+static PyObject *__pyx_n_s_weight_max;
+static PyObject *__pyx_n_s_weight_min;
+static PyObject *__pyx_n_s_weighted_histo;
+static PyObject *__pyx_kp_s_weighted_histo_must_be_a_C_CONT;
+static PyObject *__pyx_n_s_weights;
+static PyObject *__pyx_n_s_weights_c;
+static PyObject *__pyx_kp_s_weights_must_be_an_array_whose;
+static PyObject *__pyx_n_s_weights_type;
+static PyObject *__pyx_n_s_wh_dtype;
+static PyObject *__pyx_kp_s_wh_dtype_type_not_supported_0;
+static PyObject *__pyx_n_s_zeros;
+static PyObject *__pyx_pf_4silx_4math_12chistogramnd_12chistogramnd_raise_unsupported_type(PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_4silx_4math_12chistogramnd_chistogramnd(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_sample, PyObject *__pyx_v_histo_range, PyObject *__pyx_v_n_bins, PyObject *__pyx_v_weights, PyObject *__pyx_v_weight_min, PyObject *__pyx_v_weight_max, PyObject *__pyx_v_last_bin_closed, PyObject *__pyx_v_histo, PyObject *__pyx_v_weighted_histo, PyObject *__pyx_v_wh_dtype); /* proto */
+static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */
+static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info); /* proto */
+static 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_4silx_4math_12chistogramnd___pyx_scope_struct__chistogramnd(PyTypeObject *t, PyObject *a, PyObject *k); /*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_2;
+static PyObject *__pyx_int_neg_1;
+static PyObject *__pyx_tuple_;
+static PyObject *__pyx_tuple__2;
+static PyObject *__pyx_tuple__3;
+static PyObject *__pyx_tuple__4;
+static PyObject *__pyx_tuple__5;
+static PyObject *__pyx_tuple__6;
+static PyObject *__pyx_tuple__7;
+static PyObject *__pyx_tuple__8;
+static PyObject *__pyx_tuple__9;
+static PyObject *__pyx_slice__33;
+static PyObject *__pyx_slice__34;
+static PyObject *__pyx_slice__35;
+static PyObject *__pyx_tuple__10;
+static PyObject *__pyx_tuple__12;
+static PyObject *__pyx_tuple__13;
+static PyObject *__pyx_tuple__14;
+static PyObject *__pyx_tuple__15;
+static PyObject *__pyx_tuple__16;
+static PyObject *__pyx_tuple__17;
+static PyObject *__pyx_tuple__18;
+static PyObject *__pyx_tuple__19;
+static PyObject *__pyx_tuple__20;
+static PyObject *__pyx_tuple__21;
+static PyObject *__pyx_tuple__22;
+static PyObject *__pyx_tuple__23;
+static PyObject *__pyx_tuple__24;
+static PyObject *__pyx_tuple__25;
+static PyObject *__pyx_tuple__26;
+static PyObject *__pyx_tuple__27;
+static PyObject *__pyx_tuple__28;
+static PyObject *__pyx_tuple__29;
+static PyObject *__pyx_tuple__30;
+static PyObject *__pyx_tuple__31;
+static PyObject *__pyx_tuple__32;
+static PyObject *__pyx_tuple__36;
+static PyObject *__pyx_tuple__37;
+static PyObject *__pyx_tuple__39;
+static PyObject *__pyx_tuple__40;
+static PyObject *__pyx_tuple__41;
+static PyObject *__pyx_tuple__42;
+static PyObject *__pyx_tuple__43;
+static PyObject *__pyx_codeobj__11;
+static PyObject *__pyx_codeobj__38;
+
+/* "silx/math/chistogramnd.pyx":36
+ *
+ *
+ * def chistogramnd(sample, # <<<<<<<<<<<<<<
+ * histo_range,
+ * n_bins,
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_4silx_4math_12chistogramnd_1chistogramnd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_4silx_4math_12chistogramnd_chistogramnd[] = "chistogramnd(sample, histo_range, n_bins, weights=None, weight_min=None, weight_max=None, last_bin_closed=False, histo=None, weighted_histo=None, wh_dtype=None)\nComputes the multidimensional histogram of some data.\n\n :param sample:\n The data to be histogrammed.\n Its shape must be either\n (N,) if it contains one dimensional coordinates,\n or an (N,D) array where the rows are the\n coordinates of points in a D dimensional space.\n The following dtypes are supported : :class:`numpy.float64`,\n :class:`numpy.float32`, :class:`numpy.int32`.\n\n .. warning:: if sample is not a C_CONTIGUOUS ndarray (e.g : a non\n contiguous slice) then histogramnd will have to do make an internal\n copy.\n :type sample: :class:`numpy.array`\n\n :param histo_range:\n A (N, 2) array containing the histogram range along each dimension,\n where N is the sample's number of dimensions.\n :type histo_range: array_like\n\n :param n_bins:\n The number of bins :\n * a scalar (same number of bins for all dimensions)\n * a D elements array (number of bins for each dimensions)\n :type n_bins: scalar or array_like\n\n :param weights:\n A N elements numpy array of values associated with\n each sample.\n The values of the *weighted_histo* array\n returned by the function are equal to the sum of\n the weights associated with the samples falling\n into each bin.\n The following dtypes are supported : :class:`numpy.float64`,\n :class:`numpy.float32`, :class:`numpy.int32`.\n\n .. note:: If None, the weighted histogram returned will be None.\n :type weights: *optional*, :class:`numpy.array`\n\n :param weight_min:\n Use this parameter to filter out all samples whose\n weights are lower than this value.\n\n .. note:: This value will be cast to the same type\n as *weig""hts*.\n :type weight_min: *optional*, scalar\n\n :param weight_max:\n Use this parameter to filter out all samples whose\n weights are higher than this value.\n\n .. note:: This value will be cast to the same type\n as *weights*.\n\n :type weight_max: *optional*, scalar\n\n :param last_bin_closed:\n By default the last bin is half\n open (i.e.: [x,y) ; x included, y\n excluded), like all the other bins.\n Set this parameter to true if you want\n the LAST bin to be closed.\n :type last_bin_closed: *optional*, :class:`python.boolean`\n\n :param histo:\n Use this parameter if you want to pass your\n own histogram array instead of the one\n created by this function. New values\n will be added to this array. The returned array\n will then be this one (same reference).\n\n .. warning:: If the histo array was created by a previous\n call to histogramnd then the user is\n responsible for providing the same parameters\n (*n_bins*, *histo_range*, ...).\n :type histo: *optional*, :class:`numpy.array`\n\n :param weighted_histo:\n Use this parameter if you want to pass your\n own weighted histogram array instead of\n the created by this function. New\n values will be added to this array. The returned array\n will then be this one (same reference).\n\n .. warning:: If the weighted_histo array was created by a previous\n call to histogramnd then the user is\n responsible for providing the same parameters\n (*n_bins*, *histo_range*, ...).\n\n .. warning:: if weighted_histo is not a C_CONTIGUOUS ndarray (e.g : a\n non contiguous slice) then histogramnd will have to do make an\n internal copy.\n :type weighted_histo: *optional*, :class:`numpy.array`\n\n :param wh_dtype: type of the weighted histogram array. This ""parameter is\n ignored if *weighted_histo* is provided. If not provided, the\n weighted histogram array will contain values of the same type as\n *weights*. Allowed values are : `numpu.double` and `numpy.float32`.\n :type wh_dtype: *optional*, numpy data type\n\n :return: Histogram (bin counts, always returned), weighted histogram of\n the sample (or *None* if weights is *None*) and bin edges for each\n dimension.\n :rtype: *tuple* (:class:`numpy.array`, :class:`numpy.array`, `tuple`) or\n (:class:`numpy.array`, None, `tuple`)\n ";
+static PyMethodDef __pyx_mdef_4silx_4math_12chistogramnd_1chistogramnd = {"chistogramnd", (PyCFunction)__pyx_pw_4silx_4math_12chistogramnd_1chistogramnd, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4silx_4math_12chistogramnd_chistogramnd};
+static PyObject *__pyx_pw_4silx_4math_12chistogramnd_1chistogramnd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_sample = 0;
+ PyObject *__pyx_v_histo_range = 0;
+ PyObject *__pyx_v_n_bins = 0;
+ PyObject *__pyx_v_weights = 0;
+ PyObject *__pyx_v_weight_min = 0;
+ PyObject *__pyx_v_weight_max = 0;
+ PyObject *__pyx_v_last_bin_closed = 0;
+ PyObject *__pyx_v_histo = 0;
+ PyObject *__pyx_v_weighted_histo = 0;
+ PyObject *__pyx_v_wh_dtype = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("chistogramnd (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sample,&__pyx_n_s_histo_range,&__pyx_n_s_n_bins,&__pyx_n_s_weights,&__pyx_n_s_weight_min,&__pyx_n_s_weight_max,&__pyx_n_s_last_bin_closed,&__pyx_n_s_histo,&__pyx_n_s_weighted_histo,&__pyx_n_s_wh_dtype,0};
+ PyObject* values[10] = {0,0,0,0,0,0,0,0,0,0};
+
+ /* "silx/math/chistogramnd.pyx":39
+ * histo_range,
+ * n_bins,
+ * weights=None, # <<<<<<<<<<<<<<
+ * weight_min=None,
+ * weight_max=None,
+ */
+ values[3] = ((PyObject *)Py_None);
+
+ /* "silx/math/chistogramnd.pyx":40
+ * n_bins,
+ * weights=None,
+ * weight_min=None, # <<<<<<<<<<<<<<
+ * weight_max=None,
+ * last_bin_closed=False,
+ */
+ values[4] = ((PyObject *)Py_None);
+
+ /* "silx/math/chistogramnd.pyx":41
+ * weights=None,
+ * weight_min=None,
+ * weight_max=None, # <<<<<<<<<<<<<<
+ * last_bin_closed=False,
+ * histo=None,
+ */
+ values[5] = ((PyObject *)Py_None);
+
+ /* "silx/math/chistogramnd.pyx":42
+ * weight_min=None,
+ * weight_max=None,
+ * last_bin_closed=False, # <<<<<<<<<<<<<<
+ * histo=None,
+ * weighted_histo=None,
+ */
+ values[6] = ((PyObject *)Py_False);
+
+ /* "silx/math/chistogramnd.pyx":43
+ * weight_max=None,
+ * last_bin_closed=False,
+ * histo=None, # <<<<<<<<<<<<<<
+ * weighted_histo=None,
+ * wh_dtype=None):
+ */
+ values[7] = ((PyObject *)Py_None);
+
+ /* "silx/math/chistogramnd.pyx":44
+ * last_bin_closed=False,
+ * histo=None,
+ * weighted_histo=None, # <<<<<<<<<<<<<<
+ * wh_dtype=None):
+ * """Computes the multidimensional histogram of some data.
+ */
+ values[8] = ((PyObject *)Py_None);
+
+ /* "silx/math/chistogramnd.pyx":45
+ * histo=None,
+ * weighted_histo=None,
+ * wh_dtype=None): # <<<<<<<<<<<<<<
+ * """Computes the multidimensional histogram of some data.
+ *
+ */
+ values[9] = ((PyObject *)Py_None);
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
+ case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
+ case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
+ case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
+ case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_sample)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_histo_range)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("chistogramnd", 0, 3, 10, 1); __PYX_ERR(0, 36, __pyx_L3_error)
+ }
+ case 2:
+ if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_n_bins)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("chistogramnd", 0, 3, 10, 2); __PYX_ERR(0, 36, __pyx_L3_error)
+ }
+ case 3:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_weights);
+ if (value) { values[3] = value; kw_args--; }
+ }
+ case 4:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_weight_min);
+ if (value) { values[4] = value; kw_args--; }
+ }
+ case 5:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_weight_max);
+ if (value) { values[5] = value; kw_args--; }
+ }
+ case 6:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_last_bin_closed);
+ if (value) { values[6] = value; kw_args--; }
+ }
+ case 7:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_histo);
+ if (value) { values[7] = value; kw_args--; }
+ }
+ case 8:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_weighted_histo);
+ if (value) { values[8] = value; kw_args--; }
+ }
+ case 9:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_wh_dtype);
+ if (value) { values[9] = value; kw_args--; }
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "chistogramnd") < 0)) __PYX_ERR(0, 36, __pyx_L3_error)
+ }
+ } else {
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+ case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
+ case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
+ case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
+ case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
+ case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ }
+ __pyx_v_sample = values[0];
+ __pyx_v_histo_range = values[1];
+ __pyx_v_n_bins = values[2];
+ __pyx_v_weights = values[3];
+ __pyx_v_weight_min = values[4];
+ __pyx_v_weight_max = values[5];
+ __pyx_v_last_bin_closed = values[6];
+ __pyx_v_histo = values[7];
+ __pyx_v_weighted_histo = values[8];
+ __pyx_v_wh_dtype = values[9];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("chistogramnd", 0, 3, 10, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 36, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("silx.math.chistogramnd.chistogramnd", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_4silx_4math_12chistogramnd_chistogramnd(__pyx_self, __pyx_v_sample, __pyx_v_histo_range, __pyx_v_n_bins, __pyx_v_weights, __pyx_v_weight_min, __pyx_v_weight_max, __pyx_v_last_bin_closed, __pyx_v_histo, __pyx_v_weighted_histo, __pyx_v_wh_dtype);
+
+ /* "silx/math/chistogramnd.pyx":36
+ *
+ *
+ * def chistogramnd(sample, # <<<<<<<<<<<<<<
+ * histo_range,
+ * n_bins,
+ */
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "silx/math/chistogramnd.pyx":299
+ * # functions. so I have to explicitly list them all...
+ *
+ * def raise_unsupported_type(): # <<<<<<<<<<<<<<
+ * raise TypeError('Case not supported - sample:{0} '
+ * 'and weights:{1}.'
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_4silx_4math_12chistogramnd_12chistogramnd_1raise_unsupported_type(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyMethodDef __pyx_mdef_4silx_4math_12chistogramnd_12chistogramnd_1raise_unsupported_type = {"raise_unsupported_type", (PyCFunction)__pyx_pw_4silx_4math_12chistogramnd_12chistogramnd_1raise_unsupported_type, METH_NOARGS, 0};
+static PyObject *__pyx_pw_4silx_4math_12chistogramnd_12chistogramnd_1raise_unsupported_type(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("raise_unsupported_type (wrapper)", 0);
+ __pyx_r = __pyx_pf_4silx_4math_12chistogramnd_12chistogramnd_raise_unsupported_type(__pyx_self);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_4silx_4math_12chistogramnd_12chistogramnd_raise_unsupported_type(PyObject *__pyx_self) {
+ struct __pyx_obj_4silx_4math_12chistogramnd___pyx_scope_struct__chistogramnd *__pyx_cur_scope;
+ struct __pyx_obj_4silx_4math_12chistogramnd___pyx_scope_struct__chistogramnd *__pyx_outer_scope;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ int __pyx_t_4;
+ PyObject *__pyx_t_5 = NULL;
+ __Pyx_RefNannySetupContext("raise_unsupported_type", 0);
+ __pyx_outer_scope = (struct __pyx_obj_4silx_4math_12chistogramnd___pyx_scope_struct__chistogramnd *) __Pyx_CyFunction_GetClosure(__pyx_self);
+ __pyx_cur_scope = __pyx_outer_scope;
+
+ /* "silx/math/chistogramnd.pyx":302
+ * raise TypeError('Case not supported - sample:{0} '
+ * 'and weights:{1}.'
+ * ''.format(sample_type, weights_type)) # <<<<<<<<<<<<<<
+ *
+ * sample_c = np.ascontiguousarray(sample.reshape((sample.size,)),
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Case_not_supported_sample_0_and, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 302, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (unlikely(!__pyx_cur_scope->__pyx_v_sample_type)) { __Pyx_RaiseClosureNameError("sample_type"); __PYX_ERR(0, 302, __pyx_L1_error) }
+ if (unlikely(!__pyx_cur_scope->__pyx_v_weights_type)) { __Pyx_RaiseClosureNameError("weights_type"); __PYX_ERR(0, 302, __pyx_L1_error) }
+ __pyx_t_3 = NULL;
+ __pyx_t_4 = 0;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ __pyx_t_4 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_cur_scope->__pyx_v_sample_type, __pyx_cur_scope->__pyx_v_weights_type};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 302, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_cur_scope->__pyx_v_sample_type, __pyx_cur_scope->__pyx_v_weights_type};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 302, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ {
+ __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 302, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (__pyx_t_3) {
+ __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
+ }
+ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_sample_type);
+ __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_sample_type);
+ PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_cur_scope->__pyx_v_sample_type);
+ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_weights_type);
+ __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_weights_type);
+ PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_cur_scope->__pyx_v_weights_type);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 302, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "silx/math/chistogramnd.pyx":300
+ *
+ * def raise_unsupported_type():
+ * raise TypeError('Case not supported - sample:{0} ' # <<<<<<<<<<<<<<
+ * 'and weights:{1}.'
+ * ''.format(sample_type, weights_type))
+ */
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 300, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 300, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __PYX_ERR(0, 300, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":299
+ * # functions. so I have to explicitly list them all...
+ *
+ * def raise_unsupported_type(): # <<<<<<<<<<<<<<
+ * raise TypeError('Case not supported - sample:{0} '
+ * 'and weights:{1}.'
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_AddTraceback("silx.math.chistogramnd.chistogramnd.raise_unsupported_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "silx/math/chistogramnd.pyx":36
+ *
+ *
+ * def chistogramnd(sample, # <<<<<<<<<<<<<<
+ * histo_range,
+ * n_bins,
+ */
+
+static PyObject *__pyx_pf_4silx_4math_12chistogramnd_chistogramnd(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_sample, PyObject *__pyx_v_histo_range, PyObject *__pyx_v_n_bins, PyObject *__pyx_v_weights, PyObject *__pyx_v_weight_min, PyObject *__pyx_v_weight_max, PyObject *__pyx_v_last_bin_closed, PyObject *__pyx_v_histo, PyObject *__pyx_v_weighted_histo, PyObject *__pyx_v_wh_dtype) {
+ struct __pyx_obj_4silx_4math_12chistogramnd___pyx_scope_struct__chistogramnd *__pyx_cur_scope;
+ PyObject *__pyx_v_s_shape = NULL;
+ PyObject *__pyx_v_n_dims = NULL;
+ PyObject *__pyx_v_w_shape = NULL;
+ PyObject *__pyx_v_i_histo_range = NULL;
+ int __pyx_v_err_histo_range;
+ PyObject *__pyx_v_output_shape = NULL;
+ PyObject *__pyx_v_option_flags = NULL;
+ PyObject *__pyx_v_n_elem = NULL;
+ PyObject *__pyx_v_bin_edges = NULL;
+ PyObject *__pyx_v_raise_unsupported_type = 0;
+ PyObject *__pyx_v_sample_c = NULL;
+ PyObject *__pyx_v_weights_c = NULL;
+ PyObject *__pyx_v_histo_range_c = NULL;
+ PyObject *__pyx_v_n_bins_c = NULL;
+ PyObject *__pyx_v_histo_c = NULL;
+ PyObject *__pyx_v_cumul_c = NULL;
+ PyObject *__pyx_v_bin_edges_c = NULL;
+ long __pyx_v_rc;
+ PyObject *__pyx_v_edges = NULL;
+ PyObject *__pyx_v_offset = NULL;
+ PyObject *__pyx_v_i_dim = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ int __pyx_t_1;
+ int __pyx_t_2;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ int __pyx_t_7;
+ Py_ssize_t __pyx_t_8;
+ int __pyx_t_9;
+ PyObject *__pyx_t_10 = NULL;
+ PyObject *__pyx_t_11 = NULL;
+ PyObject *__pyx_t_12 = NULL;
+ __Pyx_memviewslice __pyx_t_13 = { 0, 0, { 0 }, { 0 }, { 0 } };
+ __Pyx_memviewslice __pyx_t_14 = { 0, 0, { 0 }, { 0 }, { 0 } };
+ int __pyx_t_15;
+ __Pyx_memviewslice __pyx_t_16 = { 0, 0, { 0 }, { 0 }, { 0 } };
+ __Pyx_memviewslice __pyx_t_17 = { 0, 0, { 0 }, { 0 }, { 0 } };
+ __Pyx_memviewslice __pyx_t_18 = { 0, 0, { 0 }, { 0 }, { 0 } };
+ __Pyx_memviewslice __pyx_t_19 = { 0, 0, { 0 }, { 0 }, { 0 } };
+ __Pyx_memviewslice __pyx_t_20 = { 0, 0, { 0 }, { 0 }, { 0 } };
+ int __pyx_t_21;
+ double __pyx_t_22;
+ double __pyx_t_23;
+ __Pyx_memviewslice __pyx_t_24 = { 0, 0, { 0 }, { 0 }, { 0 } };
+ float __pyx_t_25;
+ float __pyx_t_26;
+ __Pyx_memviewslice __pyx_t_27 = { 0, 0, { 0 }, { 0 }, { 0 } };
+ __pyx_t_5numpy_int32_t __pyx_t_28;
+ __pyx_t_5numpy_int32_t __pyx_t_29;
+ __Pyx_memviewslice __pyx_t_30 = { 0, 0, { 0 }, { 0 }, { 0 } };
+ __Pyx_memviewslice __pyx_t_31 = { 0, 0, { 0 }, { 0 }, { 0 } };
+ __Pyx_memviewslice __pyx_t_32 = { 0, 0, { 0 }, { 0 }, { 0 } };
+ PyObject *(*__pyx_t_33)(PyObject *);
+ int __pyx_t_34;
+ __Pyx_RefNannySetupContext("chistogramnd", 0);
+ __pyx_cur_scope = (struct __pyx_obj_4silx_4math_12chistogramnd___pyx_scope_struct__chistogramnd *)__pyx_tp_new_4silx_4math_12chistogramnd___pyx_scope_struct__chistogramnd(__pyx_ptype_4silx_4math_12chistogramnd___pyx_scope_struct__chistogramnd, __pyx_empty_tuple, NULL);
+ if (unlikely(!__pyx_cur_scope)) {
+ __pyx_cur_scope = ((struct __pyx_obj_4silx_4math_12chistogramnd___pyx_scope_struct__chistogramnd *)Py_None);
+ __Pyx_INCREF(Py_None);
+ __PYX_ERR(0, 36, __pyx_L1_error)
+ } else {
+ __Pyx_GOTREF(__pyx_cur_scope);
+ }
+ __Pyx_INCREF(__pyx_v_histo_range);
+ __Pyx_INCREF(__pyx_v_n_bins);
+ __Pyx_INCREF(__pyx_v_weight_min);
+ __Pyx_INCREF(__pyx_v_weight_max);
+ __Pyx_INCREF(__pyx_v_histo);
+ __Pyx_INCREF(__pyx_v_weighted_histo);
+ __Pyx_INCREF(__pyx_v_wh_dtype);
+
+ /* "silx/math/chistogramnd.pyx":154
+ * """
+ *
+ * if wh_dtype is None: # <<<<<<<<<<<<<<
+ * wh_dtype = np.double
+ * elif wh_dtype not in (np.double, np.float32):
+ */
+ __pyx_t_1 = (__pyx_v_wh_dtype == Py_None);
+ __pyx_t_2 = (__pyx_t_1 != 0);
+ if (__pyx_t_2) {
+
+ /* "silx/math/chistogramnd.pyx":155
+ *
+ * if wh_dtype is None:
+ * wh_dtype = np.double # <<<<<<<<<<<<<<
+ * elif wh_dtype not in (np.double, np.float32):
+ * raise ValueError('<wh_dtype> type not supported : {0}.'.format(wh_dtype))
+ */
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 155, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_double); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 155, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF_SET(__pyx_v_wh_dtype, __pyx_t_4);
+ __pyx_t_4 = 0;
+
+ /* "silx/math/chistogramnd.pyx":154
+ * """
+ *
+ * if wh_dtype is None: # <<<<<<<<<<<<<<
+ * wh_dtype = np.double
+ * elif wh_dtype not in (np.double, np.float32):
+ */
+ goto __pyx_L3;
+ }
+
+ /* "silx/math/chistogramnd.pyx":156
+ * if wh_dtype is None:
+ * wh_dtype = np.double
+ * elif wh_dtype not in (np.double, np.float32): # <<<<<<<<<<<<<<
+ * raise ValueError('<wh_dtype> type not supported : {0}.'.format(wh_dtype))
+ *
+ */
+ __Pyx_INCREF(__pyx_v_wh_dtype);
+ __pyx_t_4 = __pyx_v_wh_dtype;
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 156, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_double); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 156, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = PyObject_RichCompare(__pyx_t_4, __pyx_t_5, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 156, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 156, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (__pyx_t_1) {
+ } else {
+ __pyx_t_2 = __pyx_t_1;
+ goto __pyx_L4_bool_binop_done;
+ }
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 156, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_float32); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 156, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = PyObject_RichCompare(__pyx_t_4, __pyx_t_5, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 156, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 156, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_2 = __pyx_t_1;
+ __pyx_L4_bool_binop_done:;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_1 = (__pyx_t_2 != 0);
+ if (__pyx_t_1) {
+
+ /* "silx/math/chistogramnd.pyx":157
+ * wh_dtype = np.double
+ * elif wh_dtype not in (np.double, np.float32):
+ * raise ValueError('<wh_dtype> type not supported : {0}.'.format(wh_dtype)) # <<<<<<<<<<<<<<
+ *
+ * if (weighted_histo is not None and
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_wh_dtype_type_not_supported_0, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 157, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (!__pyx_t_5) {
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_wh_dtype); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 157, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_wh_dtype};
+ __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 157, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_wh_dtype};
+ __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 157, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ } else
+ #endif
+ {
+ __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 157, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
+ __Pyx_INCREF(__pyx_v_wh_dtype);
+ __Pyx_GIVEREF(__pyx_v_wh_dtype);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_wh_dtype);
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 157, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 157, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
+ __pyx_t_4 = 0;
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 157, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_Raise(__pyx_t_4, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __PYX_ERR(0, 157, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":156
+ * if wh_dtype is None:
+ * wh_dtype = np.double
+ * elif wh_dtype not in (np.double, np.float32): # <<<<<<<<<<<<<<
+ * raise ValueError('<wh_dtype> type not supported : {0}.'.format(wh_dtype))
+ *
+ */
+ }
+ __pyx_L3:;
+
+ /* "silx/math/chistogramnd.pyx":159
+ * raise ValueError('<wh_dtype> type not supported : {0}.'.format(wh_dtype))
+ *
+ * if (weighted_histo is not None and # <<<<<<<<<<<<<<
+ * weighted_histo.flags['C_CONTIGUOUS'] is False):
+ * raise ValueError('<weighted_histo> must be a C_CONTIGUOUS numpy array.')
+ */
+ __pyx_t_2 = (__pyx_v_weighted_histo != Py_None);
+ __pyx_t_7 = (__pyx_t_2 != 0);
+ if (__pyx_t_7) {
+ } else {
+ __pyx_t_1 = __pyx_t_7;
+ goto __pyx_L7_bool_binop_done;
+ }
+
+ /* "silx/math/chistogramnd.pyx":160
+ *
+ * if (weighted_histo is not None and
+ * weighted_histo.flags['C_CONTIGUOUS'] is False): # <<<<<<<<<<<<<<
+ * raise ValueError('<weighted_histo> must be a C_CONTIGUOUS numpy array.')
+ *
+ */
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_weighted_histo, __pyx_n_s_flags); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 160, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_3 = PyObject_GetItem(__pyx_t_4, __pyx_n_s_C_CONTIGUOUS); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 160, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_7 = (__pyx_t_3 == Py_False);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_2 = (__pyx_t_7 != 0);
+ __pyx_t_1 = __pyx_t_2;
+ __pyx_L7_bool_binop_done:;
+
+ /* "silx/math/chistogramnd.pyx":159
+ * raise ValueError('<wh_dtype> type not supported : {0}.'.format(wh_dtype))
+ *
+ * if (weighted_histo is not None and # <<<<<<<<<<<<<<
+ * weighted_histo.flags['C_CONTIGUOUS'] is False):
+ * raise ValueError('<weighted_histo> must be a C_CONTIGUOUS numpy array.')
+ */
+ if (__pyx_t_1) {
+
+ /* "silx/math/chistogramnd.pyx":161
+ * if (weighted_histo is not None and
+ * weighted_histo.flags['C_CONTIGUOUS'] is False):
+ * raise ValueError('<weighted_histo> must be a C_CONTIGUOUS numpy array.') # <<<<<<<<<<<<<<
+ *
+ * if histo is not None and histo.flags['C_CONTIGUOUS'] is False:
+ */
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 161, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __PYX_ERR(0, 161, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":159
+ * raise ValueError('<wh_dtype> type not supported : {0}.'.format(wh_dtype))
+ *
+ * if (weighted_histo is not None and # <<<<<<<<<<<<<<
+ * weighted_histo.flags['C_CONTIGUOUS'] is False):
+ * raise ValueError('<weighted_histo> must be a C_CONTIGUOUS numpy array.')
+ */
+ }
+
+ /* "silx/math/chistogramnd.pyx":163
+ * raise ValueError('<weighted_histo> must be a C_CONTIGUOUS numpy array.')
+ *
+ * if histo is not None and histo.flags['C_CONTIGUOUS'] is False: # <<<<<<<<<<<<<<
+ * raise ValueError('<histo> must be a C_CONTIGUOUS numpy array.')
+ *
+ */
+ __pyx_t_2 = (__pyx_v_histo != Py_None);
+ __pyx_t_7 = (__pyx_t_2 != 0);
+ if (__pyx_t_7) {
+ } else {
+ __pyx_t_1 = __pyx_t_7;
+ goto __pyx_L10_bool_binop_done;
+ }
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_histo, __pyx_n_s_flags); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 163, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_C_CONTIGUOUS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 163, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_7 = (__pyx_t_4 == Py_False);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_2 = (__pyx_t_7 != 0);
+ __pyx_t_1 = __pyx_t_2;
+ __pyx_L10_bool_binop_done:;
+ if (__pyx_t_1) {
+
+ /* "silx/math/chistogramnd.pyx":164
+ *
+ * if histo is not None and histo.flags['C_CONTIGUOUS'] is False:
+ * raise ValueError('<histo> must be a C_CONTIGUOUS numpy array.') # <<<<<<<<<<<<<<
+ *
+ * s_shape = sample.shape
+ */
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 164, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_Raise(__pyx_t_4, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __PYX_ERR(0, 164, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":163
+ * raise ValueError('<weighted_histo> must be a C_CONTIGUOUS numpy array.')
+ *
+ * if histo is not None and histo.flags['C_CONTIGUOUS'] is False: # <<<<<<<<<<<<<<
+ * raise ValueError('<histo> must be a C_CONTIGUOUS numpy array.')
+ *
+ */
+ }
+
+ /* "silx/math/chistogramnd.pyx":166
+ * raise ValueError('<histo> must be a C_CONTIGUOUS numpy array.')
+ *
+ * s_shape = sample.shape # <<<<<<<<<<<<<<
+ *
+ * n_dims = 1 if len(s_shape) == 1 else s_shape[1]
+ */
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_sample, __pyx_n_s_shape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 166, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_v_s_shape = __pyx_t_4;
+ __pyx_t_4 = 0;
+
+ /* "silx/math/chistogramnd.pyx":168
+ * s_shape = sample.shape
+ *
+ * n_dims = 1 if len(s_shape) == 1 else s_shape[1] # <<<<<<<<<<<<<<
+ *
+ * if weights is not None:
+ */
+ __pyx_t_8 = PyObject_Length(__pyx_v_s_shape); if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 168, __pyx_L1_error)
+ if (((__pyx_t_8 == 1) != 0)) {
+ __Pyx_INCREF(__pyx_int_1);
+ __pyx_t_4 = __pyx_int_1;
+ } else {
+ __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_s_shape, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 168, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = __pyx_t_3;
+ __pyx_t_3 = 0;
+ }
+ __pyx_v_n_dims = __pyx_t_4;
+ __pyx_t_4 = 0;
+
+ /* "silx/math/chistogramnd.pyx":170
+ * n_dims = 1 if len(s_shape) == 1 else s_shape[1]
+ *
+ * if weights is not None: # <<<<<<<<<<<<<<
+ * w_shape = weights.shape
+ *
+ */
+ __pyx_t_1 = (__pyx_v_weights != Py_None);
+ __pyx_t_2 = (__pyx_t_1 != 0);
+ if (__pyx_t_2) {
+
+ /* "silx/math/chistogramnd.pyx":171
+ *
+ * if weights is not None:
+ * w_shape = weights.shape # <<<<<<<<<<<<<<
+ *
+ * # making sure the sample and weights sizes are coherent
+ */
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_weights, __pyx_n_s_shape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 171, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_v_w_shape = __pyx_t_4;
+ __pyx_t_4 = 0;
+
+ /* "silx/math/chistogramnd.pyx":175
+ * # making sure the sample and weights sizes are coherent
+ * # 2 different cases : 2D sample (N,M) and 1D (N)
+ * if len(w_shape) != 1 or w_shape[0] != s_shape[0]: # <<<<<<<<<<<<<<
+ * raise ValueError('<weights> must be an array whose length '
+ * 'is equal to the number of samples.')
+ */
+ __pyx_t_8 = PyObject_Length(__pyx_v_w_shape); if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 175, __pyx_L1_error)
+ __pyx_t_1 = ((__pyx_t_8 != 1) != 0);
+ if (!__pyx_t_1) {
+ } else {
+ __pyx_t_2 = __pyx_t_1;
+ goto __pyx_L14_bool_binop_done;
+ }
+ __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_w_shape, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 175, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_s_shape, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 175, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_6 = PyObject_RichCompare(__pyx_t_4, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 175, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 175, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_2 = __pyx_t_1;
+ __pyx_L14_bool_binop_done:;
+ if (__pyx_t_2) {
+
+ /* "silx/math/chistogramnd.pyx":176
+ * # 2 different cases : 2D sample (N,M) and 1D (N)
+ * if len(w_shape) != 1 or w_shape[0] != s_shape[0]:
+ * raise ValueError('<weights> must be an array whose length ' # <<<<<<<<<<<<<<
+ * 'is equal to the number of samples.')
+ *
+ */
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 176, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_Raise(__pyx_t_6, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __PYX_ERR(0, 176, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":175
+ * # making sure the sample and weights sizes are coherent
+ * # 2 different cases : 2D sample (N,M) and 1D (N)
+ * if len(w_shape) != 1 or w_shape[0] != s_shape[0]: # <<<<<<<<<<<<<<
+ * raise ValueError('<weights> must be an array whose length '
+ * 'is equal to the number of samples.')
+ */
+ }
+
+ /* "silx/math/chistogramnd.pyx":179
+ * 'is equal to the number of samples.')
+ *
+ * weights_type = weights.dtype # <<<<<<<<<<<<<<
+ * else:
+ * weights_type = None
+ */
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_weights, __pyx_n_s_dtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 179, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_GIVEREF(__pyx_t_6);
+ __pyx_cur_scope->__pyx_v_weights_type = __pyx_t_6;
+ __pyx_t_6 = 0;
+
+ /* "silx/math/chistogramnd.pyx":170
+ * n_dims = 1 if len(s_shape) == 1 else s_shape[1]
+ *
+ * if weights is not None: # <<<<<<<<<<<<<<
+ * w_shape = weights.shape
+ *
+ */
+ goto __pyx_L12;
+ }
+
+ /* "silx/math/chistogramnd.pyx":181
+ * weights_type = weights.dtype
+ * else:
+ * weights_type = None # <<<<<<<<<<<<<<
+ *
+ * # just in case those arent numpy arrays
+ */
+ /*else*/ {
+ __Pyx_INCREF(Py_None);
+ __Pyx_GIVEREF(Py_None);
+ __pyx_cur_scope->__pyx_v_weights_type = Py_None;
+ }
+ __pyx_L12:;
+
+ /* "silx/math/chistogramnd.pyx":186
+ * # (this allows the user to provide native python lists,
+ * # => easier for testing)
+ * i_histo_range = histo_range # <<<<<<<<<<<<<<
+ * histo_range = np.array(histo_range)
+ * err_histo_range = False
+ */
+ __Pyx_INCREF(__pyx_v_histo_range);
+ __pyx_v_i_histo_range = __pyx_v_histo_range;
+
+ /* "silx/math/chistogramnd.pyx":187
+ * # => easier for testing)
+ * i_histo_range = histo_range
+ * histo_range = np.array(histo_range) # <<<<<<<<<<<<<<
+ * err_histo_range = False
+ *
+ */
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 187, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_array); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 187, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_4, function);
+ }
+ }
+ if (!__pyx_t_3) {
+ __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_histo_range); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 187, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_4)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_histo_range};
+ __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 187, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_6);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_histo_range};
+ __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 187, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_6);
+ } else
+ #endif
+ {
+ __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 187, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
+ __Pyx_INCREF(__pyx_v_histo_range);
+ __Pyx_GIVEREF(__pyx_v_histo_range);
+ PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_histo_range);
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 187, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF_SET(__pyx_v_histo_range, __pyx_t_6);
+ __pyx_t_6 = 0;
+
+ /* "silx/math/chistogramnd.pyx":188
+ * i_histo_range = histo_range
+ * histo_range = np.array(histo_range)
+ * err_histo_range = False # <<<<<<<<<<<<<<
+ *
+ * if n_dims == 1:
+ */
+ __pyx_v_err_histo_range = 0;
+
+ /* "silx/math/chistogramnd.pyx":190
+ * err_histo_range = False
+ *
+ * if n_dims == 1: # <<<<<<<<<<<<<<
+ * if histo_range.shape == (2,):
+ * pass
+ */
+ __pyx_t_6 = __Pyx_PyInt_EqObjC(__pyx_v_n_dims, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 190, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 190, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ if (__pyx_t_2) {
+
+ /* "silx/math/chistogramnd.pyx":191
+ *
+ * if n_dims == 1:
+ * if histo_range.shape == (2,): # <<<<<<<<<<<<<<
+ * pass
+ * elif histo_range.shape == (1, 2):
+ */
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_histo_range, __pyx_n_s_shape); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 191, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_4 = PyObject_RichCompare(__pyx_t_6, __pyx_tuple__4, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 191, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 191, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ if (__pyx_t_2) {
+ goto __pyx_L17;
+ }
+
+ /* "silx/math/chistogramnd.pyx":193
+ * if histo_range.shape == (2,):
+ * pass
+ * elif histo_range.shape == (1, 2): # <<<<<<<<<<<<<<
+ * histo_range.shape = -1
+ * else:
+ */
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_histo_range, __pyx_n_s_shape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 193, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_6 = PyObject_RichCompare(__pyx_t_4, __pyx_tuple__5, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 193, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 193, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ if (__pyx_t_2) {
+
+ /* "silx/math/chistogramnd.pyx":194
+ * pass
+ * elif histo_range.shape == (1, 2):
+ * histo_range.shape = -1 # <<<<<<<<<<<<<<
+ * else:
+ * err_histo_range = True
+ */
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_histo_range, __pyx_n_s_shape, __pyx_int_neg_1) < 0) __PYX_ERR(0, 194, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":193
+ * if histo_range.shape == (2,):
+ * pass
+ * elif histo_range.shape == (1, 2): # <<<<<<<<<<<<<<
+ * histo_range.shape = -1
+ * else:
+ */
+ goto __pyx_L17;
+ }
+
+ /* "silx/math/chistogramnd.pyx":196
+ * histo_range.shape = -1
+ * else:
+ * err_histo_range = True # <<<<<<<<<<<<<<
+ * elif n_dims != 1 and histo_range.shape != (n_dims, 2):
+ * err_histo_range = True
+ */
+ /*else*/ {
+ __pyx_v_err_histo_range = 1;
+ }
+ __pyx_L17:;
+
+ /* "silx/math/chistogramnd.pyx":190
+ * err_histo_range = False
+ *
+ * if n_dims == 1: # <<<<<<<<<<<<<<
+ * if histo_range.shape == (2,):
+ * pass
+ */
+ goto __pyx_L16;
+ }
+
+ /* "silx/math/chistogramnd.pyx":197
+ * else:
+ * err_histo_range = True
+ * elif n_dims != 1 and histo_range.shape != (n_dims, 2): # <<<<<<<<<<<<<<
+ * err_histo_range = True
+ *
+ */
+ __pyx_t_6 = PyObject_RichCompare(__pyx_v_n_dims, __pyx_int_1, Py_NE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 197, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 197, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ if (__pyx_t_1) {
+ } else {
+ __pyx_t_2 = __pyx_t_1;
+ goto __pyx_L18_bool_binop_done;
+ }
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_histo_range, __pyx_n_s_shape); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 197, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 197, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_INCREF(__pyx_v_n_dims);
+ __Pyx_GIVEREF(__pyx_v_n_dims);
+ PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_n_dims);
+ __Pyx_INCREF(__pyx_int_2);
+ __Pyx_GIVEREF(__pyx_int_2);
+ PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_int_2);
+ __pyx_t_5 = PyObject_RichCompare(__pyx_t_6, __pyx_t_4, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 197, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 197, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_2 = __pyx_t_1;
+ __pyx_L18_bool_binop_done:;
+ if (__pyx_t_2) {
+
+ /* "silx/math/chistogramnd.pyx":198
+ * err_histo_range = True
+ * elif n_dims != 1 and histo_range.shape != (n_dims, 2):
+ * err_histo_range = True # <<<<<<<<<<<<<<
+ *
+ * if err_histo_range:
+ */
+ __pyx_v_err_histo_range = 1;
+
+ /* "silx/math/chistogramnd.pyx":197
+ * else:
+ * err_histo_range = True
+ * elif n_dims != 1 and histo_range.shape != (n_dims, 2): # <<<<<<<<<<<<<<
+ * err_histo_range = True
+ *
+ */
+ }
+ __pyx_L16:;
+
+ /* "silx/math/chistogramnd.pyx":200
+ * err_histo_range = True
+ *
+ * if err_histo_range: # <<<<<<<<<<<<<<
+ * raise ValueError('<histo_range> error : expected {n_dims} sets of '
+ * 'lower and upper bin edges, '
+ */
+ __pyx_t_2 = (__pyx_v_err_histo_range != 0);
+ if (__pyx_t_2) {
+
+ /* "silx/math/chistogramnd.pyx":206
+ * '(provided <sample> contains '
+ * '{n_dims}D values)'
+ * ''.format(histo_range=i_histo_range, # <<<<<<<<<<<<<<
+ * n_dims=n_dims))
+ *
+ */
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_histo_range_error_expected_n_di, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 206, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 206, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_histo_range, __pyx_v_i_histo_range) < 0) __PYX_ERR(0, 206, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":207
+ * '{n_dims}D values)'
+ * ''.format(histo_range=i_histo_range,
+ * n_dims=n_dims)) # <<<<<<<<<<<<<<
+ *
+ * # check range value
+ */
+ if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_n_dims, __pyx_v_n_dims) < 0) __PYX_ERR(0, 206, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":206
+ * '(provided <sample> contains '
+ * '{n_dims}D values)'
+ * ''.format(histo_range=i_histo_range, # <<<<<<<<<<<<<<
+ * n_dims=n_dims))
+ *
+ */
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 206, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+ /* "silx/math/chistogramnd.pyx":201
+ *
+ * if err_histo_range:
+ * raise ValueError('<histo_range> error : expected {n_dims} sets of ' # <<<<<<<<<<<<<<
+ * 'lower and upper bin edges, '
+ * 'got the following instead : {histo_range}. '
+ */
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 201, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
+ __pyx_t_6 = 0;
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 201, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_Raise(__pyx_t_6, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __PYX_ERR(0, 201, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":200
+ * err_histo_range = True
+ *
+ * if err_histo_range: # <<<<<<<<<<<<<<
+ * raise ValueError('<histo_range> error : expected {n_dims} sets of '
+ * 'lower and upper bin edges, '
+ */
+ }
+
+ /* "silx/math/chistogramnd.pyx":210
+ *
+ * # check range value
+ * if np.inf in histo_range: # <<<<<<<<<<<<<<
+ * raise ValueError('Range parameter should be finite value')
+ * if np.nan in histo_range:
+ */
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 210, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_inf); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 210, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_4, __pyx_v_histo_range, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 210, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_1 = (__pyx_t_2 != 0);
+ if (__pyx_t_1) {
+
+ /* "silx/math/chistogramnd.pyx":211
+ * # check range value
+ * if np.inf in histo_range:
+ * raise ValueError('Range parameter should be finite value') # <<<<<<<<<<<<<<
+ * if np.nan in histo_range:
+ * raise ValueError('Range value can\'t be nan')
+ */
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 211, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_Raise(__pyx_t_4, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __PYX_ERR(0, 211, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":210
+ *
+ * # check range value
+ * if np.inf in histo_range: # <<<<<<<<<<<<<<
+ * raise ValueError('Range parameter should be finite value')
+ * if np.nan in histo_range:
+ */
+ }
+
+ /* "silx/math/chistogramnd.pyx":212
+ * if np.inf in histo_range:
+ * raise ValueError('Range parameter should be finite value')
+ * if np.nan in histo_range: # <<<<<<<<<<<<<<
+ * raise ValueError('Range value can\'t be nan')
+ *
+ */
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 212, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_nan); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 212, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_t_6, __pyx_v_histo_range, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 212, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_2 = (__pyx_t_1 != 0);
+ if (__pyx_t_2) {
+
+ /* "silx/math/chistogramnd.pyx":213
+ * raise ValueError('Range parameter should be finite value')
+ * if np.nan in histo_range:
+ * raise ValueError('Range value can\'t be nan') # <<<<<<<<<<<<<<
+ *
+ * # checking n_bins size
+ */
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 213, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_Raise(__pyx_t_6, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __PYX_ERR(0, 213, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":212
+ * if np.inf in histo_range:
+ * raise ValueError('Range parameter should be finite value')
+ * if np.nan in histo_range: # <<<<<<<<<<<<<<
+ * raise ValueError('Range value can\'t be nan')
+ *
+ */
+ }
+
+ /* "silx/math/chistogramnd.pyx":216
+ *
+ * # checking n_bins size
+ * n_bins = np.array(n_bins, ndmin=1) # <<<<<<<<<<<<<<
+ * if len(n_bins) == 1:
+ * n_bins = np.tile(n_bins, n_dims)
+ */
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 216, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_array); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 216, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 216, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_INCREF(__pyx_v_n_bins);
+ __Pyx_GIVEREF(__pyx_v_n_bins);
+ PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_n_bins);
+ __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 216, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_ndmin, __pyx_int_1) < 0) __PYX_ERR(0, 216, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 216, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF_SET(__pyx_v_n_bins, __pyx_t_3);
+ __pyx_t_3 = 0;
+
+ /* "silx/math/chistogramnd.pyx":217
+ * # checking n_bins size
+ * n_bins = np.array(n_bins, ndmin=1)
+ * if len(n_bins) == 1: # <<<<<<<<<<<<<<
+ * n_bins = np.tile(n_bins, n_dims)
+ * elif n_bins.shape != (n_dims,):
+ */
+ __pyx_t_8 = PyObject_Length(__pyx_v_n_bins); if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 217, __pyx_L1_error)
+ __pyx_t_2 = ((__pyx_t_8 == 1) != 0);
+ if (__pyx_t_2) {
+
+ /* "silx/math/chistogramnd.pyx":218
+ * n_bins = np.array(n_bins, ndmin=1)
+ * if len(n_bins) == 1:
+ * n_bins = np.tile(n_bins, n_dims) # <<<<<<<<<<<<<<
+ * elif n_bins.shape != (n_dims,):
+ * raise ValueError('n_bins must be either a scalar (same number '
+ */
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 218, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_tile); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 218, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_5 = NULL;
+ __pyx_t_9 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_6, function);
+ __pyx_t_9 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_6)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_n_bins, __pyx_v_n_dims};
+ __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 218, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_n_bins, __pyx_v_n_dims};
+ __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 218, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ } else
+ #endif
+ {
+ __pyx_t_4 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 218, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ if (__pyx_t_5) {
+ __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __pyx_t_5 = NULL;
+ }
+ __Pyx_INCREF(__pyx_v_n_bins);
+ __Pyx_GIVEREF(__pyx_v_n_bins);
+ PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_9, __pyx_v_n_bins);
+ __Pyx_INCREF(__pyx_v_n_dims);
+ __Pyx_GIVEREF(__pyx_v_n_dims);
+ PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_9, __pyx_v_n_dims);
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 218, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF_SET(__pyx_v_n_bins, __pyx_t_3);
+ __pyx_t_3 = 0;
+
+ /* "silx/math/chistogramnd.pyx":217
+ * # checking n_bins size
+ * n_bins = np.array(n_bins, ndmin=1)
+ * if len(n_bins) == 1: # <<<<<<<<<<<<<<
+ * n_bins = np.tile(n_bins, n_dims)
+ * elif n_bins.shape != (n_dims,):
+ */
+ goto __pyx_L23;
+ }
+
+ /* "silx/math/chistogramnd.pyx":219
+ * if len(n_bins) == 1:
+ * n_bins = np.tile(n_bins, n_dims)
+ * elif n_bins.shape != (n_dims,): # <<<<<<<<<<<<<<
+ * raise ValueError('n_bins must be either a scalar (same number '
+ * 'of bins for all dimensions) or '
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_n_bins, __pyx_n_s_shape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 219, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 219, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_INCREF(__pyx_v_n_dims);
+ __Pyx_GIVEREF(__pyx_v_n_dims);
+ PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_n_dims);
+ __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_t_6, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 219, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 219, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ if (__pyx_t_2) {
+
+ /* "silx/math/chistogramnd.pyx":220
+ * n_bins = np.tile(n_bins, n_dims)
+ * elif n_bins.shape != (n_dims,):
+ * raise ValueError('n_bins must be either a scalar (same number ' # <<<<<<<<<<<<<<
+ * 'of bins for all dimensions) or '
+ * 'an array (number of bins for each '
+ */
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 220, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_Raise(__pyx_t_4, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __PYX_ERR(0, 220, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":219
+ * if len(n_bins) == 1:
+ * n_bins = np.tile(n_bins, n_dims)
+ * elif n_bins.shape != (n_dims,): # <<<<<<<<<<<<<<
+ * raise ValueError('n_bins must be either a scalar (same number '
+ * 'of bins for all dimensions) or '
+ */
+ }
+ __pyx_L23:;
+
+ /* "silx/math/chistogramnd.pyx":228
+ * # exception is thrown when calling np.zeros
+ * # also testing for negative/null values
+ * if np.any(np.equal(n_bins, None)) or np.any(n_bins <= 0): # <<<<<<<<<<<<<<
+ * raise ValueError('<n_bins> : only positive values allowed.')
+ *
+ */
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 228, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_any); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 228, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 228, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_equal); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 228, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_5 = NULL;
+ __pyx_t_9 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_10);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_10, function);
+ __pyx_t_9 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_10)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_n_bins, Py_None};
+ __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 228, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_6);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_n_bins, Py_None};
+ __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 228, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_6);
+ } else
+ #endif
+ {
+ __pyx_t_11 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 228, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ if (__pyx_t_5) {
+ __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_5); __pyx_t_5 = NULL;
+ }
+ __Pyx_INCREF(__pyx_v_n_bins);
+ __Pyx_GIVEREF(__pyx_v_n_bins);
+ PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_9, __pyx_v_n_bins);
+ __Pyx_INCREF(Py_None);
+ __Pyx_GIVEREF(Py_None);
+ PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_9, Py_None);
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_11, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 228, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __pyx_t_10 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_10)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_10);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (!__pyx_t_10) {
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 228, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_t_6};
+ __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 228, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_t_6};
+ __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 228, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 228, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_10); __pyx_t_10 = NULL;
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_11, 0+1, __pyx_t_6);
+ __pyx_t_6 = 0;
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_11, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 228, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 228, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ if (!__pyx_t_1) {
+ } else {
+ __pyx_t_2 = __pyx_t_1;
+ goto __pyx_L25_bool_binop_done;
+ }
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 228, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_any); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 228, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = PyObject_RichCompare(__pyx_v_n_bins, __pyx_int_0, Py_LE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 228, __pyx_L1_error)
+ __pyx_t_6 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_11);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_11, function);
+ }
+ }
+ if (!__pyx_t_6) {
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 228, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_11)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_3};
+ __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 228, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_3};
+ __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 228, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 228, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_6); __pyx_t_6 = NULL;
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_3);
+ __pyx_t_3 = 0;
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 228, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 228, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_2 = __pyx_t_1;
+ __pyx_L25_bool_binop_done:;
+ if (__pyx_t_2) {
+
+ /* "silx/math/chistogramnd.pyx":229
+ * # also testing for negative/null values
+ * if np.any(np.equal(n_bins, None)) or np.any(n_bins <= 0):
+ * raise ValueError('<n_bins> : only positive values allowed.') # <<<<<<<<<<<<<<
+ *
+ * output_shape = tuple(n_bins)
+ */
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 229, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_Raise(__pyx_t_4, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __PYX_ERR(0, 229, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":228
+ * # exception is thrown when calling np.zeros
+ * # also testing for negative/null values
+ * if np.any(np.equal(n_bins, None)) or np.any(n_bins <= 0): # <<<<<<<<<<<<<<
+ * raise ValueError('<n_bins> : only positive values allowed.')
+ *
+ */
+ }
+
+ /* "silx/math/chistogramnd.pyx":231
+ * raise ValueError('<n_bins> : only positive values allowed.')
+ *
+ * output_shape = tuple(n_bins) # <<<<<<<<<<<<<<
+ *
+ * # checking the histo array, if provided
+ */
+ __pyx_t_4 = PySequence_Tuple(__pyx_v_n_bins); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 231, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_v_output_shape = ((PyObject*)__pyx_t_4);
+ __pyx_t_4 = 0;
+
+ /* "silx/math/chistogramnd.pyx":234
+ *
+ * # checking the histo array, if provided
+ * if histo is None: # <<<<<<<<<<<<<<
+ * histo = np.zeros(output_shape, dtype=np.uint32)
+ * else:
+ */
+ __pyx_t_2 = (__pyx_v_histo == Py_None);
+ __pyx_t_1 = (__pyx_t_2 != 0);
+ if (__pyx_t_1) {
+
+ /* "silx/math/chistogramnd.pyx":235
+ * # checking the histo array, if provided
+ * if histo is None:
+ * histo = np.zeros(output_shape, dtype=np.uint32) # <<<<<<<<<<<<<<
+ * else:
+ * if histo.shape != output_shape:
+ */
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 235, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 235, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 235, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_INCREF(__pyx_v_output_shape);
+ __Pyx_GIVEREF(__pyx_v_output_shape);
+ PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_output_shape);
+ __pyx_t_10 = PyDict_New(); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 235, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 235, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_uint32); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 235, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 235, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_4, __pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 235, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_DECREF_SET(__pyx_v_histo, __pyx_t_6);
+ __pyx_t_6 = 0;
+
+ /* "silx/math/chistogramnd.pyx":234
+ *
+ * # checking the histo array, if provided
+ * if histo is None: # <<<<<<<<<<<<<<
+ * histo = np.zeros(output_shape, dtype=np.uint32)
+ * else:
+ */
+ goto __pyx_L27;
+ }
+
+ /* "silx/math/chistogramnd.pyx":237
+ * histo = np.zeros(output_shape, dtype=np.uint32)
+ * else:
+ * if histo.shape != output_shape: # <<<<<<<<<<<<<<
+ * raise ValueError('Provided <histo> array doesn\'t have '
+ * 'a shape compatible with <n_bins> '
+ */
+ /*else*/ {
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_histo, __pyx_n_s_shape); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 237, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_10 = PyObject_RichCompare(__pyx_t_6, __pyx_v_output_shape, Py_NE); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 237, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 237, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ if (__pyx_t_1) {
+
+ /* "silx/math/chistogramnd.pyx":241
+ * 'a shape compatible with <n_bins> '
+ * ': should be {0} instead of {1}.'
+ * ''.format(output_shape, histo.shape)) # <<<<<<<<<<<<<<
+ * if histo.dtype != np.uint32:
+ * raise ValueError('Provided <histo> array doesn\'t have '
+ */
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Provided_histo_array_doesn_t_hav, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 241, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_histo, __pyx_n_s_shape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 241, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_11 = NULL;
+ __pyx_t_9 = 0;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
+ __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_6);
+ if (likely(__pyx_t_11)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+ __Pyx_INCREF(__pyx_t_11);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_6, function);
+ __pyx_t_9 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_6)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_11, __pyx_v_output_shape, __pyx_t_4};
+ __pyx_t_10 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 241, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_11, __pyx_v_output_shape, __pyx_t_4};
+ __pyx_t_10 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 241, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_3 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 241, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ if (__pyx_t_11) {
+ __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_11); __pyx_t_11 = NULL;
+ }
+ __Pyx_INCREF(__pyx_v_output_shape);
+ __Pyx_GIVEREF(__pyx_v_output_shape);
+ PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_9, __pyx_v_output_shape);
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_9, __pyx_t_4);
+ __pyx_t_4 = 0;
+ __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_3, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 241, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+ /* "silx/math/chistogramnd.pyx":238
+ * else:
+ * if histo.shape != output_shape:
+ * raise ValueError('Provided <histo> array doesn\'t have ' # <<<<<<<<<<<<<<
+ * 'a shape compatible with <n_bins> '
+ * ': should be {0} instead of {1}.'
+ */
+ __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 238, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_GIVEREF(__pyx_t_10);
+ PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_10);
+ __pyx_t_10 = 0;
+ __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 238, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_Raise(__pyx_t_10, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __PYX_ERR(0, 238, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":237
+ * histo = np.zeros(output_shape, dtype=np.uint32)
+ * else:
+ * if histo.shape != output_shape: # <<<<<<<<<<<<<<
+ * raise ValueError('Provided <histo> array doesn\'t have '
+ * 'a shape compatible with <n_bins> '
+ */
+ }
+
+ /* "silx/math/chistogramnd.pyx":242
+ * ': should be {0} instead of {1}.'
+ * ''.format(output_shape, histo.shape))
+ * if histo.dtype != np.uint32: # <<<<<<<<<<<<<<
+ * raise ValueError('Provided <histo> array doesn\'t have '
+ * 'the expected type '
+ */
+ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_histo, __pyx_n_s_dtype); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 242, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 242, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_uint32); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 242, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = PyObject_RichCompare(__pyx_t_10, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 242, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 242, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ if (__pyx_t_1) {
+
+ /* "silx/math/chistogramnd.pyx":246
+ * 'the expected type '
+ * ': should be {0} instead of {1}.'
+ * ''.format(np.uint32, histo.dtype)) # <<<<<<<<<<<<<<
+ *
+ * # checking the weighted_histo array, if provided
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Provided_histo_array_doesn_t_hav_2, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 246, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 246, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_uint32); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 246, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_histo, __pyx_n_s_dtype); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 246, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_11 = NULL;
+ __pyx_t_9 = 0;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_11)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_11);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ __pyx_t_9 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_11, __pyx_t_4, __pyx_t_10};
+ __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 246, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_11, __pyx_t_4, __pyx_t_10};
+ __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 246, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_5 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 246, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (__pyx_t_11) {
+ __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_11); __pyx_t_11 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_9, __pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_10);
+ PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_9, __pyx_t_10);
+ __pyx_t_4 = 0;
+ __pyx_t_10 = 0;
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 246, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+ /* "silx/math/chistogramnd.pyx":243
+ * ''.format(output_shape, histo.shape))
+ * if histo.dtype != np.uint32:
+ * raise ValueError('Provided <histo> array doesn\'t have ' # <<<<<<<<<<<<<<
+ * 'the expected type '
+ * ': should be {0} instead of {1}.'
+ */
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 243, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6);
+ __pyx_t_6 = 0;
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 243, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_Raise(__pyx_t_6, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __PYX_ERR(0, 243, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":242
+ * ': should be {0} instead of {1}.'
+ * ''.format(output_shape, histo.shape))
+ * if histo.dtype != np.uint32: # <<<<<<<<<<<<<<
+ * raise ValueError('Provided <histo> array doesn\'t have '
+ * 'the expected type '
+ */
+ }
+ }
+ __pyx_L27:;
+
+ /* "silx/math/chistogramnd.pyx":249
+ *
+ * # checking the weighted_histo array, if provided
+ * if weights_type is None: # <<<<<<<<<<<<<<
+ * # no weights provided, not creating the weighted_histo array
+ * weighted_histo = None
+ */
+ __pyx_t_1 = (__pyx_cur_scope->__pyx_v_weights_type == Py_None);
+ __pyx_t_2 = (__pyx_t_1 != 0);
+ if (__pyx_t_2) {
+
+ /* "silx/math/chistogramnd.pyx":251
+ * if weights_type is None:
+ * # no weights provided, not creating the weighted_histo array
+ * weighted_histo = None # <<<<<<<<<<<<<<
+ * elif weighted_histo is None:
+ * # weights provided, but no weighted_histo, creating it
+ */
+ __Pyx_INCREF(Py_None);
+ __Pyx_DECREF_SET(__pyx_v_weighted_histo, Py_None);
+
+ /* "silx/math/chistogramnd.pyx":249
+ *
+ * # checking the weighted_histo array, if provided
+ * if weights_type is None: # <<<<<<<<<<<<<<
+ * # no weights provided, not creating the weighted_histo array
+ * weighted_histo = None
+ */
+ goto __pyx_L30;
+ }
+
+ /* "silx/math/chistogramnd.pyx":252
+ * # no weights provided, not creating the weighted_histo array
+ * weighted_histo = None
+ * elif weighted_histo is None: # <<<<<<<<<<<<<<
+ * # weights provided, but no weighted_histo, creating it
+ * if wh_dtype is None:
+ */
+ __pyx_t_2 = (__pyx_v_weighted_histo == Py_None);
+ __pyx_t_1 = (__pyx_t_2 != 0);
+ if (__pyx_t_1) {
+
+ /* "silx/math/chistogramnd.pyx":254
+ * elif weighted_histo is None:
+ * # weights provided, but no weighted_histo, creating it
+ * if wh_dtype is None: # <<<<<<<<<<<<<<
+ * wh_dtype = weights_type
+ * weighted_histo = np.zeros(output_shape, dtype=wh_dtype)
+ */
+ __pyx_t_1 = (__pyx_v_wh_dtype == Py_None);
+ __pyx_t_2 = (__pyx_t_1 != 0);
+ if (__pyx_t_2) {
+
+ /* "silx/math/chistogramnd.pyx":255
+ * # weights provided, but no weighted_histo, creating it
+ * if wh_dtype is None:
+ * wh_dtype = weights_type # <<<<<<<<<<<<<<
+ * weighted_histo = np.zeros(output_shape, dtype=wh_dtype)
+ * else:
+ */
+ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_weights_type);
+ __Pyx_DECREF_SET(__pyx_v_wh_dtype, __pyx_cur_scope->__pyx_v_weights_type);
+
+ /* "silx/math/chistogramnd.pyx":254
+ * elif weighted_histo is None:
+ * # weights provided, but no weighted_histo, creating it
+ * if wh_dtype is None: # <<<<<<<<<<<<<<
+ * wh_dtype = weights_type
+ * weighted_histo = np.zeros(output_shape, dtype=wh_dtype)
+ */
+ }
+
+ /* "silx/math/chistogramnd.pyx":256
+ * if wh_dtype is None:
+ * wh_dtype = weights_type
+ * weighted_histo = np.zeros(output_shape, dtype=wh_dtype) # <<<<<<<<<<<<<<
+ * else:
+ * # weighted_histo provided, checking shape/dtype
+ */
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 256, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_zeros); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 256, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 256, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_INCREF(__pyx_v_output_shape);
+ __Pyx_GIVEREF(__pyx_v_output_shape);
+ PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_output_shape);
+ __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 256, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_v_wh_dtype) < 0) __PYX_ERR(0, 256, __pyx_L1_error)
+ __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 256, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF_SET(__pyx_v_weighted_histo, __pyx_t_10);
+ __pyx_t_10 = 0;
+
+ /* "silx/math/chistogramnd.pyx":252
+ * # no weights provided, not creating the weighted_histo array
+ * weighted_histo = None
+ * elif weighted_histo is None: # <<<<<<<<<<<<<<
+ * # weights provided, but no weighted_histo, creating it
+ * if wh_dtype is None:
+ */
+ goto __pyx_L30;
+ }
+
+ /* "silx/math/chistogramnd.pyx":259
+ * else:
+ * # weighted_histo provided, checking shape/dtype
+ * if weighted_histo.shape != output_shape: # <<<<<<<<<<<<<<
+ * raise ValueError('Provided <weighted_histo> array doesn\'t have '
+ * 'a shape compatible with <n_bins> '
+ */
+ /*else*/ {
+ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_weighted_histo, __pyx_n_s_shape); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 259, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_5 = PyObject_RichCompare(__pyx_t_10, __pyx_v_output_shape, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 259, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 259, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ if (__pyx_t_2) {
+
+ /* "silx/math/chistogramnd.pyx":263
+ * 'a shape compatible with <n_bins> '
+ * ': should be {0} instead of {1}.'
+ * ''.format(output_shape, weighted_histo.shape)) # <<<<<<<<<<<<<<
+ * if (weighted_histo.dtype != np.float64 and
+ * weighted_histo.dtype != np.float32):
+ */
+ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Provided_weighted_histo_array_do, __pyx_n_s_format); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 263, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_weighted_histo, __pyx_n_s_shape); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 263, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_3 = NULL;
+ __pyx_t_9 = 0;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_10);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_10, function);
+ __pyx_t_9 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_10)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_output_shape, __pyx_t_6};
+ __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 263, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_output_shape, __pyx_t_6};
+ __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 263, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_4 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 263, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ if (__pyx_t_3) {
+ __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL;
+ }
+ __Pyx_INCREF(__pyx_v_output_shape);
+ __Pyx_GIVEREF(__pyx_v_output_shape);
+ PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_9, __pyx_v_output_shape);
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_9, __pyx_t_6);
+ __pyx_t_6 = 0;
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 263, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+
+ /* "silx/math/chistogramnd.pyx":260
+ * # weighted_histo provided, checking shape/dtype
+ * if weighted_histo.shape != output_shape:
+ * raise ValueError('Provided <weighted_histo> array doesn\'t have ' # <<<<<<<<<<<<<<
+ * 'a shape compatible with <n_bins> '
+ * ': should be {0} instead of {1}.'
+ */
+ __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 260, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_GIVEREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_5);
+ __pyx_t_5 = 0;
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 260, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_Raise(__pyx_t_5, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __PYX_ERR(0, 260, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":259
+ * else:
+ * # weighted_histo provided, checking shape/dtype
+ * if weighted_histo.shape != output_shape: # <<<<<<<<<<<<<<
+ * raise ValueError('Provided <weighted_histo> array doesn\'t have '
+ * 'a shape compatible with <n_bins> '
+ */
+ }
+
+ /* "silx/math/chistogramnd.pyx":264
+ * ': should be {0} instead of {1}.'
+ * ''.format(output_shape, weighted_histo.shape))
+ * if (weighted_histo.dtype != np.float64 and # <<<<<<<<<<<<<<
+ * weighted_histo.dtype != np.float32):
+ * raise ValueError('Provided <weighted_histo> array doesn\'t have '
+ */
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_weighted_histo, __pyx_n_s_dtype); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 264, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 264, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_float64); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 264, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __pyx_t_10 = PyObject_RichCompare(__pyx_t_5, __pyx_t_4, Py_NE); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 264, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 264, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ if (__pyx_t_1) {
+ } else {
+ __pyx_t_2 = __pyx_t_1;
+ goto __pyx_L34_bool_binop_done;
+ }
+
+ /* "silx/math/chistogramnd.pyx":265
+ * ''.format(output_shape, weighted_histo.shape))
+ * if (weighted_histo.dtype != np.float64 and
+ * weighted_histo.dtype != np.float32): # <<<<<<<<<<<<<<
+ * raise ValueError('Provided <weighted_histo> array doesn\'t have '
+ * 'the expected type '
+ */
+ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_weighted_histo, __pyx_n_s_dtype); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 265, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 265, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_float32); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 265, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = PyObject_RichCompare(__pyx_t_10, __pyx_t_5, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 265, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 265, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_2 = __pyx_t_1;
+ __pyx_L34_bool_binop_done:;
+
+ /* "silx/math/chistogramnd.pyx":264
+ * ': should be {0} instead of {1}.'
+ * ''.format(output_shape, weighted_histo.shape))
+ * if (weighted_histo.dtype != np.float64 and # <<<<<<<<<<<<<<
+ * weighted_histo.dtype != np.float32):
+ * raise ValueError('Provided <weighted_histo> array doesn\'t have '
+ */
+ if (__pyx_t_2) {
+
+ /* "silx/math/chistogramnd.pyx":269
+ * 'the expected type '
+ * ': should be {0} or {1} instead of {2}.'
+ * ''.format(np.double, # <<<<<<<<<<<<<<
+ * np.float32,
+ * weighted_histo.dtype))
+ */
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Provided_weighted_histo_array_do_2, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 269, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 269, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_double); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 269, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+
+ /* "silx/math/chistogramnd.pyx":270
+ * ': should be {0} or {1} instead of {2}.'
+ * ''.format(np.double,
+ * np.float32, # <<<<<<<<<<<<<<
+ * weighted_histo.dtype))
+ *
+ */
+ __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 270, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_float32); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 270, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+
+ /* "silx/math/chistogramnd.pyx":271
+ * ''.format(np.double,
+ * np.float32,
+ * weighted_histo.dtype)) # <<<<<<<<<<<<<<
+ *
+ * option_flags = 0
+ */
+ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_weighted_histo, __pyx_n_s_dtype); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 271, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_11 = NULL;
+ __pyx_t_9 = 0;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
+ __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_5);
+ if (likely(__pyx_t_11)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+ __Pyx_INCREF(__pyx_t_11);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_5, function);
+ __pyx_t_9 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_11, __pyx_t_6, __pyx_t_3, __pyx_t_10};
+ __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_9, 3+__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 269, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_11, __pyx_t_6, __pyx_t_3, __pyx_t_10};
+ __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_9, 3+__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 269, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_12 = PyTuple_New(3+__pyx_t_9); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 269, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ if (__pyx_t_11) {
+ __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_11); __pyx_t_11 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_9, __pyx_t_6);
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_9, __pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_10);
+ PyTuple_SET_ITEM(__pyx_t_12, 2+__pyx_t_9, __pyx_t_10);
+ __pyx_t_6 = 0;
+ __pyx_t_3 = 0;
+ __pyx_t_10 = 0;
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 269, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "silx/math/chistogramnd.pyx":266
+ * if (weighted_histo.dtype != np.float64 and
+ * weighted_histo.dtype != np.float32):
+ * raise ValueError('Provided <weighted_histo> array doesn\'t have ' # <<<<<<<<<<<<<<
+ * 'the expected type '
+ * ': should be {0} or {1} instead of {2}.'
+ */
+ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 266, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
+ __pyx_t_4 = 0;
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 266, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_Raise(__pyx_t_4, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __PYX_ERR(0, 266, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":264
+ * ': should be {0} instead of {1}.'
+ * ''.format(output_shape, weighted_histo.shape))
+ * if (weighted_histo.dtype != np.float64 and # <<<<<<<<<<<<<<
+ * weighted_histo.dtype != np.float32):
+ * raise ValueError('Provided <weighted_histo> array doesn\'t have '
+ */
+ }
+ }
+ __pyx_L30:;
+
+ /* "silx/math/chistogramnd.pyx":273
+ * weighted_histo.dtype))
+ *
+ * option_flags = 0 # <<<<<<<<<<<<<<
+ *
+ * if weight_min is not None:
+ */
+ __Pyx_INCREF(__pyx_int_0);
+ __pyx_v_option_flags = __pyx_int_0;
+
+ /* "silx/math/chistogramnd.pyx":275
+ * option_flags = 0
+ *
+ * if weight_min is not None: # <<<<<<<<<<<<<<
+ * option_flags |= histogramnd_c.HISTO_WEIGHT_MIN
+ * else:
+ */
+ __pyx_t_2 = (__pyx_v_weight_min != Py_None);
+ __pyx_t_1 = (__pyx_t_2 != 0);
+ if (__pyx_t_1) {
+
+ /* "silx/math/chistogramnd.pyx":276
+ *
+ * if weight_min is not None:
+ * option_flags |= histogramnd_c.HISTO_WEIGHT_MIN # <<<<<<<<<<<<<<
+ * else:
+ * weight_min = 0
+ */
+ __pyx_t_4 = __Pyx_PyInt_From_histo_opt_type(HISTO_WEIGHT_MIN); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 276, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = PyNumber_InPlaceOr(__pyx_v_option_flags, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 276, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF_SET(__pyx_v_option_flags, __pyx_t_5);
+ __pyx_t_5 = 0;
+
+ /* "silx/math/chistogramnd.pyx":275
+ * option_flags = 0
+ *
+ * if weight_min is not None: # <<<<<<<<<<<<<<
+ * option_flags |= histogramnd_c.HISTO_WEIGHT_MIN
+ * else:
+ */
+ goto __pyx_L36;
+ }
+
+ /* "silx/math/chistogramnd.pyx":278
+ * option_flags |= histogramnd_c.HISTO_WEIGHT_MIN
+ * else:
+ * weight_min = 0 # <<<<<<<<<<<<<<
+ *
+ * if weight_max is not None:
+ */
+ /*else*/ {
+ __Pyx_INCREF(__pyx_int_0);
+ __Pyx_DECREF_SET(__pyx_v_weight_min, __pyx_int_0);
+ }
+ __pyx_L36:;
+
+ /* "silx/math/chistogramnd.pyx":280
+ * weight_min = 0
+ *
+ * if weight_max is not None: # <<<<<<<<<<<<<<
+ * option_flags |= histogramnd_c.HISTO_WEIGHT_MAX
+ * else:
+ */
+ __pyx_t_1 = (__pyx_v_weight_max != Py_None);
+ __pyx_t_2 = (__pyx_t_1 != 0);
+ if (__pyx_t_2) {
+
+ /* "silx/math/chistogramnd.pyx":281
+ *
+ * if weight_max is not None:
+ * option_flags |= histogramnd_c.HISTO_WEIGHT_MAX # <<<<<<<<<<<<<<
+ * else:
+ * weight_max = 0
+ */
+ __pyx_t_5 = __Pyx_PyInt_From_histo_opt_type(HISTO_WEIGHT_MAX); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 281, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_4 = PyNumber_InPlaceOr(__pyx_v_option_flags, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 281, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF_SET(__pyx_v_option_flags, __pyx_t_4);
+ __pyx_t_4 = 0;
+
+ /* "silx/math/chistogramnd.pyx":280
+ * weight_min = 0
+ *
+ * if weight_max is not None: # <<<<<<<<<<<<<<
+ * option_flags |= histogramnd_c.HISTO_WEIGHT_MAX
+ * else:
+ */
+ goto __pyx_L37;
+ }
+
+ /* "silx/math/chistogramnd.pyx":283
+ * option_flags |= histogramnd_c.HISTO_WEIGHT_MAX
+ * else:
+ * weight_max = 0 # <<<<<<<<<<<<<<
+ *
+ * if last_bin_closed is not None and last_bin_closed:
+ */
+ /*else*/ {
+ __Pyx_INCREF(__pyx_int_0);
+ __Pyx_DECREF_SET(__pyx_v_weight_max, __pyx_int_0);
+ }
+ __pyx_L37:;
+
+ /* "silx/math/chistogramnd.pyx":285
+ * weight_max = 0
+ *
+ * if last_bin_closed is not None and last_bin_closed: # <<<<<<<<<<<<<<
+ * option_flags |= histogramnd_c.HISTO_LAST_BIN_CLOSED
+ *
+ */
+ __pyx_t_1 = (__pyx_v_last_bin_closed != Py_None);
+ __pyx_t_7 = (__pyx_t_1 != 0);
+ if (__pyx_t_7) {
+ } else {
+ __pyx_t_2 = __pyx_t_7;
+ goto __pyx_L39_bool_binop_done;
+ }
+ __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_last_bin_closed); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 285, __pyx_L1_error)
+ __pyx_t_2 = __pyx_t_7;
+ __pyx_L39_bool_binop_done:;
+ if (__pyx_t_2) {
+
+ /* "silx/math/chistogramnd.pyx":286
+ *
+ * if last_bin_closed is not None and last_bin_closed:
+ * option_flags |= histogramnd_c.HISTO_LAST_BIN_CLOSED # <<<<<<<<<<<<<<
+ *
+ * sample_type = sample.dtype
+ */
+ __pyx_t_4 = __Pyx_PyInt_From_histo_opt_type(HISTO_LAST_BIN_CLOSED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 286, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = PyNumber_InPlaceOr(__pyx_v_option_flags, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 286, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF_SET(__pyx_v_option_flags, __pyx_t_5);
+ __pyx_t_5 = 0;
+
+ /* "silx/math/chistogramnd.pyx":285
+ * weight_max = 0
+ *
+ * if last_bin_closed is not None and last_bin_closed: # <<<<<<<<<<<<<<
+ * option_flags |= histogramnd_c.HISTO_LAST_BIN_CLOSED
+ *
+ */
+ }
+
+ /* "silx/math/chistogramnd.pyx":288
+ * option_flags |= histogramnd_c.HISTO_LAST_BIN_CLOSED
+ *
+ * sample_type = sample.dtype # <<<<<<<<<<<<<<
+ * sample_type = sample_type.newbyteorder('N')
+ *
+ */
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_sample, __pyx_n_s_dtype); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 288, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_5);
+ __pyx_cur_scope->__pyx_v_sample_type = __pyx_t_5;
+ __pyx_t_5 = 0;
+
+ /* "silx/math/chistogramnd.pyx":289
+ *
+ * sample_type = sample.dtype
+ * sample_type = sample_type.newbyteorder('N') # <<<<<<<<<<<<<<
+ *
+ * n_elem = sample.size // n_dims
+ */
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_sample_type, __pyx_n_s_newbyteorder); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 289, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 289, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_sample_type);
+ __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_sample_type, __pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_4);
+ __pyx_t_4 = 0;
+
+ /* "silx/math/chistogramnd.pyx":291
+ * sample_type = sample_type.newbyteorder('N')
+ *
+ * n_elem = sample.size // n_dims # <<<<<<<<<<<<<<
+ *
+ * bin_edges = np.zeros(n_bins.sum() + n_bins.size, dtype=np.double)
+ */
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_sample, __pyx_n_s_size); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 291, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = PyNumber_FloorDivide(__pyx_t_4, __pyx_v_n_dims); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 291, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_v_n_elem = __pyx_t_5;
+ __pyx_t_5 = 0;
+
+ /* "silx/math/chistogramnd.pyx":293
+ * n_elem = sample.size // n_dims
+ *
+ * bin_edges = np.zeros(n_bins.sum() + n_bins.size, dtype=np.double) # <<<<<<<<<<<<<<
+ *
+ * # wanted to store the functions in a dict (with the supported types
+ */
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 293, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 293, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_n_bins, __pyx_n_s_sum); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 293, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __pyx_t_10 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_12))) {
+ __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_12);
+ if (likely(__pyx_t_10)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
+ __Pyx_INCREF(__pyx_t_10);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_12, function);
+ }
+ }
+ if (__pyx_t_10) {
+ __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 293, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ } else {
+ __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_12); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 293, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_n_bins, __pyx_n_s_size); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 293, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __pyx_t_10 = PyNumber_Add(__pyx_t_5, __pyx_t_12); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 293, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 293, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_GIVEREF(__pyx_t_10);
+ PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10);
+ __pyx_t_10 = 0;
+ __pyx_t_10 = PyDict_New(); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 293, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 293, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_double); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 293, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(0, 293, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_12, __pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 293, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __pyx_v_bin_edges = __pyx_t_3;
+ __pyx_t_3 = 0;
+
+ /* "silx/math/chistogramnd.pyx":299
+ * # functions. so I have to explicitly list them all...
+ *
+ * def raise_unsupported_type(): # <<<<<<<<<<<<<<
+ * raise TypeError('Case not supported - sample:{0} '
+ * 'and weights:{1}.'
+ */
+ __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4silx_4math_12chistogramnd_12chistogramnd_1raise_unsupported_type, 0, __pyx_n_s_chistogramnd_locals_raise_unsupp, ((PyObject*)__pyx_cur_scope), __pyx_n_s_silx_math_chistogramnd, __pyx_d, ((PyObject *)__pyx_codeobj__11)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 299, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_v_raise_unsupported_type = __pyx_t_3;
+ __pyx_t_3 = 0;
+
+ /* "silx/math/chistogramnd.pyx":304
+ * ''.format(sample_type, weights_type))
+ *
+ * sample_c = np.ascontiguousarray(sample.reshape((sample.size,)), # <<<<<<<<<<<<<<
+ * dtype=sample_type)
+ *
+ */
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 304, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_ascontiguousarray); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 304, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_sample, __pyx_n_s_reshape); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 304, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_sample, __pyx_n_s_size); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 304, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 304, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
+ __pyx_t_4 = 0;
+ __pyx_t_4 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_12))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_12);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_12, function);
+ }
+ }
+ if (!__pyx_t_4) {
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 304, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_12)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_5};
+ __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 304, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_5};
+ __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 304, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 304, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
+ __Pyx_GIVEREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_5);
+ __pyx_t_5 = 0;
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 304, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 304, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_3);
+ __pyx_t_3 = 0;
+
+ /* "silx/math/chistogramnd.pyx":305
+ *
+ * sample_c = np.ascontiguousarray(sample.reshape((sample.size,)),
+ * dtype=sample_type) # <<<<<<<<<<<<<<
+ *
+ * weights_c = (np.ascontiguousarray(weights.reshape((weights.size,)),
+ */
+ __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 305, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_cur_scope->__pyx_v_sample_type) < 0) __PYX_ERR(0, 305, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":304
+ * ''.format(sample_type, weights_type))
+ *
+ * sample_c = np.ascontiguousarray(sample.reshape((sample.size,)), # <<<<<<<<<<<<<<
+ * dtype=sample_type)
+ *
+ */
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_12, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 304, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_v_sample_c = __pyx_t_6;
+ __pyx_t_6 = 0;
+
+ /* "silx/math/chistogramnd.pyx":309
+ * weights_c = (np.ascontiguousarray(weights.reshape((weights.size,)),
+ * dtype=weights.dtype.newbyteorder('N'))
+ * if weights is not None else None) # <<<<<<<<<<<<<<
+ *
+ * histo_range_c = np.ascontiguousarray(histo_range.reshape((histo_range.size,)),
+ */
+ __pyx_t_2 = (__pyx_v_weights != Py_None);
+ if ((__pyx_t_2 != 0)) {
+
+ /* "silx/math/chistogramnd.pyx":307
+ * dtype=sample_type)
+ *
+ * weights_c = (np.ascontiguousarray(weights.reshape((weights.size,)), # <<<<<<<<<<<<<<
+ * dtype=weights.dtype.newbyteorder('N'))
+ * if weights is not None else None)
+ */
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 307, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_ascontiguousarray); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 307, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_weights, __pyx_n_s_reshape); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 307, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_weights, __pyx_n_s_size); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 307, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 307, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
+ __pyx_t_5 = 0;
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_10);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_10, function);
+ }
+ }
+ if (!__pyx_t_5) {
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 307, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_10)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
+ __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 307, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
+ __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 307, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 307, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_5); __pyx_t_5 = NULL;
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_11, 0+1, __pyx_t_4);
+ __pyx_t_4 = 0;
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_11, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 307, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 307, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3);
+ __pyx_t_3 = 0;
+
+ /* "silx/math/chistogramnd.pyx":308
+ *
+ * weights_c = (np.ascontiguousarray(weights.reshape((weights.size,)),
+ * dtype=weights.dtype.newbyteorder('N')) # <<<<<<<<<<<<<<
+ * if weights is not None else None)
+ *
+ */
+ __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 308, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_weights, __pyx_n_s_dtype); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 308, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_newbyteorder); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 308, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 308, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_11) < 0) __PYX_ERR(0, 308, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+
+ /* "silx/math/chistogramnd.pyx":307
+ * dtype=sample_type)
+ *
+ * weights_c = (np.ascontiguousarray(weights.reshape((weights.size,)), # <<<<<<<<<<<<<<
+ * dtype=weights.dtype.newbyteorder('N'))
+ * if weights is not None else None)
+ */
+ __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, __pyx_t_3); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 307, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_6 = __pyx_t_11;
+ __pyx_t_11 = 0;
+ } else {
+
+ /* "silx/math/chistogramnd.pyx":309
+ * weights_c = (np.ascontiguousarray(weights.reshape((weights.size,)),
+ * dtype=weights.dtype.newbyteorder('N'))
+ * if weights is not None else None) # <<<<<<<<<<<<<<
+ *
+ * histo_range_c = np.ascontiguousarray(histo_range.reshape((histo_range.size,)),
+ */
+ __Pyx_INCREF(Py_None);
+ __pyx_t_6 = Py_None;
+ }
+ __pyx_v_weights_c = __pyx_t_6;
+ __pyx_t_6 = 0;
+
+ /* "silx/math/chistogramnd.pyx":311
+ * if weights is not None else None)
+ *
+ * histo_range_c = np.ascontiguousarray(histo_range.reshape((histo_range.size,)), # <<<<<<<<<<<<<<
+ * dtype=np.double)
+ *
+ */
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 311, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_ascontiguousarray); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 311, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_histo_range, __pyx_n_s_reshape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 311, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_histo_range, __pyx_n_s_size); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 311, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 311, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_GIVEREF(__pyx_t_10);
+ PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10);
+ __pyx_t_10 = 0;
+ __pyx_t_10 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_10)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_10);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (!__pyx_t_10) {
+ __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_12); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 311, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_GOTREF(__pyx_t_6);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_t_12};
+ __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 311, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_t_12};
+ __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 311, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 311, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_10); __pyx_t_10 = NULL;
+ __Pyx_GIVEREF(__pyx_t_12);
+ PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_t_12);
+ __pyx_t_12 = 0;
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 311, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 311, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6);
+ __pyx_t_6 = 0;
+
+ /* "silx/math/chistogramnd.pyx":312
+ *
+ * histo_range_c = np.ascontiguousarray(histo_range.reshape((histo_range.size,)),
+ * dtype=np.double) # <<<<<<<<<<<<<<
+ *
+ * n_bins_c = np.ascontiguousarray(n_bins.reshape((n_bins.size,)),
+ */
+ __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 312, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 312, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_double); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 312, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_t_12) < 0) __PYX_ERR(0, 312, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+
+ /* "silx/math/chistogramnd.pyx":311
+ * if weights is not None else None)
+ *
+ * histo_range_c = np.ascontiguousarray(histo_range.reshape((histo_range.size,)), # <<<<<<<<<<<<<<
+ * dtype=np.double)
+ *
+ */
+ __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 311, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_v_histo_range_c = __pyx_t_12;
+ __pyx_t_12 = 0;
+
+ /* "silx/math/chistogramnd.pyx":314
+ * dtype=np.double)
+ *
+ * n_bins_c = np.ascontiguousarray(n_bins.reshape((n_bins.size,)), # <<<<<<<<<<<<<<
+ * dtype=np.int32)
+ *
+ */
+ __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 314, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_ascontiguousarray); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 314, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_n_bins, __pyx_n_s_reshape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 314, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_n_bins, __pyx_n_s_size); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 314, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 314, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_11);
+ PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_11);
+ __pyx_t_11 = 0;
+ __pyx_t_11 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_11)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_11);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (!__pyx_t_11) {
+ __pyx_t_12 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 314, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_12);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_11, __pyx_t_4};
+ __pyx_t_12 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 314, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_11, __pyx_t_4};
+ __pyx_t_12 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 314, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 314, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_11); __pyx_t_11 = NULL;
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_4);
+ __pyx_t_4 = 0;
+ __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_10, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 314, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 314, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_12);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12);
+ __pyx_t_12 = 0;
+
+ /* "silx/math/chistogramnd.pyx":315
+ *
+ * n_bins_c = np.ascontiguousarray(n_bins.reshape((n_bins.size,)),
+ * dtype=np.int32) # <<<<<<<<<<<<<<
+ *
+ * histo_c = histo.reshape((histo.size,))
+ */
+ __pyx_t_12 = PyDict_New(); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 315, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 315, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_int32); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 315, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(0, 315, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+ /* "silx/math/chistogramnd.pyx":314
+ * dtype=np.double)
+ *
+ * n_bins_c = np.ascontiguousarray(n_bins.reshape((n_bins.size,)), # <<<<<<<<<<<<<<
+ * dtype=np.int32)
+ *
+ */
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_3, __pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 314, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __pyx_v_n_bins_c = __pyx_t_4;
+ __pyx_t_4 = 0;
+
+ /* "silx/math/chistogramnd.pyx":317
+ * dtype=np.int32)
+ *
+ * histo_c = histo.reshape((histo.size,)) # <<<<<<<<<<<<<<
+ *
+ * if weighted_histo is not None:
+ */
+ __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_histo, __pyx_n_s_reshape); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 317, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_histo, __pyx_n_s_size); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 317, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 317, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3);
+ __pyx_t_3 = 0;
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_12))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_12, function);
+ }
+ }
+ if (!__pyx_t_3) {
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 317, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_12)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_6};
+ __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 317, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_6};
+ __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 317, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 317, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_6);
+ __pyx_t_6 = 0;
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 317, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __pyx_v_histo_c = __pyx_t_4;
+ __pyx_t_4 = 0;
+
+ /* "silx/math/chistogramnd.pyx":319
+ * histo_c = histo.reshape((histo.size,))
+ *
+ * if weighted_histo is not None: # <<<<<<<<<<<<<<
+ * cumul_c = weighted_histo.reshape((weighted_histo.size,))
+ * else:
+ */
+ __pyx_t_2 = (__pyx_v_weighted_histo != Py_None);
+ __pyx_t_7 = (__pyx_t_2 != 0);
+ if (__pyx_t_7) {
+
+ /* "silx/math/chistogramnd.pyx":320
+ *
+ * if weighted_histo is not None:
+ * cumul_c = weighted_histo.reshape((weighted_histo.size,)) # <<<<<<<<<<<<<<
+ * else:
+ * cumul_c = None
+ */
+ __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_weighted_histo, __pyx_n_s_reshape); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 320, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_weighted_histo, __pyx_n_s_size); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 320, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 320, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_GIVEREF(__pyx_t_10);
+ PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_10);
+ __pyx_t_10 = 0;
+ __pyx_t_10 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_12))) {
+ __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_12);
+ if (likely(__pyx_t_10)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
+ __Pyx_INCREF(__pyx_t_10);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_12, function);
+ }
+ }
+ if (!__pyx_t_10) {
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 320, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_12)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_t_6};
+ __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 320, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_t_6};
+ __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 320, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 320, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_10); __pyx_t_10 = NULL;
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_t_6);
+ __pyx_t_6 = 0;
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 320, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __pyx_v_cumul_c = __pyx_t_4;
+ __pyx_t_4 = 0;
+
+ /* "silx/math/chistogramnd.pyx":319
+ * histo_c = histo.reshape((histo.size,))
+ *
+ * if weighted_histo is not None: # <<<<<<<<<<<<<<
+ * cumul_c = weighted_histo.reshape((weighted_histo.size,))
+ * else:
+ */
+ goto __pyx_L41;
+ }
+
+ /* "silx/math/chistogramnd.pyx":322
+ * cumul_c = weighted_histo.reshape((weighted_histo.size,))
+ * else:
+ * cumul_c = None # <<<<<<<<<<<<<<
+ *
+ * bin_edges_c = np.ascontiguousarray(bin_edges.reshape((bin_edges.size,)),
+ */
+ /*else*/ {
+ __Pyx_INCREF(Py_None);
+ __pyx_v_cumul_c = Py_None;
+ }
+ __pyx_L41:;
+
+ /* "silx/math/chistogramnd.pyx":324
+ * cumul_c = None
+ *
+ * bin_edges_c = np.ascontiguousarray(bin_edges.reshape((bin_edges.size,)), # <<<<<<<<<<<<<<
+ * dtype=bin_edges.dtype.newbyteorder('N'))
+ *
+ */
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 324, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_ascontiguousarray); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 324, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_bin_edges, __pyx_n_s_reshape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 324, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_bin_edges, __pyx_n_s_size); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 324, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 324, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_6);
+ __pyx_t_6 = 0;
+ __pyx_t_6 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (!__pyx_t_6) {
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 324, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_10};
+ __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 324, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_10};
+ __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 324, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 324, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_6); __pyx_t_6 = NULL;
+ __Pyx_GIVEREF(__pyx_t_10);
+ PyTuple_SET_ITEM(__pyx_t_11, 0+1, __pyx_t_10);
+ __pyx_t_10 = 0;
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_11, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 324, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 324, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
+ __pyx_t_4 = 0;
+
+ /* "silx/math/chistogramnd.pyx":325
+ *
+ * bin_edges_c = np.ascontiguousarray(bin_edges.reshape((bin_edges.size,)),
+ * dtype=bin_edges.dtype.newbyteorder('N')) # <<<<<<<<<<<<<<
+ *
+ * rc = 0
+ */
+ __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 325, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_bin_edges, __pyx_n_s_dtype); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 325, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_newbyteorder); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 325, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 325, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_11) < 0) __PYX_ERR(0, 325, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+
+ /* "silx/math/chistogramnd.pyx":324
+ * cumul_c = None
+ *
+ * bin_edges_c = np.ascontiguousarray(bin_edges.reshape((bin_edges.size,)), # <<<<<<<<<<<<<<
+ * dtype=bin_edges.dtype.newbyteorder('N'))
+ *
+ */
+ __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 324, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_v_bin_edges_c = __pyx_t_11;
+ __pyx_t_11 = 0;
+
+ /* "silx/math/chistogramnd.pyx":327
+ * dtype=bin_edges.dtype.newbyteorder('N'))
+ *
+ * rc = 0 # <<<<<<<<<<<<<<
+ *
+ * if weighted_histo is None or weighted_histo.dtype == np.double:
+ */
+ __pyx_v_rc = 0;
+
+ /* "silx/math/chistogramnd.pyx":329
+ * rc = 0
+ *
+ * if weighted_histo is None or weighted_histo.dtype == np.double: # <<<<<<<<<<<<<<
+ *
+ * if sample_type == np.float64:
+ */
+ __pyx_t_2 = (__pyx_v_weighted_histo == Py_None);
+ __pyx_t_1 = (__pyx_t_2 != 0);
+ if (!__pyx_t_1) {
+ } else {
+ __pyx_t_7 = __pyx_t_1;
+ goto __pyx_L43_bool_binop_done;
+ }
+ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_weighted_histo, __pyx_n_s_dtype); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 329, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 329, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_double); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 329, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = PyObject_RichCompare(__pyx_t_11, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 329, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 329, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_7 = __pyx_t_1;
+ __pyx_L43_bool_binop_done:;
+ if (__pyx_t_7) {
+
+ /* "silx/math/chistogramnd.pyx":331
+ * if weighted_histo is None or weighted_histo.dtype == np.double:
+ *
+ * if sample_type == np.float64: # <<<<<<<<<<<<<<
+ *
+ * if weights_type == np.float64 or weights_type is None:
+ */
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 331, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_float64); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 331, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_sample_type, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 331, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 331, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ if (__pyx_t_7) {
+
+ /* "silx/math/chistogramnd.pyx":333
+ * if sample_type == np.float64:
+ *
+ * if weights_type == np.float64 or weights_type is None: # <<<<<<<<<<<<<<
+ *
+ * rc = _histogramnd_double_double_double(sample_c,
+ */
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 333, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_float64); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 333, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_weights_type, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 333, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 333, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ if (!__pyx_t_1) {
+ } else {
+ __pyx_t_7 = __pyx_t_1;
+ goto __pyx_L47_bool_binop_done;
+ }
+ __pyx_t_1 = (__pyx_cur_scope->__pyx_v_weights_type == Py_None);
+ __pyx_t_2 = (__pyx_t_1 != 0);
+ __pyx_t_7 = __pyx_t_2;
+ __pyx_L47_bool_binop_done:;
+ if (__pyx_t_7) {
+
+ /* "silx/math/chistogramnd.pyx":335
+ * if weights_type == np.float64 or weights_type is None:
+ *
+ * rc = _histogramnd_double_double_double(sample_c, # <<<<<<<<<<<<<<
+ * weights_c,
+ * n_dims,
+ */
+ __pyx_t_13 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_sample_c);
+ if (unlikely(!__pyx_t_13.memview)) __PYX_ERR(0, 335, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":336
+ *
+ * rc = _histogramnd_double_double_double(sample_c,
+ * weights_c, # <<<<<<<<<<<<<<
+ * n_dims,
+ * n_elem,
+ */
+ __pyx_t_14 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_weights_c);
+ if (unlikely(!__pyx_t_14.memview)) __PYX_ERR(0, 336, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":337
+ * rc = _histogramnd_double_double_double(sample_c,
+ * weights_c,
+ * n_dims, # <<<<<<<<<<<<<<
+ * n_elem,
+ * histo_range_c,
+ */
+ __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_v_n_dims); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 337, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":338
+ * weights_c,
+ * n_dims,
+ * n_elem, # <<<<<<<<<<<<<<
+ * histo_range_c,
+ * n_bins_c,
+ */
+ __pyx_t_15 = __Pyx_PyInt_As_int(__pyx_v_n_elem); if (unlikely((__pyx_t_15 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 338, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":339
+ * n_dims,
+ * n_elem,
+ * histo_range_c, # <<<<<<<<<<<<<<
+ * n_bins_c,
+ * histo_c,
+ */
+ __pyx_t_16 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_histo_range_c);
+ if (unlikely(!__pyx_t_16.memview)) __PYX_ERR(0, 339, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":340
+ * n_elem,
+ * histo_range_c,
+ * n_bins_c, # <<<<<<<<<<<<<<
+ * histo_c,
+ * cumul_c,
+ */
+ __pyx_t_17 = __Pyx_PyObject_to_MemoryviewSlice_ds_int(__pyx_v_n_bins_c);
+ if (unlikely(!__pyx_t_17.memview)) __PYX_ERR(0, 340, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":341
+ * histo_range_c,
+ * n_bins_c,
+ * histo_c, # <<<<<<<<<<<<<<
+ * cumul_c,
+ * bin_edges_c,
+ */
+ __pyx_t_18 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(__pyx_v_histo_c);
+ if (unlikely(!__pyx_t_18.memview)) __PYX_ERR(0, 341, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":342
+ * n_bins_c,
+ * histo_c,
+ * cumul_c, # <<<<<<<<<<<<<<
+ * bin_edges_c,
+ * option_flags,
+ */
+ __pyx_t_19 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_cumul_c);
+ if (unlikely(!__pyx_t_19.memview)) __PYX_ERR(0, 342, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":343
+ * histo_c,
+ * cumul_c,
+ * bin_edges_c, # <<<<<<<<<<<<<<
+ * option_flags,
+ * weight_min=weight_min,
+ */
+ __pyx_t_20 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_bin_edges_c);
+ if (unlikely(!__pyx_t_20.memview)) __PYX_ERR(0, 343, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":344
+ * cumul_c,
+ * bin_edges_c,
+ * option_flags, # <<<<<<<<<<<<<<
+ * weight_min=weight_min,
+ * weight_max=weight_max)
+ */
+ __pyx_t_21 = __Pyx_PyInt_As_int(__pyx_v_option_flags); if (unlikely((__pyx_t_21 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 344, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":345
+ * bin_edges_c,
+ * option_flags,
+ * weight_min=weight_min, # <<<<<<<<<<<<<<
+ * weight_max=weight_max)
+ *
+ */
+ __pyx_t_22 = __pyx_PyFloat_AsDouble(__pyx_v_weight_min); if (unlikely((__pyx_t_22 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 345, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":346
+ * option_flags,
+ * weight_min=weight_min,
+ * weight_max=weight_max) # <<<<<<<<<<<<<<
+ *
+ * elif weights_type == np.float32:
+ */
+ __pyx_t_23 = __pyx_PyFloat_AsDouble(__pyx_v_weight_max); if (unlikely((__pyx_t_23 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 346, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":335
+ * if weights_type == np.float64 or weights_type is None:
+ *
+ * rc = _histogramnd_double_double_double(sample_c, # <<<<<<<<<<<<<<
+ * weights_c,
+ * n_dims,
+ */
+ __pyx_v_rc = __pyx_f_4silx_4math_12chistogramnd__histogramnd_double_double_double(__pyx_t_13, __pyx_t_14, __pyx_t_9, __pyx_t_15, __pyx_t_16, __pyx_t_17, __pyx_t_18, __pyx_t_19, __pyx_t_20, __pyx_t_21, __pyx_t_22, __pyx_t_23);
+ __PYX_XDEC_MEMVIEW(&__pyx_t_13, 1);
+ __pyx_t_13.memview = NULL;
+ __pyx_t_13.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_14, 1);
+ __pyx_t_14.memview = NULL;
+ __pyx_t_14.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_16, 1);
+ __pyx_t_16.memview = NULL;
+ __pyx_t_16.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_17, 1);
+ __pyx_t_17.memview = NULL;
+ __pyx_t_17.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_18, 1);
+ __pyx_t_18.memview = NULL;
+ __pyx_t_18.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_19, 1);
+ __pyx_t_19.memview = NULL;
+ __pyx_t_19.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_20, 1);
+ __pyx_t_20.memview = NULL;
+ __pyx_t_20.data = NULL;
+
+ /* "silx/math/chistogramnd.pyx":333
+ * if sample_type == np.float64:
+ *
+ * if weights_type == np.float64 or weights_type is None: # <<<<<<<<<<<<<<
+ *
+ * rc = _histogramnd_double_double_double(sample_c,
+ */
+ goto __pyx_L46;
+ }
+
+ /* "silx/math/chistogramnd.pyx":348
+ * weight_max=weight_max)
+ *
+ * elif weights_type == np.float32: # <<<<<<<<<<<<<<
+ *
+ * rc = _histogramnd_double_float_double(sample_c,
+ */
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 348, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_float32); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 348, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_weights_type, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 348, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 348, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ if (__pyx_t_7) {
+
+ /* "silx/math/chistogramnd.pyx":350
+ * elif weights_type == np.float32:
+ *
+ * rc = _histogramnd_double_float_double(sample_c, # <<<<<<<<<<<<<<
+ * weights_c,
+ * n_dims,
+ */
+ __pyx_t_20 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_sample_c);
+ if (unlikely(!__pyx_t_20.memview)) __PYX_ERR(0, 350, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":351
+ *
+ * rc = _histogramnd_double_float_double(sample_c,
+ * weights_c, # <<<<<<<<<<<<<<
+ * n_dims,
+ * n_elem,
+ */
+ __pyx_t_24 = __Pyx_PyObject_to_MemoryviewSlice_ds_float(__pyx_v_weights_c);
+ if (unlikely(!__pyx_t_24.memview)) __PYX_ERR(0, 351, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":352
+ * rc = _histogramnd_double_float_double(sample_c,
+ * weights_c,
+ * n_dims, # <<<<<<<<<<<<<<
+ * n_elem,
+ * histo_range_c,
+ */
+ __pyx_t_21 = __Pyx_PyInt_As_int(__pyx_v_n_dims); if (unlikely((__pyx_t_21 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 352, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":353
+ * weights_c,
+ * n_dims,
+ * n_elem, # <<<<<<<<<<<<<<
+ * histo_range_c,
+ * n_bins_c,
+ */
+ __pyx_t_15 = __Pyx_PyInt_As_int(__pyx_v_n_elem); if (unlikely((__pyx_t_15 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 353, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":354
+ * n_dims,
+ * n_elem,
+ * histo_range_c, # <<<<<<<<<<<<<<
+ * n_bins_c,
+ * histo_c,
+ */
+ __pyx_t_19 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_histo_range_c);
+ if (unlikely(!__pyx_t_19.memview)) __PYX_ERR(0, 354, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":355
+ * n_elem,
+ * histo_range_c,
+ * n_bins_c, # <<<<<<<<<<<<<<
+ * histo_c,
+ * cumul_c,
+ */
+ __pyx_t_17 = __Pyx_PyObject_to_MemoryviewSlice_ds_int(__pyx_v_n_bins_c);
+ if (unlikely(!__pyx_t_17.memview)) __PYX_ERR(0, 355, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":356
+ * histo_range_c,
+ * n_bins_c,
+ * histo_c, # <<<<<<<<<<<<<<
+ * cumul_c,
+ * bin_edges_c,
+ */
+ __pyx_t_18 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(__pyx_v_histo_c);
+ if (unlikely(!__pyx_t_18.memview)) __PYX_ERR(0, 356, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":357
+ * n_bins_c,
+ * histo_c,
+ * cumul_c, # <<<<<<<<<<<<<<
+ * bin_edges_c,
+ * option_flags,
+ */
+ __pyx_t_16 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_cumul_c);
+ if (unlikely(!__pyx_t_16.memview)) __PYX_ERR(0, 357, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":358
+ * histo_c,
+ * cumul_c,
+ * bin_edges_c, # <<<<<<<<<<<<<<
+ * option_flags,
+ * weight_min=weight_min,
+ */
+ __pyx_t_14 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_bin_edges_c);
+ if (unlikely(!__pyx_t_14.memview)) __PYX_ERR(0, 358, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":359
+ * cumul_c,
+ * bin_edges_c,
+ * option_flags, # <<<<<<<<<<<<<<
+ * weight_min=weight_min,
+ * weight_max=weight_max)
+ */
+ __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_v_option_flags); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 359, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":360
+ * bin_edges_c,
+ * option_flags,
+ * weight_min=weight_min, # <<<<<<<<<<<<<<
+ * weight_max=weight_max)
+ *
+ */
+ __pyx_t_25 = __pyx_PyFloat_AsFloat(__pyx_v_weight_min); if (unlikely((__pyx_t_25 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 360, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":361
+ * option_flags,
+ * weight_min=weight_min,
+ * weight_max=weight_max) # <<<<<<<<<<<<<<
+ *
+ * elif weights_type == np.int32:
+ */
+ __pyx_t_26 = __pyx_PyFloat_AsFloat(__pyx_v_weight_max); if (unlikely((__pyx_t_26 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 361, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":350
+ * elif weights_type == np.float32:
+ *
+ * rc = _histogramnd_double_float_double(sample_c, # <<<<<<<<<<<<<<
+ * weights_c,
+ * n_dims,
+ */
+ __pyx_v_rc = __pyx_f_4silx_4math_12chistogramnd__histogramnd_double_float_double(__pyx_t_20, __pyx_t_24, __pyx_t_21, __pyx_t_15, __pyx_t_19, __pyx_t_17, __pyx_t_18, __pyx_t_16, __pyx_t_14, __pyx_t_9, __pyx_t_25, __pyx_t_26);
+ __PYX_XDEC_MEMVIEW(&__pyx_t_20, 1);
+ __pyx_t_20.memview = NULL;
+ __pyx_t_20.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_24, 1);
+ __pyx_t_24.memview = NULL;
+ __pyx_t_24.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_19, 1);
+ __pyx_t_19.memview = NULL;
+ __pyx_t_19.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_17, 1);
+ __pyx_t_17.memview = NULL;
+ __pyx_t_17.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_18, 1);
+ __pyx_t_18.memview = NULL;
+ __pyx_t_18.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_16, 1);
+ __pyx_t_16.memview = NULL;
+ __pyx_t_16.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_14, 1);
+ __pyx_t_14.memview = NULL;
+ __pyx_t_14.data = NULL;
+
+ /* "silx/math/chistogramnd.pyx":348
+ * weight_max=weight_max)
+ *
+ * elif weights_type == np.float32: # <<<<<<<<<<<<<<
+ *
+ * rc = _histogramnd_double_float_double(sample_c,
+ */
+ goto __pyx_L46;
+ }
+
+ /* "silx/math/chistogramnd.pyx":363
+ * weight_max=weight_max)
+ *
+ * elif weights_type == np.int32: # <<<<<<<<<<<<<<
+ *
+ * rc = _histogramnd_double_int32_t_double(sample_c,
+ */
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 363, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_int32); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 363, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_weights_type, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 363, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 363, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ if (__pyx_t_7) {
+
+ /* "silx/math/chistogramnd.pyx":365
+ * elif weights_type == np.int32:
+ *
+ * rc = _histogramnd_double_int32_t_double(sample_c, # <<<<<<<<<<<<<<
+ * weights_c,
+ * n_dims,
+ */
+ __pyx_t_14 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_sample_c);
+ if (unlikely(!__pyx_t_14.memview)) __PYX_ERR(0, 365, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":366
+ *
+ * rc = _histogramnd_double_int32_t_double(sample_c,
+ * weights_c, # <<<<<<<<<<<<<<
+ * n_dims,
+ * n_elem,
+ */
+ __pyx_t_27 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(__pyx_v_weights_c);
+ if (unlikely(!__pyx_t_27.memview)) __PYX_ERR(0, 366, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":367
+ * rc = _histogramnd_double_int32_t_double(sample_c,
+ * weights_c,
+ * n_dims, # <<<<<<<<<<<<<<
+ * n_elem,
+ * histo_range_c,
+ */
+ __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_v_n_dims); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 367, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":368
+ * weights_c,
+ * n_dims,
+ * n_elem, # <<<<<<<<<<<<<<
+ * histo_range_c,
+ * n_bins_c,
+ */
+ __pyx_t_15 = __Pyx_PyInt_As_int(__pyx_v_n_elem); if (unlikely((__pyx_t_15 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 368, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":369
+ * n_dims,
+ * n_elem,
+ * histo_range_c, # <<<<<<<<<<<<<<
+ * n_bins_c,
+ * histo_c,
+ */
+ __pyx_t_16 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_histo_range_c);
+ if (unlikely(!__pyx_t_16.memview)) __PYX_ERR(0, 369, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":370
+ * n_elem,
+ * histo_range_c,
+ * n_bins_c, # <<<<<<<<<<<<<<
+ * histo_c,
+ * cumul_c,
+ */
+ __pyx_t_17 = __Pyx_PyObject_to_MemoryviewSlice_ds_int(__pyx_v_n_bins_c);
+ if (unlikely(!__pyx_t_17.memview)) __PYX_ERR(0, 370, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":371
+ * histo_range_c,
+ * n_bins_c,
+ * histo_c, # <<<<<<<<<<<<<<
+ * cumul_c,
+ * bin_edges_c,
+ */
+ __pyx_t_18 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(__pyx_v_histo_c);
+ if (unlikely(!__pyx_t_18.memview)) __PYX_ERR(0, 371, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":372
+ * n_bins_c,
+ * histo_c,
+ * cumul_c, # <<<<<<<<<<<<<<
+ * bin_edges_c,
+ * option_flags,
+ */
+ __pyx_t_19 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_cumul_c);
+ if (unlikely(!__pyx_t_19.memview)) __PYX_ERR(0, 372, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":373
+ * histo_c,
+ * cumul_c,
+ * bin_edges_c, # <<<<<<<<<<<<<<
+ * option_flags,
+ * weight_min=weight_min,
+ */
+ __pyx_t_20 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_bin_edges_c);
+ if (unlikely(!__pyx_t_20.memview)) __PYX_ERR(0, 373, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":374
+ * cumul_c,
+ * bin_edges_c,
+ * option_flags, # <<<<<<<<<<<<<<
+ * weight_min=weight_min,
+ * weight_max=weight_max)
+ */
+ __pyx_t_21 = __Pyx_PyInt_As_int(__pyx_v_option_flags); if (unlikely((__pyx_t_21 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 374, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":375
+ * bin_edges_c,
+ * option_flags,
+ * weight_min=weight_min, # <<<<<<<<<<<<<<
+ * weight_max=weight_max)
+ *
+ */
+ __pyx_t_28 = __Pyx_PyInt_As_npy_int32(__pyx_v_weight_min); if (unlikely((__pyx_t_28 == ((npy_int32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 375, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":376
+ * option_flags,
+ * weight_min=weight_min,
+ * weight_max=weight_max) # <<<<<<<<<<<<<<
+ *
+ * else:
+ */
+ __pyx_t_29 = __Pyx_PyInt_As_npy_int32(__pyx_v_weight_max); if (unlikely((__pyx_t_29 == ((npy_int32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 376, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":365
+ * elif weights_type == np.int32:
+ *
+ * rc = _histogramnd_double_int32_t_double(sample_c, # <<<<<<<<<<<<<<
+ * weights_c,
+ * n_dims,
+ */
+ __pyx_v_rc = __pyx_f_4silx_4math_12chistogramnd__histogramnd_double_int32_t_double(__pyx_t_14, __pyx_t_27, __pyx_t_9, __pyx_t_15, __pyx_t_16, __pyx_t_17, __pyx_t_18, __pyx_t_19, __pyx_t_20, __pyx_t_21, __pyx_t_28, __pyx_t_29);
+ __PYX_XDEC_MEMVIEW(&__pyx_t_14, 1);
+ __pyx_t_14.memview = NULL;
+ __pyx_t_14.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_27, 1);
+ __pyx_t_27.memview = NULL;
+ __pyx_t_27.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_16, 1);
+ __pyx_t_16.memview = NULL;
+ __pyx_t_16.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_17, 1);
+ __pyx_t_17.memview = NULL;
+ __pyx_t_17.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_18, 1);
+ __pyx_t_18.memview = NULL;
+ __pyx_t_18.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_19, 1);
+ __pyx_t_19.memview = NULL;
+ __pyx_t_19.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_20, 1);
+ __pyx_t_20.memview = NULL;
+ __pyx_t_20.data = NULL;
+
+ /* "silx/math/chistogramnd.pyx":363
+ * weight_max=weight_max)
+ *
+ * elif weights_type == np.int32: # <<<<<<<<<<<<<<
+ *
+ * rc = _histogramnd_double_int32_t_double(sample_c,
+ */
+ goto __pyx_L46;
+ }
+
+ /* "silx/math/chistogramnd.pyx":379
+ *
+ * else:
+ * raise_unsupported_type() # <<<<<<<<<<<<<<
+ *
+ * # endif sample_type == np.float64
+ */
+ /*else*/ {
+ __pyx_t_4 = __pyx_pf_4silx_4math_12chistogramnd_12chistogramnd_raise_unsupported_type(__pyx_v_raise_unsupported_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 379, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ }
+ __pyx_L46:;
+
+ /* "silx/math/chistogramnd.pyx":331
+ * if weighted_histo is None or weighted_histo.dtype == np.double:
+ *
+ * if sample_type == np.float64: # <<<<<<<<<<<<<<
+ *
+ * if weights_type == np.float64 or weights_type is None:
+ */
+ goto __pyx_L45;
+ }
+
+ /* "silx/math/chistogramnd.pyx":382
+ *
+ * # endif sample_type == np.float64
+ * elif sample_type == np.float32: # <<<<<<<<<<<<<<
+ *
+ * if weights_type == np.float64 or weights_type is None:
+ */
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 382, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_float32); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 382, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_sample_type, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 382, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 382, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ if (__pyx_t_7) {
+
+ /* "silx/math/chistogramnd.pyx":384
+ * elif sample_type == np.float32:
+ *
+ * if weights_type == np.float64 or weights_type is None: # <<<<<<<<<<<<<<
+ *
+ * rc = _histogramnd_float_double_double(sample_c,
+ */
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 384, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_float64); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 384, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_weights_type, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 384, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 384, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ if (!__pyx_t_2) {
+ } else {
+ __pyx_t_7 = __pyx_t_2;
+ goto __pyx_L50_bool_binop_done;
+ }
+ __pyx_t_2 = (__pyx_cur_scope->__pyx_v_weights_type == Py_None);
+ __pyx_t_1 = (__pyx_t_2 != 0);
+ __pyx_t_7 = __pyx_t_1;
+ __pyx_L50_bool_binop_done:;
+ if (__pyx_t_7) {
+
+ /* "silx/math/chistogramnd.pyx":386
+ * if weights_type == np.float64 or weights_type is None:
+ *
+ * rc = _histogramnd_float_double_double(sample_c, # <<<<<<<<<<<<<<
+ * weights_c,
+ * n_dims,
+ */
+ __pyx_t_24 = __Pyx_PyObject_to_MemoryviewSlice_ds_float(__pyx_v_sample_c);
+ if (unlikely(!__pyx_t_24.memview)) __PYX_ERR(0, 386, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":387
+ *
+ * rc = _histogramnd_float_double_double(sample_c,
+ * weights_c, # <<<<<<<<<<<<<<
+ * n_dims,
+ * n_elem,
+ */
+ __pyx_t_20 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_weights_c);
+ if (unlikely(!__pyx_t_20.memview)) __PYX_ERR(0, 387, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":388
+ * rc = _histogramnd_float_double_double(sample_c,
+ * weights_c,
+ * n_dims, # <<<<<<<<<<<<<<
+ * n_elem,
+ * histo_range_c,
+ */
+ __pyx_t_21 = __Pyx_PyInt_As_int(__pyx_v_n_dims); if (unlikely((__pyx_t_21 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 388, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":389
+ * weights_c,
+ * n_dims,
+ * n_elem, # <<<<<<<<<<<<<<
+ * histo_range_c,
+ * n_bins_c,
+ */
+ __pyx_t_15 = __Pyx_PyInt_As_int(__pyx_v_n_elem); if (unlikely((__pyx_t_15 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 389, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":390
+ * n_dims,
+ * n_elem,
+ * histo_range_c, # <<<<<<<<<<<<<<
+ * n_bins_c,
+ * histo_c,
+ */
+ __pyx_t_19 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_histo_range_c);
+ if (unlikely(!__pyx_t_19.memview)) __PYX_ERR(0, 390, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":391
+ * n_elem,
+ * histo_range_c,
+ * n_bins_c, # <<<<<<<<<<<<<<
+ * histo_c,
+ * cumul_c,
+ */
+ __pyx_t_17 = __Pyx_PyObject_to_MemoryviewSlice_ds_int(__pyx_v_n_bins_c);
+ if (unlikely(!__pyx_t_17.memview)) __PYX_ERR(0, 391, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":392
+ * histo_range_c,
+ * n_bins_c,
+ * histo_c, # <<<<<<<<<<<<<<
+ * cumul_c,
+ * bin_edges_c,
+ */
+ __pyx_t_18 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(__pyx_v_histo_c);
+ if (unlikely(!__pyx_t_18.memview)) __PYX_ERR(0, 392, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":393
+ * n_bins_c,
+ * histo_c,
+ * cumul_c, # <<<<<<<<<<<<<<
+ * bin_edges_c,
+ * option_flags,
+ */
+ __pyx_t_16 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_cumul_c);
+ if (unlikely(!__pyx_t_16.memview)) __PYX_ERR(0, 393, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":394
+ * histo_c,
+ * cumul_c,
+ * bin_edges_c, # <<<<<<<<<<<<<<
+ * option_flags,
+ * weight_min=weight_min,
+ */
+ __pyx_t_14 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_bin_edges_c);
+ if (unlikely(!__pyx_t_14.memview)) __PYX_ERR(0, 394, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":395
+ * cumul_c,
+ * bin_edges_c,
+ * option_flags, # <<<<<<<<<<<<<<
+ * weight_min=weight_min,
+ * weight_max=weight_max)
+ */
+ __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_v_option_flags); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 395, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":396
+ * bin_edges_c,
+ * option_flags,
+ * weight_min=weight_min, # <<<<<<<<<<<<<<
+ * weight_max=weight_max)
+ *
+ */
+ __pyx_t_23 = __pyx_PyFloat_AsDouble(__pyx_v_weight_min); if (unlikely((__pyx_t_23 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 396, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":397
+ * option_flags,
+ * weight_min=weight_min,
+ * weight_max=weight_max) # <<<<<<<<<<<<<<
+ *
+ * elif weights_type == np.float32:
+ */
+ __pyx_t_22 = __pyx_PyFloat_AsDouble(__pyx_v_weight_max); if (unlikely((__pyx_t_22 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 397, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":386
+ * if weights_type == np.float64 or weights_type is None:
+ *
+ * rc = _histogramnd_float_double_double(sample_c, # <<<<<<<<<<<<<<
+ * weights_c,
+ * n_dims,
+ */
+ __pyx_v_rc = __pyx_f_4silx_4math_12chistogramnd__histogramnd_float_double_double(__pyx_t_24, __pyx_t_20, __pyx_t_21, __pyx_t_15, __pyx_t_19, __pyx_t_17, __pyx_t_18, __pyx_t_16, __pyx_t_14, __pyx_t_9, __pyx_t_23, __pyx_t_22);
+ __PYX_XDEC_MEMVIEW(&__pyx_t_24, 1);
+ __pyx_t_24.memview = NULL;
+ __pyx_t_24.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_20, 1);
+ __pyx_t_20.memview = NULL;
+ __pyx_t_20.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_19, 1);
+ __pyx_t_19.memview = NULL;
+ __pyx_t_19.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_17, 1);
+ __pyx_t_17.memview = NULL;
+ __pyx_t_17.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_18, 1);
+ __pyx_t_18.memview = NULL;
+ __pyx_t_18.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_16, 1);
+ __pyx_t_16.memview = NULL;
+ __pyx_t_16.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_14, 1);
+ __pyx_t_14.memview = NULL;
+ __pyx_t_14.data = NULL;
+
+ /* "silx/math/chistogramnd.pyx":384
+ * elif sample_type == np.float32:
+ *
+ * if weights_type == np.float64 or weights_type is None: # <<<<<<<<<<<<<<
+ *
+ * rc = _histogramnd_float_double_double(sample_c,
+ */
+ goto __pyx_L49;
+ }
+
+ /* "silx/math/chistogramnd.pyx":399
+ * weight_max=weight_max)
+ *
+ * elif weights_type == np.float32: # <<<<<<<<<<<<<<
+ *
+ * rc = _histogramnd_float_float_double(sample_c,
+ */
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 399, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_float32); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 399, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_weights_type, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 399, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 399, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ if (__pyx_t_7) {
+
+ /* "silx/math/chistogramnd.pyx":401
+ * elif weights_type == np.float32:
+ *
+ * rc = _histogramnd_float_float_double(sample_c, # <<<<<<<<<<<<<<
+ * weights_c,
+ * n_dims,
+ */
+ __pyx_t_24 = __Pyx_PyObject_to_MemoryviewSlice_ds_float(__pyx_v_sample_c);
+ if (unlikely(!__pyx_t_24.memview)) __PYX_ERR(0, 401, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":402
+ *
+ * rc = _histogramnd_float_float_double(sample_c,
+ * weights_c, # <<<<<<<<<<<<<<
+ * n_dims,
+ * n_elem,
+ */
+ __pyx_t_30 = __Pyx_PyObject_to_MemoryviewSlice_ds_float(__pyx_v_weights_c);
+ if (unlikely(!__pyx_t_30.memview)) __PYX_ERR(0, 402, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":403
+ * rc = _histogramnd_float_float_double(sample_c,
+ * weights_c,
+ * n_dims, # <<<<<<<<<<<<<<
+ * n_elem,
+ * histo_range_c,
+ */
+ __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_v_n_dims); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 403, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":404
+ * weights_c,
+ * n_dims,
+ * n_elem, # <<<<<<<<<<<<<<
+ * histo_range_c,
+ * n_bins_c,
+ */
+ __pyx_t_15 = __Pyx_PyInt_As_int(__pyx_v_n_elem); if (unlikely((__pyx_t_15 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 404, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":405
+ * n_dims,
+ * n_elem,
+ * histo_range_c, # <<<<<<<<<<<<<<
+ * n_bins_c,
+ * histo_c,
+ */
+ __pyx_t_14 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_histo_range_c);
+ if (unlikely(!__pyx_t_14.memview)) __PYX_ERR(0, 405, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":406
+ * n_elem,
+ * histo_range_c,
+ * n_bins_c, # <<<<<<<<<<<<<<
+ * histo_c,
+ * cumul_c,
+ */
+ __pyx_t_17 = __Pyx_PyObject_to_MemoryviewSlice_ds_int(__pyx_v_n_bins_c);
+ if (unlikely(!__pyx_t_17.memview)) __PYX_ERR(0, 406, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":407
+ * histo_range_c,
+ * n_bins_c,
+ * histo_c, # <<<<<<<<<<<<<<
+ * cumul_c,
+ * bin_edges_c,
+ */
+ __pyx_t_18 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(__pyx_v_histo_c);
+ if (unlikely(!__pyx_t_18.memview)) __PYX_ERR(0, 407, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":408
+ * n_bins_c,
+ * histo_c,
+ * cumul_c, # <<<<<<<<<<<<<<
+ * bin_edges_c,
+ * option_flags,
+ */
+ __pyx_t_16 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_cumul_c);
+ if (unlikely(!__pyx_t_16.memview)) __PYX_ERR(0, 408, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":409
+ * histo_c,
+ * cumul_c,
+ * bin_edges_c, # <<<<<<<<<<<<<<
+ * option_flags,
+ * weight_min=weight_min,
+ */
+ __pyx_t_19 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_bin_edges_c);
+ if (unlikely(!__pyx_t_19.memview)) __PYX_ERR(0, 409, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":410
+ * cumul_c,
+ * bin_edges_c,
+ * option_flags, # <<<<<<<<<<<<<<
+ * weight_min=weight_min,
+ * weight_max=weight_max)
+ */
+ __pyx_t_21 = __Pyx_PyInt_As_int(__pyx_v_option_flags); if (unlikely((__pyx_t_21 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 410, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":411
+ * bin_edges_c,
+ * option_flags,
+ * weight_min=weight_min, # <<<<<<<<<<<<<<
+ * weight_max=weight_max)
+ *
+ */
+ __pyx_t_26 = __pyx_PyFloat_AsFloat(__pyx_v_weight_min); if (unlikely((__pyx_t_26 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 411, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":412
+ * option_flags,
+ * weight_min=weight_min,
+ * weight_max=weight_max) # <<<<<<<<<<<<<<
+ *
+ * elif weights_type == np.int32:
+ */
+ __pyx_t_25 = __pyx_PyFloat_AsFloat(__pyx_v_weight_max); if (unlikely((__pyx_t_25 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 412, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":401
+ * elif weights_type == np.float32:
+ *
+ * rc = _histogramnd_float_float_double(sample_c, # <<<<<<<<<<<<<<
+ * weights_c,
+ * n_dims,
+ */
+ __pyx_v_rc = __pyx_f_4silx_4math_12chistogramnd__histogramnd_float_float_double(__pyx_t_24, __pyx_t_30, __pyx_t_9, __pyx_t_15, __pyx_t_14, __pyx_t_17, __pyx_t_18, __pyx_t_16, __pyx_t_19, __pyx_t_21, __pyx_t_26, __pyx_t_25);
+ __PYX_XDEC_MEMVIEW(&__pyx_t_24, 1);
+ __pyx_t_24.memview = NULL;
+ __pyx_t_24.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_30, 1);
+ __pyx_t_30.memview = NULL;
+ __pyx_t_30.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_14, 1);
+ __pyx_t_14.memview = NULL;
+ __pyx_t_14.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_17, 1);
+ __pyx_t_17.memview = NULL;
+ __pyx_t_17.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_18, 1);
+ __pyx_t_18.memview = NULL;
+ __pyx_t_18.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_16, 1);
+ __pyx_t_16.memview = NULL;
+ __pyx_t_16.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_19, 1);
+ __pyx_t_19.memview = NULL;
+ __pyx_t_19.data = NULL;
+
+ /* "silx/math/chistogramnd.pyx":399
+ * weight_max=weight_max)
+ *
+ * elif weights_type == np.float32: # <<<<<<<<<<<<<<
+ *
+ * rc = _histogramnd_float_float_double(sample_c,
+ */
+ goto __pyx_L49;
+ }
+
+ /* "silx/math/chistogramnd.pyx":414
+ * weight_max=weight_max)
+ *
+ * elif weights_type == np.int32: # <<<<<<<<<<<<<<
+ *
+ * rc = _histogramnd_float_int32_t_double(sample_c,
+ */
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 414, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_int32); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 414, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_weights_type, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 414, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 414, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ if (__pyx_t_7) {
+
+ /* "silx/math/chistogramnd.pyx":416
+ * elif weights_type == np.int32:
+ *
+ * rc = _histogramnd_float_int32_t_double(sample_c, # <<<<<<<<<<<<<<
+ * weights_c,
+ * n_dims,
+ */
+ __pyx_t_30 = __Pyx_PyObject_to_MemoryviewSlice_ds_float(__pyx_v_sample_c);
+ if (unlikely(!__pyx_t_30.memview)) __PYX_ERR(0, 416, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":417
+ *
+ * rc = _histogramnd_float_int32_t_double(sample_c,
+ * weights_c, # <<<<<<<<<<<<<<
+ * n_dims,
+ * n_elem,
+ */
+ __pyx_t_27 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(__pyx_v_weights_c);
+ if (unlikely(!__pyx_t_27.memview)) __PYX_ERR(0, 417, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":418
+ * rc = _histogramnd_float_int32_t_double(sample_c,
+ * weights_c,
+ * n_dims, # <<<<<<<<<<<<<<
+ * n_elem,
+ * histo_range_c,
+ */
+ __pyx_t_21 = __Pyx_PyInt_As_int(__pyx_v_n_dims); if (unlikely((__pyx_t_21 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 418, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":419
+ * weights_c,
+ * n_dims,
+ * n_elem, # <<<<<<<<<<<<<<
+ * histo_range_c,
+ * n_bins_c,
+ */
+ __pyx_t_15 = __Pyx_PyInt_As_int(__pyx_v_n_elem); if (unlikely((__pyx_t_15 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 419, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":420
+ * n_dims,
+ * n_elem,
+ * histo_range_c, # <<<<<<<<<<<<<<
+ * n_bins_c,
+ * histo_c,
+ */
+ __pyx_t_19 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_histo_range_c);
+ if (unlikely(!__pyx_t_19.memview)) __PYX_ERR(0, 420, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":421
+ * n_elem,
+ * histo_range_c,
+ * n_bins_c, # <<<<<<<<<<<<<<
+ * histo_c,
+ * cumul_c,
+ */
+ __pyx_t_17 = __Pyx_PyObject_to_MemoryviewSlice_ds_int(__pyx_v_n_bins_c);
+ if (unlikely(!__pyx_t_17.memview)) __PYX_ERR(0, 421, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":422
+ * histo_range_c,
+ * n_bins_c,
+ * histo_c, # <<<<<<<<<<<<<<
+ * cumul_c,
+ * bin_edges_c,
+ */
+ __pyx_t_18 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(__pyx_v_histo_c);
+ if (unlikely(!__pyx_t_18.memview)) __PYX_ERR(0, 422, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":423
+ * n_bins_c,
+ * histo_c,
+ * cumul_c, # <<<<<<<<<<<<<<
+ * bin_edges_c,
+ * option_flags,
+ */
+ __pyx_t_16 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_cumul_c);
+ if (unlikely(!__pyx_t_16.memview)) __PYX_ERR(0, 423, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":424
+ * histo_c,
+ * cumul_c,
+ * bin_edges_c, # <<<<<<<<<<<<<<
+ * option_flags,
+ * weight_min=weight_min,
+ */
+ __pyx_t_14 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_bin_edges_c);
+ if (unlikely(!__pyx_t_14.memview)) __PYX_ERR(0, 424, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":425
+ * cumul_c,
+ * bin_edges_c,
+ * option_flags, # <<<<<<<<<<<<<<
+ * weight_min=weight_min,
+ * weight_max=weight_max)
+ */
+ __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_v_option_flags); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 425, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":426
+ * bin_edges_c,
+ * option_flags,
+ * weight_min=weight_min, # <<<<<<<<<<<<<<
+ * weight_max=weight_max)
+ *
+ */
+ __pyx_t_29 = __Pyx_PyInt_As_npy_int32(__pyx_v_weight_min); if (unlikely((__pyx_t_29 == ((npy_int32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 426, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":427
+ * option_flags,
+ * weight_min=weight_min,
+ * weight_max=weight_max) # <<<<<<<<<<<<<<
+ *
+ * else:
+ */
+ __pyx_t_28 = __Pyx_PyInt_As_npy_int32(__pyx_v_weight_max); if (unlikely((__pyx_t_28 == ((npy_int32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 427, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":416
+ * elif weights_type == np.int32:
+ *
+ * rc = _histogramnd_float_int32_t_double(sample_c, # <<<<<<<<<<<<<<
+ * weights_c,
+ * n_dims,
+ */
+ __pyx_v_rc = __pyx_f_4silx_4math_12chistogramnd__histogramnd_float_int32_t_double(__pyx_t_30, __pyx_t_27, __pyx_t_21, __pyx_t_15, __pyx_t_19, __pyx_t_17, __pyx_t_18, __pyx_t_16, __pyx_t_14, __pyx_t_9, __pyx_t_29, __pyx_t_28);
+ __PYX_XDEC_MEMVIEW(&__pyx_t_30, 1);
+ __pyx_t_30.memview = NULL;
+ __pyx_t_30.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_27, 1);
+ __pyx_t_27.memview = NULL;
+ __pyx_t_27.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_19, 1);
+ __pyx_t_19.memview = NULL;
+ __pyx_t_19.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_17, 1);
+ __pyx_t_17.memview = NULL;
+ __pyx_t_17.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_18, 1);
+ __pyx_t_18.memview = NULL;
+ __pyx_t_18.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_16, 1);
+ __pyx_t_16.memview = NULL;
+ __pyx_t_16.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_14, 1);
+ __pyx_t_14.memview = NULL;
+ __pyx_t_14.data = NULL;
+
+ /* "silx/math/chistogramnd.pyx":414
+ * weight_max=weight_max)
+ *
+ * elif weights_type == np.int32: # <<<<<<<<<<<<<<
+ *
+ * rc = _histogramnd_float_int32_t_double(sample_c,
+ */
+ goto __pyx_L49;
+ }
+
+ /* "silx/math/chistogramnd.pyx":430
+ *
+ * else:
+ * raise_unsupported_type() # <<<<<<<<<<<<<<
+ *
+ * # endif sample_type == np.float32
+ */
+ /*else*/ {
+ __pyx_t_4 = __pyx_pf_4silx_4math_12chistogramnd_12chistogramnd_raise_unsupported_type(__pyx_v_raise_unsupported_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 430, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ }
+ __pyx_L49:;
+
+ /* "silx/math/chistogramnd.pyx":382
+ *
+ * # endif sample_type == np.float64
+ * elif sample_type == np.float32: # <<<<<<<<<<<<<<
+ *
+ * if weights_type == np.float64 or weights_type is None:
+ */
+ goto __pyx_L45;
+ }
+
+ /* "silx/math/chistogramnd.pyx":433
+ *
+ * # endif sample_type == np.float32
+ * elif sample_type == np.int32: # <<<<<<<<<<<<<<
+ *
+ * if weights_type == np.float64 or weights_type is None:
+ */
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 433, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_int32); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 433, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_sample_type, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 433, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 433, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ if (__pyx_t_7) {
+
+ /* "silx/math/chistogramnd.pyx":435
+ * elif sample_type == np.int32:
+ *
+ * if weights_type == np.float64 or weights_type is None: # <<<<<<<<<<<<<<
+ *
+ * rc = _histogramnd_int32_t_double_double(sample_c,
+ */
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 435, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_float64); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 435, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_weights_type, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 435, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 435, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ if (!__pyx_t_1) {
+ } else {
+ __pyx_t_7 = __pyx_t_1;
+ goto __pyx_L53_bool_binop_done;
+ }
+ __pyx_t_1 = (__pyx_cur_scope->__pyx_v_weights_type == Py_None);
+ __pyx_t_2 = (__pyx_t_1 != 0);
+ __pyx_t_7 = __pyx_t_2;
+ __pyx_L53_bool_binop_done:;
+ if (__pyx_t_7) {
+
+ /* "silx/math/chistogramnd.pyx":437
+ * if weights_type == np.float64 or weights_type is None:
+ *
+ * rc = _histogramnd_int32_t_double_double(sample_c, # <<<<<<<<<<<<<<
+ * weights_c,
+ * n_dims,
+ */
+ __pyx_t_27 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(__pyx_v_sample_c);
+ if (unlikely(!__pyx_t_27.memview)) __PYX_ERR(0, 437, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":438
+ *
+ * rc = _histogramnd_int32_t_double_double(sample_c,
+ * weights_c, # <<<<<<<<<<<<<<
+ * n_dims,
+ * n_elem,
+ */
+ __pyx_t_14 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_weights_c);
+ if (unlikely(!__pyx_t_14.memview)) __PYX_ERR(0, 438, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":439
+ * rc = _histogramnd_int32_t_double_double(sample_c,
+ * weights_c,
+ * n_dims, # <<<<<<<<<<<<<<
+ * n_elem,
+ * histo_range_c,
+ */
+ __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_v_n_dims); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 439, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":440
+ * weights_c,
+ * n_dims,
+ * n_elem, # <<<<<<<<<<<<<<
+ * histo_range_c,
+ * n_bins_c,
+ */
+ __pyx_t_15 = __Pyx_PyInt_As_int(__pyx_v_n_elem); if (unlikely((__pyx_t_15 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 440, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":441
+ * n_dims,
+ * n_elem,
+ * histo_range_c, # <<<<<<<<<<<<<<
+ * n_bins_c,
+ * histo_c,
+ */
+ __pyx_t_16 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_histo_range_c);
+ if (unlikely(!__pyx_t_16.memview)) __PYX_ERR(0, 441, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":442
+ * n_elem,
+ * histo_range_c,
+ * n_bins_c, # <<<<<<<<<<<<<<
+ * histo_c,
+ * cumul_c,
+ */
+ __pyx_t_17 = __Pyx_PyObject_to_MemoryviewSlice_ds_int(__pyx_v_n_bins_c);
+ if (unlikely(!__pyx_t_17.memview)) __PYX_ERR(0, 442, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":443
+ * histo_range_c,
+ * n_bins_c,
+ * histo_c, # <<<<<<<<<<<<<<
+ * cumul_c,
+ * bin_edges_c,
+ */
+ __pyx_t_18 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(__pyx_v_histo_c);
+ if (unlikely(!__pyx_t_18.memview)) __PYX_ERR(0, 443, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":444
+ * n_bins_c,
+ * histo_c,
+ * cumul_c, # <<<<<<<<<<<<<<
+ * bin_edges_c,
+ * option_flags,
+ */
+ __pyx_t_19 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_cumul_c);
+ if (unlikely(!__pyx_t_19.memview)) __PYX_ERR(0, 444, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":445
+ * histo_c,
+ * cumul_c,
+ * bin_edges_c, # <<<<<<<<<<<<<<
+ * option_flags,
+ * weight_min=weight_min,
+ */
+ __pyx_t_20 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_bin_edges_c);
+ if (unlikely(!__pyx_t_20.memview)) __PYX_ERR(0, 445, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":446
+ * cumul_c,
+ * bin_edges_c,
+ * option_flags, # <<<<<<<<<<<<<<
+ * weight_min=weight_min,
+ * weight_max=weight_max)
+ */
+ __pyx_t_21 = __Pyx_PyInt_As_int(__pyx_v_option_flags); if (unlikely((__pyx_t_21 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 446, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":447
+ * bin_edges_c,
+ * option_flags,
+ * weight_min=weight_min, # <<<<<<<<<<<<<<
+ * weight_max=weight_max)
+ *
+ */
+ __pyx_t_22 = __pyx_PyFloat_AsDouble(__pyx_v_weight_min); if (unlikely((__pyx_t_22 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 447, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":448
+ * option_flags,
+ * weight_min=weight_min,
+ * weight_max=weight_max) # <<<<<<<<<<<<<<
+ *
+ * elif weights_type == np.float32:
+ */
+ __pyx_t_23 = __pyx_PyFloat_AsDouble(__pyx_v_weight_max); if (unlikely((__pyx_t_23 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 448, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":437
+ * if weights_type == np.float64 or weights_type is None:
+ *
+ * rc = _histogramnd_int32_t_double_double(sample_c, # <<<<<<<<<<<<<<
+ * weights_c,
+ * n_dims,
+ */
+ __pyx_v_rc = __pyx_f_4silx_4math_12chistogramnd__histogramnd_int32_t_double_double(__pyx_t_27, __pyx_t_14, __pyx_t_9, __pyx_t_15, __pyx_t_16, __pyx_t_17, __pyx_t_18, __pyx_t_19, __pyx_t_20, __pyx_t_21, __pyx_t_22, __pyx_t_23);
+ __PYX_XDEC_MEMVIEW(&__pyx_t_27, 1);
+ __pyx_t_27.memview = NULL;
+ __pyx_t_27.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_14, 1);
+ __pyx_t_14.memview = NULL;
+ __pyx_t_14.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_16, 1);
+ __pyx_t_16.memview = NULL;
+ __pyx_t_16.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_17, 1);
+ __pyx_t_17.memview = NULL;
+ __pyx_t_17.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_18, 1);
+ __pyx_t_18.memview = NULL;
+ __pyx_t_18.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_19, 1);
+ __pyx_t_19.memview = NULL;
+ __pyx_t_19.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_20, 1);
+ __pyx_t_20.memview = NULL;
+ __pyx_t_20.data = NULL;
+
+ /* "silx/math/chistogramnd.pyx":435
+ * elif sample_type == np.int32:
+ *
+ * if weights_type == np.float64 or weights_type is None: # <<<<<<<<<<<<<<
+ *
+ * rc = _histogramnd_int32_t_double_double(sample_c,
+ */
+ goto __pyx_L52;
+ }
+
+ /* "silx/math/chistogramnd.pyx":450
+ * weight_max=weight_max)
+ *
+ * elif weights_type == np.float32: # <<<<<<<<<<<<<<
+ *
+ * rc = _histogramnd_int32_t_float_double(sample_c,
+ */
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 450, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_float32); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 450, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_weights_type, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 450, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 450, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ if (__pyx_t_7) {
+
+ /* "silx/math/chistogramnd.pyx":452
+ * elif weights_type == np.float32:
+ *
+ * rc = _histogramnd_int32_t_float_double(sample_c, # <<<<<<<<<<<<<<
+ * weights_c,
+ * n_dims,
+ */
+ __pyx_t_27 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(__pyx_v_sample_c);
+ if (unlikely(!__pyx_t_27.memview)) __PYX_ERR(0, 452, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":453
+ *
+ * rc = _histogramnd_int32_t_float_double(sample_c,
+ * weights_c, # <<<<<<<<<<<<<<
+ * n_dims,
+ * n_elem,
+ */
+ __pyx_t_30 = __Pyx_PyObject_to_MemoryviewSlice_ds_float(__pyx_v_weights_c);
+ if (unlikely(!__pyx_t_30.memview)) __PYX_ERR(0, 453, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":454
+ * rc = _histogramnd_int32_t_float_double(sample_c,
+ * weights_c,
+ * n_dims, # <<<<<<<<<<<<<<
+ * n_elem,
+ * histo_range_c,
+ */
+ __pyx_t_21 = __Pyx_PyInt_As_int(__pyx_v_n_dims); if (unlikely((__pyx_t_21 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 454, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":455
+ * weights_c,
+ * n_dims,
+ * n_elem, # <<<<<<<<<<<<<<
+ * histo_range_c,
+ * n_bins_c,
+ */
+ __pyx_t_15 = __Pyx_PyInt_As_int(__pyx_v_n_elem); if (unlikely((__pyx_t_15 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 455, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":456
+ * n_dims,
+ * n_elem,
+ * histo_range_c, # <<<<<<<<<<<<<<
+ * n_bins_c,
+ * histo_c,
+ */
+ __pyx_t_20 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_histo_range_c);
+ if (unlikely(!__pyx_t_20.memview)) __PYX_ERR(0, 456, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":457
+ * n_elem,
+ * histo_range_c,
+ * n_bins_c, # <<<<<<<<<<<<<<
+ * histo_c,
+ * cumul_c,
+ */
+ __pyx_t_17 = __Pyx_PyObject_to_MemoryviewSlice_ds_int(__pyx_v_n_bins_c);
+ if (unlikely(!__pyx_t_17.memview)) __PYX_ERR(0, 457, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":458
+ * histo_range_c,
+ * n_bins_c,
+ * histo_c, # <<<<<<<<<<<<<<
+ * cumul_c,
+ * bin_edges_c,
+ */
+ __pyx_t_18 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(__pyx_v_histo_c);
+ if (unlikely(!__pyx_t_18.memview)) __PYX_ERR(0, 458, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":459
+ * n_bins_c,
+ * histo_c,
+ * cumul_c, # <<<<<<<<<<<<<<
+ * bin_edges_c,
+ * option_flags,
+ */
+ __pyx_t_19 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_cumul_c);
+ if (unlikely(!__pyx_t_19.memview)) __PYX_ERR(0, 459, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":460
+ * histo_c,
+ * cumul_c,
+ * bin_edges_c, # <<<<<<<<<<<<<<
+ * option_flags,
+ * weight_min=weight_min,
+ */
+ __pyx_t_16 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_bin_edges_c);
+ if (unlikely(!__pyx_t_16.memview)) __PYX_ERR(0, 460, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":461
+ * cumul_c,
+ * bin_edges_c,
+ * option_flags, # <<<<<<<<<<<<<<
+ * weight_min=weight_min,
+ * weight_max=weight_max)
+ */
+ __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_v_option_flags); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 461, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":462
+ * bin_edges_c,
+ * option_flags,
+ * weight_min=weight_min, # <<<<<<<<<<<<<<
+ * weight_max=weight_max)
+ *
+ */
+ __pyx_t_25 = __pyx_PyFloat_AsFloat(__pyx_v_weight_min); if (unlikely((__pyx_t_25 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 462, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":463
+ * option_flags,
+ * weight_min=weight_min,
+ * weight_max=weight_max) # <<<<<<<<<<<<<<
+ *
+ * elif weights_type == np.int32:
+ */
+ __pyx_t_26 = __pyx_PyFloat_AsFloat(__pyx_v_weight_max); if (unlikely((__pyx_t_26 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 463, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":452
+ * elif weights_type == np.float32:
+ *
+ * rc = _histogramnd_int32_t_float_double(sample_c, # <<<<<<<<<<<<<<
+ * weights_c,
+ * n_dims,
+ */
+ __pyx_v_rc = __pyx_f_4silx_4math_12chistogramnd__histogramnd_int32_t_float_double(__pyx_t_27, __pyx_t_30, __pyx_t_21, __pyx_t_15, __pyx_t_20, __pyx_t_17, __pyx_t_18, __pyx_t_19, __pyx_t_16, __pyx_t_9, __pyx_t_25, __pyx_t_26);
+ __PYX_XDEC_MEMVIEW(&__pyx_t_27, 1);
+ __pyx_t_27.memview = NULL;
+ __pyx_t_27.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_30, 1);
+ __pyx_t_30.memview = NULL;
+ __pyx_t_30.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_20, 1);
+ __pyx_t_20.memview = NULL;
+ __pyx_t_20.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_17, 1);
+ __pyx_t_17.memview = NULL;
+ __pyx_t_17.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_18, 1);
+ __pyx_t_18.memview = NULL;
+ __pyx_t_18.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_19, 1);
+ __pyx_t_19.memview = NULL;
+ __pyx_t_19.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_16, 1);
+ __pyx_t_16.memview = NULL;
+ __pyx_t_16.data = NULL;
+
+ /* "silx/math/chistogramnd.pyx":450
+ * weight_max=weight_max)
+ *
+ * elif weights_type == np.float32: # <<<<<<<<<<<<<<
+ *
+ * rc = _histogramnd_int32_t_float_double(sample_c,
+ */
+ goto __pyx_L52;
+ }
+
+ /* "silx/math/chistogramnd.pyx":465
+ * weight_max=weight_max)
+ *
+ * elif weights_type == np.int32: # <<<<<<<<<<<<<<
+ *
+ * rc = _histogramnd_int32_t_int32_t_double(sample_c,
+ */
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 465, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_int32); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 465, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_weights_type, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 465, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 465, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ if (__pyx_t_7) {
+
+ /* "silx/math/chistogramnd.pyx":467
+ * elif weights_type == np.int32:
+ *
+ * rc = _histogramnd_int32_t_int32_t_double(sample_c, # <<<<<<<<<<<<<<
+ * weights_c,
+ * n_dims,
+ */
+ __pyx_t_27 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(__pyx_v_sample_c);
+ if (unlikely(!__pyx_t_27.memview)) __PYX_ERR(0, 467, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":468
+ *
+ * rc = _histogramnd_int32_t_int32_t_double(sample_c,
+ * weights_c, # <<<<<<<<<<<<<<
+ * n_dims,
+ * n_elem,
+ */
+ __pyx_t_31 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(__pyx_v_weights_c);
+ if (unlikely(!__pyx_t_31.memview)) __PYX_ERR(0, 468, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":469
+ * rc = _histogramnd_int32_t_int32_t_double(sample_c,
+ * weights_c,
+ * n_dims, # <<<<<<<<<<<<<<
+ * n_elem,
+ * histo_range_c,
+ */
+ __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_v_n_dims); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 469, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":470
+ * weights_c,
+ * n_dims,
+ * n_elem, # <<<<<<<<<<<<<<
+ * histo_range_c,
+ * n_bins_c,
+ */
+ __pyx_t_15 = __Pyx_PyInt_As_int(__pyx_v_n_elem); if (unlikely((__pyx_t_15 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 470, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":471
+ * n_dims,
+ * n_elem,
+ * histo_range_c, # <<<<<<<<<<<<<<
+ * n_bins_c,
+ * histo_c,
+ */
+ __pyx_t_16 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_histo_range_c);
+ if (unlikely(!__pyx_t_16.memview)) __PYX_ERR(0, 471, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":472
+ * n_elem,
+ * histo_range_c,
+ * n_bins_c, # <<<<<<<<<<<<<<
+ * histo_c,
+ * cumul_c,
+ */
+ __pyx_t_17 = __Pyx_PyObject_to_MemoryviewSlice_ds_int(__pyx_v_n_bins_c);
+ if (unlikely(!__pyx_t_17.memview)) __PYX_ERR(0, 472, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":473
+ * histo_range_c,
+ * n_bins_c,
+ * histo_c, # <<<<<<<<<<<<<<
+ * cumul_c,
+ * bin_edges_c,
+ */
+ __pyx_t_18 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(__pyx_v_histo_c);
+ if (unlikely(!__pyx_t_18.memview)) __PYX_ERR(0, 473, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":474
+ * n_bins_c,
+ * histo_c,
+ * cumul_c, # <<<<<<<<<<<<<<
+ * bin_edges_c,
+ * option_flags,
+ */
+ __pyx_t_19 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_cumul_c);
+ if (unlikely(!__pyx_t_19.memview)) __PYX_ERR(0, 474, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":475
+ * histo_c,
+ * cumul_c,
+ * bin_edges_c, # <<<<<<<<<<<<<<
+ * option_flags,
+ * weight_min=weight_min,
+ */
+ __pyx_t_20 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_bin_edges_c);
+ if (unlikely(!__pyx_t_20.memview)) __PYX_ERR(0, 475, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":476
+ * cumul_c,
+ * bin_edges_c,
+ * option_flags, # <<<<<<<<<<<<<<
+ * weight_min=weight_min,
+ * weight_max=weight_max)
+ */
+ __pyx_t_21 = __Pyx_PyInt_As_int(__pyx_v_option_flags); if (unlikely((__pyx_t_21 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 476, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":477
+ * bin_edges_c,
+ * option_flags,
+ * weight_min=weight_min, # <<<<<<<<<<<<<<
+ * weight_max=weight_max)
+ *
+ */
+ __pyx_t_28 = __Pyx_PyInt_As_npy_int32(__pyx_v_weight_min); if (unlikely((__pyx_t_28 == ((npy_int32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 477, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":478
+ * option_flags,
+ * weight_min=weight_min,
+ * weight_max=weight_max) # <<<<<<<<<<<<<<
+ *
+ * else:
+ */
+ __pyx_t_29 = __Pyx_PyInt_As_npy_int32(__pyx_v_weight_max); if (unlikely((__pyx_t_29 == ((npy_int32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 478, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":467
+ * elif weights_type == np.int32:
+ *
+ * rc = _histogramnd_int32_t_int32_t_double(sample_c, # <<<<<<<<<<<<<<
+ * weights_c,
+ * n_dims,
+ */
+ __pyx_v_rc = __pyx_f_4silx_4math_12chistogramnd__histogramnd_int32_t_int32_t_double(__pyx_t_27, __pyx_t_31, __pyx_t_9, __pyx_t_15, __pyx_t_16, __pyx_t_17, __pyx_t_18, __pyx_t_19, __pyx_t_20, __pyx_t_21, __pyx_t_28, __pyx_t_29);
+ __PYX_XDEC_MEMVIEW(&__pyx_t_27, 1);
+ __pyx_t_27.memview = NULL;
+ __pyx_t_27.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_31, 1);
+ __pyx_t_31.memview = NULL;
+ __pyx_t_31.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_16, 1);
+ __pyx_t_16.memview = NULL;
+ __pyx_t_16.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_17, 1);
+ __pyx_t_17.memview = NULL;
+ __pyx_t_17.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_18, 1);
+ __pyx_t_18.memview = NULL;
+ __pyx_t_18.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_19, 1);
+ __pyx_t_19.memview = NULL;
+ __pyx_t_19.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_20, 1);
+ __pyx_t_20.memview = NULL;
+ __pyx_t_20.data = NULL;
+
+ /* "silx/math/chistogramnd.pyx":465
+ * weight_max=weight_max)
+ *
+ * elif weights_type == np.int32: # <<<<<<<<<<<<<<
+ *
+ * rc = _histogramnd_int32_t_int32_t_double(sample_c,
+ */
+ goto __pyx_L52;
+ }
+
+ /* "silx/math/chistogramnd.pyx":481
+ *
+ * else:
+ * raise_unsupported_type() # <<<<<<<<<<<<<<
+ *
+ * # endif sample_type == np.int32:
+ */
+ /*else*/ {
+ __pyx_t_4 = __pyx_pf_4silx_4math_12chistogramnd_12chistogramnd_raise_unsupported_type(__pyx_v_raise_unsupported_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 481, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ }
+ __pyx_L52:;
+
+ /* "silx/math/chistogramnd.pyx":433
+ *
+ * # endif sample_type == np.float32
+ * elif sample_type == np.int32: # <<<<<<<<<<<<<<
+ *
+ * if weights_type == np.float64 or weights_type is None:
+ */
+ goto __pyx_L45;
+ }
+
+ /* "silx/math/chistogramnd.pyx":485
+ * # endif sample_type == np.int32:
+ * else:
+ * raise_unsupported_type() # <<<<<<<<<<<<<<
+ *
+ * # endif weighted_histo is None or weighted_histo.dtype == np.double:
+ */
+ /*else*/ {
+ __pyx_t_4 = __pyx_pf_4silx_4math_12chistogramnd_12chistogramnd_raise_unsupported_type(__pyx_v_raise_unsupported_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 485, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ }
+ __pyx_L45:;
+
+ /* "silx/math/chistogramnd.pyx":329
+ * rc = 0
+ *
+ * if weighted_histo is None or weighted_histo.dtype == np.double: # <<<<<<<<<<<<<<
+ *
+ * if sample_type == np.float64:
+ */
+ goto __pyx_L42;
+ }
+
+ /* "silx/math/chistogramnd.pyx":488
+ *
+ * # endif weighted_histo is None or weighted_histo.dtype == np.double:
+ * elif weighted_histo.dtype == np.float32: # <<<<<<<<<<<<<<
+ *
+ * if sample_type == np.float64:
+ */
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_weighted_histo, __pyx_n_s_dtype); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 488, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 488, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_float32); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 488, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = PyObject_RichCompare(__pyx_t_4, __pyx_t_11, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 488, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 488, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (__pyx_t_7) {
+
+ /* "silx/math/chistogramnd.pyx":490
+ * elif weighted_histo.dtype == np.float32:
+ *
+ * if sample_type == np.float64: # <<<<<<<<<<<<<<
+ *
+ * if weights_type == np.float64 or weights_type is None:
+ */
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 490, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_float64); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 490, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_sample_type, __pyx_t_11, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 490, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 490, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (__pyx_t_7) {
+
+ /* "silx/math/chistogramnd.pyx":492
+ * if sample_type == np.float64:
+ *
+ * if weights_type == np.float64 or weights_type is None: # <<<<<<<<<<<<<<
+ *
+ * rc = _histogramnd_double_double_float(sample_c,
+ */
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 492, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_float64); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 492, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_weights_type, __pyx_t_11, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 492, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 492, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (!__pyx_t_2) {
+ } else {
+ __pyx_t_7 = __pyx_t_2;
+ goto __pyx_L57_bool_binop_done;
+ }
+ __pyx_t_2 = (__pyx_cur_scope->__pyx_v_weights_type == Py_None);
+ __pyx_t_1 = (__pyx_t_2 != 0);
+ __pyx_t_7 = __pyx_t_1;
+ __pyx_L57_bool_binop_done:;
+ if (__pyx_t_7) {
+
+ /* "silx/math/chistogramnd.pyx":494
+ * if weights_type == np.float64 or weights_type is None:
+ *
+ * rc = _histogramnd_double_double_float(sample_c, # <<<<<<<<<<<<<<
+ * weights_c,
+ * n_dims,
+ */
+ __pyx_t_20 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_sample_c);
+ if (unlikely(!__pyx_t_20.memview)) __PYX_ERR(0, 494, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":495
+ *
+ * rc = _histogramnd_double_double_float(sample_c,
+ * weights_c, # <<<<<<<<<<<<<<
+ * n_dims,
+ * n_elem,
+ */
+ __pyx_t_19 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_weights_c);
+ if (unlikely(!__pyx_t_19.memview)) __PYX_ERR(0, 495, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":496
+ * rc = _histogramnd_double_double_float(sample_c,
+ * weights_c,
+ * n_dims, # <<<<<<<<<<<<<<
+ * n_elem,
+ * histo_range_c,
+ */
+ __pyx_t_21 = __Pyx_PyInt_As_int(__pyx_v_n_dims); if (unlikely((__pyx_t_21 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 496, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":497
+ * weights_c,
+ * n_dims,
+ * n_elem, # <<<<<<<<<<<<<<
+ * histo_range_c,
+ * n_bins_c,
+ */
+ __pyx_t_15 = __Pyx_PyInt_As_int(__pyx_v_n_elem); if (unlikely((__pyx_t_15 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 497, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":498
+ * n_dims,
+ * n_elem,
+ * histo_range_c, # <<<<<<<<<<<<<<
+ * n_bins_c,
+ * histo_c,
+ */
+ __pyx_t_16 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_histo_range_c);
+ if (unlikely(!__pyx_t_16.memview)) __PYX_ERR(0, 498, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":499
+ * n_elem,
+ * histo_range_c,
+ * n_bins_c, # <<<<<<<<<<<<<<
+ * histo_c,
+ * cumul_c,
+ */
+ __pyx_t_17 = __Pyx_PyObject_to_MemoryviewSlice_ds_int(__pyx_v_n_bins_c);
+ if (unlikely(!__pyx_t_17.memview)) __PYX_ERR(0, 499, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":500
+ * histo_range_c,
+ * n_bins_c,
+ * histo_c, # <<<<<<<<<<<<<<
+ * cumul_c,
+ * bin_edges_c,
+ */
+ __pyx_t_18 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(__pyx_v_histo_c);
+ if (unlikely(!__pyx_t_18.memview)) __PYX_ERR(0, 500, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":501
+ * n_bins_c,
+ * histo_c,
+ * cumul_c, # <<<<<<<<<<<<<<
+ * bin_edges_c,
+ * option_flags,
+ */
+ __pyx_t_30 = __Pyx_PyObject_to_MemoryviewSlice_ds_float(__pyx_v_cumul_c);
+ if (unlikely(!__pyx_t_30.memview)) __PYX_ERR(0, 501, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":502
+ * histo_c,
+ * cumul_c,
+ * bin_edges_c, # <<<<<<<<<<<<<<
+ * option_flags,
+ * weight_min=weight_min,
+ */
+ __pyx_t_14 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_bin_edges_c);
+ if (unlikely(!__pyx_t_14.memview)) __PYX_ERR(0, 502, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":503
+ * cumul_c,
+ * bin_edges_c,
+ * option_flags, # <<<<<<<<<<<<<<
+ * weight_min=weight_min,
+ * weight_max=weight_max)
+ */
+ __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_v_option_flags); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 503, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":504
+ * bin_edges_c,
+ * option_flags,
+ * weight_min=weight_min, # <<<<<<<<<<<<<<
+ * weight_max=weight_max)
+ *
+ */
+ __pyx_t_23 = __pyx_PyFloat_AsDouble(__pyx_v_weight_min); if (unlikely((__pyx_t_23 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 504, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":505
+ * option_flags,
+ * weight_min=weight_min,
+ * weight_max=weight_max) # <<<<<<<<<<<<<<
+ *
+ * elif weights_type == np.float32:
+ */
+ __pyx_t_22 = __pyx_PyFloat_AsDouble(__pyx_v_weight_max); if (unlikely((__pyx_t_22 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 505, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":494
+ * if weights_type == np.float64 or weights_type is None:
+ *
+ * rc = _histogramnd_double_double_float(sample_c, # <<<<<<<<<<<<<<
+ * weights_c,
+ * n_dims,
+ */
+ __pyx_v_rc = __pyx_f_4silx_4math_12chistogramnd__histogramnd_double_double_float(__pyx_t_20, __pyx_t_19, __pyx_t_21, __pyx_t_15, __pyx_t_16, __pyx_t_17, __pyx_t_18, __pyx_t_30, __pyx_t_14, __pyx_t_9, __pyx_t_23, __pyx_t_22);
+ __PYX_XDEC_MEMVIEW(&__pyx_t_20, 1);
+ __pyx_t_20.memview = NULL;
+ __pyx_t_20.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_19, 1);
+ __pyx_t_19.memview = NULL;
+ __pyx_t_19.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_16, 1);
+ __pyx_t_16.memview = NULL;
+ __pyx_t_16.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_17, 1);
+ __pyx_t_17.memview = NULL;
+ __pyx_t_17.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_18, 1);
+ __pyx_t_18.memview = NULL;
+ __pyx_t_18.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_30, 1);
+ __pyx_t_30.memview = NULL;
+ __pyx_t_30.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_14, 1);
+ __pyx_t_14.memview = NULL;
+ __pyx_t_14.data = NULL;
+
+ /* "silx/math/chistogramnd.pyx":492
+ * if sample_type == np.float64:
+ *
+ * if weights_type == np.float64 or weights_type is None: # <<<<<<<<<<<<<<
+ *
+ * rc = _histogramnd_double_double_float(sample_c,
+ */
+ goto __pyx_L56;
+ }
+
+ /* "silx/math/chistogramnd.pyx":507
+ * weight_max=weight_max)
+ *
+ * elif weights_type == np.float32: # <<<<<<<<<<<<<<
+ *
+ * rc = _histogramnd_double_float_float(sample_c,
+ */
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 507, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_float32); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 507, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_weights_type, __pyx_t_11, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 507, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 507, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (__pyx_t_7) {
+
+ /* "silx/math/chistogramnd.pyx":509
+ * elif weights_type == np.float32:
+ *
+ * rc = _histogramnd_double_float_float(sample_c, # <<<<<<<<<<<<<<
+ * weights_c,
+ * n_dims,
+ */
+ __pyx_t_14 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_sample_c);
+ if (unlikely(!__pyx_t_14.memview)) __PYX_ERR(0, 509, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":510
+ *
+ * rc = _histogramnd_double_float_float(sample_c,
+ * weights_c, # <<<<<<<<<<<<<<
+ * n_dims,
+ * n_elem,
+ */
+ __pyx_t_30 = __Pyx_PyObject_to_MemoryviewSlice_ds_float(__pyx_v_weights_c);
+ if (unlikely(!__pyx_t_30.memview)) __PYX_ERR(0, 510, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":511
+ * rc = _histogramnd_double_float_float(sample_c,
+ * weights_c,
+ * n_dims, # <<<<<<<<<<<<<<
+ * n_elem,
+ * histo_range_c,
+ */
+ __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_v_n_dims); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 511, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":512
+ * weights_c,
+ * n_dims,
+ * n_elem, # <<<<<<<<<<<<<<
+ * histo_range_c,
+ * n_bins_c,
+ */
+ __pyx_t_15 = __Pyx_PyInt_As_int(__pyx_v_n_elem); if (unlikely((__pyx_t_15 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 512, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":513
+ * n_dims,
+ * n_elem,
+ * histo_range_c, # <<<<<<<<<<<<<<
+ * n_bins_c,
+ * histo_c,
+ */
+ __pyx_t_16 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_histo_range_c);
+ if (unlikely(!__pyx_t_16.memview)) __PYX_ERR(0, 513, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":514
+ * n_elem,
+ * histo_range_c,
+ * n_bins_c, # <<<<<<<<<<<<<<
+ * histo_c,
+ * cumul_c,
+ */
+ __pyx_t_17 = __Pyx_PyObject_to_MemoryviewSlice_ds_int(__pyx_v_n_bins_c);
+ if (unlikely(!__pyx_t_17.memview)) __PYX_ERR(0, 514, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":515
+ * histo_range_c,
+ * n_bins_c,
+ * histo_c, # <<<<<<<<<<<<<<
+ * cumul_c,
+ * bin_edges_c,
+ */
+ __pyx_t_18 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(__pyx_v_histo_c);
+ if (unlikely(!__pyx_t_18.memview)) __PYX_ERR(0, 515, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":516
+ * n_bins_c,
+ * histo_c,
+ * cumul_c, # <<<<<<<<<<<<<<
+ * bin_edges_c,
+ * option_flags,
+ */
+ __pyx_t_24 = __Pyx_PyObject_to_MemoryviewSlice_ds_float(__pyx_v_cumul_c);
+ if (unlikely(!__pyx_t_24.memview)) __PYX_ERR(0, 516, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":517
+ * histo_c,
+ * cumul_c,
+ * bin_edges_c, # <<<<<<<<<<<<<<
+ * option_flags,
+ * weight_min=weight_min,
+ */
+ __pyx_t_19 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_bin_edges_c);
+ if (unlikely(!__pyx_t_19.memview)) __PYX_ERR(0, 517, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":518
+ * cumul_c,
+ * bin_edges_c,
+ * option_flags, # <<<<<<<<<<<<<<
+ * weight_min=weight_min,
+ * weight_max=weight_max)
+ */
+ __pyx_t_21 = __Pyx_PyInt_As_int(__pyx_v_option_flags); if (unlikely((__pyx_t_21 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 518, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":519
+ * bin_edges_c,
+ * option_flags,
+ * weight_min=weight_min, # <<<<<<<<<<<<<<
+ * weight_max=weight_max)
+ *
+ */
+ __pyx_t_26 = __pyx_PyFloat_AsFloat(__pyx_v_weight_min); if (unlikely((__pyx_t_26 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 519, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":520
+ * option_flags,
+ * weight_min=weight_min,
+ * weight_max=weight_max) # <<<<<<<<<<<<<<
+ *
+ * elif weights_type == np.int32:
+ */
+ __pyx_t_25 = __pyx_PyFloat_AsFloat(__pyx_v_weight_max); if (unlikely((__pyx_t_25 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 520, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":509
+ * elif weights_type == np.float32:
+ *
+ * rc = _histogramnd_double_float_float(sample_c, # <<<<<<<<<<<<<<
+ * weights_c,
+ * n_dims,
+ */
+ __pyx_v_rc = __pyx_f_4silx_4math_12chistogramnd__histogramnd_double_float_float(__pyx_t_14, __pyx_t_30, __pyx_t_9, __pyx_t_15, __pyx_t_16, __pyx_t_17, __pyx_t_18, __pyx_t_24, __pyx_t_19, __pyx_t_21, __pyx_t_26, __pyx_t_25);
+ __PYX_XDEC_MEMVIEW(&__pyx_t_14, 1);
+ __pyx_t_14.memview = NULL;
+ __pyx_t_14.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_30, 1);
+ __pyx_t_30.memview = NULL;
+ __pyx_t_30.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_16, 1);
+ __pyx_t_16.memview = NULL;
+ __pyx_t_16.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_17, 1);
+ __pyx_t_17.memview = NULL;
+ __pyx_t_17.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_18, 1);
+ __pyx_t_18.memview = NULL;
+ __pyx_t_18.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_24, 1);
+ __pyx_t_24.memview = NULL;
+ __pyx_t_24.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_19, 1);
+ __pyx_t_19.memview = NULL;
+ __pyx_t_19.data = NULL;
+
+ /* "silx/math/chistogramnd.pyx":507
+ * weight_max=weight_max)
+ *
+ * elif weights_type == np.float32: # <<<<<<<<<<<<<<
+ *
+ * rc = _histogramnd_double_float_float(sample_c,
+ */
+ goto __pyx_L56;
+ }
+
+ /* "silx/math/chistogramnd.pyx":522
+ * weight_max=weight_max)
+ *
+ * elif weights_type == np.int32: # <<<<<<<<<<<<<<
+ *
+ * rc = _histogramnd_double_int32_t_float(sample_c,
+ */
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 522, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_int32); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 522, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_weights_type, __pyx_t_11, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 522, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 522, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (__pyx_t_7) {
+
+ /* "silx/math/chistogramnd.pyx":524
+ * elif weights_type == np.int32:
+ *
+ * rc = _histogramnd_double_int32_t_float(sample_c, # <<<<<<<<<<<<<<
+ * weights_c,
+ * n_dims,
+ */
+ __pyx_t_19 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_sample_c);
+ if (unlikely(!__pyx_t_19.memview)) __PYX_ERR(0, 524, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":525
+ *
+ * rc = _histogramnd_double_int32_t_float(sample_c,
+ * weights_c, # <<<<<<<<<<<<<<
+ * n_dims,
+ * n_elem,
+ */
+ __pyx_t_31 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(__pyx_v_weights_c);
+ if (unlikely(!__pyx_t_31.memview)) __PYX_ERR(0, 525, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":526
+ * rc = _histogramnd_double_int32_t_float(sample_c,
+ * weights_c,
+ * n_dims, # <<<<<<<<<<<<<<
+ * n_elem,
+ * histo_range_c,
+ */
+ __pyx_t_21 = __Pyx_PyInt_As_int(__pyx_v_n_dims); if (unlikely((__pyx_t_21 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 526, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":527
+ * weights_c,
+ * n_dims,
+ * n_elem, # <<<<<<<<<<<<<<
+ * histo_range_c,
+ * n_bins_c,
+ */
+ __pyx_t_15 = __Pyx_PyInt_As_int(__pyx_v_n_elem); if (unlikely((__pyx_t_15 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 527, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":528
+ * n_dims,
+ * n_elem,
+ * histo_range_c, # <<<<<<<<<<<<<<
+ * n_bins_c,
+ * histo_c,
+ */
+ __pyx_t_16 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_histo_range_c);
+ if (unlikely(!__pyx_t_16.memview)) __PYX_ERR(0, 528, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":529
+ * n_elem,
+ * histo_range_c,
+ * n_bins_c, # <<<<<<<<<<<<<<
+ * histo_c,
+ * cumul_c,
+ */
+ __pyx_t_17 = __Pyx_PyObject_to_MemoryviewSlice_ds_int(__pyx_v_n_bins_c);
+ if (unlikely(!__pyx_t_17.memview)) __PYX_ERR(0, 529, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":530
+ * histo_range_c,
+ * n_bins_c,
+ * histo_c, # <<<<<<<<<<<<<<
+ * cumul_c,
+ * bin_edges_c,
+ */
+ __pyx_t_18 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(__pyx_v_histo_c);
+ if (unlikely(!__pyx_t_18.memview)) __PYX_ERR(0, 530, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":531
+ * n_bins_c,
+ * histo_c,
+ * cumul_c, # <<<<<<<<<<<<<<
+ * bin_edges_c,
+ * option_flags,
+ */
+ __pyx_t_24 = __Pyx_PyObject_to_MemoryviewSlice_ds_float(__pyx_v_cumul_c);
+ if (unlikely(!__pyx_t_24.memview)) __PYX_ERR(0, 531, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":532
+ * histo_c,
+ * cumul_c,
+ * bin_edges_c, # <<<<<<<<<<<<<<
+ * option_flags,
+ * weight_min=weight_min,
+ */
+ __pyx_t_14 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_bin_edges_c);
+ if (unlikely(!__pyx_t_14.memview)) __PYX_ERR(0, 532, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":533
+ * cumul_c,
+ * bin_edges_c,
+ * option_flags, # <<<<<<<<<<<<<<
+ * weight_min=weight_min,
+ * weight_max=weight_max)
+ */
+ __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_v_option_flags); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 533, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":534
+ * bin_edges_c,
+ * option_flags,
+ * weight_min=weight_min, # <<<<<<<<<<<<<<
+ * weight_max=weight_max)
+ *
+ */
+ __pyx_t_29 = __Pyx_PyInt_As_npy_int32(__pyx_v_weight_min); if (unlikely((__pyx_t_29 == ((npy_int32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 534, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":535
+ * option_flags,
+ * weight_min=weight_min,
+ * weight_max=weight_max) # <<<<<<<<<<<<<<
+ *
+ * else:
+ */
+ __pyx_t_28 = __Pyx_PyInt_As_npy_int32(__pyx_v_weight_max); if (unlikely((__pyx_t_28 == ((npy_int32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 535, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":524
+ * elif weights_type == np.int32:
+ *
+ * rc = _histogramnd_double_int32_t_float(sample_c, # <<<<<<<<<<<<<<
+ * weights_c,
+ * n_dims,
+ */
+ __pyx_v_rc = __pyx_f_4silx_4math_12chistogramnd__histogramnd_double_int32_t_float(__pyx_t_19, __pyx_t_31, __pyx_t_21, __pyx_t_15, __pyx_t_16, __pyx_t_17, __pyx_t_18, __pyx_t_24, __pyx_t_14, __pyx_t_9, __pyx_t_29, __pyx_t_28);
+ __PYX_XDEC_MEMVIEW(&__pyx_t_19, 1);
+ __pyx_t_19.memview = NULL;
+ __pyx_t_19.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_31, 1);
+ __pyx_t_31.memview = NULL;
+ __pyx_t_31.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_16, 1);
+ __pyx_t_16.memview = NULL;
+ __pyx_t_16.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_17, 1);
+ __pyx_t_17.memview = NULL;
+ __pyx_t_17.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_18, 1);
+ __pyx_t_18.memview = NULL;
+ __pyx_t_18.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_24, 1);
+ __pyx_t_24.memview = NULL;
+ __pyx_t_24.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_14, 1);
+ __pyx_t_14.memview = NULL;
+ __pyx_t_14.data = NULL;
+
+ /* "silx/math/chistogramnd.pyx":522
+ * weight_max=weight_max)
+ *
+ * elif weights_type == np.int32: # <<<<<<<<<<<<<<
+ *
+ * rc = _histogramnd_double_int32_t_float(sample_c,
+ */
+ goto __pyx_L56;
+ }
+
+ /* "silx/math/chistogramnd.pyx":538
+ *
+ * else:
+ * raise_unsupported_type() # <<<<<<<<<<<<<<
+ *
+ * # endif sample_type == np.float64
+ */
+ /*else*/ {
+ __pyx_t_3 = __pyx_pf_4silx_4math_12chistogramnd_12chistogramnd_raise_unsupported_type(__pyx_v_raise_unsupported_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 538, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ }
+ __pyx_L56:;
+
+ /* "silx/math/chistogramnd.pyx":490
+ * elif weighted_histo.dtype == np.float32:
+ *
+ * if sample_type == np.float64: # <<<<<<<<<<<<<<
+ *
+ * if weights_type == np.float64 or weights_type is None:
+ */
+ goto __pyx_L55;
+ }
+
+ /* "silx/math/chistogramnd.pyx":541
+ *
+ * # endif sample_type == np.float64
+ * elif sample_type == np.float32: # <<<<<<<<<<<<<<
+ *
+ * if weights_type == np.float64 or weights_type is None:
+ */
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 541, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_float32); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 541, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_sample_type, __pyx_t_11, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 541, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 541, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (__pyx_t_7) {
+
+ /* "silx/math/chistogramnd.pyx":543
+ * elif sample_type == np.float32:
+ *
+ * if weights_type == np.float64 or weights_type is None: # <<<<<<<<<<<<<<
+ *
+ * rc = _histogramnd_float_double_float(sample_c,
+ */
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 543, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_float64); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 543, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_weights_type, __pyx_t_11, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 543, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 543, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (!__pyx_t_1) {
+ } else {
+ __pyx_t_7 = __pyx_t_1;
+ goto __pyx_L60_bool_binop_done;
+ }
+ __pyx_t_1 = (__pyx_cur_scope->__pyx_v_weights_type == Py_None);
+ __pyx_t_2 = (__pyx_t_1 != 0);
+ __pyx_t_7 = __pyx_t_2;
+ __pyx_L60_bool_binop_done:;
+ if (__pyx_t_7) {
+
+ /* "silx/math/chistogramnd.pyx":545
+ * if weights_type == np.float64 or weights_type is None:
+ *
+ * rc = _histogramnd_float_double_float(sample_c, # <<<<<<<<<<<<<<
+ * weights_c,
+ * n_dims,
+ */
+ __pyx_t_24 = __Pyx_PyObject_to_MemoryviewSlice_ds_float(__pyx_v_sample_c);
+ if (unlikely(!__pyx_t_24.memview)) __PYX_ERR(0, 545, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":546
+ *
+ * rc = _histogramnd_float_double_float(sample_c,
+ * weights_c, # <<<<<<<<<<<<<<
+ * n_dims,
+ * n_elem,
+ */
+ __pyx_t_14 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_weights_c);
+ if (unlikely(!__pyx_t_14.memview)) __PYX_ERR(0, 546, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":547
+ * rc = _histogramnd_float_double_float(sample_c,
+ * weights_c,
+ * n_dims, # <<<<<<<<<<<<<<
+ * n_elem,
+ * histo_range_c,
+ */
+ __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_v_n_dims); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 547, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":548
+ * weights_c,
+ * n_dims,
+ * n_elem, # <<<<<<<<<<<<<<
+ * histo_range_c,
+ * n_bins_c,
+ */
+ __pyx_t_15 = __Pyx_PyInt_As_int(__pyx_v_n_elem); if (unlikely((__pyx_t_15 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 548, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":549
+ * n_dims,
+ * n_elem,
+ * histo_range_c, # <<<<<<<<<<<<<<
+ * n_bins_c,
+ * histo_c,
+ */
+ __pyx_t_16 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_histo_range_c);
+ if (unlikely(!__pyx_t_16.memview)) __PYX_ERR(0, 549, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":550
+ * n_elem,
+ * histo_range_c,
+ * n_bins_c, # <<<<<<<<<<<<<<
+ * histo_c,
+ * cumul_c,
+ */
+ __pyx_t_17 = __Pyx_PyObject_to_MemoryviewSlice_ds_int(__pyx_v_n_bins_c);
+ if (unlikely(!__pyx_t_17.memview)) __PYX_ERR(0, 550, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":551
+ * histo_range_c,
+ * n_bins_c,
+ * histo_c, # <<<<<<<<<<<<<<
+ * cumul_c,
+ * bin_edges_c,
+ */
+ __pyx_t_18 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(__pyx_v_histo_c);
+ if (unlikely(!__pyx_t_18.memview)) __PYX_ERR(0, 551, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":552
+ * n_bins_c,
+ * histo_c,
+ * cumul_c, # <<<<<<<<<<<<<<
+ * bin_edges_c,
+ * option_flags,
+ */
+ __pyx_t_30 = __Pyx_PyObject_to_MemoryviewSlice_ds_float(__pyx_v_cumul_c);
+ if (unlikely(!__pyx_t_30.memview)) __PYX_ERR(0, 552, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":553
+ * histo_c,
+ * cumul_c,
+ * bin_edges_c, # <<<<<<<<<<<<<<
+ * option_flags,
+ * weight_min=weight_min,
+ */
+ __pyx_t_19 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_bin_edges_c);
+ if (unlikely(!__pyx_t_19.memview)) __PYX_ERR(0, 553, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":554
+ * cumul_c,
+ * bin_edges_c,
+ * option_flags, # <<<<<<<<<<<<<<
+ * weight_min=weight_min,
+ * weight_max=weight_max)
+ */
+ __pyx_t_21 = __Pyx_PyInt_As_int(__pyx_v_option_flags); if (unlikely((__pyx_t_21 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 554, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":555
+ * bin_edges_c,
+ * option_flags,
+ * weight_min=weight_min, # <<<<<<<<<<<<<<
+ * weight_max=weight_max)
+ *
+ */
+ __pyx_t_22 = __pyx_PyFloat_AsDouble(__pyx_v_weight_min); if (unlikely((__pyx_t_22 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 555, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":556
+ * option_flags,
+ * weight_min=weight_min,
+ * weight_max=weight_max) # <<<<<<<<<<<<<<
+ *
+ * elif weights_type == np.float32:
+ */
+ __pyx_t_23 = __pyx_PyFloat_AsDouble(__pyx_v_weight_max); if (unlikely((__pyx_t_23 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 556, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":545
+ * if weights_type == np.float64 or weights_type is None:
+ *
+ * rc = _histogramnd_float_double_float(sample_c, # <<<<<<<<<<<<<<
+ * weights_c,
+ * n_dims,
+ */
+ __pyx_v_rc = __pyx_f_4silx_4math_12chistogramnd__histogramnd_float_double_float(__pyx_t_24, __pyx_t_14, __pyx_t_9, __pyx_t_15, __pyx_t_16, __pyx_t_17, __pyx_t_18, __pyx_t_30, __pyx_t_19, __pyx_t_21, __pyx_t_22, __pyx_t_23);
+ __PYX_XDEC_MEMVIEW(&__pyx_t_24, 1);
+ __pyx_t_24.memview = NULL;
+ __pyx_t_24.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_14, 1);
+ __pyx_t_14.memview = NULL;
+ __pyx_t_14.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_16, 1);
+ __pyx_t_16.memview = NULL;
+ __pyx_t_16.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_17, 1);
+ __pyx_t_17.memview = NULL;
+ __pyx_t_17.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_18, 1);
+ __pyx_t_18.memview = NULL;
+ __pyx_t_18.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_30, 1);
+ __pyx_t_30.memview = NULL;
+ __pyx_t_30.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_19, 1);
+ __pyx_t_19.memview = NULL;
+ __pyx_t_19.data = NULL;
+
+ /* "silx/math/chistogramnd.pyx":543
+ * elif sample_type == np.float32:
+ *
+ * if weights_type == np.float64 or weights_type is None: # <<<<<<<<<<<<<<
+ *
+ * rc = _histogramnd_float_double_float(sample_c,
+ */
+ goto __pyx_L59;
+ }
+
+ /* "silx/math/chistogramnd.pyx":558
+ * weight_max=weight_max)
+ *
+ * elif weights_type == np.float32: # <<<<<<<<<<<<<<
+ *
+ * rc = _histogramnd_float_float_float(sample_c,
+ */
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 558, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_float32); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 558, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_weights_type, __pyx_t_11, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 558, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 558, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (__pyx_t_7) {
+
+ /* "silx/math/chistogramnd.pyx":560
+ * elif weights_type == np.float32:
+ *
+ * rc = _histogramnd_float_float_float(sample_c, # <<<<<<<<<<<<<<
+ * weights_c,
+ * n_dims,
+ */
+ __pyx_t_30 = __Pyx_PyObject_to_MemoryviewSlice_ds_float(__pyx_v_sample_c);
+ if (unlikely(!__pyx_t_30.memview)) __PYX_ERR(0, 560, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":561
+ *
+ * rc = _histogramnd_float_float_float(sample_c,
+ * weights_c, # <<<<<<<<<<<<<<
+ * n_dims,
+ * n_elem,
+ */
+ __pyx_t_24 = __Pyx_PyObject_to_MemoryviewSlice_ds_float(__pyx_v_weights_c);
+ if (unlikely(!__pyx_t_24.memview)) __PYX_ERR(0, 561, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":562
+ * rc = _histogramnd_float_float_float(sample_c,
+ * weights_c,
+ * n_dims, # <<<<<<<<<<<<<<
+ * n_elem,
+ * histo_range_c,
+ */
+ __pyx_t_21 = __Pyx_PyInt_As_int(__pyx_v_n_dims); if (unlikely((__pyx_t_21 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 562, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":563
+ * weights_c,
+ * n_dims,
+ * n_elem, # <<<<<<<<<<<<<<
+ * histo_range_c,
+ * n_bins_c,
+ */
+ __pyx_t_15 = __Pyx_PyInt_As_int(__pyx_v_n_elem); if (unlikely((__pyx_t_15 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 563, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":564
+ * n_dims,
+ * n_elem,
+ * histo_range_c, # <<<<<<<<<<<<<<
+ * n_bins_c,
+ * histo_c,
+ */
+ __pyx_t_19 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_histo_range_c);
+ if (unlikely(!__pyx_t_19.memview)) __PYX_ERR(0, 564, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":565
+ * n_elem,
+ * histo_range_c,
+ * n_bins_c, # <<<<<<<<<<<<<<
+ * histo_c,
+ * cumul_c,
+ */
+ __pyx_t_17 = __Pyx_PyObject_to_MemoryviewSlice_ds_int(__pyx_v_n_bins_c);
+ if (unlikely(!__pyx_t_17.memview)) __PYX_ERR(0, 565, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":566
+ * histo_range_c,
+ * n_bins_c,
+ * histo_c, # <<<<<<<<<<<<<<
+ * cumul_c,
+ * bin_edges_c,
+ */
+ __pyx_t_18 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(__pyx_v_histo_c);
+ if (unlikely(!__pyx_t_18.memview)) __PYX_ERR(0, 566, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":567
+ * n_bins_c,
+ * histo_c,
+ * cumul_c, # <<<<<<<<<<<<<<
+ * bin_edges_c,
+ * option_flags,
+ */
+ __pyx_t_32 = __Pyx_PyObject_to_MemoryviewSlice_ds_float(__pyx_v_cumul_c);
+ if (unlikely(!__pyx_t_32.memview)) __PYX_ERR(0, 567, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":568
+ * histo_c,
+ * cumul_c,
+ * bin_edges_c, # <<<<<<<<<<<<<<
+ * option_flags,
+ * weight_min=weight_min,
+ */
+ __pyx_t_16 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_bin_edges_c);
+ if (unlikely(!__pyx_t_16.memview)) __PYX_ERR(0, 568, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":569
+ * cumul_c,
+ * bin_edges_c,
+ * option_flags, # <<<<<<<<<<<<<<
+ * weight_min=weight_min,
+ * weight_max=weight_max)
+ */
+ __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_v_option_flags); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 569, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":570
+ * bin_edges_c,
+ * option_flags,
+ * weight_min=weight_min, # <<<<<<<<<<<<<<
+ * weight_max=weight_max)
+ *
+ */
+ __pyx_t_25 = __pyx_PyFloat_AsFloat(__pyx_v_weight_min); if (unlikely((__pyx_t_25 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 570, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":571
+ * option_flags,
+ * weight_min=weight_min,
+ * weight_max=weight_max) # <<<<<<<<<<<<<<
+ *
+ * elif weights_type == np.int32:
+ */
+ __pyx_t_26 = __pyx_PyFloat_AsFloat(__pyx_v_weight_max); if (unlikely((__pyx_t_26 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 571, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":560
+ * elif weights_type == np.float32:
+ *
+ * rc = _histogramnd_float_float_float(sample_c, # <<<<<<<<<<<<<<
+ * weights_c,
+ * n_dims,
+ */
+ __pyx_v_rc = __pyx_f_4silx_4math_12chistogramnd__histogramnd_float_float_float(__pyx_t_30, __pyx_t_24, __pyx_t_21, __pyx_t_15, __pyx_t_19, __pyx_t_17, __pyx_t_18, __pyx_t_32, __pyx_t_16, __pyx_t_9, __pyx_t_25, __pyx_t_26);
+ __PYX_XDEC_MEMVIEW(&__pyx_t_30, 1);
+ __pyx_t_30.memview = NULL;
+ __pyx_t_30.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_24, 1);
+ __pyx_t_24.memview = NULL;
+ __pyx_t_24.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_19, 1);
+ __pyx_t_19.memview = NULL;
+ __pyx_t_19.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_17, 1);
+ __pyx_t_17.memview = NULL;
+ __pyx_t_17.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_18, 1);
+ __pyx_t_18.memview = NULL;
+ __pyx_t_18.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_32, 1);
+ __pyx_t_32.memview = NULL;
+ __pyx_t_32.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_16, 1);
+ __pyx_t_16.memview = NULL;
+ __pyx_t_16.data = NULL;
+
+ /* "silx/math/chistogramnd.pyx":558
+ * weight_max=weight_max)
+ *
+ * elif weights_type == np.float32: # <<<<<<<<<<<<<<
+ *
+ * rc = _histogramnd_float_float_float(sample_c,
+ */
+ goto __pyx_L59;
+ }
+
+ /* "silx/math/chistogramnd.pyx":573
+ * weight_max=weight_max)
+ *
+ * elif weights_type == np.int32: # <<<<<<<<<<<<<<
+ *
+ * rc = _histogramnd_float_int32_t_float(sample_c,
+ */
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 573, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_int32); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 573, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_weights_type, __pyx_t_11, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 573, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 573, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (__pyx_t_7) {
+
+ /* "silx/math/chistogramnd.pyx":575
+ * elif weights_type == np.int32:
+ *
+ * rc = _histogramnd_float_int32_t_float(sample_c, # <<<<<<<<<<<<<<
+ * weights_c,
+ * n_dims,
+ */
+ __pyx_t_32 = __Pyx_PyObject_to_MemoryviewSlice_ds_float(__pyx_v_sample_c);
+ if (unlikely(!__pyx_t_32.memview)) __PYX_ERR(0, 575, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":576
+ *
+ * rc = _histogramnd_float_int32_t_float(sample_c,
+ * weights_c, # <<<<<<<<<<<<<<
+ * n_dims,
+ * n_elem,
+ */
+ __pyx_t_31 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(__pyx_v_weights_c);
+ if (unlikely(!__pyx_t_31.memview)) __PYX_ERR(0, 576, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":577
+ * rc = _histogramnd_float_int32_t_float(sample_c,
+ * weights_c,
+ * n_dims, # <<<<<<<<<<<<<<
+ * n_elem,
+ * histo_range_c,
+ */
+ __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_v_n_dims); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 577, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":578
+ * weights_c,
+ * n_dims,
+ * n_elem, # <<<<<<<<<<<<<<
+ * histo_range_c,
+ * n_bins_c,
+ */
+ __pyx_t_15 = __Pyx_PyInt_As_int(__pyx_v_n_elem); if (unlikely((__pyx_t_15 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 578, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":579
+ * n_dims,
+ * n_elem,
+ * histo_range_c, # <<<<<<<<<<<<<<
+ * n_bins_c,
+ * histo_c,
+ */
+ __pyx_t_16 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_histo_range_c);
+ if (unlikely(!__pyx_t_16.memview)) __PYX_ERR(0, 579, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":580
+ * n_elem,
+ * histo_range_c,
+ * n_bins_c, # <<<<<<<<<<<<<<
+ * histo_c,
+ * cumul_c,
+ */
+ __pyx_t_17 = __Pyx_PyObject_to_MemoryviewSlice_ds_int(__pyx_v_n_bins_c);
+ if (unlikely(!__pyx_t_17.memview)) __PYX_ERR(0, 580, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":581
+ * histo_range_c,
+ * n_bins_c,
+ * histo_c, # <<<<<<<<<<<<<<
+ * cumul_c,
+ * bin_edges_c,
+ */
+ __pyx_t_18 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(__pyx_v_histo_c);
+ if (unlikely(!__pyx_t_18.memview)) __PYX_ERR(0, 581, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":582
+ * n_bins_c,
+ * histo_c,
+ * cumul_c, # <<<<<<<<<<<<<<
+ * bin_edges_c,
+ * option_flags,
+ */
+ __pyx_t_24 = __Pyx_PyObject_to_MemoryviewSlice_ds_float(__pyx_v_cumul_c);
+ if (unlikely(!__pyx_t_24.memview)) __PYX_ERR(0, 582, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":583
+ * histo_c,
+ * cumul_c,
+ * bin_edges_c, # <<<<<<<<<<<<<<
+ * option_flags,
+ * weight_min=weight_min,
+ */
+ __pyx_t_19 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_bin_edges_c);
+ if (unlikely(!__pyx_t_19.memview)) __PYX_ERR(0, 583, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":584
+ * cumul_c,
+ * bin_edges_c,
+ * option_flags, # <<<<<<<<<<<<<<
+ * weight_min=weight_min,
+ * weight_max=weight_max)
+ */
+ __pyx_t_21 = __Pyx_PyInt_As_int(__pyx_v_option_flags); if (unlikely((__pyx_t_21 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 584, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":585
+ * bin_edges_c,
+ * option_flags,
+ * weight_min=weight_min, # <<<<<<<<<<<<<<
+ * weight_max=weight_max)
+ *
+ */
+ __pyx_t_28 = __Pyx_PyInt_As_npy_int32(__pyx_v_weight_min); if (unlikely((__pyx_t_28 == ((npy_int32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 585, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":586
+ * option_flags,
+ * weight_min=weight_min,
+ * weight_max=weight_max) # <<<<<<<<<<<<<<
+ *
+ * else:
+ */
+ __pyx_t_29 = __Pyx_PyInt_As_npy_int32(__pyx_v_weight_max); if (unlikely((__pyx_t_29 == ((npy_int32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 586, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":575
+ * elif weights_type == np.int32:
+ *
+ * rc = _histogramnd_float_int32_t_float(sample_c, # <<<<<<<<<<<<<<
+ * weights_c,
+ * n_dims,
+ */
+ __pyx_v_rc = __pyx_f_4silx_4math_12chistogramnd__histogramnd_float_int32_t_float(__pyx_t_32, __pyx_t_31, __pyx_t_9, __pyx_t_15, __pyx_t_16, __pyx_t_17, __pyx_t_18, __pyx_t_24, __pyx_t_19, __pyx_t_21, __pyx_t_28, __pyx_t_29);
+ __PYX_XDEC_MEMVIEW(&__pyx_t_32, 1);
+ __pyx_t_32.memview = NULL;
+ __pyx_t_32.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_31, 1);
+ __pyx_t_31.memview = NULL;
+ __pyx_t_31.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_16, 1);
+ __pyx_t_16.memview = NULL;
+ __pyx_t_16.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_17, 1);
+ __pyx_t_17.memview = NULL;
+ __pyx_t_17.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_18, 1);
+ __pyx_t_18.memview = NULL;
+ __pyx_t_18.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_24, 1);
+ __pyx_t_24.memview = NULL;
+ __pyx_t_24.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_19, 1);
+ __pyx_t_19.memview = NULL;
+ __pyx_t_19.data = NULL;
+
+ /* "silx/math/chistogramnd.pyx":573
+ * weight_max=weight_max)
+ *
+ * elif weights_type == np.int32: # <<<<<<<<<<<<<<
+ *
+ * rc = _histogramnd_float_int32_t_float(sample_c,
+ */
+ goto __pyx_L59;
+ }
+
+ /* "silx/math/chistogramnd.pyx":589
+ *
+ * else:
+ * raise_unsupported_type() # <<<<<<<<<<<<<<
+ *
+ * # endif sample_type == np.float32
+ */
+ /*else*/ {
+ __pyx_t_3 = __pyx_pf_4silx_4math_12chistogramnd_12chistogramnd_raise_unsupported_type(__pyx_v_raise_unsupported_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 589, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ }
+ __pyx_L59:;
+
+ /* "silx/math/chistogramnd.pyx":541
+ *
+ * # endif sample_type == np.float64
+ * elif sample_type == np.float32: # <<<<<<<<<<<<<<
+ *
+ * if weights_type == np.float64 or weights_type is None:
+ */
+ goto __pyx_L55;
+ }
+
+ /* "silx/math/chistogramnd.pyx":592
+ *
+ * # endif sample_type == np.float32
+ * elif sample_type == np.int32: # <<<<<<<<<<<<<<
+ *
+ * if weights_type == np.float64 or weights_type is None:
+ */
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 592, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_int32); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 592, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_sample_type, __pyx_t_11, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 592, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 592, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (__pyx_t_7) {
+
+ /* "silx/math/chistogramnd.pyx":594
+ * elif sample_type == np.int32:
+ *
+ * if weights_type == np.float64 or weights_type is None: # <<<<<<<<<<<<<<
+ *
+ * rc = _histogramnd_int32_t_double_float(sample_c,
+ */
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 594, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_float64); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 594, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_weights_type, __pyx_t_11, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 594, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 594, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (!__pyx_t_2) {
+ } else {
+ __pyx_t_7 = __pyx_t_2;
+ goto __pyx_L63_bool_binop_done;
+ }
+ __pyx_t_2 = (__pyx_cur_scope->__pyx_v_weights_type == Py_None);
+ __pyx_t_1 = (__pyx_t_2 != 0);
+ __pyx_t_7 = __pyx_t_1;
+ __pyx_L63_bool_binop_done:;
+ if (__pyx_t_7) {
+
+ /* "silx/math/chistogramnd.pyx":596
+ * if weights_type == np.float64 or weights_type is None:
+ *
+ * rc = _histogramnd_int32_t_double_float(sample_c, # <<<<<<<<<<<<<<
+ * weights_c,
+ * n_dims,
+ */
+ __pyx_t_31 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(__pyx_v_sample_c);
+ if (unlikely(!__pyx_t_31.memview)) __PYX_ERR(0, 596, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":597
+ *
+ * rc = _histogramnd_int32_t_double_float(sample_c,
+ * weights_c, # <<<<<<<<<<<<<<
+ * n_dims,
+ * n_elem,
+ */
+ __pyx_t_19 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_weights_c);
+ if (unlikely(!__pyx_t_19.memview)) __PYX_ERR(0, 597, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":598
+ * rc = _histogramnd_int32_t_double_float(sample_c,
+ * weights_c,
+ * n_dims, # <<<<<<<<<<<<<<
+ * n_elem,
+ * histo_range_c,
+ */
+ __pyx_t_21 = __Pyx_PyInt_As_int(__pyx_v_n_dims); if (unlikely((__pyx_t_21 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 598, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":599
+ * weights_c,
+ * n_dims,
+ * n_elem, # <<<<<<<<<<<<<<
+ * histo_range_c,
+ * n_bins_c,
+ */
+ __pyx_t_15 = __Pyx_PyInt_As_int(__pyx_v_n_elem); if (unlikely((__pyx_t_15 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 599, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":600
+ * n_dims,
+ * n_elem,
+ * histo_range_c, # <<<<<<<<<<<<<<
+ * n_bins_c,
+ * histo_c,
+ */
+ __pyx_t_16 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_histo_range_c);
+ if (unlikely(!__pyx_t_16.memview)) __PYX_ERR(0, 600, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":601
+ * n_elem,
+ * histo_range_c,
+ * n_bins_c, # <<<<<<<<<<<<<<
+ * histo_c,
+ * cumul_c,
+ */
+ __pyx_t_17 = __Pyx_PyObject_to_MemoryviewSlice_ds_int(__pyx_v_n_bins_c);
+ if (unlikely(!__pyx_t_17.memview)) __PYX_ERR(0, 601, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":602
+ * histo_range_c,
+ * n_bins_c,
+ * histo_c, # <<<<<<<<<<<<<<
+ * cumul_c,
+ * bin_edges_c,
+ */
+ __pyx_t_18 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(__pyx_v_histo_c);
+ if (unlikely(!__pyx_t_18.memview)) __PYX_ERR(0, 602, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":603
+ * n_bins_c,
+ * histo_c,
+ * cumul_c, # <<<<<<<<<<<<<<
+ * bin_edges_c,
+ * option_flags,
+ */
+ __pyx_t_24 = __Pyx_PyObject_to_MemoryviewSlice_ds_float(__pyx_v_cumul_c);
+ if (unlikely(!__pyx_t_24.memview)) __PYX_ERR(0, 603, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":604
+ * histo_c,
+ * cumul_c,
+ * bin_edges_c, # <<<<<<<<<<<<<<
+ * option_flags,
+ * weight_min=weight_min,
+ */
+ __pyx_t_14 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_bin_edges_c);
+ if (unlikely(!__pyx_t_14.memview)) __PYX_ERR(0, 604, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":605
+ * cumul_c,
+ * bin_edges_c,
+ * option_flags, # <<<<<<<<<<<<<<
+ * weight_min=weight_min,
+ * weight_max=weight_max)
+ */
+ __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_v_option_flags); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 605, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":606
+ * bin_edges_c,
+ * option_flags,
+ * weight_min=weight_min, # <<<<<<<<<<<<<<
+ * weight_max=weight_max)
+ *
+ */
+ __pyx_t_23 = __pyx_PyFloat_AsDouble(__pyx_v_weight_min); if (unlikely((__pyx_t_23 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 606, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":607
+ * option_flags,
+ * weight_min=weight_min,
+ * weight_max=weight_max) # <<<<<<<<<<<<<<
+ *
+ * elif weights_type == np.float32:
+ */
+ __pyx_t_22 = __pyx_PyFloat_AsDouble(__pyx_v_weight_max); if (unlikely((__pyx_t_22 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 607, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":596
+ * if weights_type == np.float64 or weights_type is None:
+ *
+ * rc = _histogramnd_int32_t_double_float(sample_c, # <<<<<<<<<<<<<<
+ * weights_c,
+ * n_dims,
+ */
+ __pyx_v_rc = __pyx_f_4silx_4math_12chistogramnd__histogramnd_int32_t_double_float(__pyx_t_31, __pyx_t_19, __pyx_t_21, __pyx_t_15, __pyx_t_16, __pyx_t_17, __pyx_t_18, __pyx_t_24, __pyx_t_14, __pyx_t_9, __pyx_t_23, __pyx_t_22);
+ __PYX_XDEC_MEMVIEW(&__pyx_t_31, 1);
+ __pyx_t_31.memview = NULL;
+ __pyx_t_31.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_19, 1);
+ __pyx_t_19.memview = NULL;
+ __pyx_t_19.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_16, 1);
+ __pyx_t_16.memview = NULL;
+ __pyx_t_16.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_17, 1);
+ __pyx_t_17.memview = NULL;
+ __pyx_t_17.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_18, 1);
+ __pyx_t_18.memview = NULL;
+ __pyx_t_18.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_24, 1);
+ __pyx_t_24.memview = NULL;
+ __pyx_t_24.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_14, 1);
+ __pyx_t_14.memview = NULL;
+ __pyx_t_14.data = NULL;
+
+ /* "silx/math/chistogramnd.pyx":594
+ * elif sample_type == np.int32:
+ *
+ * if weights_type == np.float64 or weights_type is None: # <<<<<<<<<<<<<<
+ *
+ * rc = _histogramnd_int32_t_double_float(sample_c,
+ */
+ goto __pyx_L62;
+ }
+
+ /* "silx/math/chistogramnd.pyx":609
+ * weight_max=weight_max)
+ *
+ * elif weights_type == np.float32: # <<<<<<<<<<<<<<
+ *
+ * rc = _histogramnd_int32_t_float_float(sample_c,
+ */
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 609, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_float32); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 609, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_weights_type, __pyx_t_11, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 609, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 609, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (__pyx_t_7) {
+
+ /* "silx/math/chistogramnd.pyx":611
+ * elif weights_type == np.float32:
+ *
+ * rc = _histogramnd_int32_t_float_float(sample_c, # <<<<<<<<<<<<<<
+ * weights_c,
+ * n_dims,
+ */
+ __pyx_t_31 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(__pyx_v_sample_c);
+ if (unlikely(!__pyx_t_31.memview)) __PYX_ERR(0, 611, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":612
+ *
+ * rc = _histogramnd_int32_t_float_float(sample_c,
+ * weights_c, # <<<<<<<<<<<<<<
+ * n_dims,
+ * n_elem,
+ */
+ __pyx_t_24 = __Pyx_PyObject_to_MemoryviewSlice_ds_float(__pyx_v_weights_c);
+ if (unlikely(!__pyx_t_24.memview)) __PYX_ERR(0, 612, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":613
+ * rc = _histogramnd_int32_t_float_float(sample_c,
+ * weights_c,
+ * n_dims, # <<<<<<<<<<<<<<
+ * n_elem,
+ * histo_range_c,
+ */
+ __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_v_n_dims); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 613, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":614
+ * weights_c,
+ * n_dims,
+ * n_elem, # <<<<<<<<<<<<<<
+ * histo_range_c,
+ * n_bins_c,
+ */
+ __pyx_t_15 = __Pyx_PyInt_As_int(__pyx_v_n_elem); if (unlikely((__pyx_t_15 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 614, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":615
+ * n_dims,
+ * n_elem,
+ * histo_range_c, # <<<<<<<<<<<<<<
+ * n_bins_c,
+ * histo_c,
+ */
+ __pyx_t_14 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_histo_range_c);
+ if (unlikely(!__pyx_t_14.memview)) __PYX_ERR(0, 615, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":616
+ * n_elem,
+ * histo_range_c,
+ * n_bins_c, # <<<<<<<<<<<<<<
+ * histo_c,
+ * cumul_c,
+ */
+ __pyx_t_17 = __Pyx_PyObject_to_MemoryviewSlice_ds_int(__pyx_v_n_bins_c);
+ if (unlikely(!__pyx_t_17.memview)) __PYX_ERR(0, 616, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":617
+ * histo_range_c,
+ * n_bins_c,
+ * histo_c, # <<<<<<<<<<<<<<
+ * cumul_c,
+ * bin_edges_c,
+ */
+ __pyx_t_18 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(__pyx_v_histo_c);
+ if (unlikely(!__pyx_t_18.memview)) __PYX_ERR(0, 617, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":618
+ * n_bins_c,
+ * histo_c,
+ * cumul_c, # <<<<<<<<<<<<<<
+ * bin_edges_c,
+ * option_flags,
+ */
+ __pyx_t_32 = __Pyx_PyObject_to_MemoryviewSlice_ds_float(__pyx_v_cumul_c);
+ if (unlikely(!__pyx_t_32.memview)) __PYX_ERR(0, 618, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":619
+ * histo_c,
+ * cumul_c,
+ * bin_edges_c, # <<<<<<<<<<<<<<
+ * option_flags,
+ * weight_min=weight_min,
+ */
+ __pyx_t_16 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_bin_edges_c);
+ if (unlikely(!__pyx_t_16.memview)) __PYX_ERR(0, 619, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":620
+ * cumul_c,
+ * bin_edges_c,
+ * option_flags, # <<<<<<<<<<<<<<
+ * weight_min=weight_min,
+ * weight_max=weight_max)
+ */
+ __pyx_t_21 = __Pyx_PyInt_As_int(__pyx_v_option_flags); if (unlikely((__pyx_t_21 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 620, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":621
+ * bin_edges_c,
+ * option_flags,
+ * weight_min=weight_min, # <<<<<<<<<<<<<<
+ * weight_max=weight_max)
+ *
+ */
+ __pyx_t_26 = __pyx_PyFloat_AsFloat(__pyx_v_weight_min); if (unlikely((__pyx_t_26 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 621, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":622
+ * option_flags,
+ * weight_min=weight_min,
+ * weight_max=weight_max) # <<<<<<<<<<<<<<
+ *
+ * elif weights_type == np.int32:
+ */
+ __pyx_t_25 = __pyx_PyFloat_AsFloat(__pyx_v_weight_max); if (unlikely((__pyx_t_25 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 622, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":611
+ * elif weights_type == np.float32:
+ *
+ * rc = _histogramnd_int32_t_float_float(sample_c, # <<<<<<<<<<<<<<
+ * weights_c,
+ * n_dims,
+ */
+ __pyx_v_rc = __pyx_f_4silx_4math_12chistogramnd__histogramnd_int32_t_float_float(__pyx_t_31, __pyx_t_24, __pyx_t_9, __pyx_t_15, __pyx_t_14, __pyx_t_17, __pyx_t_18, __pyx_t_32, __pyx_t_16, __pyx_t_21, __pyx_t_26, __pyx_t_25);
+ __PYX_XDEC_MEMVIEW(&__pyx_t_31, 1);
+ __pyx_t_31.memview = NULL;
+ __pyx_t_31.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_24, 1);
+ __pyx_t_24.memview = NULL;
+ __pyx_t_24.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_14, 1);
+ __pyx_t_14.memview = NULL;
+ __pyx_t_14.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_17, 1);
+ __pyx_t_17.memview = NULL;
+ __pyx_t_17.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_18, 1);
+ __pyx_t_18.memview = NULL;
+ __pyx_t_18.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_32, 1);
+ __pyx_t_32.memview = NULL;
+ __pyx_t_32.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_16, 1);
+ __pyx_t_16.memview = NULL;
+ __pyx_t_16.data = NULL;
+
+ /* "silx/math/chistogramnd.pyx":609
+ * weight_max=weight_max)
+ *
+ * elif weights_type == np.float32: # <<<<<<<<<<<<<<
+ *
+ * rc = _histogramnd_int32_t_float_float(sample_c,
+ */
+ goto __pyx_L62;
+ }
+
+ /* "silx/math/chistogramnd.pyx":624
+ * weight_max=weight_max)
+ *
+ * elif weights_type == np.int32: # <<<<<<<<<<<<<<
+ *
+ * rc = _histogramnd_int32_t_int32_t_float(sample_c,
+ */
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 624, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_int32); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 624, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_weights_type, __pyx_t_11, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 624, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 624, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (__pyx_t_7) {
+
+ /* "silx/math/chistogramnd.pyx":626
+ * elif weights_type == np.int32:
+ *
+ * rc = _histogramnd_int32_t_int32_t_float(sample_c, # <<<<<<<<<<<<<<
+ * weights_c,
+ * n_dims,
+ */
+ __pyx_t_31 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(__pyx_v_sample_c);
+ if (unlikely(!__pyx_t_31.memview)) __PYX_ERR(0, 626, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":627
+ *
+ * rc = _histogramnd_int32_t_int32_t_float(sample_c,
+ * weights_c, # <<<<<<<<<<<<<<
+ * n_dims,
+ * n_elem,
+ */
+ __pyx_t_27 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(__pyx_v_weights_c);
+ if (unlikely(!__pyx_t_27.memview)) __PYX_ERR(0, 627, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":628
+ * rc = _histogramnd_int32_t_int32_t_float(sample_c,
+ * weights_c,
+ * n_dims, # <<<<<<<<<<<<<<
+ * n_elem,
+ * histo_range_c,
+ */
+ __pyx_t_21 = __Pyx_PyInt_As_int(__pyx_v_n_dims); if (unlikely((__pyx_t_21 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 628, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":629
+ * weights_c,
+ * n_dims,
+ * n_elem, # <<<<<<<<<<<<<<
+ * histo_range_c,
+ * n_bins_c,
+ */
+ __pyx_t_15 = __Pyx_PyInt_As_int(__pyx_v_n_elem); if (unlikely((__pyx_t_15 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 629, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":630
+ * n_dims,
+ * n_elem,
+ * histo_range_c, # <<<<<<<<<<<<<<
+ * n_bins_c,
+ * histo_c,
+ */
+ __pyx_t_16 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_histo_range_c);
+ if (unlikely(!__pyx_t_16.memview)) __PYX_ERR(0, 630, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":631
+ * n_elem,
+ * histo_range_c,
+ * n_bins_c, # <<<<<<<<<<<<<<
+ * histo_c,
+ * cumul_c,
+ */
+ __pyx_t_17 = __Pyx_PyObject_to_MemoryviewSlice_ds_int(__pyx_v_n_bins_c);
+ if (unlikely(!__pyx_t_17.memview)) __PYX_ERR(0, 631, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":632
+ * histo_range_c,
+ * n_bins_c,
+ * histo_c, # <<<<<<<<<<<<<<
+ * cumul_c,
+ * bin_edges_c,
+ */
+ __pyx_t_18 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(__pyx_v_histo_c);
+ if (unlikely(!__pyx_t_18.memview)) __PYX_ERR(0, 632, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":633
+ * n_bins_c,
+ * histo_c,
+ * cumul_c, # <<<<<<<<<<<<<<
+ * bin_edges_c,
+ * option_flags,
+ */
+ __pyx_t_32 = __Pyx_PyObject_to_MemoryviewSlice_ds_float(__pyx_v_cumul_c);
+ if (unlikely(!__pyx_t_32.memview)) __PYX_ERR(0, 633, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":634
+ * histo_c,
+ * cumul_c,
+ * bin_edges_c, # <<<<<<<<<<<<<<
+ * option_flags,
+ * weight_min=weight_min,
+ */
+ __pyx_t_14 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_bin_edges_c);
+ if (unlikely(!__pyx_t_14.memview)) __PYX_ERR(0, 634, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":635
+ * cumul_c,
+ * bin_edges_c,
+ * option_flags, # <<<<<<<<<<<<<<
+ * weight_min=weight_min,
+ * weight_max=weight_max)
+ */
+ __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_v_option_flags); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 635, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":636
+ * bin_edges_c,
+ * option_flags,
+ * weight_min=weight_min, # <<<<<<<<<<<<<<
+ * weight_max=weight_max)
+ *
+ */
+ __pyx_t_29 = __Pyx_PyInt_As_npy_int32(__pyx_v_weight_min); if (unlikely((__pyx_t_29 == ((npy_int32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 636, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":637
+ * option_flags,
+ * weight_min=weight_min,
+ * weight_max=weight_max) # <<<<<<<<<<<<<<
+ *
+ * else:
+ */
+ __pyx_t_28 = __Pyx_PyInt_As_npy_int32(__pyx_v_weight_max); if (unlikely((__pyx_t_28 == ((npy_int32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 637, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":626
+ * elif weights_type == np.int32:
+ *
+ * rc = _histogramnd_int32_t_int32_t_float(sample_c, # <<<<<<<<<<<<<<
+ * weights_c,
+ * n_dims,
+ */
+ __pyx_v_rc = __pyx_f_4silx_4math_12chistogramnd__histogramnd_int32_t_int32_t_float(__pyx_t_31, __pyx_t_27, __pyx_t_21, __pyx_t_15, __pyx_t_16, __pyx_t_17, __pyx_t_18, __pyx_t_32, __pyx_t_14, __pyx_t_9, __pyx_t_29, __pyx_t_28);
+ __PYX_XDEC_MEMVIEW(&__pyx_t_31, 1);
+ __pyx_t_31.memview = NULL;
+ __pyx_t_31.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_27, 1);
+ __pyx_t_27.memview = NULL;
+ __pyx_t_27.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_16, 1);
+ __pyx_t_16.memview = NULL;
+ __pyx_t_16.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_17, 1);
+ __pyx_t_17.memview = NULL;
+ __pyx_t_17.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_18, 1);
+ __pyx_t_18.memview = NULL;
+ __pyx_t_18.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_32, 1);
+ __pyx_t_32.memview = NULL;
+ __pyx_t_32.data = NULL;
+ __PYX_XDEC_MEMVIEW(&__pyx_t_14, 1);
+ __pyx_t_14.memview = NULL;
+ __pyx_t_14.data = NULL;
+
+ /* "silx/math/chistogramnd.pyx":624
+ * weight_max=weight_max)
+ *
+ * elif weights_type == np.int32: # <<<<<<<<<<<<<<
+ *
+ * rc = _histogramnd_int32_t_int32_t_float(sample_c,
+ */
+ goto __pyx_L62;
+ }
+
+ /* "silx/math/chistogramnd.pyx":640
+ *
+ * else:
+ * raise_unsupported_type() # <<<<<<<<<<<<<<
+ *
+ * # endif sample_type == np.int32:
+ */
+ /*else*/ {
+ __pyx_t_3 = __pyx_pf_4silx_4math_12chistogramnd_12chistogramnd_raise_unsupported_type(__pyx_v_raise_unsupported_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 640, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ }
+ __pyx_L62:;
+
+ /* "silx/math/chistogramnd.pyx":592
+ *
+ * # endif sample_type == np.float32
+ * elif sample_type == np.int32: # <<<<<<<<<<<<<<
+ *
+ * if weights_type == np.float64 or weights_type is None:
+ */
+ goto __pyx_L55;
+ }
+
+ /* "silx/math/chistogramnd.pyx":644
+ * # endif sample_type == np.int32:
+ * else:
+ * raise_unsupported_type() # <<<<<<<<<<<<<<
+ *
+ * # end elseif weighted_histo.dtype == np.float32:
+ */
+ /*else*/ {
+ __pyx_t_3 = __pyx_pf_4silx_4math_12chistogramnd_12chistogramnd_raise_unsupported_type(__pyx_v_raise_unsupported_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 644, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ }
+ __pyx_L55:;
+
+ /* "silx/math/chistogramnd.pyx":488
+ *
+ * # endif weighted_histo is None or weighted_histo.dtype == np.double:
+ * elif weighted_histo.dtype == np.float32: # <<<<<<<<<<<<<<
+ *
+ * if sample_type == np.float64:
+ */
+ goto __pyx_L42;
+ }
+
+ /* "silx/math/chistogramnd.pyx":649
+ * else:
+ * # this isnt supposed to happen since weighted_histo type was checked earlier
+ * raise_unsupported_type() # <<<<<<<<<<<<<<
+ *
+ * if rc != histogramnd_c.HISTO_OK:
+ */
+ /*else*/ {
+ __pyx_t_3 = __pyx_pf_4silx_4math_12chistogramnd_12chistogramnd_raise_unsupported_type(__pyx_v_raise_unsupported_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 649, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ }
+ __pyx_L42:;
+
+ /* "silx/math/chistogramnd.pyx":651
+ * raise_unsupported_type()
+ *
+ * if rc != histogramnd_c.HISTO_OK: # <<<<<<<<<<<<<<
+ * if rc == histogramnd_c.HISTO_ERR_ALLOC:
+ * raise MemoryError('histogramnd failed to allocate memory.')
+ */
+ __pyx_t_7 = ((__pyx_v_rc != HISTO_OK) != 0);
+ if (__pyx_t_7) {
+
+ /* "silx/math/chistogramnd.pyx":652
+ *
+ * if rc != histogramnd_c.HISTO_OK:
+ * if rc == histogramnd_c.HISTO_ERR_ALLOC: # <<<<<<<<<<<<<<
+ * raise MemoryError('histogramnd failed to allocate memory.')
+ * else:
+ */
+ __pyx_t_7 = ((__pyx_v_rc == HISTO_ERR_ALLOC) != 0);
+ if (__pyx_t_7) {
+
+ /* "silx/math/chistogramnd.pyx":653
+ * if rc != histogramnd_c.HISTO_OK:
+ * if rc == histogramnd_c.HISTO_ERR_ALLOC:
+ * raise MemoryError('histogramnd failed to allocate memory.') # <<<<<<<<<<<<<<
+ * else:
+ * raise Exception('histogramnd returned an error : {0}'
+ */
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_MemoryError, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 653, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __PYX_ERR(0, 653, __pyx_L1_error)
+
+ /* "silx/math/chistogramnd.pyx":652
+ *
+ * if rc != histogramnd_c.HISTO_OK:
+ * if rc == histogramnd_c.HISTO_ERR_ALLOC: # <<<<<<<<<<<<<<
+ * raise MemoryError('histogramnd failed to allocate memory.')
+ * else:
+ */
+ }
+
+ /* "silx/math/chistogramnd.pyx":655
+ * raise MemoryError('histogramnd failed to allocate memory.')
+ * else:
+ * raise Exception('histogramnd returned an error : {0}' # <<<<<<<<<<<<<<
+ * ''.format(rc))
+ *
+ */
+ /*else*/ {
+
+ /* "silx/math/chistogramnd.pyx":656
+ * else:
+ * raise Exception('histogramnd returned an error : {0}'
+ * ''.format(rc)) # <<<<<<<<<<<<<<
+ *
+ * edges = []
+ */
+ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_histogramnd_returned_an_error_0, __pyx_n_s_format); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 656, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __pyx_t_4 = __Pyx_PyInt_From_long(__pyx_v_rc); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 656, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_12 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) {
+ __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_11);
+ if (likely(__pyx_t_12)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
+ __Pyx_INCREF(__pyx_t_12);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_11, function);
+ }
+ }
+ if (!__pyx_t_12) {
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 656, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_11)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_t_4};
+ __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 656, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_t_4};
+ __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 656, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 656, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_12); __pyx_t_12 = NULL;
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_4);
+ __pyx_t_4 = 0;
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_10, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 656, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+
+ /* "silx/math/chistogramnd.pyx":655
+ * raise MemoryError('histogramnd failed to allocate memory.')
+ * else:
+ * raise Exception('histogramnd returned an error : {0}' # <<<<<<<<<<<<<<
+ * ''.format(rc))
+ *
+ */
+ __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 655, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_3);
+ __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_11, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 655, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __PYX_ERR(0, 655, __pyx_L1_error)
+ }
+
+ /* "silx/math/chistogramnd.pyx":651
+ * raise_unsupported_type()
+ *
+ * if rc != histogramnd_c.HISTO_OK: # <<<<<<<<<<<<<<
+ * if rc == histogramnd_c.HISTO_ERR_ALLOC:
+ * raise MemoryError('histogramnd failed to allocate memory.')
+ */
+ }
+
+ /* "silx/math/chistogramnd.pyx":658
+ * ''.format(rc))
+ *
+ * edges = [] # <<<<<<<<<<<<<<
+ * offset = 0
+ * for i_dim in range(n_dims):
+ */
+ __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 658, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_v_edges = ((PyObject*)__pyx_t_3);
+ __pyx_t_3 = 0;
+
+ /* "silx/math/chistogramnd.pyx":659
+ *
+ * edges = []
+ * offset = 0 # <<<<<<<<<<<<<<
+ * for i_dim in range(n_dims):
+ * edges.append(bin_edges[offset:offset + n_bins[i_dim] + 1])
+ */
+ __Pyx_INCREF(__pyx_int_0);
+ __pyx_v_offset = __pyx_int_0;
+
+ /* "silx/math/chistogramnd.pyx":660
+ * edges = []
+ * offset = 0
+ * for i_dim in range(n_dims): # <<<<<<<<<<<<<<
+ * edges.append(bin_edges[offset:offset + n_bins[i_dim] + 1])
+ * offset += n_bins[i_dim] + 1
+ */
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 660, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_INCREF(__pyx_v_n_dims);
+ __Pyx_GIVEREF(__pyx_v_n_dims);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_n_dims);
+ __pyx_t_11 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_3, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 660, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (likely(PyList_CheckExact(__pyx_t_11)) || PyTuple_CheckExact(__pyx_t_11)) {
+ __pyx_t_3 = __pyx_t_11; __Pyx_INCREF(__pyx_t_3); __pyx_t_8 = 0;
+ __pyx_t_33 = NULL;
+ } else {
+ __pyx_t_8 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_11); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 660, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_33 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_33)) __PYX_ERR(0, 660, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_33)) {
+ if (likely(PyList_CheckExact(__pyx_t_3))) {
+ if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_3)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_11 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_8); __Pyx_INCREF(__pyx_t_11); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 660, __pyx_L1_error)
+ #else
+ __pyx_t_11 = PySequence_ITEM(__pyx_t_3, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 660, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ #endif
+ } else {
+ if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_11 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_8); __Pyx_INCREF(__pyx_t_11); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 660, __pyx_L1_error)
+ #else
+ __pyx_t_11 = PySequence_ITEM(__pyx_t_3, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 660, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ #endif
+ }
+ } else {
+ __pyx_t_11 = __pyx_t_33(__pyx_t_3);
+ if (unlikely(!__pyx_t_11)) {
+ 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, 660, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_11);
+ }
+ __Pyx_XDECREF_SET(__pyx_v_i_dim, __pyx_t_11);
+ __pyx_t_11 = 0;
+
+ /* "silx/math/chistogramnd.pyx":661
+ * offset = 0
+ * for i_dim in range(n_dims):
+ * edges.append(bin_edges[offset:offset + n_bins[i_dim] + 1]) # <<<<<<<<<<<<<<
+ * offset += n_bins[i_dim] + 1
+ *
+ */
+ __pyx_t_11 = PyObject_GetItem(__pyx_v_n_bins, __pyx_v_i_dim); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 661, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __pyx_t_10 = PyNumber_Add(__pyx_v_offset, __pyx_t_11); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 661, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __pyx_t_11 = __Pyx_PyInt_AddObjC(__pyx_t_10, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 661, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __pyx_t_10 = __Pyx_PyObject_GetSlice(__pyx_v_bin_edges, 0, 0, &__pyx_v_offset, &__pyx_t_11, NULL, 0, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 661, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __pyx_t_34 = __Pyx_PyList_Append(__pyx_v_edges, __pyx_t_10); if (unlikely(__pyx_t_34 == -1)) __PYX_ERR(0, 661, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+
+ /* "silx/math/chistogramnd.pyx":662
+ * for i_dim in range(n_dims):
+ * edges.append(bin_edges[offset:offset + n_bins[i_dim] + 1])
+ * offset += n_bins[i_dim] + 1 # <<<<<<<<<<<<<<
+ *
+ * return histo, weighted_histo, tuple(edges)
+ */
+ __pyx_t_10 = PyObject_GetItem(__pyx_v_n_bins, __pyx_v_i_dim); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 662, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_11 = __Pyx_PyInt_AddObjC(__pyx_t_10, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 662, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __pyx_t_10 = PyNumber_InPlaceAdd(__pyx_v_offset, __pyx_t_11); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 662, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_DECREF_SET(__pyx_v_offset, __pyx_t_10);
+ __pyx_t_10 = 0;
+
+ /* "silx/math/chistogramnd.pyx":660
+ * edges = []
+ * offset = 0
+ * for i_dim in range(n_dims): # <<<<<<<<<<<<<<
+ * edges.append(bin_edges[offset:offset + n_bins[i_dim] + 1])
+ * offset += n_bins[i_dim] + 1
+ */
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+ /* "silx/math/chistogramnd.pyx":664
+ * offset += n_bins[i_dim] + 1
+ *
+ * return histo, weighted_histo, tuple(edges) # <<<<<<<<<<<<<<
+ *
+ * # =====================
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_3 = PyList_AsTuple(__pyx_v_edges); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 664, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_10 = PyTuple_New(3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 664, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_INCREF(__pyx_v_histo);
+ __Pyx_GIVEREF(__pyx_v_histo);
+ PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_histo);
+ __Pyx_INCREF(__pyx_v_weighted_histo);
+ __Pyx_GIVEREF(__pyx_v_weighted_histo);
+ PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_v_weighted_histo);
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_t_3);
+ __pyx_t_3 = 0;
+ __pyx_r = __pyx_t_10;
+ __pyx_t_10 = 0;
+ goto __pyx_L0;
+
+ /* "silx/math/chistogramnd.pyx":36
+ *
+ *
+ * def chistogramnd(sample, # <<<<<<<<<<<<<<
+ * histo_range,
+ * n_bins,
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_10);
+ __Pyx_XDECREF(__pyx_t_11);
+ __Pyx_XDECREF(__pyx_t_12);
+ __PYX_XDEC_MEMVIEW(&__pyx_t_13, 1);
+ __PYX_XDEC_MEMVIEW(&__pyx_t_14, 1);
+ __PYX_XDEC_MEMVIEW(&__pyx_t_16, 1);
+ __PYX_XDEC_MEMVIEW(&__pyx_t_17, 1);
+ __PYX_XDEC_MEMVIEW(&__pyx_t_18, 1);
+ __PYX_XDEC_MEMVIEW(&__pyx_t_19, 1);
+ __PYX_XDEC_MEMVIEW(&__pyx_t_20, 1);
+ __PYX_XDEC_MEMVIEW(&__pyx_t_24, 1);
+ __PYX_XDEC_MEMVIEW(&__pyx_t_27, 1);
+ __PYX_XDEC_MEMVIEW(&__pyx_t_30, 1);
+ __PYX_XDEC_MEMVIEW(&__pyx_t_31, 1);
+ __PYX_XDEC_MEMVIEW(&__pyx_t_32, 1);
+ __Pyx_AddTraceback("silx.math.chistogramnd.chistogramnd", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_s_shape);
+ __Pyx_XDECREF(__pyx_v_n_dims);
+ __Pyx_XDECREF(__pyx_v_w_shape);
+ __Pyx_XDECREF(__pyx_v_i_histo_range);
+ __Pyx_XDECREF(__pyx_v_output_shape);
+ __Pyx_XDECREF(__pyx_v_option_flags);
+ __Pyx_XDECREF(__pyx_v_n_elem);
+ __Pyx_XDECREF(__pyx_v_bin_edges);
+ __Pyx_XDECREF(__pyx_v_raise_unsupported_type);
+ __Pyx_XDECREF(__pyx_v_sample_c);
+ __Pyx_XDECREF(__pyx_v_weights_c);
+ __Pyx_XDECREF(__pyx_v_histo_range_c);
+ __Pyx_XDECREF(__pyx_v_n_bins_c);
+ __Pyx_XDECREF(__pyx_v_histo_c);
+ __Pyx_XDECREF(__pyx_v_cumul_c);
+ __Pyx_XDECREF(__pyx_v_bin_edges_c);
+ __Pyx_XDECREF(__pyx_v_edges);
+ __Pyx_XDECREF(__pyx_v_offset);
+ __Pyx_XDECREF(__pyx_v_i_dim);
+ __Pyx_XDECREF(__pyx_v_histo_range);
+ __Pyx_XDECREF(__pyx_v_n_bins);
+ __Pyx_XDECREF(__pyx_v_weight_min);
+ __Pyx_XDECREF(__pyx_v_weight_max);
+ __Pyx_XDECREF(__pyx_v_histo);
+ __Pyx_XDECREF(__pyx_v_weighted_histo);
+ __Pyx_XDECREF(__pyx_v_wh_dtype);
+ __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "silx/math/chistogramnd.pyx":675
+ * @cython.initializedcheck(False)
+ * @cython.nonecheck(False)
+ * cdef int _histogramnd_double_double_double(double[:] sample, # <<<<<<<<<<<<<<
+ * double[:] weights,
+ * int n_dims,
+ */
+
+static int __pyx_f_4silx_4math_12chistogramnd__histogramnd_double_double_double(__Pyx_memviewslice __pyx_v_sample, __Pyx_memviewslice __pyx_v_weights, int __pyx_v_n_dims, int __pyx_v_n_elem, __Pyx_memviewslice __pyx_v_histo_range, __Pyx_memviewslice __pyx_v_n_bins, __Pyx_memviewslice __pyx_v_histo, __Pyx_memviewslice __pyx_v_cumul, __Pyx_memviewslice __pyx_v_bin_edges, int __pyx_v_option_flags, double __pyx_v_weight_min, double __pyx_v_weight_max) {
+ int __pyx_r;
+ Py_ssize_t __pyx_t_1;
+ Py_ssize_t __pyx_t_2;
+ Py_ssize_t __pyx_t_3;
+ Py_ssize_t __pyx_t_4;
+ Py_ssize_t __pyx_t_5;
+ Py_ssize_t __pyx_t_6;
+ Py_ssize_t __pyx_t_7;
+
+ /* "silx/math/chistogramnd.pyx":688
+ * double weight_max) nogil:
+ *
+ * return histogramnd_c.histogramnd_double_double_double(&sample[0], # <<<<<<<<<<<<<<
+ * &weights[0],
+ * n_dims,
+ */
+ __pyx_t_1 = 0;
+
+ /* "silx/math/chistogramnd.pyx":689
+ *
+ * return histogramnd_c.histogramnd_double_double_double(&sample[0],
+ * &weights[0], # <<<<<<<<<<<<<<
+ * n_dims,
+ * n_elem,
+ */
+ __pyx_t_2 = 0;
+
+ /* "silx/math/chistogramnd.pyx":692
+ * n_dims,
+ * n_elem,
+ * &histo_range[0], # <<<<<<<<<<<<<<
+ * &n_bins[0],
+ * &histo[0],
+ */
+ __pyx_t_3 = 0;
+
+ /* "silx/math/chistogramnd.pyx":693
+ * n_elem,
+ * &histo_range[0],
+ * &n_bins[0], # <<<<<<<<<<<<<<
+ * &histo[0],
+ * &cumul[0],
+ */
+ __pyx_t_4 = 0;
+
+ /* "silx/math/chistogramnd.pyx":694
+ * &histo_range[0],
+ * &n_bins[0],
+ * &histo[0], # <<<<<<<<<<<<<<
+ * &cumul[0],
+ * &bin_edges[0],
+ */
+ __pyx_t_5 = 0;
+
+ /* "silx/math/chistogramnd.pyx":695
+ * &n_bins[0],
+ * &histo[0],
+ * &cumul[0], # <<<<<<<<<<<<<<
+ * &bin_edges[0],
+ * option_flags,
+ */
+ __pyx_t_6 = 0;
+
+ /* "silx/math/chistogramnd.pyx":696
+ * &histo[0],
+ * &cumul[0],
+ * &bin_edges[0], # <<<<<<<<<<<<<<
+ * option_flags,
+ * weight_min,
+ */
+ __pyx_t_7 = 0;
+
+ /* "silx/math/chistogramnd.pyx":688
+ * double weight_max) nogil:
+ *
+ * return histogramnd_c.histogramnd_double_double_double(&sample[0], # <<<<<<<<<<<<<<
+ * &weights[0],
+ * n_dims,
+ */
+ __pyx_r = histogramnd_double_double_double((&(*((double *) ( /* dim=0 */ (__pyx_v_sample.data + __pyx_t_1 * __pyx_v_sample.strides[0]) )))), (&(*((double *) ( /* dim=0 */ (__pyx_v_weights.data + __pyx_t_2 * __pyx_v_weights.strides[0]) )))), __pyx_v_n_dims, __pyx_v_n_elem, (&(*((double *) ( /* dim=0 */ (__pyx_v_histo_range.data + __pyx_t_3 * __pyx_v_histo_range.strides[0]) )))), (&(*((int *) ( /* dim=0 */ (__pyx_v_n_bins.data + __pyx_t_4 * __pyx_v_n_bins.strides[0]) )))), (&(*((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_histo.data + __pyx_t_5 * __pyx_v_histo.strides[0]) )))), (&(*((double *) ( /* dim=0 */ (__pyx_v_cumul.data + __pyx_t_6 * __pyx_v_cumul.strides[0]) )))), (&(*((double *) ( /* dim=0 */ (__pyx_v_bin_edges.data + __pyx_t_7 * __pyx_v_bin_edges.strides[0]) )))), __pyx_v_option_flags, __pyx_v_weight_min, __pyx_v_weight_max);
+ goto __pyx_L0;
+
+ /* "silx/math/chistogramnd.pyx":675
+ * @cython.initializedcheck(False)
+ * @cython.nonecheck(False)
+ * cdef int _histogramnd_double_double_double(double[:] sample, # <<<<<<<<<<<<<<
+ * double[:] weights,
+ * int n_dims,
+ */
+
+ /* function exit code */
+ __pyx_L0:;
+ return __pyx_r;
+}
+
+/* "silx/math/chistogramnd.pyx":706
+ * @cython.initializedcheck(False)
+ * @cython.nonecheck(False)
+ * cdef int _histogramnd_double_float_double(double[:] sample, # <<<<<<<<<<<<<<
+ * float[:] weights,
+ * int n_dims,
+ */
+
+static int __pyx_f_4silx_4math_12chistogramnd__histogramnd_double_float_double(__Pyx_memviewslice __pyx_v_sample, __Pyx_memviewslice __pyx_v_weights, int __pyx_v_n_dims, int __pyx_v_n_elem, __Pyx_memviewslice __pyx_v_histo_range, __Pyx_memviewslice __pyx_v_n_bins, __Pyx_memviewslice __pyx_v_histo, __Pyx_memviewslice __pyx_v_cumul, __Pyx_memviewslice __pyx_v_bin_edges, int __pyx_v_option_flags, float __pyx_v_weight_min, float __pyx_v_weight_max) {
+ int __pyx_r;
+ Py_ssize_t __pyx_t_1;
+ Py_ssize_t __pyx_t_2;
+ Py_ssize_t __pyx_t_3;
+ Py_ssize_t __pyx_t_4;
+ Py_ssize_t __pyx_t_5;
+ Py_ssize_t __pyx_t_6;
+ Py_ssize_t __pyx_t_7;
+
+ /* "silx/math/chistogramnd.pyx":719
+ * float weight_max) nogil:
+ *
+ * return histogramnd_c.histogramnd_double_float_double(&sample[0], # <<<<<<<<<<<<<<
+ * &weights[0],
+ * n_dims,
+ */
+ __pyx_t_1 = 0;
+
+ /* "silx/math/chistogramnd.pyx":720
+ *
+ * return histogramnd_c.histogramnd_double_float_double(&sample[0],
+ * &weights[0], # <<<<<<<<<<<<<<
+ * n_dims,
+ * n_elem,
+ */
+ __pyx_t_2 = 0;
+
+ /* "silx/math/chistogramnd.pyx":723
+ * n_dims,
+ * n_elem,
+ * &histo_range[0], # <<<<<<<<<<<<<<
+ * &n_bins[0],
+ * &histo[0],
+ */
+ __pyx_t_3 = 0;
+
+ /* "silx/math/chistogramnd.pyx":724
+ * n_elem,
+ * &histo_range[0],
+ * &n_bins[0], # <<<<<<<<<<<<<<
+ * &histo[0],
+ * &cumul[0],
+ */
+ __pyx_t_4 = 0;
+
+ /* "silx/math/chistogramnd.pyx":725
+ * &histo_range[0],
+ * &n_bins[0],
+ * &histo[0], # <<<<<<<<<<<<<<
+ * &cumul[0],
+ * &bin_edges[0],
+ */
+ __pyx_t_5 = 0;
+
+ /* "silx/math/chistogramnd.pyx":726
+ * &n_bins[0],
+ * &histo[0],
+ * &cumul[0], # <<<<<<<<<<<<<<
+ * &bin_edges[0],
+ * option_flags,
+ */
+ __pyx_t_6 = 0;
+
+ /* "silx/math/chistogramnd.pyx":727
+ * &histo[0],
+ * &cumul[0],
+ * &bin_edges[0], # <<<<<<<<<<<<<<
+ * option_flags,
+ * weight_min,
+ */
+ __pyx_t_7 = 0;
+
+ /* "silx/math/chistogramnd.pyx":719
+ * float weight_max) nogil:
+ *
+ * return histogramnd_c.histogramnd_double_float_double(&sample[0], # <<<<<<<<<<<<<<
+ * &weights[0],
+ * n_dims,
+ */
+ __pyx_r = histogramnd_double_float_double((&(*((double *) ( /* dim=0 */ (__pyx_v_sample.data + __pyx_t_1 * __pyx_v_sample.strides[0]) )))), (&(*((float *) ( /* dim=0 */ (__pyx_v_weights.data + __pyx_t_2 * __pyx_v_weights.strides[0]) )))), __pyx_v_n_dims, __pyx_v_n_elem, (&(*((double *) ( /* dim=0 */ (__pyx_v_histo_range.data + __pyx_t_3 * __pyx_v_histo_range.strides[0]) )))), (&(*((int *) ( /* dim=0 */ (__pyx_v_n_bins.data + __pyx_t_4 * __pyx_v_n_bins.strides[0]) )))), (&(*((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_histo.data + __pyx_t_5 * __pyx_v_histo.strides[0]) )))), (&(*((double *) ( /* dim=0 */ (__pyx_v_cumul.data + __pyx_t_6 * __pyx_v_cumul.strides[0]) )))), (&(*((double *) ( /* dim=0 */ (__pyx_v_bin_edges.data + __pyx_t_7 * __pyx_v_bin_edges.strides[0]) )))), __pyx_v_option_flags, __pyx_v_weight_min, __pyx_v_weight_max);
+ goto __pyx_L0;
+
+ /* "silx/math/chistogramnd.pyx":706
+ * @cython.initializedcheck(False)
+ * @cython.nonecheck(False)
+ * cdef int _histogramnd_double_float_double(double[:] sample, # <<<<<<<<<<<<<<
+ * float[:] weights,
+ * int n_dims,
+ */
+
+ /* function exit code */
+ __pyx_L0:;
+ return __pyx_r;
+}
+
+/* "silx/math/chistogramnd.pyx":737
+ * @cython.initializedcheck(False)
+ * @cython.nonecheck(False)
+ * cdef int _histogramnd_double_int32_t_double(double[:] sample, # <<<<<<<<<<<<<<
+ * numpy.int32_t[:] weights,
+ * int n_dims,
+ */
+
+static int __pyx_f_4silx_4math_12chistogramnd__histogramnd_double_int32_t_double(__Pyx_memviewslice __pyx_v_sample, __Pyx_memviewslice __pyx_v_weights, int __pyx_v_n_dims, int __pyx_v_n_elem, __Pyx_memviewslice __pyx_v_histo_range, __Pyx_memviewslice __pyx_v_n_bins, __Pyx_memviewslice __pyx_v_histo, __Pyx_memviewslice __pyx_v_cumul, __Pyx_memviewslice __pyx_v_bin_edges, int __pyx_v_option_flags, __pyx_t_5numpy_int32_t __pyx_v_weight_min, __pyx_t_5numpy_int32_t __pyx_v_weight_max) {
+ int __pyx_r;
+ Py_ssize_t __pyx_t_1;
+ Py_ssize_t __pyx_t_2;
+ Py_ssize_t __pyx_t_3;
+ Py_ssize_t __pyx_t_4;
+ Py_ssize_t __pyx_t_5;
+ Py_ssize_t __pyx_t_6;
+ Py_ssize_t __pyx_t_7;
+
+ /* "silx/math/chistogramnd.pyx":750
+ * numpy.int32_t weight_max) nogil:
+ *
+ * return histogramnd_c.histogramnd_double_int32_t_double(&sample[0], # <<<<<<<<<<<<<<
+ * &weights[0],
+ * n_dims,
+ */
+ __pyx_t_1 = 0;
+
+ /* "silx/math/chistogramnd.pyx":751
+ *
+ * return histogramnd_c.histogramnd_double_int32_t_double(&sample[0],
+ * &weights[0], # <<<<<<<<<<<<<<
+ * n_dims,
+ * n_elem,
+ */
+ __pyx_t_2 = 0;
+
+ /* "silx/math/chistogramnd.pyx":754
+ * n_dims,
+ * n_elem,
+ * &histo_range[0], # <<<<<<<<<<<<<<
+ * &n_bins[0],
+ * &histo[0],
+ */
+ __pyx_t_3 = 0;
+
+ /* "silx/math/chistogramnd.pyx":755
+ * n_elem,
+ * &histo_range[0],
+ * &n_bins[0], # <<<<<<<<<<<<<<
+ * &histo[0],
+ * &cumul[0],
+ */
+ __pyx_t_4 = 0;
+
+ /* "silx/math/chistogramnd.pyx":756
+ * &histo_range[0],
+ * &n_bins[0],
+ * &histo[0], # <<<<<<<<<<<<<<
+ * &cumul[0],
+ * &bin_edges[0],
+ */
+ __pyx_t_5 = 0;
+
+ /* "silx/math/chistogramnd.pyx":757
+ * &n_bins[0],
+ * &histo[0],
+ * &cumul[0], # <<<<<<<<<<<<<<
+ * &bin_edges[0],
+ * option_flags,
+ */
+ __pyx_t_6 = 0;
+
+ /* "silx/math/chistogramnd.pyx":758
+ * &histo[0],
+ * &cumul[0],
+ * &bin_edges[0], # <<<<<<<<<<<<<<
+ * option_flags,
+ * weight_min,
+ */
+ __pyx_t_7 = 0;
+
+ /* "silx/math/chistogramnd.pyx":750
+ * numpy.int32_t weight_max) nogil:
+ *
+ * return histogramnd_c.histogramnd_double_int32_t_double(&sample[0], # <<<<<<<<<<<<<<
+ * &weights[0],
+ * n_dims,
+ */
+ __pyx_r = histogramnd_double_int32_t_double((&(*((double *) ( /* dim=0 */ (__pyx_v_sample.data + __pyx_t_1 * __pyx_v_sample.strides[0]) )))), (&(*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_weights.data + __pyx_t_2 * __pyx_v_weights.strides[0]) )))), __pyx_v_n_dims, __pyx_v_n_elem, (&(*((double *) ( /* dim=0 */ (__pyx_v_histo_range.data + __pyx_t_3 * __pyx_v_histo_range.strides[0]) )))), (&(*((int *) ( /* dim=0 */ (__pyx_v_n_bins.data + __pyx_t_4 * __pyx_v_n_bins.strides[0]) )))), (&(*((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_histo.data + __pyx_t_5 * __pyx_v_histo.strides[0]) )))), (&(*((double *) ( /* dim=0 */ (__pyx_v_cumul.data + __pyx_t_6 * __pyx_v_cumul.strides[0]) )))), (&(*((double *) ( /* dim=0 */ (__pyx_v_bin_edges.data + __pyx_t_7 * __pyx_v_bin_edges.strides[0]) )))), __pyx_v_option_flags, __pyx_v_weight_min, __pyx_v_weight_max);
+ goto __pyx_L0;
+
+ /* "silx/math/chistogramnd.pyx":737
+ * @cython.initializedcheck(False)
+ * @cython.nonecheck(False)
+ * cdef int _histogramnd_double_int32_t_double(double[:] sample, # <<<<<<<<<<<<<<
+ * numpy.int32_t[:] weights,
+ * int n_dims,
+ */
+
+ /* function exit code */
+ __pyx_L0:;
+ return __pyx_r;
+}
+
+/* "silx/math/chistogramnd.pyx":773
+ * @cython.initializedcheck(False)
+ * @cython.nonecheck(False)
+ * cdef int _histogramnd_float_double_double(float[:] sample, # <<<<<<<<<<<<<<
+ * double[:] weights,
+ * int n_dims,
+ */
+
+static int __pyx_f_4silx_4math_12chistogramnd__histogramnd_float_double_double(__Pyx_memviewslice __pyx_v_sample, __Pyx_memviewslice __pyx_v_weights, int __pyx_v_n_dims, int __pyx_v_n_elem, __Pyx_memviewslice __pyx_v_histo_range, __Pyx_memviewslice __pyx_v_n_bins, __Pyx_memviewslice __pyx_v_histo, __Pyx_memviewslice __pyx_v_cumul, __Pyx_memviewslice __pyx_v_bin_edges, int __pyx_v_option_flags, double __pyx_v_weight_min, double __pyx_v_weight_max) {
+ int __pyx_r;
+ Py_ssize_t __pyx_t_1;
+ Py_ssize_t __pyx_t_2;
+ Py_ssize_t __pyx_t_3;
+ Py_ssize_t __pyx_t_4;
+ Py_ssize_t __pyx_t_5;
+ Py_ssize_t __pyx_t_6;
+ Py_ssize_t __pyx_t_7;
+
+ /* "silx/math/chistogramnd.pyx":786
+ * double weight_max) nogil:
+ *
+ * return histogramnd_c.histogramnd_float_double_double(&sample[0], # <<<<<<<<<<<<<<
+ * &weights[0],
+ * n_dims,
+ */
+ __pyx_t_1 = 0;
+
+ /* "silx/math/chistogramnd.pyx":787
+ *
+ * return histogramnd_c.histogramnd_float_double_double(&sample[0],
+ * &weights[0], # <<<<<<<<<<<<<<
+ * n_dims,
+ * n_elem,
+ */
+ __pyx_t_2 = 0;
+
+ /* "silx/math/chistogramnd.pyx":790
+ * n_dims,
+ * n_elem,
+ * &histo_range[0], # <<<<<<<<<<<<<<
+ * &n_bins[0],
+ * &histo[0],
+ */
+ __pyx_t_3 = 0;
+
+ /* "silx/math/chistogramnd.pyx":791
+ * n_elem,
+ * &histo_range[0],
+ * &n_bins[0], # <<<<<<<<<<<<<<
+ * &histo[0],
+ * &cumul[0],
+ */
+ __pyx_t_4 = 0;
+
+ /* "silx/math/chistogramnd.pyx":792
+ * &histo_range[0],
+ * &n_bins[0],
+ * &histo[0], # <<<<<<<<<<<<<<
+ * &cumul[0],
+ * &bin_edges[0],
+ */
+ __pyx_t_5 = 0;
+
+ /* "silx/math/chistogramnd.pyx":793
+ * &n_bins[0],
+ * &histo[0],
+ * &cumul[0], # <<<<<<<<<<<<<<
+ * &bin_edges[0],
+ * option_flags,
+ */
+ __pyx_t_6 = 0;
+
+ /* "silx/math/chistogramnd.pyx":794
+ * &histo[0],
+ * &cumul[0],
+ * &bin_edges[0], # <<<<<<<<<<<<<<
+ * option_flags,
+ * weight_min,
+ */
+ __pyx_t_7 = 0;
+
+ /* "silx/math/chistogramnd.pyx":786
+ * double weight_max) nogil:
+ *
+ * return histogramnd_c.histogramnd_float_double_double(&sample[0], # <<<<<<<<<<<<<<
+ * &weights[0],
+ * n_dims,
+ */
+ __pyx_r = histogramnd_float_double_double((&(*((float *) ( /* dim=0 */ (__pyx_v_sample.data + __pyx_t_1 * __pyx_v_sample.strides[0]) )))), (&(*((double *) ( /* dim=0 */ (__pyx_v_weights.data + __pyx_t_2 * __pyx_v_weights.strides[0]) )))), __pyx_v_n_dims, __pyx_v_n_elem, (&(*((double *) ( /* dim=0 */ (__pyx_v_histo_range.data + __pyx_t_3 * __pyx_v_histo_range.strides[0]) )))), (&(*((int *) ( /* dim=0 */ (__pyx_v_n_bins.data + __pyx_t_4 * __pyx_v_n_bins.strides[0]) )))), (&(*((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_histo.data + __pyx_t_5 * __pyx_v_histo.strides[0]) )))), (&(*((double *) ( /* dim=0 */ (__pyx_v_cumul.data + __pyx_t_6 * __pyx_v_cumul.strides[0]) )))), (&(*((double *) ( /* dim=0 */ (__pyx_v_bin_edges.data + __pyx_t_7 * __pyx_v_bin_edges.strides[0]) )))), __pyx_v_option_flags, __pyx_v_weight_min, __pyx_v_weight_max);
+ goto __pyx_L0;
+
+ /* "silx/math/chistogramnd.pyx":773
+ * @cython.initializedcheck(False)
+ * @cython.nonecheck(False)
+ * cdef int _histogramnd_float_double_double(float[:] sample, # <<<<<<<<<<<<<<
+ * double[:] weights,
+ * int n_dims,
+ */
+
+ /* function exit code */
+ __pyx_L0:;
+ return __pyx_r;
+}
+
+/* "silx/math/chistogramnd.pyx":804
+ * @cython.initializedcheck(False)
+ * @cython.nonecheck(False)
+ * cdef int _histogramnd_float_float_double(float[:] sample, # <<<<<<<<<<<<<<
+ * float[:] weights,
+ * int n_dims,
+ */
+
+static int __pyx_f_4silx_4math_12chistogramnd__histogramnd_float_float_double(__Pyx_memviewslice __pyx_v_sample, __Pyx_memviewslice __pyx_v_weights, int __pyx_v_n_dims, int __pyx_v_n_elem, __Pyx_memviewslice __pyx_v_histo_range, __Pyx_memviewslice __pyx_v_n_bins, __Pyx_memviewslice __pyx_v_histo, __Pyx_memviewslice __pyx_v_cumul, __Pyx_memviewslice __pyx_v_bin_edges, int __pyx_v_option_flags, float __pyx_v_weight_min, float __pyx_v_weight_max) {
+ int __pyx_r;
+ Py_ssize_t __pyx_t_1;
+ Py_ssize_t __pyx_t_2;
+ Py_ssize_t __pyx_t_3;
+ Py_ssize_t __pyx_t_4;
+ Py_ssize_t __pyx_t_5;
+ Py_ssize_t __pyx_t_6;
+ Py_ssize_t __pyx_t_7;
+
+ /* "silx/math/chistogramnd.pyx":817
+ * float weight_max) nogil:
+ *
+ * return histogramnd_c.histogramnd_float_float_double(&sample[0], # <<<<<<<<<<<<<<
+ * &weights[0],
+ * n_dims,
+ */
+ __pyx_t_1 = 0;
+
+ /* "silx/math/chistogramnd.pyx":818
+ *
+ * return histogramnd_c.histogramnd_float_float_double(&sample[0],
+ * &weights[0], # <<<<<<<<<<<<<<
+ * n_dims,
+ * n_elem,
+ */
+ __pyx_t_2 = 0;
+
+ /* "silx/math/chistogramnd.pyx":821
+ * n_dims,
+ * n_elem,
+ * &histo_range[0], # <<<<<<<<<<<<<<
+ * &n_bins[0],
+ * &histo[0],
+ */
+ __pyx_t_3 = 0;
+
+ /* "silx/math/chistogramnd.pyx":822
+ * n_elem,
+ * &histo_range[0],
+ * &n_bins[0], # <<<<<<<<<<<<<<
+ * &histo[0],
+ * &cumul[0],
+ */
+ __pyx_t_4 = 0;
+
+ /* "silx/math/chistogramnd.pyx":823
+ * &histo_range[0],
+ * &n_bins[0],
+ * &histo[0], # <<<<<<<<<<<<<<
+ * &cumul[0],
+ * &bin_edges[0],
+ */
+ __pyx_t_5 = 0;
+
+ /* "silx/math/chistogramnd.pyx":824
+ * &n_bins[0],
+ * &histo[0],
+ * &cumul[0], # <<<<<<<<<<<<<<
+ * &bin_edges[0],
+ * option_flags,
+ */
+ __pyx_t_6 = 0;
+
+ /* "silx/math/chistogramnd.pyx":825
+ * &histo[0],
+ * &cumul[0],
+ * &bin_edges[0], # <<<<<<<<<<<<<<
+ * option_flags,
+ * weight_min,
+ */
+ __pyx_t_7 = 0;
+
+ /* "silx/math/chistogramnd.pyx":817
+ * float weight_max) nogil:
+ *
+ * return histogramnd_c.histogramnd_float_float_double(&sample[0], # <<<<<<<<<<<<<<
+ * &weights[0],
+ * n_dims,
+ */
+ __pyx_r = histogramnd_float_float_double((&(*((float *) ( /* dim=0 */ (__pyx_v_sample.data + __pyx_t_1 * __pyx_v_sample.strides[0]) )))), (&(*((float *) ( /* dim=0 */ (__pyx_v_weights.data + __pyx_t_2 * __pyx_v_weights.strides[0]) )))), __pyx_v_n_dims, __pyx_v_n_elem, (&(*((double *) ( /* dim=0 */ (__pyx_v_histo_range.data + __pyx_t_3 * __pyx_v_histo_range.strides[0]) )))), (&(*((int *) ( /* dim=0 */ (__pyx_v_n_bins.data + __pyx_t_4 * __pyx_v_n_bins.strides[0]) )))), (&(*((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_histo.data + __pyx_t_5 * __pyx_v_histo.strides[0]) )))), (&(*((double *) ( /* dim=0 */ (__pyx_v_cumul.data + __pyx_t_6 * __pyx_v_cumul.strides[0]) )))), (&(*((double *) ( /* dim=0 */ (__pyx_v_bin_edges.data + __pyx_t_7 * __pyx_v_bin_edges.strides[0]) )))), __pyx_v_option_flags, __pyx_v_weight_min, __pyx_v_weight_max);
+ goto __pyx_L0;
+
+ /* "silx/math/chistogramnd.pyx":804
+ * @cython.initializedcheck(False)
+ * @cython.nonecheck(False)
+ * cdef int _histogramnd_float_float_double(float[:] sample, # <<<<<<<<<<<<<<
+ * float[:] weights,
+ * int n_dims,
+ */
+
+ /* function exit code */
+ __pyx_L0:;
+ return __pyx_r;
+}
+
+/* "silx/math/chistogramnd.pyx":835
+ * @cython.initializedcheck(False)
+ * @cython.nonecheck(False)
+ * cdef int _histogramnd_float_int32_t_double(float[:] sample, # <<<<<<<<<<<<<<
+ * numpy.int32_t[:] weights,
+ * int n_dims,
+ */
+
+static int __pyx_f_4silx_4math_12chistogramnd__histogramnd_float_int32_t_double(__Pyx_memviewslice __pyx_v_sample, __Pyx_memviewslice __pyx_v_weights, int __pyx_v_n_dims, int __pyx_v_n_elem, __Pyx_memviewslice __pyx_v_histo_range, __Pyx_memviewslice __pyx_v_n_bins, __Pyx_memviewslice __pyx_v_histo, __Pyx_memviewslice __pyx_v_cumul, __Pyx_memviewslice __pyx_v_bin_edges, int __pyx_v_option_flags, __pyx_t_5numpy_int32_t __pyx_v_weight_min, __pyx_t_5numpy_int32_t __pyx_v_weight_max) {
+ int __pyx_r;
+ Py_ssize_t __pyx_t_1;
+ Py_ssize_t __pyx_t_2;
+ Py_ssize_t __pyx_t_3;
+ Py_ssize_t __pyx_t_4;
+ Py_ssize_t __pyx_t_5;
+ Py_ssize_t __pyx_t_6;
+ Py_ssize_t __pyx_t_7;
+
+ /* "silx/math/chistogramnd.pyx":848
+ * numpy.int32_t weight_max) nogil:
+ *
+ * return histogramnd_c.histogramnd_float_int32_t_double(&sample[0], # <<<<<<<<<<<<<<
+ * &weights[0],
+ * n_dims,
+ */
+ __pyx_t_1 = 0;
+
+ /* "silx/math/chistogramnd.pyx":849
+ *
+ * return histogramnd_c.histogramnd_float_int32_t_double(&sample[0],
+ * &weights[0], # <<<<<<<<<<<<<<
+ * n_dims,
+ * n_elem,
+ */
+ __pyx_t_2 = 0;
+
+ /* "silx/math/chistogramnd.pyx":852
+ * n_dims,
+ * n_elem,
+ * &histo_range[0], # <<<<<<<<<<<<<<
+ * &n_bins[0],
+ * &histo[0],
+ */
+ __pyx_t_3 = 0;
+
+ /* "silx/math/chistogramnd.pyx":853
+ * n_elem,
+ * &histo_range[0],
+ * &n_bins[0], # <<<<<<<<<<<<<<
+ * &histo[0],
+ * &cumul[0],
+ */
+ __pyx_t_4 = 0;
+
+ /* "silx/math/chistogramnd.pyx":854
+ * &histo_range[0],
+ * &n_bins[0],
+ * &histo[0], # <<<<<<<<<<<<<<
+ * &cumul[0],
+ * &bin_edges[0],
+ */
+ __pyx_t_5 = 0;
+
+ /* "silx/math/chistogramnd.pyx":855
+ * &n_bins[0],
+ * &histo[0],
+ * &cumul[0], # <<<<<<<<<<<<<<
+ * &bin_edges[0],
+ * option_flags,
+ */
+ __pyx_t_6 = 0;
+
+ /* "silx/math/chistogramnd.pyx":856
+ * &histo[0],
+ * &cumul[0],
+ * &bin_edges[0], # <<<<<<<<<<<<<<
+ * option_flags,
+ * weight_min,
+ */
+ __pyx_t_7 = 0;
+
+ /* "silx/math/chistogramnd.pyx":848
+ * numpy.int32_t weight_max) nogil:
+ *
+ * return histogramnd_c.histogramnd_float_int32_t_double(&sample[0], # <<<<<<<<<<<<<<
+ * &weights[0],
+ * n_dims,
+ */
+ __pyx_r = histogramnd_float_int32_t_double((&(*((float *) ( /* dim=0 */ (__pyx_v_sample.data + __pyx_t_1 * __pyx_v_sample.strides[0]) )))), (&(*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_weights.data + __pyx_t_2 * __pyx_v_weights.strides[0]) )))), __pyx_v_n_dims, __pyx_v_n_elem, (&(*((double *) ( /* dim=0 */ (__pyx_v_histo_range.data + __pyx_t_3 * __pyx_v_histo_range.strides[0]) )))), (&(*((int *) ( /* dim=0 */ (__pyx_v_n_bins.data + __pyx_t_4 * __pyx_v_n_bins.strides[0]) )))), (&(*((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_histo.data + __pyx_t_5 * __pyx_v_histo.strides[0]) )))), (&(*((double *) ( /* dim=0 */ (__pyx_v_cumul.data + __pyx_t_6 * __pyx_v_cumul.strides[0]) )))), (&(*((double *) ( /* dim=0 */ (__pyx_v_bin_edges.data + __pyx_t_7 * __pyx_v_bin_edges.strides[0]) )))), __pyx_v_option_flags, __pyx_v_weight_min, __pyx_v_weight_max);
+ goto __pyx_L0;
+
+ /* "silx/math/chistogramnd.pyx":835
+ * @cython.initializedcheck(False)
+ * @cython.nonecheck(False)
+ * cdef int _histogramnd_float_int32_t_double(float[:] sample, # <<<<<<<<<<<<<<
+ * numpy.int32_t[:] weights,
+ * int n_dims,
+ */
+
+ /* function exit code */
+ __pyx_L0:;
+ return __pyx_r;
+}
+
+/* "silx/math/chistogramnd.pyx":871
+ * @cython.initializedcheck(False)
+ * @cython.nonecheck(False)
+ * cdef int _histogramnd_int32_t_double_double(numpy.int32_t[:] sample, # <<<<<<<<<<<<<<
+ * double[:] weights,
+ * int n_dims,
+ */
+
+static int __pyx_f_4silx_4math_12chistogramnd__histogramnd_int32_t_double_double(__Pyx_memviewslice __pyx_v_sample, __Pyx_memviewslice __pyx_v_weights, int __pyx_v_n_dims, int __pyx_v_n_elem, __Pyx_memviewslice __pyx_v_histo_range, __Pyx_memviewslice __pyx_v_n_bins, __Pyx_memviewslice __pyx_v_histo, __Pyx_memviewslice __pyx_v_cumul, __Pyx_memviewslice __pyx_v_bin_edges, int __pyx_v_option_flags, double __pyx_v_weight_min, double __pyx_v_weight_max) {
+ int __pyx_r;
+ Py_ssize_t __pyx_t_1;
+ Py_ssize_t __pyx_t_2;
+ Py_ssize_t __pyx_t_3;
+ Py_ssize_t __pyx_t_4;
+ Py_ssize_t __pyx_t_5;
+ Py_ssize_t __pyx_t_6;
+ Py_ssize_t __pyx_t_7;
+
+ /* "silx/math/chistogramnd.pyx":884
+ * double weight_max) nogil:
+ *
+ * return histogramnd_c.histogramnd_int32_t_double_double(&sample[0], # <<<<<<<<<<<<<<
+ * &weights[0],
+ * n_dims,
+ */
+ __pyx_t_1 = 0;
+
+ /* "silx/math/chistogramnd.pyx":885
+ *
+ * return histogramnd_c.histogramnd_int32_t_double_double(&sample[0],
+ * &weights[0], # <<<<<<<<<<<<<<
+ * n_dims,
+ * n_elem,
+ */
+ __pyx_t_2 = 0;
+
+ /* "silx/math/chistogramnd.pyx":888
+ * n_dims,
+ * n_elem,
+ * &histo_range[0], # <<<<<<<<<<<<<<
+ * &n_bins[0],
+ * &histo[0],
+ */
+ __pyx_t_3 = 0;
+
+ /* "silx/math/chistogramnd.pyx":889
+ * n_elem,
+ * &histo_range[0],
+ * &n_bins[0], # <<<<<<<<<<<<<<
+ * &histo[0],
+ * &cumul[0],
+ */
+ __pyx_t_4 = 0;
+
+ /* "silx/math/chistogramnd.pyx":890
+ * &histo_range[0],
+ * &n_bins[0],
+ * &histo[0], # <<<<<<<<<<<<<<
+ * &cumul[0],
+ * &bin_edges[0],
+ */
+ __pyx_t_5 = 0;
+
+ /* "silx/math/chistogramnd.pyx":891
+ * &n_bins[0],
+ * &histo[0],
+ * &cumul[0], # <<<<<<<<<<<<<<
+ * &bin_edges[0],
+ * option_flags,
+ */
+ __pyx_t_6 = 0;
+
+ /* "silx/math/chistogramnd.pyx":892
+ * &histo[0],
+ * &cumul[0],
+ * &bin_edges[0], # <<<<<<<<<<<<<<
+ * option_flags,
+ * weight_min,
+ */
+ __pyx_t_7 = 0;
+
+ /* "silx/math/chistogramnd.pyx":884
+ * double weight_max) nogil:
+ *
+ * return histogramnd_c.histogramnd_int32_t_double_double(&sample[0], # <<<<<<<<<<<<<<
+ * &weights[0],
+ * n_dims,
+ */
+ __pyx_r = histogramnd_int32_t_double_double((&(*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_sample.data + __pyx_t_1 * __pyx_v_sample.strides[0]) )))), (&(*((double *) ( /* dim=0 */ (__pyx_v_weights.data + __pyx_t_2 * __pyx_v_weights.strides[0]) )))), __pyx_v_n_dims, __pyx_v_n_elem, (&(*((double *) ( /* dim=0 */ (__pyx_v_histo_range.data + __pyx_t_3 * __pyx_v_histo_range.strides[0]) )))), (&(*((int *) ( /* dim=0 */ (__pyx_v_n_bins.data + __pyx_t_4 * __pyx_v_n_bins.strides[0]) )))), (&(*((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_histo.data + __pyx_t_5 * __pyx_v_histo.strides[0]) )))), (&(*((double *) ( /* dim=0 */ (__pyx_v_cumul.data + __pyx_t_6 * __pyx_v_cumul.strides[0]) )))), (&(*((double *) ( /* dim=0 */ (__pyx_v_bin_edges.data + __pyx_t_7 * __pyx_v_bin_edges.strides[0]) )))), __pyx_v_option_flags, __pyx_v_weight_min, __pyx_v_weight_max);
+ goto __pyx_L0;
+
+ /* "silx/math/chistogramnd.pyx":871
+ * @cython.initializedcheck(False)
+ * @cython.nonecheck(False)
+ * cdef int _histogramnd_int32_t_double_double(numpy.int32_t[:] sample, # <<<<<<<<<<<<<<
+ * double[:] weights,
+ * int n_dims,
+ */
+
+ /* function exit code */
+ __pyx_L0:;
+ return __pyx_r;
+}
+
+/* "silx/math/chistogramnd.pyx":902
+ * @cython.initializedcheck(False)
+ * @cython.nonecheck(False)
+ * cdef int _histogramnd_int32_t_float_double(numpy.int32_t[:] sample, # <<<<<<<<<<<<<<
+ * float[:] weights,
+ * int n_dims,
+ */
+
+static int __pyx_f_4silx_4math_12chistogramnd__histogramnd_int32_t_float_double(__Pyx_memviewslice __pyx_v_sample, __Pyx_memviewslice __pyx_v_weights, int __pyx_v_n_dims, int __pyx_v_n_elem, __Pyx_memviewslice __pyx_v_histo_range, __Pyx_memviewslice __pyx_v_n_bins, __Pyx_memviewslice __pyx_v_histo, __Pyx_memviewslice __pyx_v_cumul, __Pyx_memviewslice __pyx_v_bin_edges, int __pyx_v_option_flags, float __pyx_v_weight_min, float __pyx_v_weight_max) {
+ int __pyx_r;
+ Py_ssize_t __pyx_t_1;
+ Py_ssize_t __pyx_t_2;
+ Py_ssize_t __pyx_t_3;
+ Py_ssize_t __pyx_t_4;
+ Py_ssize_t __pyx_t_5;
+ Py_ssize_t __pyx_t_6;
+ Py_ssize_t __pyx_t_7;
+
+ /* "silx/math/chistogramnd.pyx":915
+ * float weight_max) nogil:
+ *
+ * return histogramnd_c.histogramnd_int32_t_float_double(&sample[0], # <<<<<<<<<<<<<<
+ * &weights[0],
+ * n_dims,
+ */
+ __pyx_t_1 = 0;
+
+ /* "silx/math/chistogramnd.pyx":916
+ *
+ * return histogramnd_c.histogramnd_int32_t_float_double(&sample[0],
+ * &weights[0], # <<<<<<<<<<<<<<
+ * n_dims,
+ * n_elem,
+ */
+ __pyx_t_2 = 0;
+
+ /* "silx/math/chistogramnd.pyx":919
+ * n_dims,
+ * n_elem,
+ * &histo_range[0], # <<<<<<<<<<<<<<
+ * &n_bins[0],
+ * &histo[0],
+ */
+ __pyx_t_3 = 0;
+
+ /* "silx/math/chistogramnd.pyx":920
+ * n_elem,
+ * &histo_range[0],
+ * &n_bins[0], # <<<<<<<<<<<<<<
+ * &histo[0],
+ * &cumul[0],
+ */
+ __pyx_t_4 = 0;
+
+ /* "silx/math/chistogramnd.pyx":921
+ * &histo_range[0],
+ * &n_bins[0],
+ * &histo[0], # <<<<<<<<<<<<<<
+ * &cumul[0],
+ * &bin_edges[0],
+ */
+ __pyx_t_5 = 0;
+
+ /* "silx/math/chistogramnd.pyx":922
+ * &n_bins[0],
+ * &histo[0],
+ * &cumul[0], # <<<<<<<<<<<<<<
+ * &bin_edges[0],
+ * option_flags,
+ */
+ __pyx_t_6 = 0;
+
+ /* "silx/math/chistogramnd.pyx":923
+ * &histo[0],
+ * &cumul[0],
+ * &bin_edges[0], # <<<<<<<<<<<<<<
+ * option_flags,
+ * weight_min,
+ */
+ __pyx_t_7 = 0;
+
+ /* "silx/math/chistogramnd.pyx":915
+ * float weight_max) nogil:
+ *
+ * return histogramnd_c.histogramnd_int32_t_float_double(&sample[0], # <<<<<<<<<<<<<<
+ * &weights[0],
+ * n_dims,
+ */
+ __pyx_r = histogramnd_int32_t_float_double((&(*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_sample.data + __pyx_t_1 * __pyx_v_sample.strides[0]) )))), (&(*((float *) ( /* dim=0 */ (__pyx_v_weights.data + __pyx_t_2 * __pyx_v_weights.strides[0]) )))), __pyx_v_n_dims, __pyx_v_n_elem, (&(*((double *) ( /* dim=0 */ (__pyx_v_histo_range.data + __pyx_t_3 * __pyx_v_histo_range.strides[0]) )))), (&(*((int *) ( /* dim=0 */ (__pyx_v_n_bins.data + __pyx_t_4 * __pyx_v_n_bins.strides[0]) )))), (&(*((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_histo.data + __pyx_t_5 * __pyx_v_histo.strides[0]) )))), (&(*((double *) ( /* dim=0 */ (__pyx_v_cumul.data + __pyx_t_6 * __pyx_v_cumul.strides[0]) )))), (&(*((double *) ( /* dim=0 */ (__pyx_v_bin_edges.data + __pyx_t_7 * __pyx_v_bin_edges.strides[0]) )))), __pyx_v_option_flags, __pyx_v_weight_min, __pyx_v_weight_max);
+ goto __pyx_L0;
+
+ /* "silx/math/chistogramnd.pyx":902
+ * @cython.initializedcheck(False)
+ * @cython.nonecheck(False)
+ * cdef int _histogramnd_int32_t_float_double(numpy.int32_t[:] sample, # <<<<<<<<<<<<<<
+ * float[:] weights,
+ * int n_dims,
+ */
+
+ /* function exit code */
+ __pyx_L0:;
+ return __pyx_r;
+}
+
+/* "silx/math/chistogramnd.pyx":933
+ * @cython.initializedcheck(False)
+ * @cython.nonecheck(False)
+ * cdef int _histogramnd_int32_t_int32_t_double(numpy.int32_t[:] sample, # <<<<<<<<<<<<<<
+ * numpy.int32_t[:] weights,
+ * int n_dims,
+ */
+
+static int __pyx_f_4silx_4math_12chistogramnd__histogramnd_int32_t_int32_t_double(__Pyx_memviewslice __pyx_v_sample, __Pyx_memviewslice __pyx_v_weights, int __pyx_v_n_dims, int __pyx_v_n_elem, __Pyx_memviewslice __pyx_v_histo_range, __Pyx_memviewslice __pyx_v_n_bins, __Pyx_memviewslice __pyx_v_histo, __Pyx_memviewslice __pyx_v_cumul, __Pyx_memviewslice __pyx_v_bin_edges, int __pyx_v_option_flags, __pyx_t_5numpy_int32_t __pyx_v_weight_min, __pyx_t_5numpy_int32_t __pyx_v_weight_max) {
+ int __pyx_r;
+ Py_ssize_t __pyx_t_1;
+ Py_ssize_t __pyx_t_2;
+ Py_ssize_t __pyx_t_3;
+ Py_ssize_t __pyx_t_4;
+ Py_ssize_t __pyx_t_5;
+ Py_ssize_t __pyx_t_6;
+ Py_ssize_t __pyx_t_7;
+
+ /* "silx/math/chistogramnd.pyx":946
+ * numpy.int32_t weight_max) nogil:
+ *
+ * return histogramnd_c.histogramnd_int32_t_int32_t_double(&sample[0], # <<<<<<<<<<<<<<
+ * &weights[0],
+ * n_dims,
+ */
+ __pyx_t_1 = 0;
+
+ /* "silx/math/chistogramnd.pyx":947
+ *
+ * return histogramnd_c.histogramnd_int32_t_int32_t_double(&sample[0],
+ * &weights[0], # <<<<<<<<<<<<<<
+ * n_dims,
+ * n_elem,
+ */
+ __pyx_t_2 = 0;
+
+ /* "silx/math/chistogramnd.pyx":950
+ * n_dims,
+ * n_elem,
+ * &histo_range[0], # <<<<<<<<<<<<<<
+ * &n_bins[0],
+ * &histo[0],
+ */
+ __pyx_t_3 = 0;
+
+ /* "silx/math/chistogramnd.pyx":951
+ * n_elem,
+ * &histo_range[0],
+ * &n_bins[0], # <<<<<<<<<<<<<<
+ * &histo[0],
+ * &cumul[0],
+ */
+ __pyx_t_4 = 0;
+
+ /* "silx/math/chistogramnd.pyx":952
+ * &histo_range[0],
+ * &n_bins[0],
+ * &histo[0], # <<<<<<<<<<<<<<
+ * &cumul[0],
+ * &bin_edges[0],
+ */
+ __pyx_t_5 = 0;
+
+ /* "silx/math/chistogramnd.pyx":953
+ * &n_bins[0],
+ * &histo[0],
+ * &cumul[0], # <<<<<<<<<<<<<<
+ * &bin_edges[0],
+ * option_flags,
+ */
+ __pyx_t_6 = 0;
+
+ /* "silx/math/chistogramnd.pyx":954
+ * &histo[0],
+ * &cumul[0],
+ * &bin_edges[0], # <<<<<<<<<<<<<<
+ * option_flags,
+ * weight_min,
+ */
+ __pyx_t_7 = 0;
+
+ /* "silx/math/chistogramnd.pyx":946
+ * numpy.int32_t weight_max) nogil:
+ *
+ * return histogramnd_c.histogramnd_int32_t_int32_t_double(&sample[0], # <<<<<<<<<<<<<<
+ * &weights[0],
+ * n_dims,
+ */
+ __pyx_r = histogramnd_int32_t_int32_t_double((&(*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_sample.data + __pyx_t_1 * __pyx_v_sample.strides[0]) )))), (&(*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_weights.data + __pyx_t_2 * __pyx_v_weights.strides[0]) )))), __pyx_v_n_dims, __pyx_v_n_elem, (&(*((double *) ( /* dim=0 */ (__pyx_v_histo_range.data + __pyx_t_3 * __pyx_v_histo_range.strides[0]) )))), (&(*((int *) ( /* dim=0 */ (__pyx_v_n_bins.data + __pyx_t_4 * __pyx_v_n_bins.strides[0]) )))), (&(*((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_histo.data + __pyx_t_5 * __pyx_v_histo.strides[0]) )))), (&(*((double *) ( /* dim=0 */ (__pyx_v_cumul.data + __pyx_t_6 * __pyx_v_cumul.strides[0]) )))), (&(*((double *) ( /* dim=0 */ (__pyx_v_bin_edges.data + __pyx_t_7 * __pyx_v_bin_edges.strides[0]) )))), __pyx_v_option_flags, __pyx_v_weight_min, __pyx_v_weight_max);
+ goto __pyx_L0;
+
+ /* "silx/math/chistogramnd.pyx":933
+ * @cython.initializedcheck(False)
+ * @cython.nonecheck(False)
+ * cdef int _histogramnd_int32_t_int32_t_double(numpy.int32_t[:] sample, # <<<<<<<<<<<<<<
+ * numpy.int32_t[:] weights,
+ * int n_dims,
+ */
+
+ /* function exit code */
+ __pyx_L0:;
+ return __pyx_r;
+}
+
+/* "silx/math/chistogramnd.pyx":969
+ * @cython.initializedcheck(False)
+ * @cython.nonecheck(False)
+ * cdef int _histogramnd_double_double_float(double[:] sample, # <<<<<<<<<<<<<<
+ * double[:] weights,
+ * int n_dims,
+ */
+
+static int __pyx_f_4silx_4math_12chistogramnd__histogramnd_double_double_float(__Pyx_memviewslice __pyx_v_sample, __Pyx_memviewslice __pyx_v_weights, int __pyx_v_n_dims, int __pyx_v_n_elem, __Pyx_memviewslice __pyx_v_histo_range, __Pyx_memviewslice __pyx_v_n_bins, __Pyx_memviewslice __pyx_v_histo, __Pyx_memviewslice __pyx_v_cumul, __Pyx_memviewslice __pyx_v_bin_edges, int __pyx_v_option_flags, double __pyx_v_weight_min, double __pyx_v_weight_max) {
+ int __pyx_r;
+ Py_ssize_t __pyx_t_1;
+ Py_ssize_t __pyx_t_2;
+ Py_ssize_t __pyx_t_3;
+ Py_ssize_t __pyx_t_4;
+ Py_ssize_t __pyx_t_5;
+ Py_ssize_t __pyx_t_6;
+ Py_ssize_t __pyx_t_7;
+
+ /* "silx/math/chistogramnd.pyx":982
+ * double weight_max) nogil:
+ *
+ * return histogramnd_c.histogramnd_double_double_float(&sample[0], # <<<<<<<<<<<<<<
+ * &weights[0],
+ * n_dims,
+ */
+ __pyx_t_1 = 0;
+
+ /* "silx/math/chistogramnd.pyx":983
+ *
+ * return histogramnd_c.histogramnd_double_double_float(&sample[0],
+ * &weights[0], # <<<<<<<<<<<<<<
+ * n_dims,
+ * n_elem,
+ */
+ __pyx_t_2 = 0;
+
+ /* "silx/math/chistogramnd.pyx":986
+ * n_dims,
+ * n_elem,
+ * &histo_range[0], # <<<<<<<<<<<<<<
+ * &n_bins[0],
+ * &histo[0],
+ */
+ __pyx_t_3 = 0;
+
+ /* "silx/math/chistogramnd.pyx":987
+ * n_elem,
+ * &histo_range[0],
+ * &n_bins[0], # <<<<<<<<<<<<<<
+ * &histo[0],
+ * &cumul[0],
+ */
+ __pyx_t_4 = 0;
+
+ /* "silx/math/chistogramnd.pyx":988
+ * &histo_range[0],
+ * &n_bins[0],
+ * &histo[0], # <<<<<<<<<<<<<<
+ * &cumul[0],
+ * &bin_edges[0],
+ */
+ __pyx_t_5 = 0;
+
+ /* "silx/math/chistogramnd.pyx":989
+ * &n_bins[0],
+ * &histo[0],
+ * &cumul[0], # <<<<<<<<<<<<<<
+ * &bin_edges[0],
+ * option_flags,
+ */
+ __pyx_t_6 = 0;
+
+ /* "silx/math/chistogramnd.pyx":990
+ * &histo[0],
+ * &cumul[0],
+ * &bin_edges[0], # <<<<<<<<<<<<<<
+ * option_flags,
+ * weight_min,
+ */
+ __pyx_t_7 = 0;
+
+ /* "silx/math/chistogramnd.pyx":982
+ * double weight_max) nogil:
+ *
+ * return histogramnd_c.histogramnd_double_double_float(&sample[0], # <<<<<<<<<<<<<<
+ * &weights[0],
+ * n_dims,
+ */
+ __pyx_r = histogramnd_double_double_float((&(*((double *) ( /* dim=0 */ (__pyx_v_sample.data + __pyx_t_1 * __pyx_v_sample.strides[0]) )))), (&(*((double *) ( /* dim=0 */ (__pyx_v_weights.data + __pyx_t_2 * __pyx_v_weights.strides[0]) )))), __pyx_v_n_dims, __pyx_v_n_elem, (&(*((double *) ( /* dim=0 */ (__pyx_v_histo_range.data + __pyx_t_3 * __pyx_v_histo_range.strides[0]) )))), (&(*((int *) ( /* dim=0 */ (__pyx_v_n_bins.data + __pyx_t_4 * __pyx_v_n_bins.strides[0]) )))), (&(*((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_histo.data + __pyx_t_5 * __pyx_v_histo.strides[0]) )))), (&(*((float *) ( /* dim=0 */ (__pyx_v_cumul.data + __pyx_t_6 * __pyx_v_cumul.strides[0]) )))), (&(*((double *) ( /* dim=0 */ (__pyx_v_bin_edges.data + __pyx_t_7 * __pyx_v_bin_edges.strides[0]) )))), __pyx_v_option_flags, __pyx_v_weight_min, __pyx_v_weight_max);
+ goto __pyx_L0;
+
+ /* "silx/math/chistogramnd.pyx":969
+ * @cython.initializedcheck(False)
+ * @cython.nonecheck(False)
+ * cdef int _histogramnd_double_double_float(double[:] sample, # <<<<<<<<<<<<<<
+ * double[:] weights,
+ * int n_dims,
+ */
+
+ /* function exit code */
+ __pyx_L0:;
+ return __pyx_r;
+}
+
+/* "silx/math/chistogramnd.pyx":1000
+ * @cython.initializedcheck(False)
+ * @cython.nonecheck(False)
+ * cdef int _histogramnd_double_float_float(double[:] sample, # <<<<<<<<<<<<<<
+ * float[:] weights,
+ * int n_dims,
+ */
+
+static int __pyx_f_4silx_4math_12chistogramnd__histogramnd_double_float_float(__Pyx_memviewslice __pyx_v_sample, __Pyx_memviewslice __pyx_v_weights, int __pyx_v_n_dims, int __pyx_v_n_elem, __Pyx_memviewslice __pyx_v_histo_range, __Pyx_memviewslice __pyx_v_n_bins, __Pyx_memviewslice __pyx_v_histo, __Pyx_memviewslice __pyx_v_cumul, __Pyx_memviewslice __pyx_v_bin_edges, int __pyx_v_option_flags, float __pyx_v_weight_min, float __pyx_v_weight_max) {
+ int __pyx_r;
+ Py_ssize_t __pyx_t_1;
+ Py_ssize_t __pyx_t_2;
+ Py_ssize_t __pyx_t_3;
+ Py_ssize_t __pyx_t_4;
+ Py_ssize_t __pyx_t_5;
+ Py_ssize_t __pyx_t_6;
+ Py_ssize_t __pyx_t_7;
+
+ /* "silx/math/chistogramnd.pyx":1013
+ * float weight_max) nogil:
+ *
+ * return histogramnd_c.histogramnd_double_float_float(&sample[0], # <<<<<<<<<<<<<<
+ * &weights[0],
+ * n_dims,
+ */
+ __pyx_t_1 = 0;
+
+ /* "silx/math/chistogramnd.pyx":1014
+ *
+ * return histogramnd_c.histogramnd_double_float_float(&sample[0],
+ * &weights[0], # <<<<<<<<<<<<<<
+ * n_dims,
+ * n_elem,
+ */
+ __pyx_t_2 = 0;
+
+ /* "silx/math/chistogramnd.pyx":1017
+ * n_dims,
+ * n_elem,
+ * &histo_range[0], # <<<<<<<<<<<<<<
+ * &n_bins[0],
+ * &histo[0],
+ */
+ __pyx_t_3 = 0;
+
+ /* "silx/math/chistogramnd.pyx":1018
+ * n_elem,
+ * &histo_range[0],
+ * &n_bins[0], # <<<<<<<<<<<<<<
+ * &histo[0],
+ * &cumul[0],
+ */
+ __pyx_t_4 = 0;
+
+ /* "silx/math/chistogramnd.pyx":1019
+ * &histo_range[0],
+ * &n_bins[0],
+ * &histo[0], # <<<<<<<<<<<<<<
+ * &cumul[0],
+ * &bin_edges[0],
+ */
+ __pyx_t_5 = 0;
+
+ /* "silx/math/chistogramnd.pyx":1020
+ * &n_bins[0],
+ * &histo[0],
+ * &cumul[0], # <<<<<<<<<<<<<<
+ * &bin_edges[0],
+ * option_flags,
+ */
+ __pyx_t_6 = 0;
+
+ /* "silx/math/chistogramnd.pyx":1021
+ * &histo[0],
+ * &cumul[0],
+ * &bin_edges[0], # <<<<<<<<<<<<<<
+ * option_flags,
+ * weight_min,
+ */
+ __pyx_t_7 = 0;
+
+ /* "silx/math/chistogramnd.pyx":1013
+ * float weight_max) nogil:
+ *
+ * return histogramnd_c.histogramnd_double_float_float(&sample[0], # <<<<<<<<<<<<<<
+ * &weights[0],
+ * n_dims,
+ */
+ __pyx_r = histogramnd_double_float_float((&(*((double *) ( /* dim=0 */ (__pyx_v_sample.data + __pyx_t_1 * __pyx_v_sample.strides[0]) )))), (&(*((float *) ( /* dim=0 */ (__pyx_v_weights.data + __pyx_t_2 * __pyx_v_weights.strides[0]) )))), __pyx_v_n_dims, __pyx_v_n_elem, (&(*((double *) ( /* dim=0 */ (__pyx_v_histo_range.data + __pyx_t_3 * __pyx_v_histo_range.strides[0]) )))), (&(*((int *) ( /* dim=0 */ (__pyx_v_n_bins.data + __pyx_t_4 * __pyx_v_n_bins.strides[0]) )))), (&(*((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_histo.data + __pyx_t_5 * __pyx_v_histo.strides[0]) )))), (&(*((float *) ( /* dim=0 */ (__pyx_v_cumul.data + __pyx_t_6 * __pyx_v_cumul.strides[0]) )))), (&(*((double *) ( /* dim=0 */ (__pyx_v_bin_edges.data + __pyx_t_7 * __pyx_v_bin_edges.strides[0]) )))), __pyx_v_option_flags, __pyx_v_weight_min, __pyx_v_weight_max);
+ goto __pyx_L0;
+
+ /* "silx/math/chistogramnd.pyx":1000
+ * @cython.initializedcheck(False)
+ * @cython.nonecheck(False)
+ * cdef int _histogramnd_double_float_float(double[:] sample, # <<<<<<<<<<<<<<
+ * float[:] weights,
+ * int n_dims,
+ */
+
+ /* function exit code */
+ __pyx_L0:;
+ return __pyx_r;
+}
+
+/* "silx/math/chistogramnd.pyx":1031
+ * @cython.initializedcheck(False)
+ * @cython.nonecheck(False)
+ * cdef int _histogramnd_double_int32_t_float(double[:] sample, # <<<<<<<<<<<<<<
+ * numpy.int32_t[:] weights,
+ * int n_dims,
+ */
+
+static int __pyx_f_4silx_4math_12chistogramnd__histogramnd_double_int32_t_float(__Pyx_memviewslice __pyx_v_sample, __Pyx_memviewslice __pyx_v_weights, int __pyx_v_n_dims, int __pyx_v_n_elem, __Pyx_memviewslice __pyx_v_histo_range, __Pyx_memviewslice __pyx_v_n_bins, __Pyx_memviewslice __pyx_v_histo, __Pyx_memviewslice __pyx_v_cumul, __Pyx_memviewslice __pyx_v_bin_edges, int __pyx_v_option_flags, __pyx_t_5numpy_int32_t __pyx_v_weight_min, __pyx_t_5numpy_int32_t __pyx_v_weight_max) {
+ int __pyx_r;
+ Py_ssize_t __pyx_t_1;
+ Py_ssize_t __pyx_t_2;
+ Py_ssize_t __pyx_t_3;
+ Py_ssize_t __pyx_t_4;
+ Py_ssize_t __pyx_t_5;
+ Py_ssize_t __pyx_t_6;
+ Py_ssize_t __pyx_t_7;
+
+ /* "silx/math/chistogramnd.pyx":1044
+ * numpy.int32_t weight_max) nogil:
+ *
+ * return histogramnd_c.histogramnd_double_int32_t_float(&sample[0], # <<<<<<<<<<<<<<
+ * &weights[0],
+ * n_dims,
+ */
+ __pyx_t_1 = 0;
+
+ /* "silx/math/chistogramnd.pyx":1045
+ *
+ * return histogramnd_c.histogramnd_double_int32_t_float(&sample[0],
+ * &weights[0], # <<<<<<<<<<<<<<
+ * n_dims,
+ * n_elem,
+ */
+ __pyx_t_2 = 0;
+
+ /* "silx/math/chistogramnd.pyx":1048
+ * n_dims,
+ * n_elem,
+ * &histo_range[0], # <<<<<<<<<<<<<<
+ * &n_bins[0],
+ * &histo[0],
+ */
+ __pyx_t_3 = 0;
+
+ /* "silx/math/chistogramnd.pyx":1049
+ * n_elem,
+ * &histo_range[0],
+ * &n_bins[0], # <<<<<<<<<<<<<<
+ * &histo[0],
+ * &cumul[0],
+ */
+ __pyx_t_4 = 0;
+
+ /* "silx/math/chistogramnd.pyx":1050
+ * &histo_range[0],
+ * &n_bins[0],
+ * &histo[0], # <<<<<<<<<<<<<<
+ * &cumul[0],
+ * &bin_edges[0],
+ */
+ __pyx_t_5 = 0;
+
+ /* "silx/math/chistogramnd.pyx":1051
+ * &n_bins[0],
+ * &histo[0],
+ * &cumul[0], # <<<<<<<<<<<<<<
+ * &bin_edges[0],
+ * option_flags,
+ */
+ __pyx_t_6 = 0;
+
+ /* "silx/math/chistogramnd.pyx":1052
+ * &histo[0],
+ * &cumul[0],
+ * &bin_edges[0], # <<<<<<<<<<<<<<
+ * option_flags,
+ * weight_min,
+ */
+ __pyx_t_7 = 0;
+
+ /* "silx/math/chistogramnd.pyx":1044
+ * numpy.int32_t weight_max) nogil:
+ *
+ * return histogramnd_c.histogramnd_double_int32_t_float(&sample[0], # <<<<<<<<<<<<<<
+ * &weights[0],
+ * n_dims,
+ */
+ __pyx_r = histogramnd_double_int32_t_float((&(*((double *) ( /* dim=0 */ (__pyx_v_sample.data + __pyx_t_1 * __pyx_v_sample.strides[0]) )))), (&(*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_weights.data + __pyx_t_2 * __pyx_v_weights.strides[0]) )))), __pyx_v_n_dims, __pyx_v_n_elem, (&(*((double *) ( /* dim=0 */ (__pyx_v_histo_range.data + __pyx_t_3 * __pyx_v_histo_range.strides[0]) )))), (&(*((int *) ( /* dim=0 */ (__pyx_v_n_bins.data + __pyx_t_4 * __pyx_v_n_bins.strides[0]) )))), (&(*((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_histo.data + __pyx_t_5 * __pyx_v_histo.strides[0]) )))), (&(*((float *) ( /* dim=0 */ (__pyx_v_cumul.data + __pyx_t_6 * __pyx_v_cumul.strides[0]) )))), (&(*((double *) ( /* dim=0 */ (__pyx_v_bin_edges.data + __pyx_t_7 * __pyx_v_bin_edges.strides[0]) )))), __pyx_v_option_flags, __pyx_v_weight_min, __pyx_v_weight_max);
+ goto __pyx_L0;
+
+ /* "silx/math/chistogramnd.pyx":1031
+ * @cython.initializedcheck(False)
+ * @cython.nonecheck(False)
+ * cdef int _histogramnd_double_int32_t_float(double[:] sample, # <<<<<<<<<<<<<<
+ * numpy.int32_t[:] weights,
+ * int n_dims,
+ */
+
+ /* function exit code */
+ __pyx_L0:;
+ return __pyx_r;
+}
+
+/* "silx/math/chistogramnd.pyx":1067
+ * @cython.initializedcheck(False)
+ * @cython.nonecheck(False)
+ * cdef int _histogramnd_float_double_float(float[:] sample, # <<<<<<<<<<<<<<
+ * double[:] weights,
+ * int n_dims,
+ */
+
+static int __pyx_f_4silx_4math_12chistogramnd__histogramnd_float_double_float(__Pyx_memviewslice __pyx_v_sample, __Pyx_memviewslice __pyx_v_weights, int __pyx_v_n_dims, int __pyx_v_n_elem, __Pyx_memviewslice __pyx_v_histo_range, __Pyx_memviewslice __pyx_v_n_bins, __Pyx_memviewslice __pyx_v_histo, __Pyx_memviewslice __pyx_v_cumul, __Pyx_memviewslice __pyx_v_bin_edges, int __pyx_v_option_flags, double __pyx_v_weight_min, double __pyx_v_weight_max) {
+ int __pyx_r;
+ Py_ssize_t __pyx_t_1;
+ Py_ssize_t __pyx_t_2;
+ Py_ssize_t __pyx_t_3;
+ Py_ssize_t __pyx_t_4;
+ Py_ssize_t __pyx_t_5;
+ Py_ssize_t __pyx_t_6;
+ Py_ssize_t __pyx_t_7;
+
+ /* "silx/math/chistogramnd.pyx":1080
+ * double weight_max) nogil:
+ *
+ * return histogramnd_c.histogramnd_float_double_float(&sample[0], # <<<<<<<<<<<<<<
+ * &weights[0],
+ * n_dims,
+ */
+ __pyx_t_1 = 0;
+
+ /* "silx/math/chistogramnd.pyx":1081
+ *
+ * return histogramnd_c.histogramnd_float_double_float(&sample[0],
+ * &weights[0], # <<<<<<<<<<<<<<
+ * n_dims,
+ * n_elem,
+ */
+ __pyx_t_2 = 0;
+
+ /* "silx/math/chistogramnd.pyx":1084
+ * n_dims,
+ * n_elem,
+ * &histo_range[0], # <<<<<<<<<<<<<<
+ * &n_bins[0],
+ * &histo[0],
+ */
+ __pyx_t_3 = 0;
+
+ /* "silx/math/chistogramnd.pyx":1085
+ * n_elem,
+ * &histo_range[0],
+ * &n_bins[0], # <<<<<<<<<<<<<<
+ * &histo[0],
+ * &cumul[0],
+ */
+ __pyx_t_4 = 0;
+
+ /* "silx/math/chistogramnd.pyx":1086
+ * &histo_range[0],
+ * &n_bins[0],
+ * &histo[0], # <<<<<<<<<<<<<<
+ * &cumul[0],
+ * &bin_edges[0],
+ */
+ __pyx_t_5 = 0;
+
+ /* "silx/math/chistogramnd.pyx":1087
+ * &n_bins[0],
+ * &histo[0],
+ * &cumul[0], # <<<<<<<<<<<<<<
+ * &bin_edges[0],
+ * option_flags,
+ */
+ __pyx_t_6 = 0;
+
+ /* "silx/math/chistogramnd.pyx":1088
+ * &histo[0],
+ * &cumul[0],
+ * &bin_edges[0], # <<<<<<<<<<<<<<
+ * option_flags,
+ * weight_min,
+ */
+ __pyx_t_7 = 0;
+
+ /* "silx/math/chistogramnd.pyx":1080
+ * double weight_max) nogil:
+ *
+ * return histogramnd_c.histogramnd_float_double_float(&sample[0], # <<<<<<<<<<<<<<
+ * &weights[0],
+ * n_dims,
+ */
+ __pyx_r = histogramnd_float_double_float((&(*((float *) ( /* dim=0 */ (__pyx_v_sample.data + __pyx_t_1 * __pyx_v_sample.strides[0]) )))), (&(*((double *) ( /* dim=0 */ (__pyx_v_weights.data + __pyx_t_2 * __pyx_v_weights.strides[0]) )))), __pyx_v_n_dims, __pyx_v_n_elem, (&(*((double *) ( /* dim=0 */ (__pyx_v_histo_range.data + __pyx_t_3 * __pyx_v_histo_range.strides[0]) )))), (&(*((int *) ( /* dim=0 */ (__pyx_v_n_bins.data + __pyx_t_4 * __pyx_v_n_bins.strides[0]) )))), (&(*((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_histo.data + __pyx_t_5 * __pyx_v_histo.strides[0]) )))), (&(*((float *) ( /* dim=0 */ (__pyx_v_cumul.data + __pyx_t_6 * __pyx_v_cumul.strides[0]) )))), (&(*((double *) ( /* dim=0 */ (__pyx_v_bin_edges.data + __pyx_t_7 * __pyx_v_bin_edges.strides[0]) )))), __pyx_v_option_flags, __pyx_v_weight_min, __pyx_v_weight_max);
+ goto __pyx_L0;
+
+ /* "silx/math/chistogramnd.pyx":1067
+ * @cython.initializedcheck(False)
+ * @cython.nonecheck(False)
+ * cdef int _histogramnd_float_double_float(float[:] sample, # <<<<<<<<<<<<<<
+ * double[:] weights,
+ * int n_dims,
+ */
+
+ /* function exit code */
+ __pyx_L0:;
+ return __pyx_r;
+}
+
+/* "silx/math/chistogramnd.pyx":1098
+ * @cython.initializedcheck(False)
+ * @cython.nonecheck(False)
+ * cdef int _histogramnd_float_float_float(float[:] sample, # <<<<<<<<<<<<<<
+ * float[:] weights,
+ * int n_dims,
+ */
+
+static int __pyx_f_4silx_4math_12chistogramnd__histogramnd_float_float_float(__Pyx_memviewslice __pyx_v_sample, __Pyx_memviewslice __pyx_v_weights, int __pyx_v_n_dims, int __pyx_v_n_elem, __Pyx_memviewslice __pyx_v_histo_range, __Pyx_memviewslice __pyx_v_n_bins, __Pyx_memviewslice __pyx_v_histo, __Pyx_memviewslice __pyx_v_cumul, __Pyx_memviewslice __pyx_v_bin_edges, int __pyx_v_option_flags, float __pyx_v_weight_min, float __pyx_v_weight_max) {
+ int __pyx_r;
+ Py_ssize_t __pyx_t_1;
+ Py_ssize_t __pyx_t_2;
+ Py_ssize_t __pyx_t_3;
+ Py_ssize_t __pyx_t_4;
+ Py_ssize_t __pyx_t_5;
+ Py_ssize_t __pyx_t_6;
+ Py_ssize_t __pyx_t_7;
+
+ /* "silx/math/chistogramnd.pyx":1111
+ * float weight_max) nogil:
+ *
+ * return histogramnd_c.histogramnd_float_float_float(&sample[0], # <<<<<<<<<<<<<<
+ * &weights[0],
+ * n_dims,
+ */
+ __pyx_t_1 = 0;
+
+ /* "silx/math/chistogramnd.pyx":1112
+ *
+ * return histogramnd_c.histogramnd_float_float_float(&sample[0],
+ * &weights[0], # <<<<<<<<<<<<<<
+ * n_dims,
+ * n_elem,
+ */
+ __pyx_t_2 = 0;
+
+ /* "silx/math/chistogramnd.pyx":1115
+ * n_dims,
+ * n_elem,
+ * &histo_range[0], # <<<<<<<<<<<<<<
+ * &n_bins[0],
+ * &histo[0],
+ */
+ __pyx_t_3 = 0;
+
+ /* "silx/math/chistogramnd.pyx":1116
+ * n_elem,
+ * &histo_range[0],
+ * &n_bins[0], # <<<<<<<<<<<<<<
+ * &histo[0],
+ * &cumul[0],
+ */
+ __pyx_t_4 = 0;
+
+ /* "silx/math/chistogramnd.pyx":1117
+ * &histo_range[0],
+ * &n_bins[0],
+ * &histo[0], # <<<<<<<<<<<<<<
+ * &cumul[0],
+ * &bin_edges[0],
+ */
+ __pyx_t_5 = 0;
+
+ /* "silx/math/chistogramnd.pyx":1118
+ * &n_bins[0],
+ * &histo[0],
+ * &cumul[0], # <<<<<<<<<<<<<<
+ * &bin_edges[0],
+ * option_flags,
+ */
+ __pyx_t_6 = 0;
+
+ /* "silx/math/chistogramnd.pyx":1119
+ * &histo[0],
+ * &cumul[0],
+ * &bin_edges[0], # <<<<<<<<<<<<<<
+ * option_flags,
+ * weight_min,
+ */
+ __pyx_t_7 = 0;
+
+ /* "silx/math/chistogramnd.pyx":1111
+ * float weight_max) nogil:
+ *
+ * return histogramnd_c.histogramnd_float_float_float(&sample[0], # <<<<<<<<<<<<<<
+ * &weights[0],
+ * n_dims,
+ */
+ __pyx_r = histogramnd_float_float_float((&(*((float *) ( /* dim=0 */ (__pyx_v_sample.data + __pyx_t_1 * __pyx_v_sample.strides[0]) )))), (&(*((float *) ( /* dim=0 */ (__pyx_v_weights.data + __pyx_t_2 * __pyx_v_weights.strides[0]) )))), __pyx_v_n_dims, __pyx_v_n_elem, (&(*((double *) ( /* dim=0 */ (__pyx_v_histo_range.data + __pyx_t_3 * __pyx_v_histo_range.strides[0]) )))), (&(*((int *) ( /* dim=0 */ (__pyx_v_n_bins.data + __pyx_t_4 * __pyx_v_n_bins.strides[0]) )))), (&(*((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_histo.data + __pyx_t_5 * __pyx_v_histo.strides[0]) )))), (&(*((float *) ( /* dim=0 */ (__pyx_v_cumul.data + __pyx_t_6 * __pyx_v_cumul.strides[0]) )))), (&(*((double *) ( /* dim=0 */ (__pyx_v_bin_edges.data + __pyx_t_7 * __pyx_v_bin_edges.strides[0]) )))), __pyx_v_option_flags, __pyx_v_weight_min, __pyx_v_weight_max);
+ goto __pyx_L0;
+
+ /* "silx/math/chistogramnd.pyx":1098
+ * @cython.initializedcheck(False)
+ * @cython.nonecheck(False)
+ * cdef int _histogramnd_float_float_float(float[:] sample, # <<<<<<<<<<<<<<
+ * float[:] weights,
+ * int n_dims,
+ */
+
+ /* function exit code */
+ __pyx_L0:;
+ return __pyx_r;
+}
+
+/* "silx/math/chistogramnd.pyx":1129
+ * @cython.initializedcheck(False)
+ * @cython.nonecheck(False)
+ * cdef int _histogramnd_float_int32_t_float(float[:] sample, # <<<<<<<<<<<<<<
+ * numpy.int32_t[:] weights,
+ * int n_dims,
+ */
+
+static int __pyx_f_4silx_4math_12chistogramnd__histogramnd_float_int32_t_float(__Pyx_memviewslice __pyx_v_sample, __Pyx_memviewslice __pyx_v_weights, int __pyx_v_n_dims, int __pyx_v_n_elem, __Pyx_memviewslice __pyx_v_histo_range, __Pyx_memviewslice __pyx_v_n_bins, __Pyx_memviewslice __pyx_v_histo, __Pyx_memviewslice __pyx_v_cumul, __Pyx_memviewslice __pyx_v_bin_edges, int __pyx_v_option_flags, __pyx_t_5numpy_int32_t __pyx_v_weight_min, __pyx_t_5numpy_int32_t __pyx_v_weight_max) {
+ int __pyx_r;
+ Py_ssize_t __pyx_t_1;
+ Py_ssize_t __pyx_t_2;
+ Py_ssize_t __pyx_t_3;
+ Py_ssize_t __pyx_t_4;
+ Py_ssize_t __pyx_t_5;
+ Py_ssize_t __pyx_t_6;
+ Py_ssize_t __pyx_t_7;
+
+ /* "silx/math/chistogramnd.pyx":1142
+ * numpy.int32_t weight_max) nogil:
+ *
+ * return histogramnd_c.histogramnd_float_int32_t_float(&sample[0], # <<<<<<<<<<<<<<
+ * &weights[0],
+ * n_dims,
+ */
+ __pyx_t_1 = 0;
+
+ /* "silx/math/chistogramnd.pyx":1143
+ *
+ * return histogramnd_c.histogramnd_float_int32_t_float(&sample[0],
+ * &weights[0], # <<<<<<<<<<<<<<
+ * n_dims,
+ * n_elem,
+ */
+ __pyx_t_2 = 0;
+
+ /* "silx/math/chistogramnd.pyx":1146
+ * n_dims,
+ * n_elem,
+ * &histo_range[0], # <<<<<<<<<<<<<<
+ * &n_bins[0],
+ * &histo[0],
+ */
+ __pyx_t_3 = 0;
+
+ /* "silx/math/chistogramnd.pyx":1147
+ * n_elem,
+ * &histo_range[0],
+ * &n_bins[0], # <<<<<<<<<<<<<<
+ * &histo[0],
+ * &cumul[0],
+ */
+ __pyx_t_4 = 0;
+
+ /* "silx/math/chistogramnd.pyx":1148
+ * &histo_range[0],
+ * &n_bins[0],
+ * &histo[0], # <<<<<<<<<<<<<<
+ * &cumul[0],
+ * &bin_edges[0],
+ */
+ __pyx_t_5 = 0;
+
+ /* "silx/math/chistogramnd.pyx":1149
+ * &n_bins[0],
+ * &histo[0],
+ * &cumul[0], # <<<<<<<<<<<<<<
+ * &bin_edges[0],
+ * option_flags,
+ */
+ __pyx_t_6 = 0;
+
+ /* "silx/math/chistogramnd.pyx":1150
+ * &histo[0],
+ * &cumul[0],
+ * &bin_edges[0], # <<<<<<<<<<<<<<
+ * option_flags,
+ * weight_min,
+ */
+ __pyx_t_7 = 0;
+
+ /* "silx/math/chistogramnd.pyx":1142
+ * numpy.int32_t weight_max) nogil:
+ *
+ * return histogramnd_c.histogramnd_float_int32_t_float(&sample[0], # <<<<<<<<<<<<<<
+ * &weights[0],
+ * n_dims,
+ */
+ __pyx_r = histogramnd_float_int32_t_float((&(*((float *) ( /* dim=0 */ (__pyx_v_sample.data + __pyx_t_1 * __pyx_v_sample.strides[0]) )))), (&(*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_weights.data + __pyx_t_2 * __pyx_v_weights.strides[0]) )))), __pyx_v_n_dims, __pyx_v_n_elem, (&(*((double *) ( /* dim=0 */ (__pyx_v_histo_range.data + __pyx_t_3 * __pyx_v_histo_range.strides[0]) )))), (&(*((int *) ( /* dim=0 */ (__pyx_v_n_bins.data + __pyx_t_4 * __pyx_v_n_bins.strides[0]) )))), (&(*((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_histo.data + __pyx_t_5 * __pyx_v_histo.strides[0]) )))), (&(*((float *) ( /* dim=0 */ (__pyx_v_cumul.data + __pyx_t_6 * __pyx_v_cumul.strides[0]) )))), (&(*((double *) ( /* dim=0 */ (__pyx_v_bin_edges.data + __pyx_t_7 * __pyx_v_bin_edges.strides[0]) )))), __pyx_v_option_flags, __pyx_v_weight_min, __pyx_v_weight_max);
+ goto __pyx_L0;
+
+ /* "silx/math/chistogramnd.pyx":1129
+ * @cython.initializedcheck(False)
+ * @cython.nonecheck(False)
+ * cdef int _histogramnd_float_int32_t_float(float[:] sample, # <<<<<<<<<<<<<<
+ * numpy.int32_t[:] weights,
+ * int n_dims,
+ */
+
+ /* function exit code */
+ __pyx_L0:;
+ return __pyx_r;
+}
+
+/* "silx/math/chistogramnd.pyx":1165
+ * @cython.initializedcheck(False)
+ * @cython.nonecheck(False)
+ * cdef int _histogramnd_int32_t_double_float(numpy.int32_t[:] sample, # <<<<<<<<<<<<<<
+ * double[:] weights,
+ * int n_dims,
+ */
+
+static int __pyx_f_4silx_4math_12chistogramnd__histogramnd_int32_t_double_float(__Pyx_memviewslice __pyx_v_sample, __Pyx_memviewslice __pyx_v_weights, int __pyx_v_n_dims, int __pyx_v_n_elem, __Pyx_memviewslice __pyx_v_histo_range, __Pyx_memviewslice __pyx_v_n_bins, __Pyx_memviewslice __pyx_v_histo, __Pyx_memviewslice __pyx_v_cumul, __Pyx_memviewslice __pyx_v_bin_edges, int __pyx_v_option_flags, double __pyx_v_weight_min, double __pyx_v_weight_max) {
+ int __pyx_r;
+ Py_ssize_t __pyx_t_1;
+ Py_ssize_t __pyx_t_2;
+ Py_ssize_t __pyx_t_3;
+ Py_ssize_t __pyx_t_4;
+ Py_ssize_t __pyx_t_5;
+ Py_ssize_t __pyx_t_6;
+ Py_ssize_t __pyx_t_7;
+
+ /* "silx/math/chistogramnd.pyx":1178
+ * double weight_max) nogil:
+ *
+ * return histogramnd_c.histogramnd_int32_t_double_float(&sample[0], # <<<<<<<<<<<<<<
+ * &weights[0],
+ * n_dims,
+ */
+ __pyx_t_1 = 0;
+
+ /* "silx/math/chistogramnd.pyx":1179
+ *
+ * return histogramnd_c.histogramnd_int32_t_double_float(&sample[0],
+ * &weights[0], # <<<<<<<<<<<<<<
+ * n_dims,
+ * n_elem,
+ */
+ __pyx_t_2 = 0;
+
+ /* "silx/math/chistogramnd.pyx":1182
+ * n_dims,
+ * n_elem,
+ * &histo_range[0], # <<<<<<<<<<<<<<
+ * &n_bins[0],
+ * &histo[0],
+ */
+ __pyx_t_3 = 0;
+
+ /* "silx/math/chistogramnd.pyx":1183
+ * n_elem,
+ * &histo_range[0],
+ * &n_bins[0], # <<<<<<<<<<<<<<
+ * &histo[0],
+ * &cumul[0],
+ */
+ __pyx_t_4 = 0;
+
+ /* "silx/math/chistogramnd.pyx":1184
+ * &histo_range[0],
+ * &n_bins[0],
+ * &histo[0], # <<<<<<<<<<<<<<
+ * &cumul[0],
+ * &bin_edges[0],
+ */
+ __pyx_t_5 = 0;
+
+ /* "silx/math/chistogramnd.pyx":1185
+ * &n_bins[0],
+ * &histo[0],
+ * &cumul[0], # <<<<<<<<<<<<<<
+ * &bin_edges[0],
+ * option_flags,
+ */
+ __pyx_t_6 = 0;
+
+ /* "silx/math/chistogramnd.pyx":1186
+ * &histo[0],
+ * &cumul[0],
+ * &bin_edges[0], # <<<<<<<<<<<<<<
+ * option_flags,
+ * weight_min,
+ */
+ __pyx_t_7 = 0;
+
+ /* "silx/math/chistogramnd.pyx":1178
+ * double weight_max) nogil:
+ *
+ * return histogramnd_c.histogramnd_int32_t_double_float(&sample[0], # <<<<<<<<<<<<<<
+ * &weights[0],
+ * n_dims,
+ */
+ __pyx_r = histogramnd_int32_t_double_float((&(*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_sample.data + __pyx_t_1 * __pyx_v_sample.strides[0]) )))), (&(*((double *) ( /* dim=0 */ (__pyx_v_weights.data + __pyx_t_2 * __pyx_v_weights.strides[0]) )))), __pyx_v_n_dims, __pyx_v_n_elem, (&(*((double *) ( /* dim=0 */ (__pyx_v_histo_range.data + __pyx_t_3 * __pyx_v_histo_range.strides[0]) )))), (&(*((int *) ( /* dim=0 */ (__pyx_v_n_bins.data + __pyx_t_4 * __pyx_v_n_bins.strides[0]) )))), (&(*((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_histo.data + __pyx_t_5 * __pyx_v_histo.strides[0]) )))), (&(*((float *) ( /* dim=0 */ (__pyx_v_cumul.data + __pyx_t_6 * __pyx_v_cumul.strides[0]) )))), (&(*((double *) ( /* dim=0 */ (__pyx_v_bin_edges.data + __pyx_t_7 * __pyx_v_bin_edges.strides[0]) )))), __pyx_v_option_flags, __pyx_v_weight_min, __pyx_v_weight_max);
+ goto __pyx_L0;
+
+ /* "silx/math/chistogramnd.pyx":1165
+ * @cython.initializedcheck(False)
+ * @cython.nonecheck(False)
+ * cdef int _histogramnd_int32_t_double_float(numpy.int32_t[:] sample, # <<<<<<<<<<<<<<
+ * double[:] weights,
+ * int n_dims,
+ */
+
+ /* function exit code */
+ __pyx_L0:;
+ return __pyx_r;
+}
+
+/* "silx/math/chistogramnd.pyx":1196
+ * @cython.initializedcheck(False)
+ * @cython.nonecheck(False)
+ * cdef int _histogramnd_int32_t_float_float(numpy.int32_t[:] sample, # <<<<<<<<<<<<<<
+ * float[:] weights,
+ * int n_dims,
+ */
+
+static int __pyx_f_4silx_4math_12chistogramnd__histogramnd_int32_t_float_float(__Pyx_memviewslice __pyx_v_sample, __Pyx_memviewslice __pyx_v_weights, int __pyx_v_n_dims, int __pyx_v_n_elem, __Pyx_memviewslice __pyx_v_histo_range, __Pyx_memviewslice __pyx_v_n_bins, __Pyx_memviewslice __pyx_v_histo, __Pyx_memviewslice __pyx_v_cumul, __Pyx_memviewslice __pyx_v_bin_edges, int __pyx_v_option_flags, float __pyx_v_weight_min, float __pyx_v_weight_max) {
+ int __pyx_r;
+ Py_ssize_t __pyx_t_1;
+ Py_ssize_t __pyx_t_2;
+ Py_ssize_t __pyx_t_3;
+ Py_ssize_t __pyx_t_4;
+ Py_ssize_t __pyx_t_5;
+ Py_ssize_t __pyx_t_6;
+ Py_ssize_t __pyx_t_7;
+
+ /* "silx/math/chistogramnd.pyx":1209
+ * float weight_max) nogil:
+ *
+ * return histogramnd_c.histogramnd_int32_t_float_float(&sample[0], # <<<<<<<<<<<<<<
+ * &weights[0],
+ * n_dims,
+ */
+ __pyx_t_1 = 0;
+
+ /* "silx/math/chistogramnd.pyx":1210
+ *
+ * return histogramnd_c.histogramnd_int32_t_float_float(&sample[0],
+ * &weights[0], # <<<<<<<<<<<<<<
+ * n_dims,
+ * n_elem,
+ */
+ __pyx_t_2 = 0;
+
+ /* "silx/math/chistogramnd.pyx":1213
+ * n_dims,
+ * n_elem,
+ * &histo_range[0], # <<<<<<<<<<<<<<
+ * &n_bins[0],
+ * &histo[0],
+ */
+ __pyx_t_3 = 0;
+
+ /* "silx/math/chistogramnd.pyx":1214
+ * n_elem,
+ * &histo_range[0],
+ * &n_bins[0], # <<<<<<<<<<<<<<
+ * &histo[0],
+ * &cumul[0],
+ */
+ __pyx_t_4 = 0;
+
+ /* "silx/math/chistogramnd.pyx":1215
+ * &histo_range[0],
+ * &n_bins[0],
+ * &histo[0], # <<<<<<<<<<<<<<
+ * &cumul[0],
+ * &bin_edges[0],
+ */
+ __pyx_t_5 = 0;
+
+ /* "silx/math/chistogramnd.pyx":1216
+ * &n_bins[0],
+ * &histo[0],
+ * &cumul[0], # <<<<<<<<<<<<<<
+ * &bin_edges[0],
+ * option_flags,
+ */
+ __pyx_t_6 = 0;
+
+ /* "silx/math/chistogramnd.pyx":1217
+ * &histo[0],
+ * &cumul[0],
+ * &bin_edges[0], # <<<<<<<<<<<<<<
+ * option_flags,
+ * weight_min,
+ */
+ __pyx_t_7 = 0;
+
+ /* "silx/math/chistogramnd.pyx":1209
+ * float weight_max) nogil:
+ *
+ * return histogramnd_c.histogramnd_int32_t_float_float(&sample[0], # <<<<<<<<<<<<<<
+ * &weights[0],
+ * n_dims,
+ */
+ __pyx_r = histogramnd_int32_t_float_float((&(*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_sample.data + __pyx_t_1 * __pyx_v_sample.strides[0]) )))), (&(*((float *) ( /* dim=0 */ (__pyx_v_weights.data + __pyx_t_2 * __pyx_v_weights.strides[0]) )))), __pyx_v_n_dims, __pyx_v_n_elem, (&(*((double *) ( /* dim=0 */ (__pyx_v_histo_range.data + __pyx_t_3 * __pyx_v_histo_range.strides[0]) )))), (&(*((int *) ( /* dim=0 */ (__pyx_v_n_bins.data + __pyx_t_4 * __pyx_v_n_bins.strides[0]) )))), (&(*((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_histo.data + __pyx_t_5 * __pyx_v_histo.strides[0]) )))), (&(*((float *) ( /* dim=0 */ (__pyx_v_cumul.data + __pyx_t_6 * __pyx_v_cumul.strides[0]) )))), (&(*((double *) ( /* dim=0 */ (__pyx_v_bin_edges.data + __pyx_t_7 * __pyx_v_bin_edges.strides[0]) )))), __pyx_v_option_flags, __pyx_v_weight_min, __pyx_v_weight_max);
+ goto __pyx_L0;
+
+ /* "silx/math/chistogramnd.pyx":1196
+ * @cython.initializedcheck(False)
+ * @cython.nonecheck(False)
+ * cdef int _histogramnd_int32_t_float_float(numpy.int32_t[:] sample, # <<<<<<<<<<<<<<
+ * float[:] weights,
+ * int n_dims,
+ */
+
+ /* function exit code */
+ __pyx_L0:;
+ return __pyx_r;
+}
+
+/* "silx/math/chistogramnd.pyx":1227
+ * @cython.initializedcheck(False)
+ * @cython.nonecheck(False)
+ * cdef int _histogramnd_int32_t_int32_t_float(numpy.int32_t[:] sample, # <<<<<<<<<<<<<<
+ * numpy.int32_t[:] weights,
+ * int n_dims,
+ */
+
+static int __pyx_f_4silx_4math_12chistogramnd__histogramnd_int32_t_int32_t_float(__Pyx_memviewslice __pyx_v_sample, __Pyx_memviewslice __pyx_v_weights, int __pyx_v_n_dims, int __pyx_v_n_elem, __Pyx_memviewslice __pyx_v_histo_range, __Pyx_memviewslice __pyx_v_n_bins, __Pyx_memviewslice __pyx_v_histo, __Pyx_memviewslice __pyx_v_cumul, __Pyx_memviewslice __pyx_v_bin_edges, int __pyx_v_option_flags, __pyx_t_5numpy_int32_t __pyx_v_weight_min, __pyx_t_5numpy_int32_t __pyx_v_weight_max) {
+ int __pyx_r;
+ Py_ssize_t __pyx_t_1;
+ Py_ssize_t __pyx_t_2;
+ Py_ssize_t __pyx_t_3;
+ Py_ssize_t __pyx_t_4;
+ Py_ssize_t __pyx_t_5;
+ Py_ssize_t __pyx_t_6;
+ Py_ssize_t __pyx_t_7;
+
+ /* "silx/math/chistogramnd.pyx":1240
+ * numpy.int32_t weight_max) nogil:
+ *
+ * return histogramnd_c.histogramnd_int32_t_int32_t_float(&sample[0], # <<<<<<<<<<<<<<
+ * &weights[0],
+ * n_dims,
+ */
+ __pyx_t_1 = 0;
+
+ /* "silx/math/chistogramnd.pyx":1241
+ *
+ * return histogramnd_c.histogramnd_int32_t_int32_t_float(&sample[0],
+ * &weights[0], # <<<<<<<<<<<<<<
+ * n_dims,
+ * n_elem,
+ */
+ __pyx_t_2 = 0;
+
+ /* "silx/math/chistogramnd.pyx":1244
+ * n_dims,
+ * n_elem,
+ * &histo_range[0], # <<<<<<<<<<<<<<
+ * &n_bins[0],
+ * &histo[0],
+ */
+ __pyx_t_3 = 0;
+
+ /* "silx/math/chistogramnd.pyx":1245
+ * n_elem,
+ * &histo_range[0],
+ * &n_bins[0], # <<<<<<<<<<<<<<
+ * &histo[0],
+ * &cumul[0],
+ */
+ __pyx_t_4 = 0;
+
+ /* "silx/math/chistogramnd.pyx":1246
+ * &histo_range[0],
+ * &n_bins[0],
+ * &histo[0], # <<<<<<<<<<<<<<
+ * &cumul[0],
+ * &bin_edges[0],
+ */
+ __pyx_t_5 = 0;
+
+ /* "silx/math/chistogramnd.pyx":1247
+ * &n_bins[0],
+ * &histo[0],
+ * &cumul[0], # <<<<<<<<<<<<<<
+ * &bin_edges[0],
+ * option_flags,
+ */
+ __pyx_t_6 = 0;
+
+ /* "silx/math/chistogramnd.pyx":1248
+ * &histo[0],
+ * &cumul[0],
+ * &bin_edges[0], # <<<<<<<<<<<<<<
+ * option_flags,
+ * weight_min,
+ */
+ __pyx_t_7 = 0;
+
+ /* "silx/math/chistogramnd.pyx":1240
+ * numpy.int32_t weight_max) nogil:
+ *
+ * return histogramnd_c.histogramnd_int32_t_int32_t_float(&sample[0], # <<<<<<<<<<<<<<
+ * &weights[0],
+ * n_dims,
+ */
+ __pyx_r = histogramnd_int32_t_int32_t_float((&(*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_sample.data + __pyx_t_1 * __pyx_v_sample.strides[0]) )))), (&(*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_weights.data + __pyx_t_2 * __pyx_v_weights.strides[0]) )))), __pyx_v_n_dims, __pyx_v_n_elem, (&(*((double *) ( /* dim=0 */ (__pyx_v_histo_range.data + __pyx_t_3 * __pyx_v_histo_range.strides[0]) )))), (&(*((int *) ( /* dim=0 */ (__pyx_v_n_bins.data + __pyx_t_4 * __pyx_v_n_bins.strides[0]) )))), (&(*((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_histo.data + __pyx_t_5 * __pyx_v_histo.strides[0]) )))), (&(*((float *) ( /* dim=0 */ (__pyx_v_cumul.data + __pyx_t_6 * __pyx_v_cumul.strides[0]) )))), (&(*((double *) ( /* dim=0 */ (__pyx_v_bin_edges.data + __pyx_t_7 * __pyx_v_bin_edges.strides[0]) )))), __pyx_v_option_flags, __pyx_v_weight_min, __pyx_v_weight_max);
+ goto __pyx_L0;
+
+ /* "silx/math/chistogramnd.pyx":1227
+ * @cython.initializedcheck(False)
+ * @cython.nonecheck(False)
+ * cdef int _histogramnd_int32_t_int32_t_float(numpy.int32_t[:] sample, # <<<<<<<<<<<<<<
+ * numpy.int32_t[:] weights,
+ * int n_dims,
+ */
+
+ /* function exit code */
+ __pyx_L0:;
+ return __pyx_r;
+}
+
+/* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":197
+ * # experimental exception made for __getbuffer__ and __releasebuffer__
+ * # -- the details of this may change.
+ * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<<
+ * # This implementation of getbuffer is geared towards Cython
+ * # requirements, and does not yet fullfill the PEP.
+ */
+
+/* Python wrapper */
+static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
+static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_5numpy_7ndarray___getbuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
+ int __pyx_v_copy_shape;
+ int __pyx_v_i;
+ int __pyx_v_ndim;
+ int __pyx_v_endian_detector;
+ int __pyx_v_little_endian;
+ int __pyx_v_t;
+ char *__pyx_v_f;
+ PyArray_Descr *__pyx_v_descr = 0;
+ int __pyx_v_offset;
+ int __pyx_v_hasfields;
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ int __pyx_t_1;
+ int __pyx_t_2;
+ PyObject *__pyx_t_3 = NULL;
+ int __pyx_t_4;
+ int __pyx_t_5;
+ PyObject *__pyx_t_6 = NULL;
+ char *__pyx_t_7;
+ __Pyx_RefNannySetupContext("__getbuffer__", 0);
+ if (__pyx_v_info != NULL) {
+ __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
+ __Pyx_GIVEREF(__pyx_v_info->obj);
+ }
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":203
+ * # of flags
+ *
+ * if info == NULL: return # <<<<<<<<<<<<<<
+ *
+ * cdef int copy_shape, i, ndim
+ */
+ __pyx_t_1 = ((__pyx_v_info == NULL) != 0);
+ if (__pyx_t_1) {
+ __pyx_r = 0;
+ goto __pyx_L0;
+ }
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":206
+ *
+ * cdef int copy_shape, i, ndim
+ * cdef int endian_detector = 1 # <<<<<<<<<<<<<<
+ * cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
+ *
+ */
+ __pyx_v_endian_detector = 1;
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":207
+ * cdef int copy_shape, i, ndim
+ * cdef int endian_detector = 1
+ * cdef bint little_endian = ((<char*>&endian_detector)[0] != 0) # <<<<<<<<<<<<<<
+ *
+ * ndim = PyArray_NDIM(self)
+ */
+ __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0);
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":209
+ * cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
+ *
+ * ndim = PyArray_NDIM(self) # <<<<<<<<<<<<<<
+ *
+ * if sizeof(npy_intp) != sizeof(Py_ssize_t):
+ */
+ __pyx_v_ndim = PyArray_NDIM(__pyx_v_self);
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":211
+ * ndim = PyArray_NDIM(self)
+ *
+ * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<<
+ * copy_shape = 1
+ * else:
+ */
+ __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0);
+ if (__pyx_t_1) {
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":212
+ *
+ * if sizeof(npy_intp) != sizeof(Py_ssize_t):
+ * copy_shape = 1 # <<<<<<<<<<<<<<
+ * else:
+ * copy_shape = 0
+ */
+ __pyx_v_copy_shape = 1;
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":211
+ * ndim = PyArray_NDIM(self)
+ *
+ * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<<
+ * copy_shape = 1
+ * else:
+ */
+ goto __pyx_L4;
+ }
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":214
+ * copy_shape = 1
+ * else:
+ * copy_shape = 0 # <<<<<<<<<<<<<<
+ *
+ * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
+ */
+ /*else*/ {
+ __pyx_v_copy_shape = 0;
+ }
+ __pyx_L4:;
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":216
+ * copy_shape = 0
+ *
+ * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<<
+ * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):
+ * raise ValueError(u"ndarray is not C contiguous")
+ */
+ __pyx_t_2 = (((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS) != 0);
+ if (__pyx_t_2) {
+ } else {
+ __pyx_t_1 = __pyx_t_2;
+ goto __pyx_L6_bool_binop_done;
+ }
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":217
+ *
+ * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
+ * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)): # <<<<<<<<<<<<<<
+ * raise ValueError(u"ndarray is not C contiguous")
+ *
+ */
+ __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_C_CONTIGUOUS) != 0)) != 0);
+ __pyx_t_1 = __pyx_t_2;
+ __pyx_L6_bool_binop_done:;
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":216
+ * copy_shape = 0
+ *
+ * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<<
+ * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):
+ * raise ValueError(u"ndarray is not C contiguous")
+ */
+ if (__pyx_t_1) {
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":218
+ * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
+ * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):
+ * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<<
+ *
+ * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
+ */
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 218, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __PYX_ERR(1, 218, __pyx_L1_error)
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":216
+ * copy_shape = 0
+ *
+ * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<<
+ * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):
+ * raise ValueError(u"ndarray is not C contiguous")
+ */
+ }
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":220
+ * raise ValueError(u"ndarray is not C contiguous")
+ *
+ * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<<
+ * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)):
+ * raise ValueError(u"ndarray is not Fortran contiguous")
+ */
+ __pyx_t_2 = (((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS) != 0);
+ if (__pyx_t_2) {
+ } else {
+ __pyx_t_1 = __pyx_t_2;
+ goto __pyx_L9_bool_binop_done;
+ }
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":221
+ *
+ * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
+ * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)): # <<<<<<<<<<<<<<
+ * raise ValueError(u"ndarray is not Fortran contiguous")
+ *
+ */
+ __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_F_CONTIGUOUS) != 0)) != 0);
+ __pyx_t_1 = __pyx_t_2;
+ __pyx_L9_bool_binop_done:;
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":220
+ * raise ValueError(u"ndarray is not C contiguous")
+ *
+ * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<<
+ * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)):
+ * raise ValueError(u"ndarray is not Fortran contiguous")
+ */
+ if (__pyx_t_1) {
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":222
+ * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
+ * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)):
+ * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<<
+ *
+ * info.buf = PyArray_DATA(self)
+ */
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 222, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __PYX_ERR(1, 222, __pyx_L1_error)
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":220
+ * raise ValueError(u"ndarray is not C contiguous")
+ *
+ * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<<
+ * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)):
+ * raise ValueError(u"ndarray is not Fortran contiguous")
+ */
+ }
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":224
+ * raise ValueError(u"ndarray is not Fortran contiguous")
+ *
+ * info.buf = PyArray_DATA(self) # <<<<<<<<<<<<<<
+ * info.ndim = ndim
+ * if copy_shape:
+ */
+ __pyx_v_info->buf = PyArray_DATA(__pyx_v_self);
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":225
+ *
+ * info.buf = PyArray_DATA(self)
+ * info.ndim = ndim # <<<<<<<<<<<<<<
+ * if copy_shape:
+ * # Allocate new buffer for strides and shape info.
+ */
+ __pyx_v_info->ndim = __pyx_v_ndim;
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":226
+ * info.buf = PyArray_DATA(self)
+ * info.ndim = ndim
+ * if copy_shape: # <<<<<<<<<<<<<<
+ * # Allocate new buffer for strides and shape info.
+ * # This is allocated as one block, strides first.
+ */
+ __pyx_t_1 = (__pyx_v_copy_shape != 0);
+ if (__pyx_t_1) {
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":229
+ * # Allocate new buffer for strides and shape info.
+ * # This is allocated as one block, strides first.
+ * info.strides = <Py_ssize_t*>stdlib.malloc(sizeof(Py_ssize_t) * <size_t>ndim * 2) # <<<<<<<<<<<<<<
+ * info.shape = info.strides + ndim
+ * for i in range(ndim):
+ */
+ __pyx_v_info->strides = ((Py_ssize_t *)malloc((((sizeof(Py_ssize_t)) * ((size_t)__pyx_v_ndim)) * 2)));
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":230
+ * # This is allocated as one block, strides first.
+ * info.strides = <Py_ssize_t*>stdlib.malloc(sizeof(Py_ssize_t) * <size_t>ndim * 2)
+ * info.shape = info.strides + ndim # <<<<<<<<<<<<<<
+ * for i in range(ndim):
+ * info.strides[i] = PyArray_STRIDES(self)[i]
+ */
+ __pyx_v_info->shape = (__pyx_v_info->strides + __pyx_v_ndim);
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":231
+ * info.strides = <Py_ssize_t*>stdlib.malloc(sizeof(Py_ssize_t) * <size_t>ndim * 2)
+ * info.shape = info.strides + ndim
+ * for i in range(ndim): # <<<<<<<<<<<<<<
+ * info.strides[i] = PyArray_STRIDES(self)[i]
+ * info.shape[i] = PyArray_DIMS(self)[i]
+ */
+ __pyx_t_4 = __pyx_v_ndim;
+ for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
+ __pyx_v_i = __pyx_t_5;
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":232
+ * info.shape = info.strides + ndim
+ * for i in range(ndim):
+ * info.strides[i] = PyArray_STRIDES(self)[i] # <<<<<<<<<<<<<<
+ * info.shape[i] = PyArray_DIMS(self)[i]
+ * else:
+ */
+ (__pyx_v_info->strides[__pyx_v_i]) = (PyArray_STRIDES(__pyx_v_self)[__pyx_v_i]);
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":233
+ * for i in range(ndim):
+ * info.strides[i] = PyArray_STRIDES(self)[i]
+ * info.shape[i] = PyArray_DIMS(self)[i] # <<<<<<<<<<<<<<
+ * else:
+ * info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
+ */
+ (__pyx_v_info->shape[__pyx_v_i]) = (PyArray_DIMS(__pyx_v_self)[__pyx_v_i]);
+ }
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":226
+ * info.buf = PyArray_DATA(self)
+ * info.ndim = ndim
+ * if copy_shape: # <<<<<<<<<<<<<<
+ * # Allocate new buffer for strides and shape info.
+ * # This is allocated as one block, strides first.
+ */
+ goto __pyx_L11;
+ }
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":235
+ * info.shape[i] = PyArray_DIMS(self)[i]
+ * else:
+ * info.strides = <Py_ssize_t*>PyArray_STRIDES(self) # <<<<<<<<<<<<<<
+ * info.shape = <Py_ssize_t*>PyArray_DIMS(self)
+ * info.suboffsets = NULL
+ */
+ /*else*/ {
+ __pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(__pyx_v_self));
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":236
+ * else:
+ * info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
+ * info.shape = <Py_ssize_t*>PyArray_DIMS(self) # <<<<<<<<<<<<<<
+ * info.suboffsets = NULL
+ * info.itemsize = PyArray_ITEMSIZE(self)
+ */
+ __pyx_v_info->shape = ((Py_ssize_t *)PyArray_DIMS(__pyx_v_self));
+ }
+ __pyx_L11:;
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":237
+ * info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
+ * info.shape = <Py_ssize_t*>PyArray_DIMS(self)
+ * info.suboffsets = NULL # <<<<<<<<<<<<<<
+ * info.itemsize = PyArray_ITEMSIZE(self)
+ * info.readonly = not PyArray_ISWRITEABLE(self)
+ */
+ __pyx_v_info->suboffsets = NULL;
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":238
+ * info.shape = <Py_ssize_t*>PyArray_DIMS(self)
+ * info.suboffsets = NULL
+ * info.itemsize = PyArray_ITEMSIZE(self) # <<<<<<<<<<<<<<
+ * info.readonly = not PyArray_ISWRITEABLE(self)
+ *
+ */
+ __pyx_v_info->itemsize = PyArray_ITEMSIZE(__pyx_v_self);
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":239
+ * info.suboffsets = NULL
+ * info.itemsize = PyArray_ITEMSIZE(self)
+ * info.readonly = not PyArray_ISWRITEABLE(self) # <<<<<<<<<<<<<<
+ *
+ * cdef int t
+ */
+ __pyx_v_info->readonly = (!(PyArray_ISWRITEABLE(__pyx_v_self) != 0));
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":242
+ *
+ * cdef int t
+ * cdef char* f = NULL # <<<<<<<<<<<<<<
+ * cdef dtype descr = self.descr
+ * cdef int offset
+ */
+ __pyx_v_f = NULL;
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":243
+ * cdef int t
+ * cdef char* f = NULL
+ * cdef dtype descr = self.descr # <<<<<<<<<<<<<<
+ * cdef int offset
+ *
+ */
+ __pyx_t_3 = ((PyObject *)__pyx_v_self->descr);
+ __Pyx_INCREF(__pyx_t_3);
+ __pyx_v_descr = ((PyArray_Descr *)__pyx_t_3);
+ __pyx_t_3 = 0;
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":246
+ * cdef int offset
+ *
+ * cdef bint hasfields = PyDataType_HASFIELDS(descr) # <<<<<<<<<<<<<<
+ *
+ * if not hasfields and not copy_shape:
+ */
+ __pyx_v_hasfields = PyDataType_HASFIELDS(__pyx_v_descr);
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":248
+ * cdef bint hasfields = PyDataType_HASFIELDS(descr)
+ *
+ * if not hasfields and not copy_shape: # <<<<<<<<<<<<<<
+ * # do not call releasebuffer
+ * info.obj = None
+ */
+ __pyx_t_2 = ((!(__pyx_v_hasfields != 0)) != 0);
+ if (__pyx_t_2) {
+ } else {
+ __pyx_t_1 = __pyx_t_2;
+ goto __pyx_L15_bool_binop_done;
+ }
+ __pyx_t_2 = ((!(__pyx_v_copy_shape != 0)) != 0);
+ __pyx_t_1 = __pyx_t_2;
+ __pyx_L15_bool_binop_done:;
+ if (__pyx_t_1) {
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":250
+ * if not hasfields and not copy_shape:
+ * # do not call releasebuffer
+ * info.obj = None # <<<<<<<<<<<<<<
+ * else:
+ * # need to call releasebuffer
+ */
+ __Pyx_INCREF(Py_None);
+ __Pyx_GIVEREF(Py_None);
+ __Pyx_GOTREF(__pyx_v_info->obj);
+ __Pyx_DECREF(__pyx_v_info->obj);
+ __pyx_v_info->obj = Py_None;
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":248
+ * cdef bint hasfields = PyDataType_HASFIELDS(descr)
+ *
+ * if not hasfields and not copy_shape: # <<<<<<<<<<<<<<
+ * # do not call releasebuffer
+ * info.obj = None
+ */
+ goto __pyx_L14;
+ }
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":253
+ * else:
+ * # need to call releasebuffer
+ * info.obj = self # <<<<<<<<<<<<<<
+ *
+ * if not hasfields:
+ */
+ /*else*/ {
+ __Pyx_INCREF(((PyObject *)__pyx_v_self));
+ __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
+ __Pyx_GOTREF(__pyx_v_info->obj);
+ __Pyx_DECREF(__pyx_v_info->obj);
+ __pyx_v_info->obj = ((PyObject *)__pyx_v_self);
+ }
+ __pyx_L14:;
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":255
+ * info.obj = self
+ *
+ * if not hasfields: # <<<<<<<<<<<<<<
+ * t = descr.type_num
+ * if ((descr.byteorder == c'>' and little_endian) or
+ */
+ __pyx_t_1 = ((!(__pyx_v_hasfields != 0)) != 0);
+ if (__pyx_t_1) {
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":256
+ *
+ * if not hasfields:
+ * t = descr.type_num # <<<<<<<<<<<<<<
+ * if ((descr.byteorder == c'>' and little_endian) or
+ * (descr.byteorder == c'<' and not little_endian)):
+ */
+ __pyx_t_4 = __pyx_v_descr->type_num;
+ __pyx_v_t = __pyx_t_4;
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":257
+ * if not hasfields:
+ * t = descr.type_num
+ * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
+ * (descr.byteorder == c'<' and not little_endian)):
+ * raise ValueError(u"Non-native byte order not supported")
+ */
+ __pyx_t_2 = ((__pyx_v_descr->byteorder == '>') != 0);
+ if (!__pyx_t_2) {
+ goto __pyx_L20_next_or;
+ } else {
+ }
+ __pyx_t_2 = (__pyx_v_little_endian != 0);
+ if (!__pyx_t_2) {
+ } else {
+ __pyx_t_1 = __pyx_t_2;
+ goto __pyx_L19_bool_binop_done;
+ }
+ __pyx_L20_next_or:;
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":258
+ * t = descr.type_num
+ * if ((descr.byteorder == c'>' and little_endian) or
+ * (descr.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<<
+ * raise ValueError(u"Non-native byte order not supported")
+ * if t == NPY_BYTE: f = "b"
+ */
+ __pyx_t_2 = ((__pyx_v_descr->byteorder == '<') != 0);
+ if (__pyx_t_2) {
+ } else {
+ __pyx_t_1 = __pyx_t_2;
+ goto __pyx_L19_bool_binop_done;
+ }
+ __pyx_t_2 = ((!(__pyx_v_little_endian != 0)) != 0);
+ __pyx_t_1 = __pyx_t_2;
+ __pyx_L19_bool_binop_done:;
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":257
+ * if not hasfields:
+ * t = descr.type_num
+ * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
+ * (descr.byteorder == c'<' and not little_endian)):
+ * raise ValueError(u"Non-native byte order not supported")
+ */
+ if (__pyx_t_1) {
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":259
+ * if ((descr.byteorder == c'>' and little_endian) or
+ * (descr.byteorder == c'<' and not little_endian)):
+ * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<<
+ * if t == NPY_BYTE: f = "b"
+ * elif t == NPY_UBYTE: f = "B"
+ */
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 259, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __PYX_ERR(1, 259, __pyx_L1_error)
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":257
+ * if not hasfields:
+ * t = descr.type_num
+ * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
+ * (descr.byteorder == c'<' and not little_endian)):
+ * raise ValueError(u"Non-native byte order not supported")
+ */
+ }
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":260
+ * (descr.byteorder == c'<' and not little_endian)):
+ * raise ValueError(u"Non-native byte order not supported")
+ * if t == NPY_BYTE: f = "b" # <<<<<<<<<<<<<<
+ * elif t == NPY_UBYTE: f = "B"
+ * elif t == NPY_SHORT: f = "h"
+ */
+ switch (__pyx_v_t) {
+ case NPY_BYTE:
+ __pyx_v_f = ((char *)"b");
+ break;
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":261
+ * raise ValueError(u"Non-native byte order not supported")
+ * if t == NPY_BYTE: f = "b"
+ * elif t == NPY_UBYTE: f = "B" # <<<<<<<<<<<<<<
+ * elif t == NPY_SHORT: f = "h"
+ * elif t == NPY_USHORT: f = "H"
+ */
+ case NPY_UBYTE:
+ __pyx_v_f = ((char *)"B");
+ break;
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":262
+ * if t == NPY_BYTE: f = "b"
+ * elif t == NPY_UBYTE: f = "B"
+ * elif t == NPY_SHORT: f = "h" # <<<<<<<<<<<<<<
+ * elif t == NPY_USHORT: f = "H"
+ * elif t == NPY_INT: f = "i"
+ */
+ case NPY_SHORT:
+ __pyx_v_f = ((char *)"h");
+ break;
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":263
+ * elif t == NPY_UBYTE: f = "B"
+ * elif t == NPY_SHORT: f = "h"
+ * elif t == NPY_USHORT: f = "H" # <<<<<<<<<<<<<<
+ * elif t == NPY_INT: f = "i"
+ * elif t == NPY_UINT: f = "I"
+ */
+ case NPY_USHORT:
+ __pyx_v_f = ((char *)"H");
+ break;
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":264
+ * elif t == NPY_SHORT: f = "h"
+ * elif t == NPY_USHORT: f = "H"
+ * elif t == NPY_INT: f = "i" # <<<<<<<<<<<<<<
+ * elif t == NPY_UINT: f = "I"
+ * elif t == NPY_LONG: f = "l"
+ */
+ case NPY_INT:
+ __pyx_v_f = ((char *)"i");
+ break;
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":265
+ * elif t == NPY_USHORT: f = "H"
+ * elif t == NPY_INT: f = "i"
+ * elif t == NPY_UINT: f = "I" # <<<<<<<<<<<<<<
+ * elif t == NPY_LONG: f = "l"
+ * elif t == NPY_ULONG: f = "L"
+ */
+ case NPY_UINT:
+ __pyx_v_f = ((char *)"I");
+ break;
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":266
+ * elif t == NPY_INT: f = "i"
+ * elif t == NPY_UINT: f = "I"
+ * elif t == NPY_LONG: f = "l" # <<<<<<<<<<<<<<
+ * elif t == NPY_ULONG: f = "L"
+ * elif t == NPY_LONGLONG: f = "q"
+ */
+ case NPY_LONG:
+ __pyx_v_f = ((char *)"l");
+ break;
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":267
+ * elif t == NPY_UINT: f = "I"
+ * elif t == NPY_LONG: f = "l"
+ * elif t == NPY_ULONG: f = "L" # <<<<<<<<<<<<<<
+ * elif t == NPY_LONGLONG: f = "q"
+ * elif t == NPY_ULONGLONG: f = "Q"
+ */
+ case NPY_ULONG:
+ __pyx_v_f = ((char *)"L");
+ break;
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":268
+ * elif t == NPY_LONG: f = "l"
+ * elif t == NPY_ULONG: f = "L"
+ * elif t == NPY_LONGLONG: f = "q" # <<<<<<<<<<<<<<
+ * elif t == NPY_ULONGLONG: f = "Q"
+ * elif t == NPY_FLOAT: f = "f"
+ */
+ case NPY_LONGLONG:
+ __pyx_v_f = ((char *)"q");
+ break;
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":269
+ * elif t == NPY_ULONG: f = "L"
+ * elif t == NPY_LONGLONG: f = "q"
+ * elif t == NPY_ULONGLONG: f = "Q" # <<<<<<<<<<<<<<
+ * elif t == NPY_FLOAT: f = "f"
+ * elif t == NPY_DOUBLE: f = "d"
+ */
+ case NPY_ULONGLONG:
+ __pyx_v_f = ((char *)"Q");
+ break;
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":270
+ * elif t == NPY_LONGLONG: f = "q"
+ * elif t == NPY_ULONGLONG: f = "Q"
+ * elif t == NPY_FLOAT: f = "f" # <<<<<<<<<<<<<<
+ * elif t == NPY_DOUBLE: f = "d"
+ * elif t == NPY_LONGDOUBLE: f = "g"
+ */
+ case NPY_FLOAT:
+ __pyx_v_f = ((char *)"f");
+ break;
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":271
+ * elif t == NPY_ULONGLONG: f = "Q"
+ * elif t == NPY_FLOAT: f = "f"
+ * elif t == NPY_DOUBLE: f = "d" # <<<<<<<<<<<<<<
+ * elif t == NPY_LONGDOUBLE: f = "g"
+ * elif t == NPY_CFLOAT: f = "Zf"
+ */
+ case NPY_DOUBLE:
+ __pyx_v_f = ((char *)"d");
+ break;
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":272
+ * elif t == NPY_FLOAT: f = "f"
+ * elif t == NPY_DOUBLE: f = "d"
+ * elif t == NPY_LONGDOUBLE: f = "g" # <<<<<<<<<<<<<<
+ * elif t == NPY_CFLOAT: f = "Zf"
+ * elif t == NPY_CDOUBLE: f = "Zd"
+ */
+ case NPY_LONGDOUBLE:
+ __pyx_v_f = ((char *)"g");
+ break;
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":273
+ * elif t == NPY_DOUBLE: f = "d"
+ * elif t == NPY_LONGDOUBLE: f = "g"
+ * elif t == NPY_CFLOAT: f = "Zf" # <<<<<<<<<<<<<<
+ * elif t == NPY_CDOUBLE: f = "Zd"
+ * elif t == NPY_CLONGDOUBLE: f = "Zg"
+ */
+ case NPY_CFLOAT:
+ __pyx_v_f = ((char *)"Zf");
+ break;
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":274
+ * elif t == NPY_LONGDOUBLE: f = "g"
+ * elif t == NPY_CFLOAT: f = "Zf"
+ * elif t == NPY_CDOUBLE: f = "Zd" # <<<<<<<<<<<<<<
+ * elif t == NPY_CLONGDOUBLE: f = "Zg"
+ * elif t == NPY_OBJECT: f = "O"
+ */
+ case NPY_CDOUBLE:
+ __pyx_v_f = ((char *)"Zd");
+ break;
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":275
+ * elif t == NPY_CFLOAT: f = "Zf"
+ * elif t == NPY_CDOUBLE: f = "Zd"
+ * elif t == NPY_CLONGDOUBLE: f = "Zg" # <<<<<<<<<<<<<<
+ * elif t == NPY_OBJECT: f = "O"
+ * else:
+ */
+ case NPY_CLONGDOUBLE:
+ __pyx_v_f = ((char *)"Zg");
+ break;
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":276
+ * elif t == NPY_CDOUBLE: f = "Zd"
+ * elif t == NPY_CLONGDOUBLE: f = "Zg"
+ * elif t == NPY_OBJECT: f = "O" # <<<<<<<<<<<<<<
+ * else:
+ * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
+ */
+ case NPY_OBJECT:
+ __pyx_v_f = ((char *)"O");
+ break;
+ default:
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":278
+ * elif t == NPY_OBJECT: f = "O"
+ * else:
+ * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<<
+ * info.format = f
+ * return
+ */
+ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 278, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_6 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 278, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 278, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6);
+ __pyx_t_6 = 0;
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 278, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_Raise(__pyx_t_6, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __PYX_ERR(1, 278, __pyx_L1_error)
+ break;
+ }
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":279
+ * else:
+ * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
+ * info.format = f # <<<<<<<<<<<<<<
+ * return
+ * else:
+ */
+ __pyx_v_info->format = __pyx_v_f;
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":280
+ * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
+ * info.format = f
+ * return # <<<<<<<<<<<<<<
+ * else:
+ * info.format = <char*>stdlib.malloc(_buffer_format_string_len)
+ */
+ __pyx_r = 0;
+ goto __pyx_L0;
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":255
+ * info.obj = self
+ *
+ * if not hasfields: # <<<<<<<<<<<<<<
+ * t = descr.type_num
+ * if ((descr.byteorder == c'>' and little_endian) or
+ */
+ }
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":282
+ * return
+ * else:
+ * info.format = <char*>stdlib.malloc(_buffer_format_string_len) # <<<<<<<<<<<<<<
+ * info.format[0] = c'^' # Native data types, manual alignment
+ * offset = 0
+ */
+ /*else*/ {
+ __pyx_v_info->format = ((char *)malloc(0xFF));
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":283
+ * else:
+ * info.format = <char*>stdlib.malloc(_buffer_format_string_len)
+ * info.format[0] = c'^' # Native data types, manual alignment # <<<<<<<<<<<<<<
+ * offset = 0
+ * f = _util_dtypestring(descr, info.format + 1,
+ */
+ (__pyx_v_info->format[0]) = '^';
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":284
+ * info.format = <char*>stdlib.malloc(_buffer_format_string_len)
+ * info.format[0] = c'^' # Native data types, manual alignment
+ * offset = 0 # <<<<<<<<<<<<<<
+ * f = _util_dtypestring(descr, info.format + 1,
+ * info.format + _buffer_format_string_len,
+ */
+ __pyx_v_offset = 0;
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":285
+ * info.format[0] = c'^' # Native data types, manual alignment
+ * offset = 0
+ * f = _util_dtypestring(descr, info.format + 1, # <<<<<<<<<<<<<<
+ * info.format + _buffer_format_string_len,
+ * &offset)
+ */
+ __pyx_t_7 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 0xFF), (&__pyx_v_offset)); if (unlikely(__pyx_t_7 == NULL)) __PYX_ERR(1, 285, __pyx_L1_error)
+ __pyx_v_f = __pyx_t_7;
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":288
+ * info.format + _buffer_format_string_len,
+ * &offset)
+ * f[0] = c'\0' # Terminate format string # <<<<<<<<<<<<<<
+ *
+ * def __releasebuffer__(ndarray self, Py_buffer* info):
+ */
+ (__pyx_v_f[0]) = '\x00';
+ }
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":197
+ * # experimental exception made for __getbuffer__ and __releasebuffer__
+ * # -- the details of this may change.
+ * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<<
+ * # This implementation of getbuffer is geared towards Cython
+ * # requirements, and does not yet fullfill the PEP.
+ */
+
+ /* function exit code */
+ __pyx_r = 0;
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_AddTraceback("numpy.ndarray.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = -1;
+ if (__pyx_v_info != NULL && __pyx_v_info->obj != NULL) {
+ __Pyx_GOTREF(__pyx_v_info->obj);
+ __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = NULL;
+ }
+ goto __pyx_L2;
+ __pyx_L0:;
+ if (__pyx_v_info != NULL && __pyx_v_info->obj == Py_None) {
+ __Pyx_GOTREF(Py_None);
+ __Pyx_DECREF(Py_None); __pyx_v_info->obj = NULL;
+ }
+ __pyx_L2:;
+ __Pyx_XDECREF((PyObject *)__pyx_v_descr);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":290
+ * f[0] = c'\0' # Terminate format string
+ *
+ * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<<
+ * if PyArray_HASFIELDS(self):
+ * stdlib.free(info.format)
+ */
+
+/* Python wrapper */
+static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info); /*proto*/
+static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info) {
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__releasebuffer__ (wrapper)", 0);
+ __pyx_pf_5numpy_7ndarray_2__releasebuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+}
+
+static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info) {
+ __Pyx_RefNannyDeclarations
+ int __pyx_t_1;
+ __Pyx_RefNannySetupContext("__releasebuffer__", 0);
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":291
+ *
+ * def __releasebuffer__(ndarray self, Py_buffer* info):
+ * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<<
+ * stdlib.free(info.format)
+ * if sizeof(npy_intp) != sizeof(Py_ssize_t):
+ */
+ __pyx_t_1 = (PyArray_HASFIELDS(__pyx_v_self) != 0);
+ if (__pyx_t_1) {
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":292
+ * def __releasebuffer__(ndarray self, Py_buffer* info):
+ * if PyArray_HASFIELDS(self):
+ * stdlib.free(info.format) # <<<<<<<<<<<<<<
+ * if sizeof(npy_intp) != sizeof(Py_ssize_t):
+ * stdlib.free(info.strides)
+ */
+ free(__pyx_v_info->format);
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":291
+ *
+ * def __releasebuffer__(ndarray self, Py_buffer* info):
+ * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<<
+ * stdlib.free(info.format)
+ * if sizeof(npy_intp) != sizeof(Py_ssize_t):
+ */
+ }
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":293
+ * if PyArray_HASFIELDS(self):
+ * stdlib.free(info.format)
+ * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<<
+ * stdlib.free(info.strides)
+ * # info.shape was stored after info.strides in the same block
+ */
+ __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0);
+ if (__pyx_t_1) {
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":294
+ * stdlib.free(info.format)
+ * if sizeof(npy_intp) != sizeof(Py_ssize_t):
+ * stdlib.free(info.strides) # <<<<<<<<<<<<<<
+ * # info.shape was stored after info.strides in the same block
+ *
+ */
+ free(__pyx_v_info->strides);
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":293
+ * if PyArray_HASFIELDS(self):
+ * stdlib.free(info.format)
+ * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<<
+ * stdlib.free(info.strides)
+ * # info.shape was stored after info.strides in the same block
+ */
+ }
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":290
+ * f[0] = c'\0' # Terminate format string
+ *
+ * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<<
+ * if PyArray_HASFIELDS(self):
+ * stdlib.free(info.format)
+ */
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+}
+
+/* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":770
+ * ctypedef npy_cdouble complex_t
+ *
+ * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<<
+ * return PyArray_MultiIterNew(1, <void*>a)
+ *
+ */
+
+static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0);
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":771
+ *
+ * cdef inline object PyArray_MultiIterNew1(a):
+ * return PyArray_MultiIterNew(1, <void*>a) # <<<<<<<<<<<<<<
+ *
+ * cdef inline object PyArray_MultiIterNew2(a, b):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 771, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":770
+ * ctypedef npy_cdouble complex_t
+ *
+ * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<<
+ * return PyArray_MultiIterNew(1, <void*>a)
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("numpy.PyArray_MultiIterNew1", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = 0;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":773
+ * return PyArray_MultiIterNew(1, <void*>a)
+ *
+ * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<<
+ * return PyArray_MultiIterNew(2, <void*>a, <void*>b)
+ *
+ */
+
+static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0);
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":774
+ *
+ * cdef inline object PyArray_MultiIterNew2(a, b):
+ * return PyArray_MultiIterNew(2, <void*>a, <void*>b) # <<<<<<<<<<<<<<
+ *
+ * cdef inline object PyArray_MultiIterNew3(a, b, c):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 774, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":773
+ * return PyArray_MultiIterNew(1, <void*>a)
+ *
+ * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<<
+ * return PyArray_MultiIterNew(2, <void*>a, <void*>b)
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("numpy.PyArray_MultiIterNew2", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = 0;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":776
+ * return PyArray_MultiIterNew(2, <void*>a, <void*>b)
+ *
+ * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<<
+ * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
+ *
+ */
+
+static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0);
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":777
+ *
+ * cdef inline object PyArray_MultiIterNew3(a, b, c):
+ * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c) # <<<<<<<<<<<<<<
+ *
+ * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 777, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":776
+ * return PyArray_MultiIterNew(2, <void*>a, <void*>b)
+ *
+ * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<<
+ * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("numpy.PyArray_MultiIterNew3", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = 0;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":779
+ * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
+ *
+ * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<<
+ * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
+ *
+ */
+
+static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0);
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":780
+ *
+ * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
+ * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d) # <<<<<<<<<<<<<<
+ *
+ * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 780, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":779
+ * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
+ *
+ * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<<
+ * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("numpy.PyArray_MultiIterNew4", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = 0;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":782
+ * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
+ *
+ * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<<
+ * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
+ *
+ */
+
+static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d, PyObject *__pyx_v_e) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0);
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":783
+ *
+ * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
+ * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e) # <<<<<<<<<<<<<<
+ *
+ * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL:
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 783, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":782
+ * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
+ *
+ * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<<
+ * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("numpy.PyArray_MultiIterNew5", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = 0;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":785
+ * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
+ *
+ * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<<
+ * # Recursive utility function used in __getbuffer__ to get format
+ * # string. The new location in the format string is returned.
+ */
+
+static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_descr, char *__pyx_v_f, char *__pyx_v_end, int *__pyx_v_offset) {
+ PyArray_Descr *__pyx_v_child = 0;
+ int __pyx_v_endian_detector;
+ int __pyx_v_little_endian;
+ PyObject *__pyx_v_fields = 0;
+ PyObject *__pyx_v_childname = NULL;
+ PyObject *__pyx_v_new_offset = NULL;
+ PyObject *__pyx_v_t = NULL;
+ char *__pyx_r;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ Py_ssize_t __pyx_t_2;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ int __pyx_t_5;
+ int __pyx_t_6;
+ int __pyx_t_7;
+ long __pyx_t_8;
+ char *__pyx_t_9;
+ __Pyx_RefNannySetupContext("_util_dtypestring", 0);
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":790
+ *
+ * cdef dtype child
+ * cdef int endian_detector = 1 # <<<<<<<<<<<<<<
+ * cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
+ * cdef tuple fields
+ */
+ __pyx_v_endian_detector = 1;
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":791
+ * cdef dtype child
+ * cdef int endian_detector = 1
+ * cdef bint little_endian = ((<char*>&endian_detector)[0] != 0) # <<<<<<<<<<<<<<
+ * cdef tuple fields
+ *
+ */
+ __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0);
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":794
+ * cdef tuple fields
+ *
+ * for childname in descr.names: # <<<<<<<<<<<<<<
+ * fields = descr.fields[childname]
+ * child, new_offset = fields
+ */
+ if (unlikely(__pyx_v_descr->names == Py_None)) {
+ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
+ __PYX_ERR(1, 794, __pyx_L1_error)
+ }
+ __pyx_t_1 = __pyx_v_descr->names; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
+ for (;;) {
+ if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(1, 794, __pyx_L1_error)
+ #else
+ __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 794, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ #endif
+ __Pyx_XDECREF_SET(__pyx_v_childname, __pyx_t_3);
+ __pyx_t_3 = 0;
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":795
+ *
+ * for childname in descr.names:
+ * fields = descr.fields[childname] # <<<<<<<<<<<<<<
+ * child, new_offset = fields
+ *
+ */
+ if (unlikely(__pyx_v_descr->fields == Py_None)) {
+ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
+ __PYX_ERR(1, 795, __pyx_L1_error)
+ }
+ __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 795, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ if (!(likely(PyTuple_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(1, 795, __pyx_L1_error)
+ __Pyx_XDECREF_SET(__pyx_v_fields, ((PyObject*)__pyx_t_3));
+ __pyx_t_3 = 0;
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":796
+ * for childname in descr.names:
+ * fields = descr.fields[childname]
+ * child, new_offset = fields # <<<<<<<<<<<<<<
+ *
+ * if (end - f) - <int>(new_offset - offset[0]) < 15:
+ */
+ if (likely(__pyx_v_fields != Py_None)) {
+ PyObject* sequence = __pyx_v_fields;
+ #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(1, 796, __pyx_L1_error)
+ }
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0);
+ __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_4);
+ #else
+ __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 796, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 796, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ #endif
+ } else {
+ __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(1, 796, __pyx_L1_error)
+ }
+ if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) __PYX_ERR(1, 796, __pyx_L1_error)
+ __Pyx_XDECREF_SET(__pyx_v_child, ((PyArray_Descr *)__pyx_t_3));
+ __pyx_t_3 = 0;
+ __Pyx_XDECREF_SET(__pyx_v_new_offset, __pyx_t_4);
+ __pyx_t_4 = 0;
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":798
+ * child, new_offset = fields
+ *
+ * if (end - f) - <int>(new_offset - offset[0]) < 15: # <<<<<<<<<<<<<<
+ * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
+ *
+ */
+ __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 798, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_3 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 798, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 798, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_6 = ((((__pyx_v_end - __pyx_v_f) - ((int)__pyx_t_5)) < 15) != 0);
+ if (__pyx_t_6) {
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":799
+ *
+ * if (end - f) - <int>(new_offset - offset[0]) < 15:
+ * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<<
+ *
+ * if ((child.byteorder == c'>' and little_endian) or
+ */
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 799, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __PYX_ERR(1, 799, __pyx_L1_error)
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":798
+ * child, new_offset = fields
+ *
+ * if (end - f) - <int>(new_offset - offset[0]) < 15: # <<<<<<<<<<<<<<
+ * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
+ *
+ */
+ }
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":801
+ * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
+ *
+ * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
+ * (child.byteorder == c'<' and not little_endian)):
+ * raise ValueError(u"Non-native byte order not supported")
+ */
+ __pyx_t_7 = ((__pyx_v_child->byteorder == '>') != 0);
+ if (!__pyx_t_7) {
+ goto __pyx_L8_next_or;
+ } else {
+ }
+ __pyx_t_7 = (__pyx_v_little_endian != 0);
+ if (!__pyx_t_7) {
+ } else {
+ __pyx_t_6 = __pyx_t_7;
+ goto __pyx_L7_bool_binop_done;
+ }
+ __pyx_L8_next_or:;
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":802
+ *
+ * if ((child.byteorder == c'>' and little_endian) or
+ * (child.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<<
+ * raise ValueError(u"Non-native byte order not supported")
+ * # One could encode it in the format string and have Cython
+ */
+ __pyx_t_7 = ((__pyx_v_child->byteorder == '<') != 0);
+ if (__pyx_t_7) {
+ } else {
+ __pyx_t_6 = __pyx_t_7;
+ goto __pyx_L7_bool_binop_done;
+ }
+ __pyx_t_7 = ((!(__pyx_v_little_endian != 0)) != 0);
+ __pyx_t_6 = __pyx_t_7;
+ __pyx_L7_bool_binop_done:;
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":801
+ * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
+ *
+ * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
+ * (child.byteorder == c'<' and not little_endian)):
+ * raise ValueError(u"Non-native byte order not supported")
+ */
+ if (__pyx_t_6) {
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":803
+ * if ((child.byteorder == c'>' and little_endian) or
+ * (child.byteorder == c'<' and not little_endian)):
+ * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<<
+ * # One could encode it in the format string and have Cython
+ * # complain instead, BUT: < and > in format strings also imply
+ */
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 803, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __PYX_ERR(1, 803, __pyx_L1_error)
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":801
+ * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
+ *
+ * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
+ * (child.byteorder == c'<' and not little_endian)):
+ * raise ValueError(u"Non-native byte order not supported")
+ */
+ }
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":813
+ *
+ * # Output padding bytes
+ * while offset[0] < new_offset: # <<<<<<<<<<<<<<
+ * f[0] = 120 # "x"; pad byte
+ * f += 1
+ */
+ while (1) {
+ __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 813, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_v_new_offset, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 813, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 813, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ if (!__pyx_t_6) break;
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":814
+ * # Output padding bytes
+ * while offset[0] < new_offset:
+ * f[0] = 120 # "x"; pad byte # <<<<<<<<<<<<<<
+ * f += 1
+ * offset[0] += 1
+ */
+ (__pyx_v_f[0]) = 0x78;
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":815
+ * while offset[0] < new_offset:
+ * f[0] = 120 # "x"; pad byte
+ * f += 1 # <<<<<<<<<<<<<<
+ * offset[0] += 1
+ *
+ */
+ __pyx_v_f = (__pyx_v_f + 1);
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":816
+ * f[0] = 120 # "x"; pad byte
+ * f += 1
+ * offset[0] += 1 # <<<<<<<<<<<<<<
+ *
+ * offset[0] += child.itemsize
+ */
+ __pyx_t_8 = 0;
+ (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + 1);
+ }
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":818
+ * offset[0] += 1
+ *
+ * offset[0] += child.itemsize # <<<<<<<<<<<<<<
+ *
+ * if not PyDataType_HASFIELDS(child):
+ */
+ __pyx_t_8 = 0;
+ (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + __pyx_v_child->elsize);
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":820
+ * offset[0] += child.itemsize
+ *
+ * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<<
+ * t = child.type_num
+ * if end - f < 5:
+ */
+ __pyx_t_6 = ((!(PyDataType_HASFIELDS(__pyx_v_child) != 0)) != 0);
+ if (__pyx_t_6) {
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":821
+ *
+ * if not PyDataType_HASFIELDS(child):
+ * t = child.type_num # <<<<<<<<<<<<<<
+ * if end - f < 5:
+ * raise RuntimeError(u"Format string allocated too short.")
+ */
+ __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_child->type_num); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 821, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_4);
+ __pyx_t_4 = 0;
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":822
+ * if not PyDataType_HASFIELDS(child):
+ * t = child.type_num
+ * if end - f < 5: # <<<<<<<<<<<<<<
+ * raise RuntimeError(u"Format string allocated too short.")
+ *
+ */
+ __pyx_t_6 = (((__pyx_v_end - __pyx_v_f) < 5) != 0);
+ if (__pyx_t_6) {
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":823
+ * t = child.type_num
+ * if end - f < 5:
+ * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<<
+ *
+ * # Until ticket #99 is fixed, use integers to avoid warnings
+ */
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 823, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_Raise(__pyx_t_4, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __PYX_ERR(1, 823, __pyx_L1_error)
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":822
+ * if not PyDataType_HASFIELDS(child):
+ * t = child.type_num
+ * if end - f < 5: # <<<<<<<<<<<<<<
+ * raise RuntimeError(u"Format string allocated too short.")
+ *
+ */
+ }
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":826
+ *
+ * # Until ticket #99 is fixed, use integers to avoid warnings
+ * if t == NPY_BYTE: f[0] = 98 #"b" # <<<<<<<<<<<<<<
+ * elif t == NPY_UBYTE: f[0] = 66 #"B"
+ * elif t == NPY_SHORT: f[0] = 104 #"h"
+ */
+ __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_BYTE); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 826, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 826, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 826, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (__pyx_t_6) {
+ (__pyx_v_f[0]) = 98;
+ goto __pyx_L15;
+ }
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":827
+ * # Until ticket #99 is fixed, use integers to avoid warnings
+ * if t == NPY_BYTE: f[0] = 98 #"b"
+ * elif t == NPY_UBYTE: f[0] = 66 #"B" # <<<<<<<<<<<<<<
+ * elif t == NPY_SHORT: f[0] = 104 #"h"
+ * elif t == NPY_USHORT: f[0] = 72 #"H"
+ */
+ __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UBYTE); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 827, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 827, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 827, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ if (__pyx_t_6) {
+ (__pyx_v_f[0]) = 66;
+ goto __pyx_L15;
+ }
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":828
+ * if t == NPY_BYTE: f[0] = 98 #"b"
+ * elif t == NPY_UBYTE: f[0] = 66 #"B"
+ * elif t == NPY_SHORT: f[0] = 104 #"h" # <<<<<<<<<<<<<<
+ * elif t == NPY_USHORT: f[0] = 72 #"H"
+ * elif t == NPY_INT: f[0] = 105 #"i"
+ */
+ __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_SHORT); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 828, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 828, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 828, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (__pyx_t_6) {
+ (__pyx_v_f[0]) = 0x68;
+ goto __pyx_L15;
+ }
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":829
+ * elif t == NPY_UBYTE: f[0] = 66 #"B"
+ * elif t == NPY_SHORT: f[0] = 104 #"h"
+ * elif t == NPY_USHORT: f[0] = 72 #"H" # <<<<<<<<<<<<<<
+ * elif t == NPY_INT: f[0] = 105 #"i"
+ * elif t == NPY_UINT: f[0] = 73 #"I"
+ */
+ __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_USHORT); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 829, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 829, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 829, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ if (__pyx_t_6) {
+ (__pyx_v_f[0]) = 72;
+ goto __pyx_L15;
+ }
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":830
+ * elif t == NPY_SHORT: f[0] = 104 #"h"
+ * elif t == NPY_USHORT: f[0] = 72 #"H"
+ * elif t == NPY_INT: f[0] = 105 #"i" # <<<<<<<<<<<<<<
+ * elif t == NPY_UINT: f[0] = 73 #"I"
+ * elif t == NPY_LONG: f[0] = 108 #"l"
+ */
+ __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_INT); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 830, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 830, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 830, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (__pyx_t_6) {
+ (__pyx_v_f[0]) = 0x69;
+ goto __pyx_L15;
+ }
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":831
+ * elif t == NPY_USHORT: f[0] = 72 #"H"
+ * elif t == NPY_INT: f[0] = 105 #"i"
+ * elif t == NPY_UINT: f[0] = 73 #"I" # <<<<<<<<<<<<<<
+ * elif t == NPY_LONG: f[0] = 108 #"l"
+ * elif t == NPY_ULONG: f[0] = 76 #"L"
+ */
+ __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UINT); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 831, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 831, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 831, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ if (__pyx_t_6) {
+ (__pyx_v_f[0]) = 73;
+ goto __pyx_L15;
+ }
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":832
+ * elif t == NPY_INT: f[0] = 105 #"i"
+ * elif t == NPY_UINT: f[0] = 73 #"I"
+ * elif t == NPY_LONG: f[0] = 108 #"l" # <<<<<<<<<<<<<<
+ * elif t == NPY_ULONG: f[0] = 76 #"L"
+ * elif t == NPY_LONGLONG: f[0] = 113 #"q"
+ */
+ __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 832, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 832, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 832, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (__pyx_t_6) {
+ (__pyx_v_f[0]) = 0x6C;
+ goto __pyx_L15;
+ }
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":833
+ * elif t == NPY_UINT: f[0] = 73 #"I"
+ * elif t == NPY_LONG: f[0] = 108 #"l"
+ * elif t == NPY_ULONG: f[0] = 76 #"L" # <<<<<<<<<<<<<<
+ * elif t == NPY_LONGLONG: f[0] = 113 #"q"
+ * elif t == NPY_ULONGLONG: f[0] = 81 #"Q"
+ */
+ __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 833, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 833, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 833, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ if (__pyx_t_6) {
+ (__pyx_v_f[0]) = 76;
+ goto __pyx_L15;
+ }
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":834
+ * elif t == NPY_LONG: f[0] = 108 #"l"
+ * elif t == NPY_ULONG: f[0] = 76 #"L"
+ * elif t == NPY_LONGLONG: f[0] = 113 #"q" # <<<<<<<<<<<<<<
+ * elif t == NPY_ULONGLONG: f[0] = 81 #"Q"
+ * elif t == NPY_FLOAT: f[0] = 102 #"f"
+ */
+ __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGLONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 834, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 834, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 834, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (__pyx_t_6) {
+ (__pyx_v_f[0]) = 0x71;
+ goto __pyx_L15;
+ }
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":835
+ * elif t == NPY_ULONG: f[0] = 76 #"L"
+ * elif t == NPY_LONGLONG: f[0] = 113 #"q"
+ * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" # <<<<<<<<<<<<<<
+ * elif t == NPY_FLOAT: f[0] = 102 #"f"
+ * elif t == NPY_DOUBLE: f[0] = 100 #"d"
+ */
+ __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONGLONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 835, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 835, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 835, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ if (__pyx_t_6) {
+ (__pyx_v_f[0]) = 81;
+ goto __pyx_L15;
+ }
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":836
+ * elif t == NPY_LONGLONG: f[0] = 113 #"q"
+ * elif t == NPY_ULONGLONG: f[0] = 81 #"Q"
+ * elif t == NPY_FLOAT: f[0] = 102 #"f" # <<<<<<<<<<<<<<
+ * elif t == NPY_DOUBLE: f[0] = 100 #"d"
+ * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g"
+ */
+ __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_FLOAT); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 836, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 836, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 836, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (__pyx_t_6) {
+ (__pyx_v_f[0]) = 0x66;
+ goto __pyx_L15;
+ }
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":837
+ * elif t == NPY_ULONGLONG: f[0] = 81 #"Q"
+ * elif t == NPY_FLOAT: f[0] = 102 #"f"
+ * elif t == NPY_DOUBLE: f[0] = 100 #"d" # <<<<<<<<<<<<<<
+ * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g"
+ * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf
+ */
+ __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_DOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 837, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 837, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 837, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ if (__pyx_t_6) {
+ (__pyx_v_f[0]) = 0x64;
+ goto __pyx_L15;
+ }
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":838
+ * elif t == NPY_FLOAT: f[0] = 102 #"f"
+ * elif t == NPY_DOUBLE: f[0] = 100 #"d"
+ * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" # <<<<<<<<<<<<<<
+ * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf
+ * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd
+ */
+ __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 838, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 838, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 838, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (__pyx_t_6) {
+ (__pyx_v_f[0]) = 0x67;
+ goto __pyx_L15;
+ }
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":839
+ * elif t == NPY_DOUBLE: f[0] = 100 #"d"
+ * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g"
+ * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf # <<<<<<<<<<<<<<
+ * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd
+ * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
+ */
+ __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CFLOAT); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 839, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 839, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 839, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ if (__pyx_t_6) {
+ (__pyx_v_f[0]) = 90;
+ (__pyx_v_f[1]) = 0x66;
+ __pyx_v_f = (__pyx_v_f + 1);
+ goto __pyx_L15;
+ }
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":840
+ * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g"
+ * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf
+ * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd # <<<<<<<<<<<<<<
+ * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
+ * elif t == NPY_OBJECT: f[0] = 79 #"O"
+ */
+ __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 840, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 840, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 840, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (__pyx_t_6) {
+ (__pyx_v_f[0]) = 90;
+ (__pyx_v_f[1]) = 0x64;
+ __pyx_v_f = (__pyx_v_f + 1);
+ goto __pyx_L15;
+ }
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":841
+ * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf
+ * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd
+ * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg # <<<<<<<<<<<<<<
+ * elif t == NPY_OBJECT: f[0] = 79 #"O"
+ * else:
+ */
+ __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 841, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 841, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 841, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ if (__pyx_t_6) {
+ (__pyx_v_f[0]) = 90;
+ (__pyx_v_f[1]) = 0x67;
+ __pyx_v_f = (__pyx_v_f + 1);
+ goto __pyx_L15;
+ }
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":842
+ * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd
+ * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
+ * elif t == NPY_OBJECT: f[0] = 79 #"O" # <<<<<<<<<<<<<<
+ * else:
+ * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
+ */
+ __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_OBJECT); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 842, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 842, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 842, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (__pyx_t_6) {
+ (__pyx_v_f[0]) = 79;
+ goto __pyx_L15;
+ }
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":844
+ * elif t == NPY_OBJECT: f[0] = 79 #"O"
+ * else:
+ * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<<
+ * f += 1
+ * else:
+ */
+ /*else*/ {
+ __pyx_t_3 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 844, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 844, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
+ __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 844, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __PYX_ERR(1, 844, __pyx_L1_error)
+ }
+ __pyx_L15:;
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":845
+ * else:
+ * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
+ * f += 1 # <<<<<<<<<<<<<<
+ * else:
+ * # Cython ignores struct boundary information ("T{...}"),
+ */
+ __pyx_v_f = (__pyx_v_f + 1);
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":820
+ * offset[0] += child.itemsize
+ *
+ * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<<
+ * t = child.type_num
+ * if end - f < 5:
+ */
+ goto __pyx_L13;
+ }
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":849
+ * # Cython ignores struct boundary information ("T{...}"),
+ * # so don't output it
+ * f = _util_dtypestring(child, f, end, offset) # <<<<<<<<<<<<<<
+ * return f
+ *
+ */
+ /*else*/ {
+ __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_9 == NULL)) __PYX_ERR(1, 849, __pyx_L1_error)
+ __pyx_v_f = __pyx_t_9;
+ }
+ __pyx_L13:;
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":794
+ * cdef tuple fields
+ *
+ * for childname in descr.names: # <<<<<<<<<<<<<<
+ * fields = descr.fields[childname]
+ * child, new_offset = fields
+ */
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":850
+ * # so don't output it
+ * f = _util_dtypestring(child, f, end, offset)
+ * return f # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __pyx_r = __pyx_v_f;
+ goto __pyx_L0;
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":785
+ * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
+ *
+ * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<<
+ * # Recursive utility function used in __getbuffer__ to get format
+ * # string. The new location in the format string is returned.
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_AddTraceback("numpy._util_dtypestring", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF((PyObject *)__pyx_v_child);
+ __Pyx_XDECREF(__pyx_v_fields);
+ __Pyx_XDECREF(__pyx_v_childname);
+ __Pyx_XDECREF(__pyx_v_new_offset);
+ __Pyx_XDECREF(__pyx_v_t);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":966
+ *
+ *
+ * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<<
+ * cdef PyObject* baseptr
+ * if base is None:
+ */
+
+static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) {
+ PyObject *__pyx_v_baseptr;
+ __Pyx_RefNannyDeclarations
+ int __pyx_t_1;
+ int __pyx_t_2;
+ __Pyx_RefNannySetupContext("set_array_base", 0);
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":968
+ * cdef inline void set_array_base(ndarray arr, object base):
+ * cdef PyObject* baseptr
+ * if base is None: # <<<<<<<<<<<<<<
+ * baseptr = NULL
+ * else:
+ */
+ __pyx_t_1 = (__pyx_v_base == Py_None);
+ __pyx_t_2 = (__pyx_t_1 != 0);
+ if (__pyx_t_2) {
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":969
+ * cdef PyObject* baseptr
+ * if base is None:
+ * baseptr = NULL # <<<<<<<<<<<<<<
+ * else:
+ * Py_INCREF(base) # important to do this before decref below!
+ */
+ __pyx_v_baseptr = NULL;
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":968
+ * cdef inline void set_array_base(ndarray arr, object base):
+ * cdef PyObject* baseptr
+ * if base is None: # <<<<<<<<<<<<<<
+ * baseptr = NULL
+ * else:
+ */
+ goto __pyx_L3;
+ }
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":971
+ * baseptr = NULL
+ * else:
+ * Py_INCREF(base) # important to do this before decref below! # <<<<<<<<<<<<<<
+ * baseptr = <PyObject*>base
+ * Py_XDECREF(arr.base)
+ */
+ /*else*/ {
+ Py_INCREF(__pyx_v_base);
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":972
+ * else:
+ * Py_INCREF(base) # important to do this before decref below!
+ * baseptr = <PyObject*>base # <<<<<<<<<<<<<<
+ * Py_XDECREF(arr.base)
+ * arr.base = baseptr
+ */
+ __pyx_v_baseptr = ((PyObject *)__pyx_v_base);
+ }
+ __pyx_L3:;
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":973
+ * Py_INCREF(base) # important to do this before decref below!
+ * baseptr = <PyObject*>base
+ * Py_XDECREF(arr.base) # <<<<<<<<<<<<<<
+ * arr.base = baseptr
+ *
+ */
+ Py_XDECREF(__pyx_v_arr->base);
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":974
+ * baseptr = <PyObject*>base
+ * Py_XDECREF(arr.base)
+ * arr.base = baseptr # <<<<<<<<<<<<<<
+ *
+ * cdef inline object get_array_base(ndarray arr):
+ */
+ __pyx_v_arr->base = __pyx_v_baseptr;
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":966
+ *
+ *
+ * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<<
+ * cdef PyObject* baseptr
+ * if base is None:
+ */
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+}
+
+/* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":976
+ * arr.base = baseptr
+ *
+ * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<<
+ * if arr.base is NULL:
+ * return None
+ */
+
+static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__pyx_v_arr) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ int __pyx_t_1;
+ __Pyx_RefNannySetupContext("get_array_base", 0);
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":977
+ *
+ * cdef inline object get_array_base(ndarray arr):
+ * if arr.base is NULL: # <<<<<<<<<<<<<<
+ * return None
+ * else:
+ */
+ __pyx_t_1 = ((__pyx_v_arr->base == NULL) != 0);
+ if (__pyx_t_1) {
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":978
+ * cdef inline object get_array_base(ndarray arr):
+ * if arr.base is NULL:
+ * return None # <<<<<<<<<<<<<<
+ * else:
+ * return <object>arr.base
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(Py_None);
+ __pyx_r = Py_None;
+ goto __pyx_L0;
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":977
+ *
+ * cdef inline object get_array_base(ndarray arr):
+ * if arr.base is NULL: # <<<<<<<<<<<<<<
+ * return None
+ * else:
+ */
+ }
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":980
+ * return None
+ * else:
+ * return <object>arr.base # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ /*else*/ {
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(((PyObject *)__pyx_v_arr->base));
+ __pyx_r = ((PyObject *)__pyx_v_arr->base);
+ goto __pyx_L0;
+ }
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":976
+ * arr.base = baseptr
+ *
+ * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<<
+ * if arr.base is NULL:
+ * return None
+ */
+
+ /* function exit code */
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":985
+ * # Versions of the import_* functions which are more suitable for
+ * # Cython code.
+ * cdef inline int import_array() except -1: # <<<<<<<<<<<<<<
+ * try:
+ * _import_array()
+ */
+
+static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ int __pyx_t_4;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *__pyx_t_7 = NULL;
+ PyObject *__pyx_t_8 = NULL;
+ __Pyx_RefNannySetupContext("import_array", 0);
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":986
+ * # Cython code.
+ * cdef inline int import_array() except -1:
+ * try: # <<<<<<<<<<<<<<
+ * _import_array()
+ * except Exception:
+ */
+ {
+ __Pyx_PyThreadState_declare
+ __Pyx_PyThreadState_assign
+ __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
+ __Pyx_XGOTREF(__pyx_t_1);
+ __Pyx_XGOTREF(__pyx_t_2);
+ __Pyx_XGOTREF(__pyx_t_3);
+ /*try:*/ {
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":987
+ * cdef inline int import_array() except -1:
+ * try:
+ * _import_array() # <<<<<<<<<<<<<<
+ * except Exception:
+ * raise ImportError("numpy.core.multiarray failed to import")
+ */
+ __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(1, 987, __pyx_L3_error)
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":986
+ * # Cython code.
+ * cdef inline int import_array() except -1:
+ * try: # <<<<<<<<<<<<<<
+ * _import_array()
+ * except Exception:
+ */
+ }
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ goto __pyx_L10_try_end;
+ __pyx_L3_error:;
+ __Pyx_PyThreadState_assign
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":988
+ * try:
+ * _import_array()
+ * except Exception: # <<<<<<<<<<<<<<
+ * raise ImportError("numpy.core.multiarray failed to import")
+ *
+ */
+ __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
+ if (__pyx_t_4) {
+ __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 988, __pyx_L5_except_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_GOTREF(__pyx_t_7);
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":989
+ * _import_array()
+ * except Exception:
+ * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<<
+ *
+ * cdef inline int import_umath() except -1:
+ */
+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__21, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 989, __pyx_L5_except_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_Raise(__pyx_t_8, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __PYX_ERR(1, 989, __pyx_L5_except_error)
+ }
+ goto __pyx_L5_except_error;
+ __pyx_L5_except_error:;
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":986
+ * # Cython code.
+ * cdef inline int import_array() except -1:
+ * try: # <<<<<<<<<<<<<<
+ * _import_array()
+ * except Exception:
+ */
+ __Pyx_PyThreadState_assign
+ __Pyx_XGIVEREF(__pyx_t_1);
+ __Pyx_XGIVEREF(__pyx_t_2);
+ __Pyx_XGIVEREF(__pyx_t_3);
+ __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
+ goto __pyx_L1_error;
+ __pyx_L10_try_end:;
+ }
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":985
+ * # Versions of the import_* functions which are more suitable for
+ * # Cython code.
+ * cdef inline int import_array() except -1: # <<<<<<<<<<<<<<
+ * try:
+ * _import_array()
+ */
+
+ /* function exit code */
+ __pyx_r = 0;
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_XDECREF(__pyx_t_8);
+ __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = -1;
+ __pyx_L0:;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":991
+ * raise ImportError("numpy.core.multiarray failed to import")
+ *
+ * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<<
+ * try:
+ * _import_umath()
+ */
+
+static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ int __pyx_t_4;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *__pyx_t_7 = NULL;
+ PyObject *__pyx_t_8 = NULL;
+ __Pyx_RefNannySetupContext("import_umath", 0);
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":992
+ *
+ * cdef inline int import_umath() except -1:
+ * try: # <<<<<<<<<<<<<<
+ * _import_umath()
+ * except Exception:
+ */
+ {
+ __Pyx_PyThreadState_declare
+ __Pyx_PyThreadState_assign
+ __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
+ __Pyx_XGOTREF(__pyx_t_1);
+ __Pyx_XGOTREF(__pyx_t_2);
+ __Pyx_XGOTREF(__pyx_t_3);
+ /*try:*/ {
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":993
+ * cdef inline int import_umath() except -1:
+ * try:
+ * _import_umath() # <<<<<<<<<<<<<<
+ * except Exception:
+ * raise ImportError("numpy.core.umath failed to import")
+ */
+ __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(1, 993, __pyx_L3_error)
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":992
+ *
+ * cdef inline int import_umath() except -1:
+ * try: # <<<<<<<<<<<<<<
+ * _import_umath()
+ * except Exception:
+ */
+ }
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ goto __pyx_L10_try_end;
+ __pyx_L3_error:;
+ __Pyx_PyThreadState_assign
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":994
+ * try:
+ * _import_umath()
+ * except Exception: # <<<<<<<<<<<<<<
+ * raise ImportError("numpy.core.umath failed to import")
+ *
+ */
+ __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
+ if (__pyx_t_4) {
+ __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 994, __pyx_L5_except_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_GOTREF(__pyx_t_7);
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":995
+ * _import_umath()
+ * except Exception:
+ * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<<
+ *
+ * cdef inline int import_ufunc() except -1:
+ */
+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 995, __pyx_L5_except_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_Raise(__pyx_t_8, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __PYX_ERR(1, 995, __pyx_L5_except_error)
+ }
+ goto __pyx_L5_except_error;
+ __pyx_L5_except_error:;
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":992
+ *
+ * cdef inline int import_umath() except -1:
+ * try: # <<<<<<<<<<<<<<
+ * _import_umath()
+ * except Exception:
+ */
+ __Pyx_PyThreadState_assign
+ __Pyx_XGIVEREF(__pyx_t_1);
+ __Pyx_XGIVEREF(__pyx_t_2);
+ __Pyx_XGIVEREF(__pyx_t_3);
+ __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
+ goto __pyx_L1_error;
+ __pyx_L10_try_end:;
+ }
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":991
+ * raise ImportError("numpy.core.multiarray failed to import")
+ *
+ * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<<
+ * try:
+ * _import_umath()
+ */
+
+ /* function exit code */
+ __pyx_r = 0;
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_XDECREF(__pyx_t_8);
+ __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = -1;
+ __pyx_L0:;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":997
+ * raise ImportError("numpy.core.umath failed to import")
+ *
+ * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<<
+ * try:
+ * _import_umath()
+ */
+
+static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) {
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ int __pyx_t_4;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *__pyx_t_7 = NULL;
+ PyObject *__pyx_t_8 = NULL;
+ __Pyx_RefNannySetupContext("import_ufunc", 0);
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":998
+ *
+ * cdef inline int import_ufunc() except -1:
+ * try: # <<<<<<<<<<<<<<
+ * _import_umath()
+ * except Exception:
+ */
+ {
+ __Pyx_PyThreadState_declare
+ __Pyx_PyThreadState_assign
+ __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
+ __Pyx_XGOTREF(__pyx_t_1);
+ __Pyx_XGOTREF(__pyx_t_2);
+ __Pyx_XGOTREF(__pyx_t_3);
+ /*try:*/ {
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":999
+ * cdef inline int import_ufunc() except -1:
+ * try:
+ * _import_umath() # <<<<<<<<<<<<<<
+ * except Exception:
+ * raise ImportError("numpy.core.umath failed to import")
+ */
+ __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(1, 999, __pyx_L3_error)
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":998
+ *
+ * cdef inline int import_ufunc() except -1:
+ * try: # <<<<<<<<<<<<<<
+ * _import_umath()
+ * except Exception:
+ */
+ }
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ goto __pyx_L10_try_end;
+ __pyx_L3_error:;
+ __Pyx_PyThreadState_assign
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":1000
+ * try:
+ * _import_umath()
+ * except Exception: # <<<<<<<<<<<<<<
+ * raise ImportError("numpy.core.umath failed to import")
+ */
+ __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
+ if (__pyx_t_4) {
+ __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 1000, __pyx_L5_except_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_GOTREF(__pyx_t_7);
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":1001
+ * _import_umath()
+ * except Exception:
+ * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<<
+ */
+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__23, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1001, __pyx_L5_except_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_Raise(__pyx_t_8, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __PYX_ERR(1, 1001, __pyx_L5_except_error)
+ }
+ goto __pyx_L5_except_error;
+ __pyx_L5_except_error:;
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":998
+ *
+ * cdef inline int import_ufunc() except -1:
+ * try: # <<<<<<<<<<<<<<
+ * _import_umath()
+ * except Exception:
+ */
+ __Pyx_PyThreadState_assign
+ __Pyx_XGIVEREF(__pyx_t_1);
+ __Pyx_XGIVEREF(__pyx_t_2);
+ __Pyx_XGIVEREF(__pyx_t_3);
+ __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
+ goto __pyx_L1_error;
+ __pyx_L10_try_end:;
+ }
+
+ /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":997
+ * raise ImportError("numpy.core.umath failed to import")
+ *
+ * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<<
+ * try:
+ * _import_umath()
+ */
+
+ /* function exit code */
+ __pyx_r = 0;
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_XDECREF(__pyx_t_8);
+ __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = -1;
+ __pyx_L0:;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "View.MemoryView":120
+ * cdef bint dtype_is_object
+ *
+ * def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None, # <<<<<<<<<<<<<<
+ * mode="c", bint allocate_buffer=True):
+ *
+ */
+
+/* Python wrapper */
+static int __pyx_array___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static int __pyx_array___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_shape = 0;
+ Py_ssize_t __pyx_v_itemsize;
+ PyObject *__pyx_v_format = 0;
+ PyObject *__pyx_v_mode = 0;
+ int __pyx_v_allocate_buffer;
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_shape,&__pyx_n_s_itemsize,&__pyx_n_s_format,&__pyx_n_s_mode,&__pyx_n_s_allocate_buffer,0};
+ PyObject* values[5] = {0,0,0,0,0};
+ values[3] = ((PyObject *)__pyx_n_s_c);
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_shape)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_itemsize)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, 1); __PYX_ERR(2, 120, __pyx_L3_error)
+ }
+ case 2:
+ if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_format)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, 2); __PYX_ERR(2, 120, __pyx_L3_error)
+ }
+ case 3:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mode);
+ if (value) { values[3] = value; kw_args--; }
+ }
+ case 4:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_allocate_buffer);
+ if (value) { values[4] = value; kw_args--; }
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(2, 120, __pyx_L3_error)
+ }
+ } else {
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+ case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ }
+ __pyx_v_shape = ((PyObject*)values[0]);
+ __pyx_v_itemsize = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_itemsize == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(2, 120, __pyx_L3_error)
+ __pyx_v_format = values[2];
+ __pyx_v_mode = values[3];
+ if (values[4]) {
+ __pyx_v_allocate_buffer = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_allocate_buffer == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 121, __pyx_L3_error)
+ } else {
+
+ /* "View.MemoryView":121
+ *
+ * def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None,
+ * mode="c", bint allocate_buffer=True): # <<<<<<<<<<<<<<
+ *
+ * cdef int idx
+ */
+ __pyx_v_allocate_buffer = ((int)1);
+ }
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 120, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("View.MemoryView.array.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return -1;
+ __pyx_L4_argument_unpacking_done:;
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_shape), (&PyTuple_Type), 1, "shape", 1))) __PYX_ERR(2, 120, __pyx_L1_error)
+ if (unlikely(((PyObject *)__pyx_v_format) == Py_None)) {
+ PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "format"); __PYX_ERR(2, 120, __pyx_L1_error)
+ }
+ __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(((struct __pyx_array_obj *)__pyx_v_self), __pyx_v_shape, __pyx_v_itemsize, __pyx_v_format, __pyx_v_mode, __pyx_v_allocate_buffer);
+
+ /* "View.MemoryView":120
+ * cdef bint dtype_is_object
+ *
+ * def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None, # <<<<<<<<<<<<<<
+ * mode="c", bint allocate_buffer=True):
+ *
+ */
+
+ /* function exit code */
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __pyx_r = -1;
+ __pyx_L0:;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+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) {
+ int __pyx_v_idx;
+ Py_ssize_t __pyx_v_i;
+ Py_ssize_t __pyx_v_dim;
+ PyObject **__pyx_v_p;
+ char __pyx_v_order;
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ Py_ssize_t __pyx_t_1;
+ int __pyx_t_2;
+ PyObject *__pyx_t_3 = NULL;
+ int __pyx_t_4;
+ PyObject *__pyx_t_5 = NULL;
+ char *__pyx_t_6;
+ int __pyx_t_7;
+ Py_ssize_t __pyx_t_8;
+ PyObject *__pyx_t_9 = NULL;
+ PyObject *__pyx_t_10 = NULL;
+ __Pyx_RefNannySetupContext("__cinit__", 0);
+ __Pyx_INCREF(__pyx_v_format);
+
+ /* "View.MemoryView":127
+ * cdef PyObject **p
+ *
+ * self.ndim = <int> len(shape) # <<<<<<<<<<<<<<
+ * self.itemsize = itemsize
+ *
+ */
+ if (unlikely(__pyx_v_shape == Py_None)) {
+ PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
+ __PYX_ERR(2, 127, __pyx_L1_error)
+ }
+ __pyx_t_1 = PyTuple_GET_SIZE(__pyx_v_shape); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(2, 127, __pyx_L1_error)
+ __pyx_v_self->ndim = ((int)__pyx_t_1);
+
+ /* "View.MemoryView":128
+ *
+ * self.ndim = <int> len(shape)
+ * self.itemsize = itemsize # <<<<<<<<<<<<<<
+ *
+ * if not self.ndim:
+ */
+ __pyx_v_self->itemsize = __pyx_v_itemsize;
+
+ /* "View.MemoryView":130
+ * self.itemsize = itemsize
+ *
+ * if not self.ndim: # <<<<<<<<<<<<<<
+ * raise ValueError("Empty shape tuple for cython.array")
+ *
+ */
+ __pyx_t_2 = ((!(__pyx_v_self->ndim != 0)) != 0);
+ if (__pyx_t_2) {
+
+ /* "View.MemoryView":131
+ *
+ * if not self.ndim:
+ * raise ValueError("Empty shape tuple for cython.array") # <<<<<<<<<<<<<<
+ *
+ * if itemsize <= 0:
+ */
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__24, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 131, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __PYX_ERR(2, 131, __pyx_L1_error)
+
+ /* "View.MemoryView":130
+ * self.itemsize = itemsize
+ *
+ * if not self.ndim: # <<<<<<<<<<<<<<
+ * raise ValueError("Empty shape tuple for cython.array")
+ *
+ */
+ }
+
+ /* "View.MemoryView":133
+ * raise ValueError("Empty shape tuple for cython.array")
+ *
+ * if itemsize <= 0: # <<<<<<<<<<<<<<
+ * raise ValueError("itemsize <= 0 for cython.array")
+ *
+ */
+ __pyx_t_2 = ((__pyx_v_itemsize <= 0) != 0);
+ if (__pyx_t_2) {
+
+ /* "View.MemoryView":134
+ *
+ * if itemsize <= 0:
+ * raise ValueError("itemsize <= 0 for cython.array") # <<<<<<<<<<<<<<
+ *
+ * if not isinstance(format, bytes):
+ */
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__25, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 134, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __PYX_ERR(2, 134, __pyx_L1_error)
+
+ /* "View.MemoryView":133
+ * raise ValueError("Empty shape tuple for cython.array")
+ *
+ * if itemsize <= 0: # <<<<<<<<<<<<<<
+ * raise ValueError("itemsize <= 0 for cython.array")
+ *
+ */
+ }
+
+ /* "View.MemoryView":136
+ * raise ValueError("itemsize <= 0 for cython.array")
+ *
+ * if not isinstance(format, bytes): # <<<<<<<<<<<<<<
+ * format = format.encode('ASCII')
+ * self._format = format # keep a reference to the byte string
+ */
+ __pyx_t_2 = PyBytes_Check(__pyx_v_format);
+ __pyx_t_4 = ((!(__pyx_t_2 != 0)) != 0);
+ if (__pyx_t_4) {
+
+ /* "View.MemoryView":137
+ *
+ * if not isinstance(format, bytes):
+ * format = format.encode('ASCII') # <<<<<<<<<<<<<<
+ * self._format = format # keep a reference to the byte string
+ * self.format = self._format
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_format, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 137, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__26, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 137, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF_SET(__pyx_v_format, __pyx_t_5);
+ __pyx_t_5 = 0;
+<