summaryrefslogtreecommitdiff
path: root/silx/math/chistogramnd_lut.c
diff options
context:
space:
mode:
Diffstat (limited to 'silx/math/chistogramnd_lut.c')
-rw-r--r--silx/math/chistogramnd_lut.c19582
1 files changed, 11460 insertions, 8122 deletions
diff --git a/silx/math/chistogramnd_lut.c b/silx/math/chistogramnd_lut.c
index 868310f..edf413b 100644
--- a/silx/math/chistogramnd_lut.c
+++ b/silx/math/chistogramnd_lut.c
@@ -1,4 +1,4 @@
-/* Generated by Cython 0.25.2 */
+/* Generated by Cython 0.28.3 */
/* BEGIN: Cython Metadata
{
@@ -11,7 +11,11 @@
"silx/math/histogramnd/include",
"/usr/lib/python2.7/dist-packages/numpy/core/include"
],
- "language": "c"
+ "language": "c",
+ "name": "silx.math.chistogramnd_lut",
+ "sources": [
+ "silx/math/chistogramnd_lut.pyx"
+ ]
},
"module_name": "silx.math.chistogramnd_lut"
}
@@ -21,10 +25,11 @@ END: Cython Metadata */
#include "Python.h"
#ifndef Py_PYTHON_H
#error Python headers needed to compile C extensions, please install development version of Python.
-#elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03020000)
- #error Cython requires Python 2.6+ or Python 3.2+.
+#elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
+ #error Cython requires Python 2.6+ or Python 3.3+.
#else
-#define CYTHON_ABI "0_25_2"
+#define CYTHON_ABI "0_28_3"
+#define CYTHON_FUTURE_DIVISION 0
#include <stddef.h>
#ifndef offsetof
#define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
@@ -46,8 +51,9 @@ END: Cython Metadata */
#ifndef DL_EXPORT
#define DL_EXPORT(t) t
#endif
+#define __PYX_COMMA ,
#ifndef HAVE_LONG_LONG
- #if PY_VERSION_HEX >= 0x03030000 || (PY_MAJOR_VERSION == 2 && PY_VERSION_HEX >= 0x02070000)
+ #if PY_VERSION_HEX >= 0x02070000
#define HAVE_LONG_LONG
#endif
#endif
@@ -63,8 +69,14 @@ END: Cython Metadata */
#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_PYTYPE_LOOKUP
+ #define CYTHON_USE_PYTYPE_LOOKUP 0
+ #if PY_VERSION_HEX < 0x03050000
+ #undef CYTHON_USE_ASYNC_SLOTS
+ #define CYTHON_USE_ASYNC_SLOTS 0
+ #elif !defined(CYTHON_USE_ASYNC_SLOTS)
+ #define CYTHON_USE_ASYNC_SLOTS 1
+ #endif
#undef CYTHON_USE_PYLIST_INTERNALS
#define CYTHON_USE_PYLIST_INTERNALS 0
#undef CYTHON_USE_UNICODE_INTERNALS
@@ -83,6 +95,10 @@ END: Cython Metadata */
#define CYTHON_FAST_THREAD_STATE 0
#undef CYTHON_FAST_PYCALL
#define CYTHON_FAST_PYCALL 0
+ #undef CYTHON_PEP489_MULTI_PHASE_INIT
+ #define CYTHON_PEP489_MULTI_PHASE_INIT 0
+ #undef CYTHON_USE_TP_FINALIZE
+ #define CYTHON_USE_TP_FINALIZE 0
#elif defined(PYSTON_VERSION)
#define CYTHON_COMPILING_IN_PYPY 0
#define CYTHON_COMPILING_IN_PYSTON 1
@@ -90,6 +106,8 @@ END: Cython Metadata */
#ifndef CYTHON_USE_TYPE_SLOTS
#define CYTHON_USE_TYPE_SLOTS 1
#endif
+ #undef CYTHON_USE_PYTYPE_LOOKUP
+ #define CYTHON_USE_PYTYPE_LOOKUP 0
#undef CYTHON_USE_ASYNC_SLOTS
#define CYTHON_USE_ASYNC_SLOTS 0
#undef CYTHON_USE_PYLIST_INTERNALS
@@ -114,6 +132,10 @@ END: Cython Metadata */
#define CYTHON_FAST_THREAD_STATE 0
#undef CYTHON_FAST_PYCALL
#define CYTHON_FAST_PYCALL 0
+ #undef CYTHON_PEP489_MULTI_PHASE_INIT
+ #define CYTHON_PEP489_MULTI_PHASE_INIT 0
+ #undef CYTHON_USE_TP_FINALIZE
+ #define CYTHON_USE_TP_FINALIZE 0
#else
#define CYTHON_COMPILING_IN_PYPY 0
#define CYTHON_COMPILING_IN_PYSTON 0
@@ -121,6 +143,12 @@ END: Cython Metadata */
#ifndef CYTHON_USE_TYPE_SLOTS
#define CYTHON_USE_TYPE_SLOTS 1
#endif
+ #if PY_VERSION_HEX < 0x02070000
+ #undef CYTHON_USE_PYTYPE_LOOKUP
+ #define CYTHON_USE_PYTYPE_LOOKUP 0
+ #elif !defined(CYTHON_USE_PYTYPE_LOOKUP)
+ #define CYTHON_USE_PYTYPE_LOOKUP 1
+ #endif
#if PY_MAJOR_VERSION < 3
#undef CYTHON_USE_ASYNC_SLOTS
#define CYTHON_USE_ASYNC_SLOTS 0
@@ -160,6 +188,12 @@ END: Cython Metadata */
#ifndef CYTHON_FAST_PYCALL
#define CYTHON_FAST_PYCALL 1
#endif
+ #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
+ #define CYTHON_PEP489_MULTI_PHASE_INIT (0 && PY_VERSION_HEX >= 0x03050000)
+ #endif
+ #ifndef CYTHON_USE_TP_FINALIZE
+ #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1)
+ #endif
#endif
#if !defined(CYTHON_FAST_PYCCALL)
#define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
@@ -170,6 +204,103 @@ END: Cython Metadata */
#undef BASE
#undef MASK
#endif
+#ifndef __has_attribute
+ #define __has_attribute(x) 0
+#endif
+#ifndef __has_cpp_attribute
+ #define __has_cpp_attribute(x) 0
+#endif
+#ifndef CYTHON_RESTRICT
+ #if defined(__GNUC__)
+ #define CYTHON_RESTRICT __restrict__
+ #elif defined(_MSC_VER) && _MSC_VER >= 1400
+ #define CYTHON_RESTRICT __restrict
+ #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+ #define CYTHON_RESTRICT restrict
+ #else
+ #define CYTHON_RESTRICT
+ #endif
+#endif
+#ifndef CYTHON_UNUSED
+# if defined(__GNUC__)
+# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
+# define CYTHON_UNUSED __attribute__ ((__unused__))
+# else
+# define CYTHON_UNUSED
+# endif
+# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
+# define CYTHON_UNUSED __attribute__ ((__unused__))
+# else
+# define CYTHON_UNUSED
+# endif
+#endif
+#ifndef CYTHON_MAYBE_UNUSED_VAR
+# if defined(__cplusplus)
+ template<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)
+#ifdef _MSC_VER
+ #ifndef _MSC_STDINT_H_
+ #if _MSC_VER < 1300
+ typedef unsigned char uint8_t;
+ typedef unsigned int uint32_t;
+ #else
+ typedef unsigned __int8 uint8_t;
+ typedef unsigned __int32 uint32_t;
+ #endif
+ #endif
+#else
+ #include <stdint.h>
+#endif
+#ifndef CYTHON_FALLTHROUGH
+ #if defined(__cplusplus) && __cplusplus >= 201103L
+ #if __has_cpp_attribute(fallthrough)
+ #define CYTHON_FALLTHROUGH [[fallthrough]]
+ #elif __has_cpp_attribute(clang::fallthrough)
+ #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
+ #elif __has_cpp_attribute(gnu::fallthrough)
+ #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
+ #endif
+ #endif
+ #ifndef CYTHON_FALLTHROUGH
+ #if __has_attribute(fallthrough)
+ #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
+ #else
+ #define CYTHON_FALLTHROUGH
+ #endif
+ #endif
+ #if defined(__clang__ ) && defined(__apple_build_version__)
+ #if __apple_build_version__ < 7000000
+ #undef CYTHON_FALLTHROUGH
+ #define CYTHON_FALLTHROUGH
+ #endif
+ #endif
+#endif
+
+#ifndef CYTHON_INLINE
+ #if defined(__clang__)
+ #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
+ #elif defined(__GNUC__)
+ #define CYTHON_INLINE __inline__
+ #elif defined(_MSC_VER)
+ #define CYTHON_INLINE __inline
+ #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+ #define CYTHON_INLINE inline
+ #else
+ #define CYTHON_INLINE
+ #endif
+#endif
+
#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
#define Py_OptimizeFlag 0
#endif
@@ -198,19 +329,91 @@ END: Cython Metadata */
#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);
+#if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)
+ #ifndef METH_FASTCALL
+ #define METH_FASTCALL 0x80
+ #endif
+ typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
+ typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
+ Py_ssize_t nargs, PyObject *kwnames);
#else
#define __Pyx_PyCFunctionFast _PyCFunctionFast
+ #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
#endif
#if CYTHON_FAST_PYCCALL
#define __Pyx_PyFastCFunction_Check(func)\
- ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST)))))
+ ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS)))))
#else
#define __Pyx_PyFastCFunction_Check(func) 0
#endif
+#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
+ #define PyObject_Malloc(s) PyMem_Malloc(s)
+ #define PyObject_Free(p) PyMem_Free(p)
+ #define PyObject_Realloc(p) PyMem_Realloc(p)
+#endif
+#if CYTHON_COMPILING_IN_PYSTON
+ #define __Pyx_PyCode_HasFreeVars(co) PyCode_HasFreeVars(co)
+ #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
+#else
+ #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
+ #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno)
+#endif
+#if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000
+ #define __Pyx_PyThreadState_Current PyThreadState_GET()
+#elif PY_VERSION_HEX >= 0x03060000
+ #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
+#elif PY_VERSION_HEX >= 0x03000000
+ #define __Pyx_PyThreadState_Current PyThreadState_GET()
+#else
+ #define __Pyx_PyThreadState_Current _PyThreadState_Current
+#endif
+#if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT)
+#include "pythread.h"
+#define Py_tss_NEEDS_INIT 0
+typedef int Py_tss_t;
+static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) {
+ *key = PyThread_create_key();
+ return 0; // PyThread_create_key reports success always
+}
+static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) {
+ Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t));
+ *key = Py_tss_NEEDS_INIT;
+ return key;
+}
+static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) {
+ PyObject_Free(key);
+}
+static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) {
+ return *key != Py_tss_NEEDS_INIT;
+}
+static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) {
+ PyThread_delete_key(*key);
+ *key = Py_tss_NEEDS_INIT;
+}
+static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) {
+ return PyThread_set_key_value(*key, value);
+}
+static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
+ return PyThread_get_key_value(*key);
+}
+#endif // TSS (Thread Specific Storage) API
+#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
+#define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
+#else
+#define __Pyx_PyDict_NewPresized(n) PyDict_New()
+#endif
+#if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
+ #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y)
+ #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y)
+#else
+ #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y)
+ #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y)
+#endif
+#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && CYTHON_USE_UNICODE_INTERNALS
+#define __Pyx_PyDict_GetItemStr(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
+#else
+#define __Pyx_PyDict_GetItemStr(dict, name) PyDict_GetItem(dict, name)
+#endif
#if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
#define CYTHON_PEP393_ENABLED 1
#define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\
@@ -255,18 +458,6 @@ END: Cython Metadata */
#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
@@ -283,6 +474,7 @@ END: Cython Metadata */
#define PyString_Type PyUnicode_Type
#define PyString_Check PyUnicode_Check
#define PyString_CheckExact PyUnicode_CheckExact
+ #define PyObject_Unicode PyObject_Str
#endif
#if PY_MAJOR_VERSION >= 3
#define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
@@ -294,8 +486,11 @@ END: Cython Metadata */
#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 CYTHON_ASSUME_SAFE_MACROS
+ #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq)
+#else
+ #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq)
+#endif
#if PY_MAJOR_VERSION >= 3
#define PyIntObject PyLongObject
#define PyInt_Type PyLong_Type
@@ -330,7 +525,7 @@ END: Cython Metadata */
#define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t
#endif
#if PY_MAJOR_VERSION >= 3
- #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func))
+ #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : (Py_INCREF(func), func))
#else
#define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
#endif
@@ -339,68 +534,17 @@ END: Cython Metadata */
#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
+#ifndef __Pyx_PyAsyncMethodsStruct
+ typedef struct {
+ unaryfunc am_await;
+ unaryfunc am_aiter;
+ unaryfunc am_anext;
+ } __Pyx_PyAsyncMethodsStruct;
#endif
#if defined(WIN32) || defined(MS_WINDOWS)
@@ -428,14 +572,6 @@ static CYTHON_INLINE float __PYX_NAN() {
__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"
@@ -446,18 +582,19 @@ static CYTHON_INLINE float __PYX_NAN() {
#define __PYX_HAVE__silx__math__chistogramnd_lut
#define __PYX_HAVE_API__silx__math__chistogramnd_lut
+/* Early includes */
#include <string.h>
#include <stdio.h>
-#include <stdlib.h>
#include "numpy/arrayobject.h"
#include "numpy/ufuncobject.h"
#include "pythread.h"
+#include <stdlib.h>
#include "pystate.h"
#ifdef _OPENMP
#include <omp.h>
#endif /* _OPENMP */
-#ifdef PYREX_WITHOUT_ASSERTIONS
+#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
#define CYTHON_WITHOUT_ASSERTIONS
#endif
@@ -488,8 +625,8 @@ typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* enc
#define __Pyx_sst_abs(value) abs(value)
#elif SIZEOF_LONG >= SIZEOF_SIZE_T
#define __Pyx_sst_abs(value) labs(value)
-#elif defined (_MSC_VER) && defined (_M_X64)
- #define __Pyx_sst_abs(value) _abs64(value)
+#elif defined (_MSC_VER)
+ #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
#define __Pyx_sst_abs(value) llabs(value)
#elif defined (__GNUC__)
@@ -497,8 +634,8 @@ typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* enc
#else
#define __Pyx_sst_abs(value) ((value<0) ? -value : value)
#endif
-static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject*);
-static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
+static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
+static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
#define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
#define __Pyx_PyBytes_FromString PyBytes_FromString
@@ -511,31 +648,37 @@ static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
#define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString
#define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
#endif
-#define __Pyx_PyObject_AsSString(s) ((signed char*) __Pyx_PyObject_AsString(s))
-#define __Pyx_PyObject_AsUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s))
+#define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s))
+#define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s))
+#define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s))
+#define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s))
+#define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s))
+#define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s))
+#define __Pyx_PyObject_AsWritableString(s) ((char*) __Pyx_PyObject_AsString(s))
+#define __Pyx_PyObject_AsWritableSString(s) ((signed char*) __Pyx_PyObject_AsString(s))
+#define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s))
+#define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s))
+#define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s)
#define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s)
#define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s)
#define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s)
#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
-#if PY_MAJOR_VERSION < 3
-static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u)
-{
+static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) {
const Py_UNICODE *u_end = u;
while (*u_end++) ;
return (size_t)(u_end - u - 1);
}
-#else
-#define __Pyx_Py_UNICODE_strlen Py_UNICODE_strlen
-#endif
#define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
#define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
#define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode
#define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
#define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
-#define __Pyx_PyBool_FromLong(b) ((b) ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False))
+static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
+#define __Pyx_PySequence_Tuple(obj)\
+ (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
#if CYTHON_ASSUME_SAFE_MACROS
@@ -634,10 +777,12 @@ bad:
#define likely(x) (x)
#define unlikely(x) (x)
#endif /* __GNUC__ */
+static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }
-static PyObject *__pyx_m;
+static PyObject *__pyx_m = NULL;
static PyObject *__pyx_d;
static PyObject *__pyx_b;
+static PyObject *__pyx_cython_runtime = NULL;
static PyObject *__pyx_empty_tuple;
static PyObject *__pyx_empty_bytes;
static PyObject *__pyx_empty_unicode;
@@ -675,6 +820,13 @@ static const char *__pyx_f[] = {
"stringsource",
"type.pxd",
};
+/* NoFastGil.proto */
+#define __Pyx_PyGILState_Ensure PyGILState_Ensure
+#define __Pyx_PyGILState_Release PyGILState_Release
+#define __Pyx_FastGIL_Remember()
+#define __Pyx_FastGIL_Forget()
+#define __Pyx_FastGilFuncInit()
+
/* MemviewSliceStruct.proto */
struct __pyx_memoryview_obj;
typedef struct {
@@ -684,42 +836,7 @@ typedef struct {
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;
+#define __Pyx_MemoryView_Len(m) (m.shape[0])
/* Atomics.proto */
#include <pythread.h>
@@ -770,8 +887,49 @@ typedef volatile __pyx_atomic_int_type __pyx_atomic_int;
__pyx_sub_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock)
#endif
+/* ForceInitThreads.proto */
+#ifndef __PYX_FORCE_INIT_THREADS
+ #define __PYX_FORCE_INIT_THREADS 0
+#endif
+
+/* 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;
+
-/* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":725
+/* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":730
* # in Cython to enable them only on the right systems.
*
* ctypedef npy_int8 int8_t # <<<<<<<<<<<<<<
@@ -780,7 +938,7 @@ typedef volatile __pyx_atomic_int_type __pyx_atomic_int;
*/
typedef npy_int8 __pyx_t_5numpy_int8_t;
-/* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":726
+/* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":731
*
* ctypedef npy_int8 int8_t
* ctypedef npy_int16 int16_t # <<<<<<<<<<<<<<
@@ -789,7 +947,7 @@ typedef npy_int8 __pyx_t_5numpy_int8_t;
*/
typedef npy_int16 __pyx_t_5numpy_int16_t;
-/* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":727
+/* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":732
* ctypedef npy_int8 int8_t
* ctypedef npy_int16 int16_t
* ctypedef npy_int32 int32_t # <<<<<<<<<<<<<<
@@ -798,7 +956,7 @@ typedef npy_int16 __pyx_t_5numpy_int16_t;
*/
typedef npy_int32 __pyx_t_5numpy_int32_t;
-/* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":728
+/* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":733
* ctypedef npy_int16 int16_t
* ctypedef npy_int32 int32_t
* ctypedef npy_int64 int64_t # <<<<<<<<<<<<<<
@@ -807,7 +965,7 @@ typedef npy_int32 __pyx_t_5numpy_int32_t;
*/
typedef npy_int64 __pyx_t_5numpy_int64_t;
-/* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":732
+/* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":737
* #ctypedef npy_int128 int128_t
*
* ctypedef npy_uint8 uint8_t # <<<<<<<<<<<<<<
@@ -816,7 +974,7 @@ typedef npy_int64 __pyx_t_5numpy_int64_t;
*/
typedef npy_uint8 __pyx_t_5numpy_uint8_t;
-/* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":733
+/* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":738
*
* ctypedef npy_uint8 uint8_t
* ctypedef npy_uint16 uint16_t # <<<<<<<<<<<<<<
@@ -825,7 +983,7 @@ typedef npy_uint8 __pyx_t_5numpy_uint8_t;
*/
typedef npy_uint16 __pyx_t_5numpy_uint16_t;
-/* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":734
+/* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":739
* ctypedef npy_uint8 uint8_t
* ctypedef npy_uint16 uint16_t
* ctypedef npy_uint32 uint32_t # <<<<<<<<<<<<<<
@@ -834,7 +992,7 @@ typedef npy_uint16 __pyx_t_5numpy_uint16_t;
*/
typedef npy_uint32 __pyx_t_5numpy_uint32_t;
-/* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":735
+/* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":740
* ctypedef npy_uint16 uint16_t
* ctypedef npy_uint32 uint32_t
* ctypedef npy_uint64 uint64_t # <<<<<<<<<<<<<<
@@ -843,7 +1001,7 @@ typedef npy_uint32 __pyx_t_5numpy_uint32_t;
*/
typedef npy_uint64 __pyx_t_5numpy_uint64_t;
-/* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":739
+/* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":744
* #ctypedef npy_uint128 uint128_t
*
* ctypedef npy_float32 float32_t # <<<<<<<<<<<<<<
@@ -852,7 +1010,7 @@ typedef npy_uint64 __pyx_t_5numpy_uint64_t;
*/
typedef npy_float32 __pyx_t_5numpy_float32_t;
-/* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":740
+/* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":745
*
* ctypedef npy_float32 float32_t
* ctypedef npy_float64 float64_t # <<<<<<<<<<<<<<
@@ -861,7 +1019,7 @@ typedef npy_float32 __pyx_t_5numpy_float32_t;
*/
typedef npy_float64 __pyx_t_5numpy_float64_t;
-/* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":749
+/* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":754
* # The int types are mapped a bit surprising --
* # numpy.int corresponds to 'l' and numpy.long to 'q'
* ctypedef npy_long int_t # <<<<<<<<<<<<<<
@@ -870,7 +1028,7 @@ typedef npy_float64 __pyx_t_5numpy_float64_t;
*/
typedef npy_long __pyx_t_5numpy_int_t;
-/* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":750
+/* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":755
* # numpy.int corresponds to 'l' and numpy.long to 'q'
* ctypedef npy_long int_t
* ctypedef npy_longlong long_t # <<<<<<<<<<<<<<
@@ -879,7 +1037,7 @@ typedef npy_long __pyx_t_5numpy_int_t;
*/
typedef npy_longlong __pyx_t_5numpy_long_t;
-/* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":751
+/* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":756
* ctypedef npy_long int_t
* ctypedef npy_longlong long_t
* ctypedef npy_longlong longlong_t # <<<<<<<<<<<<<<
@@ -888,7 +1046,7 @@ typedef npy_longlong __pyx_t_5numpy_long_t;
*/
typedef npy_longlong __pyx_t_5numpy_longlong_t;
-/* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":753
+/* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":758
* ctypedef npy_longlong longlong_t
*
* ctypedef npy_ulong uint_t # <<<<<<<<<<<<<<
@@ -897,7 +1055,7 @@ typedef npy_longlong __pyx_t_5numpy_longlong_t;
*/
typedef npy_ulong __pyx_t_5numpy_uint_t;
-/* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":754
+/* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":759
*
* ctypedef npy_ulong uint_t
* ctypedef npy_ulonglong ulong_t # <<<<<<<<<<<<<<
@@ -906,7 +1064,7 @@ typedef npy_ulong __pyx_t_5numpy_uint_t;
*/
typedef npy_ulonglong __pyx_t_5numpy_ulong_t;
-/* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":755
+/* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":760
* ctypedef npy_ulong uint_t
* ctypedef npy_ulonglong ulong_t
* ctypedef npy_ulonglong ulonglong_t # <<<<<<<<<<<<<<
@@ -915,7 +1073,7 @@ typedef npy_ulonglong __pyx_t_5numpy_ulong_t;
*/
typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t;
-/* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":757
+/* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":762
* ctypedef npy_ulonglong ulonglong_t
*
* ctypedef npy_intp intp_t # <<<<<<<<<<<<<<
@@ -924,7 +1082,7 @@ typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t;
*/
typedef npy_intp __pyx_t_5numpy_intp_t;
-/* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":758
+/* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":763
*
* ctypedef npy_intp intp_t
* ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<<
@@ -933,7 +1091,7 @@ typedef npy_intp __pyx_t_5numpy_intp_t;
*/
typedef npy_uintp __pyx_t_5numpy_uintp_t;
-/* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":760
+/* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":765
* ctypedef npy_uintp uintp_t
*
* ctypedef npy_double float_t # <<<<<<<<<<<<<<
@@ -942,7 +1100,7 @@ typedef npy_uintp __pyx_t_5numpy_uintp_t;
*/
typedef npy_double __pyx_t_5numpy_float_t;
-/* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":761
+/* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":766
*
* ctypedef npy_double float_t
* ctypedef npy_double double_t # <<<<<<<<<<<<<<
@@ -951,7 +1109,7 @@ typedef npy_double __pyx_t_5numpy_float_t;
*/
typedef npy_double __pyx_t_5numpy_double_t;
-/* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":762
+/* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":767
* ctypedef npy_double float_t
* ctypedef npy_double double_t
* ctypedef npy_longdouble longdouble_t # <<<<<<<<<<<<<<
@@ -990,7 +1148,7 @@ struct __pyx_MemviewEnum_obj;
struct __pyx_memoryview_obj;
struct __pyx_memoryviewslice_obj;
-/* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":764
+/* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":769
* ctypedef npy_longdouble longdouble_t
*
* ctypedef npy_cfloat cfloat_t # <<<<<<<<<<<<<<
@@ -999,7 +1157,7 @@ struct __pyx_memoryviewslice_obj;
*/
typedef npy_cfloat __pyx_t_5numpy_cfloat_t;
-/* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":765
+/* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":770
*
* ctypedef npy_cfloat cfloat_t
* ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<<
@@ -1008,7 +1166,7 @@ typedef npy_cfloat __pyx_t_5numpy_cfloat_t;
*/
typedef npy_cdouble __pyx_t_5numpy_cdouble_t;
-/* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":766
+/* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":771
* ctypedef npy_cfloat cfloat_t
* ctypedef npy_cdouble cdouble_t
* ctypedef npy_clongdouble clongdouble_t # <<<<<<<<<<<<<<
@@ -1017,7 +1175,7 @@ typedef npy_cdouble __pyx_t_5numpy_cdouble_t;
*/
typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t;
-/* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":768
+/* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":773
* ctypedef npy_clongdouble clongdouble_t
*
* ctypedef npy_cdouble complex_t # <<<<<<<<<<<<<<
@@ -1026,7 +1184,7 @@ typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t;
*/
typedef npy_cdouble __pyx_t_5numpy_complex_t;
-/* "View.MemoryView":103
+/* "View.MemoryView":104
*
* @cname("__pyx_array")
* cdef class array: # <<<<<<<<<<<<<<
@@ -1051,7 +1209,7 @@ struct __pyx_array_obj {
};
-/* "View.MemoryView":275
+/* "View.MemoryView":278
*
* @cname('__pyx_MemviewEnum')
* cdef class Enum(object): # <<<<<<<<<<<<<<
@@ -1064,7 +1222,7 @@ struct __pyx_MemviewEnum_obj {
};
-/* "View.MemoryView":326
+/* "View.MemoryView":329
*
* @cname('__pyx_memoryview')
* cdef class memoryview(object): # <<<<<<<<<<<<<<
@@ -1087,7 +1245,7 @@ struct __pyx_memoryview_obj {
};
-/* "View.MemoryView":951
+/* "View.MemoryView":960
*
* @cname('__pyx_memoryviewslice')
* cdef class _memoryviewslice(memoryview): # <<<<<<<<<<<<<<
@@ -1104,7 +1262,7 @@ struct __pyx_memoryviewslice_obj {
-/* "View.MemoryView":103
+/* "View.MemoryView":104
*
* @cname("__pyx_array")
* cdef class array: # <<<<<<<<<<<<<<
@@ -1118,7 +1276,7 @@ struct __pyx_vtabstruct_array {
static struct __pyx_vtabstruct_array *__pyx_vtabptr_array;
-/* "View.MemoryView":326
+/* "View.MemoryView":329
*
* @cname('__pyx_memoryview')
* cdef class memoryview(object): # <<<<<<<<<<<<<<
@@ -1138,7 +1296,7 @@ struct __pyx_vtabstruct_memoryview {
static struct __pyx_vtabstruct_memoryview *__pyx_vtabptr_memoryview;
-/* "View.MemoryView":951
+/* "View.MemoryView":960
*
* @cname('__pyx_memoryviewslice')
* cdef class _memoryviewslice(memoryview): # <<<<<<<<<<<<<<
@@ -1217,16 +1375,7 @@ static struct __pyx_vtabstruct__memoryviewslice *__pyx_vtabptr__memoryviewslice;
/* 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);
-}
+static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
#else
#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
#endif
@@ -1264,7 +1413,7 @@ static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_
(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 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);
@@ -1315,23 +1464,35 @@ static PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, long intval, i
/* PyThreadStateGet.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate;
-#define __Pyx_PyThreadState_assign __pyx_tstate = PyThreadState_GET();
+#define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current;
+#define __Pyx_PyErr_Occurred() __pyx_tstate->curexc_type
#else
#define __Pyx_PyThreadState_declare
#define __Pyx_PyThreadState_assign
+#define __Pyx_PyErr_Occurred() PyErr_Occurred()
#endif
/* PyErrFetchRestore.proto */
#if CYTHON_FAST_THREAD_STATE
+#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
#define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
#define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
#define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
#define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
+#if CYTHON_COMPILING_IN_CPYTHON
+#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
+#else
+#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
+#endif
#else
+#define __Pyx_PyErr_Clear() PyErr_Clear()
+#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
#define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb)
+#define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb)
+#define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb)
#define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb)
#endif
@@ -1374,6 +1535,13 @@ static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval,
(inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
#endif
+/* ObjectGetItem.proto */
+#if CYTHON_USE_TYPE_SLOTS
+static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key);
+#else
+#define __Pyx_PyObject_GetItem(obj, key) PyObject_GetItem(obj, key)
+#endif
+
/* SliceObject.proto */
#define __Pyx_PyObject_DelSlice(obj, cstart, cstop, py_start, py_stop, py_slice, has_cstart, has_cstop, wraparound)\
__Pyx_PyObject_SetSlice(obj, (PyObject*)NULL, cstart, cstop, py_start, py_stop, py_slice, has_cstart, has_cstop, wraparound)
@@ -1388,7 +1556,7 @@ static CYTHON_INLINE int __Pyx_PyObject_SetSlice(
__Pyx_SetItemInt_Fast(o, (Py_ssize_t)i, v, is_list, wraparound, boundscheck) :\
(is_list ? (PyErr_SetString(PyExc_IndexError, "list assignment index out of range"), -1) :\
__Pyx_SetItemInt_Generic(o, to_py_func(i), v)))
-static CYTHON_INLINE int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v);
+static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v);
static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v,
int is_list, int wraparound, int boundscheck);
@@ -1409,9 +1577,6 @@ static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
#define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
#endif
-/* Import.proto */
-static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);
-
/* PyDictContains.proto */
static CYTHON_INLINE int __Pyx_PyDict_ContainsTF(PyObject* item, PyObject* dict, int eq) {
int result = PyDict_Contains(dict, item);
@@ -1420,23 +1585,13 @@ static CYTHON_INLINE int __Pyx_PyDict_ContainsTF(PyObject* item, PyObject* dict,
/* 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;
-}
+static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key);
+#define __Pyx_PyObject_Dict_GetItem(obj, name)\
+ (likely(PyDict_CheckExact(obj)) ?\
+ __Pyx_PyDict_GetItem(obj, name) : PyObject_GetItem(obj, name))
#else
- #define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key)
+#define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key)
+#define __Pyx_PyObject_Dict_GetItem(obj, name) PyObject_GetItem(obj, name)
#endif
/* UnicodeAsUCS4.proto */
@@ -1480,8 +1635,16 @@ static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void);
static void __Pyx_UnpackTupleError(PyObject *, Py_ssize_t index);
/* UnpackTuple2.proto */
-static CYTHON_INLINE int __Pyx_unpack_tuple2(PyObject* tuple, PyObject** value1, PyObject** value2,
- int is_tuple, int has_known_size, int decref_tuple);
+#define __Pyx_unpack_tuple2(tuple, value1, value2, is_tuple, has_known_size, decref_tuple)\
+ (likely(is_tuple || PyTuple_Check(tuple)) ?\
+ (likely(has_known_size || PyTuple_GET_SIZE(tuple) == 2) ?\
+ __Pyx_unpack_tuple2_exact(tuple, value1, value2, decref_tuple) :\
+ (__Pyx_UnpackTupleError(tuple, 2), -1)) :\
+ __Pyx_unpack_tuple2_generic(tuple, value1, value2, has_known_size, decref_tuple))
+static CYTHON_INLINE int __Pyx_unpack_tuple2_exact(
+ PyObject* tuple, PyObject** value1, PyObject** value2, int decref_tuple);
+static int __Pyx_unpack_tuple2_generic(
+ PyObject* tuple, PyObject** value1, PyObject** value2, int has_known_size, int decref_tuple);
/* dict_iter.proto */
static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* dict, int is_dict, PyObject* method_name,
@@ -1489,15 +1652,6 @@ static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* dict, int is_dict,
static CYTHON_INLINE int __Pyx_dict_iter_next(PyObject* dict_or_iter, Py_ssize_t orig_length, Py_ssize_t* ppos,
PyObject** pkey, PyObject** pvalue, PyObject** pitem, int is_dict);
-/* 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
@@ -1528,8 +1682,10 @@ static CYTHON_INLINE void __Pyx_XDEC_MEMVIEW(__Pyx_memviewslice *, int, int);
static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type);
/* ArgTypeTest.proto */
-static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
- const char *name, int exact);
+#define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\
+ ((likely((Py_TYPE(obj) == type) | (none_allowed && (obj == Py_None)))) ? 1 :\
+ __Pyx__ArgTypeTest(obj, type, name, exact))
+static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact);
/* IncludeStringH.proto */
#include <string.h>
@@ -1559,12 +1715,29 @@ static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *); /*proto*/
/* GetAttr.proto */
static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *);
+/* decode_c_string_utf16.proto */
+static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16(const char *s, Py_ssize_t size, const char *errors) {
+ int byteorder = 0;
+ return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
+}
+static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16LE(const char *s, Py_ssize_t size, const char *errors) {
+ int byteorder = -1;
+ return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
+}
+static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16BE(const char *s, Py_ssize_t size, const char *errors) {
+ int byteorder = 1;
+ return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
+}
+
/* decode_c_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));
+/* GetAttr3.proto */
+static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *);
+
/* SwapException.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_ExceptionSwap(type, value, tb) __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb)
@@ -1573,6 +1746,22 @@ static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject *
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);
+
+/* FastTypeChecks.proto */
+#if CYTHON_COMPILING_IN_CPYTHON
+#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
+static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
+static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
+static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
+#else
+#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
+#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
+#define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
+#endif
+#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
+
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
@@ -1607,11 +1796,6 @@ static CYTHON_INLINE int __Pyx_PyList_Extend(PyObject* L, PyObject* v) {
/* 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);
@@ -1620,15 +1804,37 @@ static void __Pyx_WriteUnraisable(const char *name, int clineno,
int lineno, const char *filename,
int full_traceback, int nogil);
+/* ImportFrom.proto */
+static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);
+
+/* HasAttr.proto */
+static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *);
+
+/* PyObject_GenericGetAttrNoDict.proto */
+#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
+static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name);
+#else
+#define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr
+#endif
+
+/* PyObject_GenericGetAttr.proto */
+#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
+static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name);
+#else
+#define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr
+#endif
+
/* SetVTable.proto */
static int __Pyx_SetVtable(PyObject *dict, void *vtable);
+/* SetupReduce.proto */
+static int __Pyx_setup_reduce(PyObject* type_obj);
+
/* 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
@@ -1699,6 +1905,13 @@ static PyTypeObject *__pyx_FusedFunctionType = NULL;
static int __pyx_FusedFunction_init(void);
#define __Pyx_FusedFunction_USED
+/* CLineInTraceback.proto */
+#ifdef CYTHON_CLINE_IN_TRACEBACK
+#define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
+#else
+static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
+#endif
+
/* CodeObjectCache.proto */
typedef struct {
PyCodeObject* code_object;
@@ -1741,13 +1954,8 @@ typedef struct {
__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);
+static int __pyx_memviewslice_is_contig(const __Pyx_memviewslice mvs, char order, int ndim);
/* OverlappingSlices.proto */
static int __pyx_slices_overlap(__Pyx_memviewslice *slice1,
@@ -1757,6 +1965,15 @@ static int __pyx_slices_overlap(__Pyx_memviewslice *slice1,
/* Capsule.proto */
static CYTHON_INLINE PyObject *__pyx_capsule_create(void *p, const char *sig);
+/* IsLittleEndian.proto */
+static CYTHON_INLINE int __Pyx_Is_Little_Endian(void);
+
+/* BufferFormatCheck.proto */
+static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts);
+static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx,
+ __Pyx_BufFmt_StackElem* stack,
+ __Pyx_TypeInfo* type);
+
/* TypeInfoCompare.proto */
static int __pyx_typeinfo_cmp(__Pyx_TypeInfo *a, __Pyx_TypeInfo *b);
@@ -1772,28 +1989,28 @@ static int __Pyx_ValidateAndInit_memviewslice(
PyObject *original_obj);
/* ObjectToMemviewSlice.proto */
-static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float64_t(PyObject *);
+static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float64_t(PyObject *, int writable_flag);
/* ObjectToMemviewSlice.proto */
-static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float32_t(PyObject *);
+static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float32_t(PyObject *, int writable_flag);
/* ObjectToMemviewSlice.proto */
-static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(PyObject *);
+static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(PyObject *, int writable_flag);
/* ObjectToMemviewSlice.proto */
-static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(PyObject *);
+static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(PyObject *, int writable_flag);
/* ObjectToMemviewSlice.proto */
-static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int16_t(PyObject *);
+static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int16_t(PyObject *, int writable_flag);
/* ObjectToMemviewSlice.proto */
-static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(PyObject *);
+static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(PyObject *, int writable_flag);
/* ObjectToMemviewSlice.proto */
-static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_double(PyObject *);
+static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_double(PyObject *, int writable_flag);
/* ObjectToMemviewSlice.proto */
-static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_int(PyObject *);
+static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_int(PyObject *, int writable_flag);
/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
@@ -1931,12 +2148,16 @@ static int __Pyx_PrintOne(PyObject* stream, PyObject *o);
/* BytesContains.proto */
static CYTHON_INLINE int __Pyx_BytesContains(PyObject* bytes, char character);
-/* CIntFromPy.proto */
-static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *);
+/* ImportNumPyArray.proto */
+static PyObject *__pyx_numpy_ndarray = NULL;
+static PyObject* __Pyx_ImportNumPyArrayTypeIfAvailable(void);
/* CIntFromPy.proto */
static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
+/* CIntFromPy.proto */
+static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *);
+
/* CheckBinaryVersion.proto */
static int __Pyx_check_binary_version(void);
@@ -1986,7 +2207,7 @@ static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0;
/* Module declarations from 'cpython.ref' */
-/* Module declarations from 'libc.stdlib' */
+/* Module declarations from 'cpython.mem' */
/* Module declarations from 'numpy' */
@@ -2046,6 +2267,7 @@ static void __pyx_memoryview_refcount_objects_in_slice_with_gil(char *, Py_ssize
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 PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *, PyObject *); /*proto*/
static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t = { "float64_t", NULL, sizeof(__pyx_t_5numpy_float64_t), { 0 }, 0, 'R', 0, 0 };
static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t = { "float32_t", NULL, sizeof(__pyx_t_5numpy_float32_t), { 0 }, 0, 'R', 0, 0 };
static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t = { "int32_t", NULL, sizeof(__pyx_t_5numpy_int32_t), { 0 }, 0, IS_UNSIGNED(__pyx_t_5numpy_int32_t) ? 'U' : 'I', IS_UNSIGNED(__pyx_t_5numpy_int32_t), 0 };
@@ -2055,16 +2277,15 @@ static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_uint32_t = { "uint32_t",
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 };
#define __Pyx_MODULE_NAME "silx.math.chistogramnd_lut"
+extern int __pyx_module_is_main_silx__math__chistogramnd_lut;
int __pyx_module_is_main_silx__math__chistogramnd_lut = 0;
/* Implementation of 'silx.math.chistogramnd_lut' */
static PyObject *__pyx_builtin_ValueError;
static PyObject *__pyx_builtin_TypeError;
static PyObject *__pyx_builtin_range;
-static PyObject *__pyx_builtin_ImportError;
-static PyObject *__pyx_builtin_AttributeError;
-static PyObject *__pyx_builtin_zip;
static PyObject *__pyx_builtin_RuntimeError;
+static PyObject *__pyx_builtin_ImportError;
static PyObject *__pyx_builtin_MemoryError;
static PyObject *__pyx_builtin_enumerate;
static PyObject *__pyx_builtin_Ellipsis;
@@ -2074,6 +2295,7 @@ 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_i[] = "i";
+static const char __pyx_k_s[] = "s";
static const char __pyx_k_ex[] = "ex";
static const char __pyx_k_id[] = "id";
static const char __pyx_k_np[] = "np";
@@ -2085,12 +2307,13 @@ static const char __pyx_k_any[] = "any";
static const char __pyx_k_end[] = "end";
static const char __pyx_k_h_c[] = "h_c";
static const char __pyx_k_lut[] = "lut";
+static const char __pyx_k_new[] = "__new__";
static const char __pyx_k_obj[] = "obj";
static const char __pyx_k_w_c[] = "w_c";
-static const char __pyx_k_zip[] = "zip";
static const char __pyx_k_args[] = "args";
static const char __pyx_k_base[] = "base";
static const char __pyx_k_date[] = "__date__";
+static const char __pyx_k_dict[] = "__dict__";
static const char __pyx_k_file[] = "file";
static const char __pyx_k_kind[] = "kind";
static const char __pyx_k_main[] = "__main__";
@@ -2143,11 +2366,14 @@ 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_pickle[] = "pickle";
+static const char __pyx_k_reduce[] = "__reduce__";
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_uint64[] = "uint64";
static const char __pyx_k_unpack[] = "unpack";
+static const char __pyx_k_update[] = "update";
static const char __pyx_k_authors[] = "__authors__";
static const char __pyx_k_bin_idx[] = "bin_idx";
static const char __pyx_k_fortran[] = "fortran";
@@ -2160,7 +2386,6 @@ static const char __pyx_k_license[] = "__license__";
static const char __pyx_k_lut_idx[] = "lut_idx";
static const char __pyx_k_max_idx[] = "max_idx";
static const char __pyx_k_memview[] = "memview";
-static const char __pyx_k_ndarray[] = "ndarray";
static const char __pyx_k_o_histo[] = "o_histo";
static const char __pyx_k_reshape[] = "reshape";
static const char __pyx_k_rng_max[] = "rng_max";
@@ -2172,12 +2397,15 @@ static const char __pyx_k_D_Naudet[] = "D. Naudet";
static const char __pyx_k_Ellipsis[] = "Ellipsis";
static const char __pyx_k_defaults[] = "defaults";
static const char __pyx_k_elem_idx[] = "elem_idx";
+static const char __pyx_k_getstate[] = "__getstate__";
static const char __pyx_k_i_n_bins[] = "i_n_bins";
static const char __pyx_k_i_n_dims[] = "i_n_dims";
static const char __pyx_k_i_sample[] = "i_sample";
static const char __pyx_k_itemsize[] = "itemsize";
static const char __pyx_k_n_bins_c[] = "n_bins_c";
+static const char __pyx_k_pyx_type[] = "__pyx_type";
static const char __pyx_k_sample_c[] = "sample_c";
+static const char __pyx_k_setstate[] = "__setstate__";
static const char __pyx_k_TypeError[] = "TypeError";
static const char __pyx_k_dim_edges[] = "dim_edges";
static const char __pyx_k_enumerate[] = "enumerate";
@@ -2187,28 +2415,35 @@ static const char __pyx_k_histo_lut[] = "histo_lut";
static const char __pyx_k_i_n_elems[] = "i_n_elems";
static const char __pyx_k_i_weights[] = "i_weights";
static const char __pyx_k_lut_dtype[] = "lut_dtype";
+static const char __pyx_k_pyx_state[] = "__pyx_state";
+static const char __pyx_k_reduce_ex[] = "__reduce_ex__";
static const char __pyx_k_15_05_2016[] = "15/05/2016";
static const char __pyx_k_IndexError[] = "IndexError";
static const char __pyx_k_ValueError[] = "ValueError";
static const char __pyx_k_bins_range[] = "bins_range";
static const char __pyx_k_elem_coord[] = "elem_coord";
+static const char __pyx_k_pyx_result[] = "__pyx_result";
static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
static const char __pyx_k_signatures[] = "signatures";
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_PickleError[] = "PickleError";
static const char __pyx_k_histo_range[] = "histo_range";
static const char __pyx_k_sample_type[] = "sample_type";
static const char __pyx_k_RuntimeError[] = "RuntimeError";
static const char __pyx_k_i_weight_max[] = "i_weight_max";
static const char __pyx_k_i_weight_min[] = "i_weight_min";
static const char __pyx_k_newbyteorder[] = "newbyteorder";
+static const char __pyx_k_pyx_checksum[] = "__pyx_checksum";
+static const char __pyx_k_stringsource[] = "stringsource";
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_AttributeError[] = "AttributeError";
+static const char __pyx_k_reduce_cython[] = "__reduce_cython__";
static const char __pyx_k_weighted_histo[] = "weighted_histo";
+static const char __pyx_k_View_MemoryView[] = "View.MemoryView";
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";
@@ -2219,6 +2454,8 @@ static const char __pyx_k_int64_t_int16_t[] = "int64_t|int16_t";
static const char __pyx_k_int64_t_int32_t[] = "int64_t|int32_t";
static const char __pyx_k_int64_t_int64_t[] = "int64_t|int64_t";
static const char __pyx_k_last_bin_closed[] = "last_bin_closed";
+static const char __pyx_k_pyx_PickleError[] = "__pyx_PickleError";
+static const char __pyx_k_setstate_cython[] = "__setstate_cython__";
static const char __pyx_k_filt_max_weights[] = "filt_max_weights";
static const char __pyx_k_filt_min_weights[] = "filt_min_weights";
static const char __pyx_k_o_weighted_histo[] = "o_weighted_histo";
@@ -2229,6 +2466,8 @@ static const char __pyx_k_float32_t_int64_t[] = "float32_t|int64_t";
static const char __pyx_k_float64_t_int16_t[] = "float64_t|int16_t";
static const char __pyx_k_float64_t_int32_t[] = "float64_t|int32_t";
static const char __pyx_k_float64_t_int64_t[] = "float64_t|int64_t";
+static const char __pyx_k_pyx_unpickle_Enum[] = "__pyx_unpickle_Enum";
+static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
static const char __pyx_k_i_filt_max_weights[] = "i_filt_max_weights";
static const char __pyx_k_i_filt_min_weights[] = "i_filt_min_weights";
static const char __pyx_k_strided_and_direct[] = "<strided and direct>";
@@ -2296,8 +2535,8 @@ static const char __pyx_k_float64_t_int64_t_float32_t[] = "float64_t|int64_t|flo
static const char __pyx_k_float64_t_int64_t_float64_t[] = "float64_t|int64_t|float64_t";
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_Expected_at_least_d_arguments[] = "Expected at least %d arguments";
static const char __pyx_k_unable_to_allocate_array_data[] = "unable to allocate array data.";
+static const char __pyx_k_silx_math_chistogramnd_lut_pyx[] = "silx/math/chistogramnd_lut.pyx";
static const char __pyx_k_strided_and_direct_or_indirect[] = "<strided and direct or indirect>";
static const char __pyx_k_The_LUT_and_weights_arrays_must[] = "The LUT and weights arrays must have the same number of elements.";
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)";
@@ -2305,14 +2544,17 @@ static const char __pyx_k_histogramnd_returned_an_error_0[] = "histogramnd retur
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_lut.pyx";
static const char __pyx_k_At_least_one_of_the_following_pa[] = "At least one of the following parameters has to be provided : <shape> or <histo> or <weighted_histo>";
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_Cannot_assign_to_read_only_memor[] = "Cannot assign to read-only memoryview";
+static const char __pyx_k_Cannot_create_writable_memory_vi[] = "Cannot create writable memory view from read-only memoryview";
static const char __pyx_k_Case_not_supported_weights_0_and[] = "Case not supported - weights:{0} and histo:{1}.";
static const char __pyx_k_Empty_shape_tuple_for_cython_arr[] = "Empty shape tuple for cython.array";
+static const char __pyx_k_Expected_at_least_d_argument_s_g[] = "Expected at least %d argument%s, got %d";
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_Function_call_with_ambiguous_arg[] = "Function call with ambiguous argument types";
+static const char __pyx_k_Incompatible_checksums_s_vs_0xb0[] = "Incompatible checksums (%s vs 0xb068931 = (name))";
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";
@@ -2325,6 +2567,7 @@ static const char __pyx_k_Unable_to_convert_item_to_object[] = "Unable to conver
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_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_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__";
static const char __pyx_k_numpy_core_umath_failed_to_impor[] = "numpy.core.umath failed to import";
static 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.";
@@ -2332,19 +2575,21 @@ static const char __pyx_k_The_shape_value_does_not_matchth_2[] = "The <shape> va
static PyObject *__pyx_kp_s_15_05_2016;
static PyObject *__pyx_n_s_ASCII;
static PyObject *__pyx_kp_s_At_least_one_of_the_following_pa;
-static PyObject *__pyx_n_s_AttributeError;
static PyObject *__pyx_kp_s_Buffer_view_does_not_expose_stri;
static PyObject *__pyx_kp_s_Can_only_create_a_buffer_that_is;
+static PyObject *__pyx_kp_s_Cannot_assign_to_read_only_memor;
+static PyObject *__pyx_kp_s_Cannot_create_writable_memory_vi;
static PyObject *__pyx_kp_s_Cannot_index_with_type_s;
static PyObject *__pyx_kp_s_Case_not_supported_weights_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_s_Expected_at_least_d_arguments;
+static PyObject *__pyx_kp_s_Expected_at_least_d_argument_s_g;
static PyObject *__pyx_kp_u_Format_string_allocated_too_shor;
static PyObject *__pyx_kp_u_Format_string_allocated_too_shor_2;
static PyObject *__pyx_kp_s_Function_call_with_ambiguous_arg;
static PyObject *__pyx_n_s_ImportError;
+static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0xb0;
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;
@@ -2358,6 +2603,7 @@ static PyObject *__pyx_kp_s_No_matching_signature_found;
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_n_s_PickleError;
static PyObject *__pyx_kp_s_Provided_dtype_and_weighted_hist;
static PyObject *__pyx_kp_s_Provided_histo_array_doesn_t_hav;
static PyObject *__pyx_n_s_RuntimeError;
@@ -2369,6 +2615,7 @@ static PyObject *__pyx_n_s_TypeError;
static PyObject *__pyx_kp_s_Type_not_supported_sample_0;
static PyObject *__pyx_kp_s_Unable_to_convert_item_to_object;
static PyObject *__pyx_n_s_ValueError;
+static PyObject *__pyx_n_s_View_MemoryView;
static PyObject *__pyx_kp_s__21;
static PyObject *__pyx_kp_s__23;
static PyObject *__pyx_n_s_allocate_buffer;
@@ -2384,10 +2631,12 @@ static PyObject *__pyx_n_s_bins_range;
static PyObject *__pyx_n_s_c;
static PyObject *__pyx_n_u_c;
static PyObject *__pyx_n_s_class;
+static PyObject *__pyx_n_s_cline_in_traceback;
static PyObject *__pyx_kp_s_contiguous_and_direct;
static PyObject *__pyx_kp_s_contiguous_and_indirect;
static PyObject *__pyx_n_s_date;
static PyObject *__pyx_n_s_defaults;
+static PyObject *__pyx_n_s_dict;
static PyObject *__pyx_n_s_dim_edges;
static PyObject *__pyx_n_s_double;
static PyObject *__pyx_n_s_dtype;
@@ -2443,6 +2692,7 @@ static PyObject *__pyx_n_s_fortran;
static PyObject *__pyx_n_u_fortran;
static PyObject *__pyx_n_s_g_max;
static PyObject *__pyx_n_s_g_min;
+static PyObject *__pyx_n_s_getstate;
static PyObject *__pyx_kp_s_got_differing_extents_in_dimensi;
static PyObject *__pyx_n_s_h_c;
static PyObject *__pyx_n_s_h_lut_c;
@@ -2530,12 +2780,13 @@ 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_ndarray;
static PyObject *__pyx_kp_u_ndarray_is_not_C_contiguous;
static PyObject *__pyx_kp_u_ndarray_is_not_Fortran_contiguou;
static PyObject *__pyx_n_s_ndim;
static PyObject *__pyx_n_s_ndmin;
+static PyObject *__pyx_n_s_new;
static PyObject *__pyx_n_s_newbyteorder;
+static PyObject *__pyx_kp_s_no_default___reduce___due_to_non;
static PyObject *__pyx_n_s_np;
static PyObject *__pyx_n_s_numpy;
static PyObject *__pyx_kp_s_numpy_core_multiarray_failed_to;
@@ -2545,22 +2796,36 @@ static PyObject *__pyx_n_s_o_lut;
static PyObject *__pyx_n_s_o_weighted_histo;
static PyObject *__pyx_n_s_obj;
static PyObject *__pyx_n_s_pack;
+static PyObject *__pyx_n_s_pickle;
static PyObject *__pyx_n_s_print;
static PyObject *__pyx_n_s_prod;
+static PyObject *__pyx_n_s_pyx_PickleError;
+static PyObject *__pyx_n_s_pyx_checksum;
static PyObject *__pyx_n_s_pyx_getbuffer;
+static PyObject *__pyx_n_s_pyx_result;
+static PyObject *__pyx_n_s_pyx_state;
+static PyObject *__pyx_n_s_pyx_type;
+static PyObject *__pyx_n_s_pyx_unpickle_Enum;
static PyObject *__pyx_n_s_pyx_vtable;
static PyObject *__pyx_n_s_range;
static PyObject *__pyx_n_s_rc;
+static PyObject *__pyx_n_s_reduce;
+static PyObject *__pyx_n_s_reduce_cython;
+static PyObject *__pyx_n_s_reduce_ex;
static PyObject *__pyx_n_s_reshape;
static PyObject *__pyx_n_s_rng_max;
static PyObject *__pyx_n_s_rng_min;
+static PyObject *__pyx_n_s_s;
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_setstate;
+static PyObject *__pyx_n_s_setstate_cython;
static PyObject *__pyx_n_s_shape;
static PyObject *__pyx_n_s_signatures;
static PyObject *__pyx_n_s_silx_math_chistogramnd_lut;
+static PyObject *__pyx_kp_s_silx_math_chistogramnd_lut_pyx;
static PyObject *__pyx_n_s_size;
static PyObject *__pyx_n_s_split;
static PyObject *__pyx_n_s_start;
@@ -2569,6 +2834,7 @@ 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_kp_s_stringsource;
static PyObject *__pyx_n_s_strip;
static PyObject *__pyx_n_s_struct;
static PyObject *__pyx_n_s_test;
@@ -2580,7 +2846,7 @@ 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_update;
static PyObject *__pyx_n_s_w_c;
static PyObject *__pyx_n_s_w_dtype;
static PyObject *__pyx_n_s_w_h_c;
@@ -2589,7 +2855,6 @@ static PyObject *__pyx_n_s_weight_min;
static PyObject *__pyx_n_s_weighted_histo;
static PyObject *__pyx_n_s_weights;
static PyObject *__pyx_n_s_zeros;
-static PyObject *__pyx_n_s_zip;
static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_histogramnd_get_lut(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_sample, PyObject *__pyx_v_histo_range, PyObject *__pyx_v_n_bins, PyObject *__pyx_v_last_bin_closed); /* proto */
static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_2histogramnd_from_lut(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_weights, PyObject *__pyx_v_histo_lut, PyObject *__pyx_v_histo, PyObject *__pyx_v_weighted_histo, PyObject *__pyx_v_shape, PyObject *__pyx_v_dtype, PyObject *__pyx_v_weight_min, PyObject *__pyx_v_weight_max); /* proto */
static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_4_histogramnd_from_lut_fused(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_signatures, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs, CYTHON_UNUSED PyObject *__pyx_v_defaults); /* proto */
@@ -2660,11 +2925,16 @@ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __
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 Py_ssize_t __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(struct __pyx_array_obj *__pyx_v_self); /* proto */
+static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_attr); /* proto */
+static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item); /* proto */
+static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_12__setitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value); /* proto */
+static PyObject *__pyx_pf___pyx_array___reduce_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf___pyx_array_2__setstate_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* 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 PyObject *__pyx_pf___pyx_MemviewEnum___reduce_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf___pyx_MemviewEnum_2__setstate_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* 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 */
@@ -2686,8 +2956,13 @@ static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16
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 PyObject *__pyx_pf___pyx_memoryview___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf___pyx_memoryview_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* 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_pf___pyx_memoryviewslice___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf___pyx_memoryviewslice_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
+static PyObject *__pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* 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*/
@@ -2695,7 +2970,10 @@ static PyObject *__pyx_tp_new__memoryviewslice(PyTypeObject *t, PyObject *a, PyO
static PyObject *__pyx_int_0;
static PyObject *__pyx_int_1;
static PyObject *__pyx_int_2;
+static PyObject *__pyx_int_8;
+static PyObject *__pyx_int_9;
static PyObject *__pyx_int_32768;
+static PyObject *__pyx_int_184977713;
static PyObject *__pyx_int_2147483648;
static PyObject *__pyx_int_neg_1;
static PyObject *__pyx_tuple_;
@@ -2708,9 +2986,9 @@ static PyObject *__pyx_tuple__7;
static PyObject *__pyx_tuple__8;
static PyObject *__pyx_tuple__9;
static PyObject *__pyx_slice__10;
-static PyObject *__pyx_slice__49;
-static PyObject *__pyx_slice__50;
-static PyObject *__pyx_slice__51;
+static PyObject *__pyx_slice__55;
+static PyObject *__pyx_slice__56;
+static PyObject *__pyx_slice__57;
static PyObject *__pyx_tuple__11;
static PyObject *__pyx_tuple__12;
static PyObject *__pyx_tuple__13;
@@ -2747,20 +3025,31 @@ static PyObject *__pyx_tuple__45;
static PyObject *__pyx_tuple__46;
static PyObject *__pyx_tuple__47;
static PyObject *__pyx_tuple__48;
+static PyObject *__pyx_tuple__49;
+static PyObject *__pyx_tuple__50;
+static PyObject *__pyx_tuple__51;
static PyObject *__pyx_tuple__52;
static PyObject *__pyx_tuple__53;
-static PyObject *__pyx_tuple__55;
-static PyObject *__pyx_tuple__57;
+static PyObject *__pyx_tuple__54;
+static PyObject *__pyx_tuple__58;
static PyObject *__pyx_tuple__59;
+static PyObject *__pyx_tuple__60;
static PyObject *__pyx_tuple__61;
-static PyObject *__pyx_tuple__62;
static PyObject *__pyx_tuple__63;
-static PyObject *__pyx_tuple__64;
static PyObject *__pyx_tuple__65;
-static PyObject *__pyx_codeobj__54;
-static PyObject *__pyx_codeobj__56;
-static PyObject *__pyx_codeobj__58;
-static PyObject *__pyx_codeobj__60;
+static PyObject *__pyx_tuple__67;
+static PyObject *__pyx_tuple__69;
+static PyObject *__pyx_tuple__70;
+static PyObject *__pyx_tuple__71;
+static PyObject *__pyx_tuple__72;
+static PyObject *__pyx_tuple__73;
+static PyObject *__pyx_tuple__74;
+static PyObject *__pyx_codeobj__62;
+static PyObject *__pyx_codeobj__64;
+static PyObject *__pyx_codeobj__66;
+static PyObject *__pyx_codeobj__68;
+static PyObject *__pyx_codeobj__75;
+/* Late includes */
/* "silx/math/chistogramnd_lut.pyx":58
*
@@ -2799,30 +3088,37 @@ static PyObject *__pyx_pw_4silx_4math_16chistogramnd_lut_1histogramnd_get_lut(Py
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
switch (pos_args) {
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
case 0: break;
default: goto __pyx_L5_argtuple_error;
}
kw_args = PyDict_Size(__pyx_kwds);
switch (pos_args) {
case 0:
- if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_sample)) != 0)) kw_args--;
+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sample)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
case 1:
- if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_histo_range)) != 0)) kw_args--;
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_histo_range)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("histogramnd_get_lut", 0, 3, 4, 1); __PYX_ERR(0, 58, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 2:
- if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_n_bins)) != 0)) kw_args--;
+ if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n_bins)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("histogramnd_get_lut", 0, 3, 4, 2); __PYX_ERR(0, 58, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 3:
if (kw_args > 0) {
- PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_last_bin_closed);
+ PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_last_bin_closed);
if (value) { values[3] = value; kw_args--; }
}
}
@@ -2832,6 +3128,7 @@ static PyObject *__pyx_pw_4silx_4math_16chistogramnd_lut_1histogramnd_get_lut(Py
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
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);
@@ -2931,7 +3228,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_histogramnd_get_lut(CYT
*
* # just in case those arent numpy arrays
*/
- __pyx_t_2 = PyObject_Length(__pyx_v_s_shape); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 98, __pyx_L1_error)
+ __pyx_t_2 = PyObject_Length(__pyx_v_s_shape); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 98, __pyx_L1_error)
if (((__pyx_t_2 == 1) != 0)) {
__Pyx_INCREF(__pyx_int_1);
__pyx_t_1 = __pyx_int_1;
@@ -3173,7 +3470,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_histogramnd_get_lut(CYT
* 'lower and upper bin edges, '
*/
__pyx_t_6 = (__pyx_v_err_histo_range != 0);
- if (__pyx_t_6) {
+ if (unlikely(__pyx_t_6)) {
/* "silx/math/chistogramnd_lut.pyx":123
* '(provided <sample> contains '
@@ -3184,7 +3481,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_histogramnd_get_lut(CYT
*/
__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, 123, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 123, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 123, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_histo_range, __pyx_v_i_histo_range) < 0) __PYX_ERR(0, 123, __pyx_L1_error)
@@ -3216,16 +3513,11 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_histogramnd_get_lut(CYT
* 'lower and upper bin edges, '
* 'got the following instead : {histo_range}. '
*/
- __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 118, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 118, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __Pyx_GIVEREF(__pyx_t_4);
- PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4);
- __pyx_t_4 = 0;
- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 118, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __Pyx_Raise(__pyx_t_4, 0, 0, 0);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__PYX_ERR(0, 118, __pyx_L1_error)
/* "silx/math/chistogramnd_lut.pyx":117
@@ -3244,56 +3536,56 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_histogramnd_get_lut(CYT
*
* # checking n_bins size
*/
- __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 126, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_double); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 126, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 126, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_double); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 126, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = NULL;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = NULL;
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
- __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5);
- if (likely(__pyx_t_1)) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
+ if (likely(__pyx_t_4)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
- __Pyx_INCREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_4);
__Pyx_INCREF(function);
__Pyx_DECREF_SET(__pyx_t_5, function);
}
}
- if (!__pyx_t_1) {
- __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_histo_range); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 126, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
+ if (!__pyx_t_4) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_histo_range); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 126, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
} else {
#if CYTHON_FAST_PYCALL
if (PyFunction_Check(__pyx_t_5)) {
- PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_v_histo_range};
- __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 126, __pyx_L1_error)
- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
- __Pyx_GOTREF(__pyx_t_4);
+ PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_histo_range};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 126, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
} else
#endif
#if CYTHON_FAST_PYCCALL
if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
- PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_v_histo_range};
- __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 126, __pyx_L1_error)
- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
- __Pyx_GOTREF(__pyx_t_4);
+ PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_histo_range};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 126, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
} else
#endif
{
__pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 126, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __pyx_t_1 = NULL;
+ __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __pyx_t_4 = NULL;
__Pyx_INCREF(__pyx_v_histo_range);
__Pyx_GIVEREF(__pyx_v_histo_range);
PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_v_histo_range);
- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 126, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 126, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
}
}
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __Pyx_DECREF_SET(__pyx_v_histo_range, __pyx_t_4);
- __pyx_t_4 = 0;
+ __Pyx_DECREF_SET(__pyx_v_histo_range, __pyx_t_1);
+ __pyx_t_1 = 0;
/* "silx/math/chistogramnd_lut.pyx":129
*
@@ -3302,26 +3594,26 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_histogramnd_get_lut(CYT
* if len(n_bins) == 1:
* n_bins = np.tile(n_bins, n_dims)
*/
- __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 129, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 129, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 129, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 129, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 129, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 129, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(__pyx_v_n_bins);
__Pyx_GIVEREF(__pyx_v_n_bins);
- PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_n_bins);
- __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 129, __pyx_L1_error)
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_n_bins);
+ __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 129, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_ndmin, __pyx_int_1) < 0) __PYX_ERR(0, 129, __pyx_L1_error)
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 129, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 129, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_DECREF_SET(__pyx_v_n_bins, __pyx_t_1);
- __pyx_t_1 = 0;
+ __Pyx_DECREF_SET(__pyx_v_n_bins, __pyx_t_4);
+ __pyx_t_4 = 0;
/* "silx/math/chistogramnd_lut.pyx":130
* # checking n_bins size
@@ -3330,7 +3622,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_histogramnd_get_lut(CYT
* n_bins = np.tile(n_bins, n_dims)
* elif n_bins.shape != (n_dims,):
*/
- __pyx_t_2 = PyObject_Length(__pyx_v_n_bins); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 130, __pyx_L1_error)
+ __pyx_t_2 = PyObject_Length(__pyx_v_n_bins); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 130, __pyx_L1_error)
__pyx_t_6 = ((__pyx_t_2 == 1) != 0);
if (__pyx_t_6) {
@@ -3343,35 +3635,35 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_histogramnd_get_lut(CYT
*/
__pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 131, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_tile); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 131, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_tile); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 131, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_t_3 = NULL;
__pyx_t_8 = 0;
- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
- __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
if (likely(__pyx_t_3)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
__Pyx_INCREF(__pyx_t_3);
__Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_4, function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
__pyx_t_8 = 1;
}
}
#if CYTHON_FAST_PYCALL
- if (PyFunction_Check(__pyx_t_4)) {
+ if (PyFunction_Check(__pyx_t_1)) {
PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_n_bins, __pyx_v_n_dims};
- __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 131, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 131, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GOTREF(__pyx_t_4);
} else
#endif
#if CYTHON_FAST_PYCCALL
- if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_n_bins, __pyx_v_n_dims};
- __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 131, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 131, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GOTREF(__pyx_t_4);
} else
#endif
{
@@ -3386,13 +3678,13 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_histogramnd_get_lut(CYT
__Pyx_INCREF(__pyx_v_n_dims);
__Pyx_GIVEREF(__pyx_v_n_dims);
PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_8, __pyx_v_n_dims);
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 131, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 131, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
}
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __Pyx_DECREF_SET(__pyx_v_n_bins, __pyx_t_1);
- __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF_SET(__pyx_v_n_bins, __pyx_t_4);
+ __pyx_t_4 = 0;
/* "silx/math/chistogramnd_lut.pyx":130
* # checking n_bins size
@@ -3411,19 +3703,19 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_histogramnd_get_lut(CYT
* raise ValueError('n_bins must be either a scalar (same number '
* 'of bins for all dimensions) or '
*/
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_n_bins, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 132, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 132, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_n_bins, __pyx_n_s_shape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 132, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 132, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(__pyx_v_n_dims);
__Pyx_GIVEREF(__pyx_v_n_dims);
- PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_n_dims);
- __pyx_t_5 = PyObject_RichCompare(__pyx_t_1, __pyx_t_4, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 132, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_n_dims);
+ __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 132, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 132, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- if (__pyx_t_6) {
+ if (unlikely(__pyx_t_6)) {
/* "silx/math/chistogramnd_lut.pyx":133
* n_bins = np.tile(n_bins, n_dims)
@@ -3455,11 +3747,11 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_histogramnd_get_lut(CYT
* raise ValueError('<n_bins> : only positive values allowed.')
*
*/
- __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 141, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_any); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 141, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 141, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_any); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 141, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 141, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_equal); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 141, __pyx_L1_error)
@@ -3480,17 +3772,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_histogramnd_get_lut(CYT
#if CYTHON_FAST_PYCALL
if (PyFunction_Check(__pyx_t_9)) {
PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_n_bins, Py_None};
- __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 141, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 141, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_GOTREF(__pyx_t_1);
} else
#endif
#if CYTHON_FAST_PYCCALL
if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_n_bins, Py_None};
- __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 141, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 141, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_GOTREF(__pyx_t_1);
} else
#endif
{
@@ -3505,57 +3797,57 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_histogramnd_get_lut(CYT
__Pyx_INCREF(Py_None);
__Pyx_GIVEREF(Py_None);
PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_8, Py_None);
- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 141, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 141, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
}
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
__pyx_t_9 = NULL;
- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
- __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_1);
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
+ __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_4);
if (likely(__pyx_t_9)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
__Pyx_INCREF(__pyx_t_9);
__Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_1, function);
+ __Pyx_DECREF_SET(__pyx_t_4, function);
}
}
if (!__pyx_t_9) {
- __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 141, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 141, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_GOTREF(__pyx_t_5);
} else {
#if CYTHON_FAST_PYCALL
- if (PyFunction_Check(__pyx_t_1)) {
- PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_4};
- __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 141, __pyx_L1_error)
+ if (PyFunction_Check(__pyx_t_4)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_1};
+ __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 141, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
__Pyx_GOTREF(__pyx_t_5);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
} else
#endif
#if CYTHON_FAST_PYCCALL
- if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
- PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_4};
- __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 141, __pyx_L1_error)
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_1};
+ __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 141, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
__Pyx_GOTREF(__pyx_t_5);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
} else
#endif
{
__pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 141, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_10);
__Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); __pyx_t_9 = NULL;
- __Pyx_GIVEREF(__pyx_t_4);
- PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_4);
- __pyx_t_4 = 0;
- __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 141, __pyx_L1_error)
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 141, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
}
}
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 141, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
if (!__pyx_t_7) {
@@ -3563,52 +3855,52 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_histogramnd_get_lut(CYT
__pyx_t_6 = __pyx_t_7;
goto __pyx_L10_bool_binop_done;
}
- __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 141, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_any); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 141, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 141, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_any); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 141, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_10);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyObject_RichCompare(__pyx_v_n_bins, __pyx_int_0, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 141, __pyx_L1_error)
- __pyx_t_4 = NULL;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = PyObject_RichCompare(__pyx_v_n_bins, __pyx_int_0, Py_LE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 141, __pyx_L1_error)
+ __pyx_t_1 = NULL;
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
- __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_10);
- if (likely(__pyx_t_4)) {
+ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_10);
+ if (likely(__pyx_t_1)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
- __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(__pyx_t_1);
__Pyx_INCREF(function);
__Pyx_DECREF_SET(__pyx_t_10, function);
}
}
- if (!__pyx_t_4) {
- __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 141, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (!__pyx_t_1) {
+ __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 141, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_GOTREF(__pyx_t_5);
} else {
#if CYTHON_FAST_PYCALL
if (PyFunction_Check(__pyx_t_10)) {
- PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_1};
+ PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_t_4};
__pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 141, __pyx_L1_error)
- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_GOTREF(__pyx_t_5);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __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_4, __pyx_t_1};
+ PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_t_4};
__pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 141, __pyx_L1_error)
- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_GOTREF(__pyx_t_5);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
} else
#endif
{
__pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 141, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_9);
- __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_4); __pyx_t_4 = NULL;
- __Pyx_GIVEREF(__pyx_t_1);
- PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_1);
- __pyx_t_1 = 0;
+ __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_1); __pyx_t_1 = NULL;
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_4);
+ __pyx_t_4 = 0;
__pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 141, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
@@ -3619,7 +3911,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_histogramnd_get_lut(CYT
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__pyx_t_6 = __pyx_t_7;
__pyx_L10_bool_binop_done:;
- if (__pyx_t_6) {
+ if (unlikely(__pyx_t_6)) {
/* "silx/math/chistogramnd_lut.pyx":142
* # also testing for negative/null values
@@ -3679,21 +3971,21 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_histogramnd_get_lut(CYT
*/
__pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_n_bins, __pyx_n_s_prod); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 148, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_10);
- __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 148, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 148, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 148, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_9);
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_uint64); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 148, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_uint64); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 148, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_1) < 0) __PYX_ERR(0, 148, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 148, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(0, 148, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 148, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_5 = PyObject_RichCompare(__pyx_t_1, __pyx_int_32768, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 148, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, __pyx_int_32768, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 148, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 148, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
if (__pyx_t_6) {
@@ -3707,11 +3999,11 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_histogramnd_get_lut(CYT
*/
__pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 149, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int16); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 149, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int16); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 149, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_v_lut_dtype = __pyx_t_1;
- __pyx_t_1 = 0;
+ __pyx_v_lut_dtype = __pyx_t_4;
+ __pyx_t_4 = 0;
/* "silx/math/chistogramnd_lut.pyx":148
* n_elem = sample.size // n_dims
@@ -3730,9 +4022,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_histogramnd_get_lut(CYT
* lut_dtype = np.int32
*
*/
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_n_bins, __pyx_n_s_prod); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 150, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 150, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_n_bins, __pyx_n_s_prod); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 150, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 150, __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, 150, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_10);
@@ -3741,9 +4033,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_histogramnd_get_lut(CYT
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(0, 150, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 150, __pyx_L1_error)
+ __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 150, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_9);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__pyx_t_5 = PyObject_RichCompare(__pyx_t_9, __pyx_int_2147483648, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 150, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
@@ -3811,14 +4103,14 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_histogramnd_get_lut(CYT
__Pyx_INCREF(__pyx_v_n_elem);
__Pyx_GIVEREF(__pyx_v_n_elem);
PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_n_elem);
- __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 157, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_v_lut_dtype) < 0) __PYX_ERR(0, 157, __pyx_L1_error)
- __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_5, __pyx_t_1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 157, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 157, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_v_lut_dtype) < 0) __PYX_ERR(0, 157, __pyx_L1_error)
+ __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 157, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_10);
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_v_lut = __pyx_t_10;
__pyx_t_10 = 0;
@@ -3831,30 +4123,30 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_histogramnd_get_lut(CYT
*/
__pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 158, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_10);
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_zeros); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 158, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 158, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
__pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 158, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_10);
__Pyx_INCREF(__pyx_v_n_bins);
__Pyx_GIVEREF(__pyx_v_n_bins);
PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_n_bins);
- __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 158, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 158, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 158, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_9);
- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_uint32); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 158, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_uint32); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 158, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(0, 158, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_10, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 158, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
+ if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_1) < 0) __PYX_ERR(0, 158, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_10, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 158, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_v_histo = __pyx_t_4;
- __pyx_t_4 = 0;
+ __pyx_v_histo = __pyx_t_1;
+ __pyx_t_1 = 0;
/* "silx/math/chistogramnd_lut.pyx":160
* histo = np.zeros(n_bins, dtype=np.uint32)
@@ -3863,16 +4155,16 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_histogramnd_get_lut(CYT
* sample_c = np.ascontiguousarray(sample.reshape((sample.size,)),
* dtype=dtype)
*/
- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_sample, __pyx_n_s_dtype); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 160, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_newbyteorder); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 160, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sample, __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 160, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_newbyteorder); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 160, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 160, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 160, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_v_dtype = __pyx_t_4;
- __pyx_t_4 = 0;
+ __pyx_v_dtype = __pyx_t_1;
+ __pyx_t_1 = 0;
/* "silx/math/chistogramnd_lut.pyx":161
*
@@ -3881,71 +4173,71 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_histogramnd_get_lut(CYT
* dtype=dtype)
*
*/
- __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 161, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_ascontiguousarray); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 161, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 161, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_ascontiguousarray); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 161, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_sample, __pyx_n_s_reshape); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 161, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_10);
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sample, __pyx_n_s_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 161, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_sample, __pyx_n_s_size); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 161, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
__pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 161, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_9);
- __Pyx_GIVEREF(__pyx_t_1);
- PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_1);
- __pyx_t_1 = 0;
- __pyx_t_1 = NULL;
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_4);
+ __pyx_t_4 = 0;
+ __pyx_t_4 = NULL;
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) {
- __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_10);
- if (likely(__pyx_t_1)) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_10);
+ if (likely(__pyx_t_4)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
- __Pyx_INCREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_4);
__Pyx_INCREF(function);
__Pyx_DECREF_SET(__pyx_t_10, function);
}
}
- if (!__pyx_t_1) {
- __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 161, __pyx_L1_error)
+ if (!__pyx_t_4) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 161, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_GOTREF(__pyx_t_1);
} else {
#if CYTHON_FAST_PYCALL
if (PyFunction_Check(__pyx_t_10)) {
- PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_t_9};
- __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 161, __pyx_L1_error)
- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
- __Pyx_GOTREF(__pyx_t_4);
+ PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_9};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 161, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
} else
#endif
#if CYTHON_FAST_PYCCALL
if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
- PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_t_9};
- __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 161, __pyx_L1_error)
- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
- __Pyx_GOTREF(__pyx_t_4);
+ PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_9};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 161, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
} else
#endif
{
__pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 161, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __pyx_t_1 = NULL;
+ __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __pyx_t_4 = NULL;
__Pyx_GIVEREF(__pyx_t_9);
PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_t_9);
__pyx_t_9 = 0;
- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 161, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 161, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
}
}
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
__pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 161, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_10);
- __Pyx_GIVEREF(__pyx_t_4);
- PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_4);
- __pyx_t_4 = 0;
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1);
+ __pyx_t_1 = 0;
/* "silx/math/chistogramnd_lut.pyx":162
* dtype = sample.dtype.newbyteorder("N")
@@ -3954,9 +4246,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_histogramnd_get_lut(CYT
*
* histo_range_c = np.ascontiguousarray(histo_range.reshape((histo_range.size,)),
*/
- __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 162, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_v_dtype) < 0) __PYX_ERR(0, 162, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 162, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_v_dtype) < 0) __PYX_ERR(0, 162, __pyx_L1_error)
/* "silx/math/chistogramnd_lut.pyx":161
*
@@ -3965,11 +4257,11 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_histogramnd_get_lut(CYT
* dtype=dtype)
*
*/
- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_10, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 161, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_10, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 161, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_v_sample_c = __pyx_t_3;
__pyx_t_3 = 0;
@@ -3982,8 +4274,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_histogramnd_get_lut(CYT
*/
__pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 164, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_ascontiguousarray); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 164, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_ascontiguousarray); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 164, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_histo_range, __pyx_n_s_reshape); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 164, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_10);
@@ -4028,15 +4320,15 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_histogramnd_get_lut(CYT
} else
#endif
{
- __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 164, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5); __pyx_t_5 = NULL;
+ __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 164, __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 = NULL;
__Pyx_GIVEREF(__pyx_t_9);
- PyTuple_SET_ITEM(__pyx_t_1, 0+1, __pyx_t_9);
+ PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_t_9);
__pyx_t_9 = 0;
- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 164, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 164, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
}
}
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
@@ -4053,18 +4345,18 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_histogramnd_get_lut(CYT
*
* n_bins_c = np.ascontiguousarray(n_bins.reshape((n_bins.size,)),
*/
- __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 165, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 165, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_histo_range, __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 165, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_newbyteorder); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 165, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_histo_range, __pyx_n_s_dtype); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 165, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_newbyteorder); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 165, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_9);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 165, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 165, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_1) < 0) __PYX_ERR(0, 165, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(0, 165, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "silx/math/chistogramnd_lut.pyx":164
* dtype=dtype)
@@ -4073,13 +4365,13 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_histogramnd_get_lut(CYT
* dtype=histo_range.dtype.newbyteorder("N"))
*
*/
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_10, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 164, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_10, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 164, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_v_histo_range_c = __pyx_t_1;
- __pyx_t_1 = 0;
+ __pyx_v_histo_range_c = __pyx_t_4;
+ __pyx_t_4 = 0;
/* "silx/math/chistogramnd_lut.pyx":167
* dtype=histo_range.dtype.newbyteorder("N"))
@@ -4088,71 +4380,71 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_histogramnd_get_lut(CYT
* dtype=np.int32)
*
*/
- __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 167, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_ascontiguousarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 167, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 167, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_ascontiguousarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 167, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_n_bins, __pyx_n_s_reshape); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 167, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_10);
- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_n_bins, __pyx_n_s_size); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 167, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_n_bins, __pyx_n_s_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 167, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
__pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 167, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_9);
- __Pyx_GIVEREF(__pyx_t_4);
- PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_4);
- __pyx_t_4 = 0;
- __pyx_t_4 = NULL;
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_1 = NULL;
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) {
- __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_10);
- if (likely(__pyx_t_4)) {
+ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_10);
+ if (likely(__pyx_t_1)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
- __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(__pyx_t_1);
__Pyx_INCREF(function);
__Pyx_DECREF_SET(__pyx_t_10, function);
}
}
- if (!__pyx_t_4) {
- __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 167, __pyx_L1_error)
+ if (!__pyx_t_1) {
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 167, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GOTREF(__pyx_t_4);
} else {
#if CYTHON_FAST_PYCALL
if (PyFunction_Check(__pyx_t_10)) {
- PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_9};
- __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 167, __pyx_L1_error)
- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- __Pyx_GOTREF(__pyx_t_1);
+ PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_t_9};
+ __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 167, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
} else
#endif
#if CYTHON_FAST_PYCCALL
if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
- PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_9};
- __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 167, __pyx_L1_error)
- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- __Pyx_GOTREF(__pyx_t_1);
+ PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_t_9};
+ __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 167, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
} else
#endif
{
__pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 167, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
- __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
+ __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); __pyx_t_1 = NULL;
__Pyx_GIVEREF(__pyx_t_9);
PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_9);
__pyx_t_9 = 0;
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 167, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 167, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
}
}
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
__pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 167, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_10);
- __Pyx_GIVEREF(__pyx_t_1);
- PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1);
- __pyx_t_1 = 0;
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_4);
+ __pyx_t_4 = 0;
/* "silx/math/chistogramnd_lut.pyx":168
*
@@ -4161,14 +4453,14 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_histogramnd_get_lut(CYT
*
* lut_c = np.ascontiguousarray(lut.reshape((lut.size,)))
*/
- __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 168, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 168, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
__pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 168, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int32); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 168, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_9);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(0, 168, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(0, 168, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
/* "silx/math/chistogramnd_lut.pyx":167
@@ -4178,11 +4470,11 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_histogramnd_get_lut(CYT
* dtype=np.int32)
*
*/
- __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_10, __pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 167, __pyx_L1_error)
+ __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_10, __pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 167, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_9);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_v_n_bins_c = __pyx_t_9;
__pyx_t_9 = 0;
@@ -4193,19 +4485,19 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_histogramnd_get_lut(CYT
* histo_c = np.ascontiguousarray(histo.reshape((histo.size,)),
* dtype=histo.dtype.newbyteorder('N'))
*/
- __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 170, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_ascontiguousarray); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 170, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 170, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_ascontiguousarray); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 170, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_10);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_lut, __pyx_n_s_reshape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 170, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_lut, __pyx_n_s_size); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 170, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 170, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 170, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
__Pyx_GIVEREF(__pyx_t_5);
- PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5);
__pyx_t_5 = 0;
__pyx_t_5 = NULL;
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
@@ -4218,37 +4510,37 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_histogramnd_get_lut(CYT
}
}
if (!__pyx_t_5) {
- __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 170, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 170, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
} else {
#if CYTHON_FAST_PYCALL
if (PyFunction_Check(__pyx_t_3)) {
- PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
- __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 170, __pyx_L1_error)
+ PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_1};
+ __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 170, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
} else
#endif
#if CYTHON_FAST_PYCCALL
if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
- PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
- __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 170, __pyx_L1_error)
+ PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_1};
+ __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 170, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
} else
#endif
{
__pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 170, __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_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 170, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_11, 0+1, __pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_11, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 170, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
}
}
@@ -4264,35 +4556,35 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_histogramnd_get_lut(CYT
}
}
if (!__pyx_t_3) {
- __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 170, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 170, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_GOTREF(__pyx_t_9);
} else {
#if CYTHON_FAST_PYCALL
if (PyFunction_Check(__pyx_t_10)) {
- PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_1};
+ PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_4};
__pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 170, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_GOTREF(__pyx_t_9);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __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_3, __pyx_t_1};
+ PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_4};
__pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 170, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_GOTREF(__pyx_t_9);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __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, 170, __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 = NULL;
- __Pyx_GIVEREF(__pyx_t_1);
- PyTuple_SET_ITEM(__pyx_t_11, 0+1, __pyx_t_1);
- __pyx_t_1 = 0;
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_11, 0+1, __pyx_t_4);
+ __pyx_t_4 = 0;
__pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_11, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 170, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_9);
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
@@ -4316,56 +4608,56 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_histogramnd_get_lut(CYT
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
__pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_histo, __pyx_n_s_reshape); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 171, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_11);
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_histo, __pyx_n_s_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 171, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_histo, __pyx_n_s_size); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 171, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
__pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 171, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __Pyx_GIVEREF(__pyx_t_1);
- PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
- __pyx_t_1 = 0;
- __pyx_t_1 = NULL;
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
+ __pyx_t_4 = 0;
+ __pyx_t_4 = NULL;
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) {
- __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_11);
- if (likely(__pyx_t_1)) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_11);
+ if (likely(__pyx_t_4)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
- __Pyx_INCREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_4);
__Pyx_INCREF(function);
__Pyx_DECREF_SET(__pyx_t_11, function);
}
}
- if (!__pyx_t_1) {
+ if (!__pyx_t_4) {
__pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 171, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_GOTREF(__pyx_t_9);
} else {
#if CYTHON_FAST_PYCALL
if (PyFunction_Check(__pyx_t_11)) {
- PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_t_3};
+ PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_3};
__pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 171, __pyx_L1_error)
- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_GOTREF(__pyx_t_9);
__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_1, __pyx_t_3};
+ PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_3};
__pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 171, __pyx_L1_error)
- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_GOTREF(__pyx_t_9);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
} else
#endif
{
- __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 171, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); __pyx_t_1 = NULL;
+ __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 171, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4); __pyx_t_4 = NULL;
__Pyx_GIVEREF(__pyx_t_3);
- PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_1, 0+1, __pyx_t_3);
__pyx_t_3 = 0;
- __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_4, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 171, __pyx_L1_error)
+ __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_1, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 171, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_9);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
}
}
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
@@ -4382,18 +4674,18 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_histogramnd_get_lut(CYT
*
* rc = 0
*/
- __pyx_t_9 = PyDict_New(); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 172, __pyx_L1_error)
+ __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 172, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_9);
- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_histo, __pyx_n_s_dtype); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 172, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_newbyteorder); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 172, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_histo, __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 172, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_newbyteorder); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 172, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 172, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 172, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(0, 172, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_dtype, __pyx_t_1) < 0) __PYX_ERR(0, 172, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
/* "silx/math/chistogramnd_lut.pyx":171
*
@@ -4402,13 +4694,13 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_histogramnd_get_lut(CYT
* dtype=histo.dtype.newbyteorder('N'))
*
*/
- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_11, __pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 171, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_11, __pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 171, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- __pyx_v_histo_c = __pyx_t_4;
- __pyx_t_4 = 0;
+ __pyx_v_histo_c = __pyx_t_1;
+ __pyx_t_1 = 0;
/* "silx/math/chistogramnd_lut.pyx":174
* dtype=histo.dtype.newbyteorder('N'))
@@ -4468,17 +4760,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_histogramnd_get_lut(CYT
#if CYTHON_FAST_PYCALL
if (PyFunction_Check(__pyx_t_9)) {
PyObject *__pyx_temp[9] = {__pyx_t_11, __pyx_v_sample_c, __pyx_v_n_dims, __pyx_v_n_elem, __pyx_v_histo_range_c, __pyx_v_n_bins_c, __pyx_v_lut_c, __pyx_v_histo_c, __pyx_v_last_bin_closed};
- __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_8, 8+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 177, __pyx_L13_error)
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_8, 8+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 177, __pyx_L13_error)
__Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
- __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_GOTREF(__pyx_t_1);
} else
#endif
#if CYTHON_FAST_PYCCALL
if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
PyObject *__pyx_temp[9] = {__pyx_t_11, __pyx_v_sample_c, __pyx_v_n_dims, __pyx_v_n_elem, __pyx_v_histo_range_c, __pyx_v_n_bins_c, __pyx_v_lut_c, __pyx_v_histo_c, __pyx_v_last_bin_closed};
- __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_8, 8+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 177, __pyx_L13_error)
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_8, 8+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 177, __pyx_L13_error)
__Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
- __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_GOTREF(__pyx_t_1);
} else
#endif
{
@@ -4511,13 +4803,13 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_histogramnd_get_lut(CYT
__Pyx_INCREF(__pyx_v_last_bin_closed);
__Pyx_GIVEREF(__pyx_v_last_bin_closed);
PyTuple_SET_ITEM(__pyx_t_10, 7+__pyx_t_8, __pyx_v_last_bin_closed);
- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 177, __pyx_L13_error)
- __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 177, __pyx_L13_error)
+ __Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
}
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- __Pyx_DECREF_SET(__pyx_v_rc, __pyx_t_4);
- __pyx_t_4 = 0;
+ __Pyx_DECREF_SET(__pyx_v_rc, __pyx_t_1);
+ __pyx_t_1 = 0;
/* "silx/math/chistogramnd_lut.pyx":176
* rc = 0
@@ -4530,16 +4822,15 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_histogramnd_get_lut(CYT
__Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
__Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
__Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
- goto __pyx_L20_try_end;
+ goto __pyx_L18_try_end;
__pyx_L13_error:;
- __Pyx_PyThreadState_assign
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
__Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
__Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
/* "silx/math/chistogramnd_lut.pyx":185
* histo_c,
@@ -4551,8 +4842,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_histogramnd_get_lut(CYT
__pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError);
if (__pyx_t_8) {
__Pyx_AddTraceback("silx.math.chistogramnd_lut.histogramnd_get_lut", __pyx_clineno, __pyx_lineno, __pyx_filename);
- if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_9, &__pyx_t_10) < 0) __PYX_ERR(0, 185, __pyx_L15_except_error)
- __Pyx_GOTREF(__pyx_t_4);
+ if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_9, &__pyx_t_10) < 0) __PYX_ERR(0, 185, __pyx_L15_except_error)
+ __Pyx_GOTREF(__pyx_t_1);
__Pyx_GOTREF(__pyx_t_9);
__Pyx_GOTREF(__pyx_t_10);
__Pyx_INCREF(__pyx_t_9);
@@ -4567,40 +4858,40 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_histogramnd_get_lut(CYT
*/
__pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Type_not_supported_sample_0, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 187, __pyx_L15_except_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_1 = NULL;
+ __pyx_t_4 = NULL;
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
- __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
- if (likely(__pyx_t_1)) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_4)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
- __Pyx_INCREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_4);
__Pyx_INCREF(function);
__Pyx_DECREF_SET(__pyx_t_3, function);
}
}
- if (!__pyx_t_1) {
+ if (!__pyx_t_4) {
__pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_sample_type); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 187, __pyx_L15_except_error)
__Pyx_GOTREF(__pyx_t_11);
} else {
#if CYTHON_FAST_PYCALL
if (PyFunction_Check(__pyx_t_3)) {
- PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_v_sample_type};
+ PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_sample_type};
__pyx_t_11 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 187, __pyx_L15_except_error)
- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_GOTREF(__pyx_t_11);
} else
#endif
#if CYTHON_FAST_PYCCALL
if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
- PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_v_sample_type};
+ PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_sample_type};
__pyx_t_11 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 187, __pyx_L15_except_error)
- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_GOTREF(__pyx_t_11);
} else
#endif
{
__pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 187, __pyx_L15_except_error)
__Pyx_GOTREF(__pyx_t_5);
- __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); __pyx_t_1 = NULL;
+ __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
__Pyx_INCREF(__pyx_v_sample_type);
__Pyx_GIVEREF(__pyx_v_sample_type);
PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_sample_type);
@@ -4618,16 +4909,11 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_histogramnd_get_lut(CYT
* ''.format(sample_type))
*
*/
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 186, __pyx_L15_except_error)
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_11); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 186, __pyx_L15_except_error)
__Pyx_GOTREF(__pyx_t_3);
- __Pyx_GIVEREF(__pyx_t_11);
- PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_11);
- __pyx_t_11 = 0;
- __pyx_t_11 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 186, __pyx_L15_except_error)
- __Pyx_GOTREF(__pyx_t_11);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_Raise(__pyx_t_11, 0, 0, 0);
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__PYX_ERR(0, 186, __pyx_L15_except_error)
}
goto __pyx_L15_except_error;
@@ -4640,13 +4926,12 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_histogramnd_get_lut(CYT
* rc = _histogramnd_get_lut_fused(sample_c,
* n_dims,
*/
- __Pyx_PyThreadState_assign
__Pyx_XGIVEREF(__pyx_t_12);
__Pyx_XGIVEREF(__pyx_t_13);
__Pyx_XGIVEREF(__pyx_t_14);
__Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
goto __pyx_L1_error;
- __pyx_L20_try_end:;
+ __pyx_L18_try_end:;
}
/* "silx/math/chistogramnd_lut.pyx":189
@@ -4659,7 +4944,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_histogramnd_get_lut(CYT
__pyx_t_10 = PyObject_RichCompare(__pyx_v_rc, __pyx_int_0, Py_NE); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 189, __pyx_L1_error)
__pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 189, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- if (__pyx_t_6) {
+ if (unlikely(__pyx_t_6)) {
/* "silx/math/chistogramnd_lut.pyx":191
* if rc != 0:
@@ -4670,46 +4955,46 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_histogramnd_get_lut(CYT
*/
__pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_histogramnd_returned_an_error_0, __pyx_n_s_format); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 191, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_9);
- __pyx_t_4 = NULL;
+ __pyx_t_1 = NULL;
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
- __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_9);
- if (likely(__pyx_t_4)) {
+ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_9);
+ if (likely(__pyx_t_1)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
- __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(__pyx_t_1);
__Pyx_INCREF(function);
__Pyx_DECREF_SET(__pyx_t_9, function);
}
}
- if (!__pyx_t_4) {
+ if (!__pyx_t_1) {
__pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_rc); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 191, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_10);
} else {
#if CYTHON_FAST_PYCALL
if (PyFunction_Check(__pyx_t_9)) {
- PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_rc};
+ PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_v_rc};
__pyx_t_10 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 191, __pyx_L1_error)
- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_GOTREF(__pyx_t_10);
} else
#endif
#if CYTHON_FAST_PYCCALL
if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
- PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_rc};
+ PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_v_rc};
__pyx_t_10 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 191, __pyx_L1_error)
- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_GOTREF(__pyx_t_10);
} else
#endif
{
- __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 191, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_11);
- __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_4); __pyx_t_4 = NULL;
+ __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 191, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __pyx_t_1 = NULL;
__Pyx_INCREF(__pyx_v_rc);
__Pyx_GIVEREF(__pyx_v_rc);
- PyTuple_SET_ITEM(__pyx_t_11, 0+1, __pyx_v_rc);
- __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_11, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 191, __pyx_L1_error)
+ PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_v_rc);
+ __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_3, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 191, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_10);
- __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
}
}
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
@@ -4721,16 +5006,11 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_histogramnd_get_lut(CYT
* ''.format(rc))
*
*/
- __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 190, __pyx_L1_error)
+ __pyx_t_9 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 190, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_9);
- __Pyx_GIVEREF(__pyx_t_10);
- PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_10);
- __pyx_t_10 = 0;
- __pyx_t_10 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_9, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 190, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_10);
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- __Pyx_Raise(__pyx_t_10, 0, 0, 0);
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_Raise(__pyx_t_9, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
__PYX_ERR(0, 190, __pyx_L1_error)
/* "silx/math/chistogramnd_lut.pyx":189
@@ -4749,10 +5029,10 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_histogramnd_get_lut(CYT
* histo_range = histo_range.reshape(-1)
* for i_dim in range(n_dims):
*/
- __pyx_t_10 = PyList_New(0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 193, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_10);
- __pyx_v_edges = ((PyObject*)__pyx_t_10);
- __pyx_t_10 = 0;
+ __pyx_t_9 = PyList_New(0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 193, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_v_edges = ((PyObject*)__pyx_t_9);
+ __pyx_t_9 = 0;
/* "silx/math/chistogramnd_lut.pyx":194
*
@@ -4761,13 +5041,13 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_histogramnd_get_lut(CYT
* for i_dim in range(n_dims):
* dim_edges = np.zeros(n_bins[i_dim] + 1)
*/
- __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_histo_range, __pyx_n_s_reshape); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 194, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_10);
- __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 194, __pyx_L1_error)
+ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_histo_range, __pyx_n_s_reshape); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 194, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_9);
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- __Pyx_DECREF_SET(__pyx_v_histo_range, __pyx_t_9);
- __pyx_t_9 = 0;
+ __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 194, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_DECREF_SET(__pyx_v_histo_range, __pyx_t_10);
+ __pyx_t_10 = 0;
/* "silx/math/chistogramnd_lut.pyx":195
* edges = []
@@ -4776,14 +5056,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_histogramnd_get_lut(CYT
* dim_edges = np.zeros(n_bins[i_dim] + 1)
* rng_min = histo_range[2 * i_dim]
*/
- __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 195, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- __Pyx_INCREF(__pyx_v_n_dims);
- __Pyx_GIVEREF(__pyx_v_n_dims);
- PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_n_dims);
- __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_9, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 195, __pyx_L1_error)
+ __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_v_n_dims); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 195, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_10);
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
if (likely(PyList_CheckExact(__pyx_t_10)) || PyTuple_CheckExact(__pyx_t_10)) {
__pyx_t_9 = __pyx_t_10; __Pyx_INCREF(__pyx_t_9); __pyx_t_2 = 0;
__pyx_t_15 = NULL;
@@ -4817,7 +5091,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_histogramnd_get_lut(CYT
if (unlikely(!__pyx_t_10)) {
PyObject* exc_type = PyErr_Occurred();
if (exc_type) {
- if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
else __PYX_ERR(0, 195, __pyx_L1_error)
}
break;
@@ -4834,62 +5108,62 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_histogramnd_get_lut(CYT
* rng_min = histo_range[2 * i_dim]
* rng_max = histo_range[2 * i_dim + 1]
*/
- __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 196, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_11);
- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 196, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
- __pyx_t_11 = PyObject_GetItem(__pyx_v_n_bins, __pyx_v_i_dim); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 196, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_11);
- __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_t_11, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 196, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 196, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
- __pyx_t_11 = NULL;
- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
- __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_4);
- if (likely(__pyx_t_11)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
- __Pyx_INCREF(__pyx_t_11);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_zeros); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 196, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_n_bins, __pyx_v_i_dim); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 196, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_11 = __Pyx_PyInt_AddObjC(__pyx_t_3, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 196, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_3);
__Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_4, function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
}
}
- if (!__pyx_t_11) {
- __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 196, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (!__pyx_t_3) {
+ __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_11); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 196, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
__Pyx_GOTREF(__pyx_t_10);
} else {
#if CYTHON_FAST_PYCALL
- if (PyFunction_Check(__pyx_t_4)) {
- PyObject *__pyx_temp[2] = {__pyx_t_11, __pyx_t_3};
- __pyx_t_10 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 196, __pyx_L1_error)
- __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_11};
+ __pyx_t_10 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 196, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_GOTREF(__pyx_t_10);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
} else
#endif
#if CYTHON_FAST_PYCCALL
- if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
- PyObject *__pyx_temp[2] = {__pyx_t_11, __pyx_t_3};
- __pyx_t_10 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 196, __pyx_L1_error)
- __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_11};
+ __pyx_t_10 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 196, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_GOTREF(__pyx_t_10);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
} else
#endif
{
__pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 196, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
- __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_11); __pyx_t_11 = NULL;
- __Pyx_GIVEREF(__pyx_t_3);
- PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_3);
- __pyx_t_3 = 0;
- __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 196, __pyx_L1_error)
+ __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
+ __Pyx_GIVEREF(__pyx_t_11);
+ PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_11);
+ __pyx_t_11 = 0;
+ __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 196, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_10);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
}
}
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_XDECREF_SET(__pyx_v_dim_edges, __pyx_t_10);
__pyx_t_10 = 0;
@@ -4902,11 +5176,11 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_histogramnd_get_lut(CYT
*/
__pyx_t_10 = PyNumber_Multiply(__pyx_int_2, __pyx_v_i_dim); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 197, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_10);
- __pyx_t_4 = PyObject_GetItem(__pyx_v_histo_range, __pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 197, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_histo_range, __pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 197, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- __Pyx_XDECREF_SET(__pyx_v_rng_min, __pyx_t_4);
- __pyx_t_4 = 0;
+ __Pyx_XDECREF_SET(__pyx_v_rng_min, __pyx_t_1);
+ __pyx_t_1 = 0;
/* "silx/math/chistogramnd_lut.pyx":198
* dim_edges = np.zeros(n_bins[i_dim] + 1)
@@ -4915,16 +5189,16 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_histogramnd_get_lut(CYT
* dim_edges[:-1] = (rng_min + np.arange(n_bins[i_dim]) *
* ((rng_max - rng_min) / n_bins[i_dim]))
*/
- __pyx_t_4 = PyNumber_Multiply(__pyx_int_2, __pyx_v_i_dim); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 198, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_10 = __Pyx_PyInt_AddObjC(__pyx_t_4, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 198, __pyx_L1_error)
+ __pyx_t_1 = PyNumber_Multiply(__pyx_int_2, __pyx_v_i_dim); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 198, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_10 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 198, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_10);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = PyObject_GetItem(__pyx_v_histo_range, __pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 198, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_histo_range, __pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 198, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- __Pyx_XDECREF_SET(__pyx_v_rng_max, __pyx_t_4);
- __pyx_t_4 = 0;
+ __Pyx_XDECREF_SET(__pyx_v_rng_max, __pyx_t_1);
+ __pyx_t_1 = 0;
/* "silx/math/chistogramnd_lut.pyx":199
* rng_min = histo_range[2 * i_dim]
@@ -4938,51 +5212,51 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_histogramnd_get_lut(CYT
__pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_arange); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 199, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- __pyx_t_10 = PyObject_GetItem(__pyx_v_n_bins, __pyx_v_i_dim); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __pyx_t_10 = __Pyx_PyObject_GetItem(__pyx_v_n_bins, __pyx_v_i_dim); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 199, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_10);
- __pyx_t_3 = NULL;
+ __pyx_t_11 = NULL;
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
- __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
- if (likely(__pyx_t_3)) {
+ __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_3);
+ __Pyx_INCREF(__pyx_t_11);
__Pyx_INCREF(function);
__Pyx_DECREF_SET(__pyx_t_5, function);
}
}
- if (!__pyx_t_3) {
- __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 199, __pyx_L1_error)
+ if (!__pyx_t_11) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_GOTREF(__pyx_t_1);
} else {
#if CYTHON_FAST_PYCALL
if (PyFunction_Check(__pyx_t_5)) {
- PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_10};
- __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 199, __pyx_L1_error)
- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_GOTREF(__pyx_t_4);
+ PyObject *__pyx_temp[2] = {__pyx_t_11, __pyx_t_10};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
__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[2] = {__pyx_t_3, __pyx_t_10};
- __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 199, __pyx_L1_error)
- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_GOTREF(__pyx_t_4);
+ PyObject *__pyx_temp[2] = {__pyx_t_11, __pyx_t_10};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
__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, 199, __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 = NULL;
+ __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_11); __pyx_t_11 = NULL;
__Pyx_GIVEREF(__pyx_t_10);
- PyTuple_SET_ITEM(__pyx_t_11, 0+1, __pyx_t_10);
+ PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_t_10);
__pyx_t_10 = 0;
- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_11, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 199, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
}
}
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
@@ -4996,12 +5270,12 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_histogramnd_get_lut(CYT
*/
__pyx_t_5 = PyNumber_Subtract(__pyx_v_rng_max, __pyx_v_rng_min); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 200, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_11 = PyObject_GetItem(__pyx_v_n_bins, __pyx_v_i_dim); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 200, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_11);
- __pyx_t_10 = __Pyx_PyNumber_Divide(__pyx_t_5, __pyx_t_11); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 200, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_n_bins, __pyx_v_i_dim); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 200, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_10 = __Pyx_PyNumber_Divide(__pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 200, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_10);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
/* "silx/math/chistogramnd_lut.pyx":199
* rng_min = histo_range[2 * i_dim]
@@ -5010,13 +5284,13 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_histogramnd_get_lut(CYT
* ((rng_max - rng_min) / n_bins[i_dim]))
* dim_edges[-1] = rng_max
*/
- __pyx_t_11 = PyNumber_Multiply(__pyx_t_4, __pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 199, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_11);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_3 = PyNumber_Multiply(__pyx_t_1, __pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- __pyx_t_10 = PyNumber_Add(__pyx_v_rng_min, __pyx_t_11); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __pyx_t_10 = PyNumber_Add(__pyx_v_rng_min, __pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 199, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_10);
- __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
if (__Pyx_PyObject_SetSlice(__pyx_v_dim_edges, __pyx_t_10, 0, -1L, NULL, NULL, &__pyx_slice__10, 0, 1, 1) < 0) __PYX_ERR(0, 199, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
@@ -5036,7 +5310,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_histogramnd_get_lut(CYT
*
* return lut, histo, tuple(edges)
*/
- __pyx_t_16 = __Pyx_PyList_Append(__pyx_v_edges, __pyx_v_dim_edges); if (unlikely(__pyx_t_16 == -1)) __PYX_ERR(0, 202, __pyx_L1_error)
+ __pyx_t_16 = __Pyx_PyList_Append(__pyx_v_edges, __pyx_v_dim_edges); if (unlikely(__pyx_t_16 == ((int)-1))) __PYX_ERR(0, 202, __pyx_L1_error)
/* "silx/math/chistogramnd_lut.pyx":195
* edges = []
@@ -5207,54 +5481,69 @@ static PyObject *__pyx_pw_4silx_4math_16chistogramnd_lut_3histogramnd_from_lut(P
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
switch (pos_args) {
case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
+ CYTHON_FALLTHROUGH;
case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
+ CYTHON_FALLTHROUGH;
case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ CYTHON_FALLTHROUGH;
case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
case 0: break;
default: goto __pyx_L5_argtuple_error;
}
kw_args = PyDict_Size(__pyx_kwds);
switch (pos_args) {
case 0:
- if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_weights)) != 0)) kw_args--;
+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_weights)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
case 1:
- if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_histo_lut)) != 0)) kw_args--;
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_histo_lut)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("histogramnd_from_lut", 0, 2, 8, 1); __PYX_ERR(0, 211, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 2:
if (kw_args > 0) {
- PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_histo);
+ PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_histo);
if (value) { values[2] = value; kw_args--; }
}
+ CYTHON_FALLTHROUGH;
case 3:
if (kw_args > 0) {
- PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_weighted_histo);
+ PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_weighted_histo);
if (value) { values[3] = value; kw_args--; }
}
+ CYTHON_FALLTHROUGH;
case 4:
if (kw_args > 0) {
- PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_shape);
+ PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_shape);
if (value) { values[4] = value; kw_args--; }
}
+ CYTHON_FALLTHROUGH;
case 5:
if (kw_args > 0) {
- PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dtype);
+ PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dtype);
if (value) { values[5] = value; kw_args--; }
}
+ CYTHON_FALLTHROUGH;
case 6:
if (kw_args > 0) {
- PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_weight_min);
+ PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_weight_min);
if (value) { values[6] = value; kw_args--; }
}
+ CYTHON_FALLTHROUGH;
case 7:
if (kw_args > 0) {
- PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_weight_max);
+ PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_weight_max);
if (value) { values[7] = value; kw_args--; }
}
}
@@ -5264,11 +5553,17 @@ static PyObject *__pyx_pw_4silx_4math_16chistogramnd_lut_3histogramnd_from_lut(P
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
+ CYTHON_FALLTHROUGH;
case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
+ CYTHON_FALLTHROUGH;
case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ CYTHON_FALLTHROUGH;
case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
break;
@@ -5373,7 +5668,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_2histogramnd_from_lut(C
*/
__pyx_t_1 = (__pyx_v_shape == Py_None);
__pyx_t_2 = (__pyx_t_1 != 0);
- if (__pyx_t_2) {
+ if (unlikely(__pyx_t_2)) {
/* "silx/math/chistogramnd_lut.pyx":225
* if histo is None and weighted_histo is None:
@@ -5445,7 +5740,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_2histogramnd_from_lut(C
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__pyx_t_1 = __pyx_t_3;
__pyx_L9_bool_binop_done:;
- if (__pyx_t_1) {
+ if (unlikely(__pyx_t_1)) {
/* "silx/math/chistogramnd_lut.pyx":231
* if shape is not None:
@@ -5513,7 +5808,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_2histogramnd_from_lut(C
* list(weighted_histo.shape) != list(shape)):
* raise ValueError('The <shape> value does not match'
*/
- if (__pyx_t_1) {
+ if (unlikely(__pyx_t_1)) {
/* "silx/math/chistogramnd_lut.pyx":236
* if(weighted_histo is not None and
@@ -5628,7 +5923,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_2histogramnd_from_lut(C
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 245, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- if (__pyx_t_1) {
+ if (unlikely(__pyx_t_1)) {
/* "silx/math/chistogramnd_lut.pyx":249
* 'the expected type '
@@ -5703,16 +5998,11 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_2histogramnd_from_lut(C
* 'the expected type '
* ': should be {0} instead of {1}.'
*/
- __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 246, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 246, __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, 246, __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_Raise(__pyx_t_4, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__PYX_ERR(0, 246, __pyx_L1_error)
/* "silx/math/chistogramnd_lut.pyx":245
@@ -5742,16 +6032,16 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_2histogramnd_from_lut(C
* raise ValueError('The <histo> shape does not match'
* 'the <weighted_histo> shape.')
*/
- __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_histo, __pyx_n_s_shape); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 252, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_weighted_histo, __pyx_n_s_shape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 252, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_histo, __pyx_n_s_shape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 252, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_10 = PyObject_RichCompare(__pyx_t_6, __pyx_t_4, Py_NE); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 252, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_weighted_histo, __pyx_n_s_shape); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 252, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_10 = PyObject_RichCompare(__pyx_t_4, __pyx_t_6, Py_NE); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 252, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 252, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- if (__pyx_t_2) {
+ if (unlikely(__pyx_t_2)) {
/* "silx/math/chistogramnd_lut.pyx":253
* if weighted_histo is not None:
@@ -5804,28 +6094,28 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_2histogramnd_from_lut(C
/*else*/ {
__pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 256, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_10);
- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 256, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_zeros); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 256, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
__pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 256, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_10);
__Pyx_INCREF(__pyx_v_shape);
__Pyx_GIVEREF(__pyx_v_shape);
PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_shape);
- __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 256, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 256, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
__pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 256, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_uint32); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 256, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_t_7) < 0) __PYX_ERR(0, 256, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_7) < 0) __PYX_ERR(0, 256, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_10, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 256, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 256, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF_SET(__pyx_v_histo, __pyx_t_7);
__pyx_t_7 = 0;
}
@@ -5930,11 +6220,11 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_2histogramnd_from_lut(C
*/
__pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_weighted_histo, __pyx_n_s_dtype); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 266, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
- __pyx_t_6 = PyObject_RichCompare(__pyx_t_7, __pyx_v_dtype, Py_NE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 266, __pyx_L1_error)
+ __pyx_t_4 = PyObject_RichCompare(__pyx_t_7, __pyx_v_dtype, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 266, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 266, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- if (__pyx_t_1) {
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 266, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ if (unlikely(__pyx_t_1)) {
/* "silx/math/chistogramnd_lut.pyx":267
* elif weighted_histo is not None:
@@ -5943,10 +6233,10 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_2histogramnd_from_lut(C
* ' do not match.')
* dtype = weighted_histo.dtype
*/
- __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 267, __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_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 267, __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, 267, __pyx_L1_error)
/* "silx/math/chistogramnd_lut.pyx":266
@@ -5965,10 +6255,10 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_2histogramnd_from_lut(C
*
* if weighted_histo is None:
*/
- __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_weighted_histo, __pyx_n_s_dtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 269, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
- __Pyx_DECREF_SET(__pyx_v_dtype, __pyx_t_6);
- __pyx_t_6 = 0;
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_weighted_histo, __pyx_n_s_dtype); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 269, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF_SET(__pyx_v_dtype, __pyx_t_4);
+ __pyx_t_4 = 0;
/* "silx/math/chistogramnd_lut.pyx":265
* else:
@@ -5998,26 +6288,26 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_2histogramnd_from_lut(C
*
* if histo_lut.size != weights.size:
*/
- __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 272, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
- __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_zeros); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 272, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 272, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 272, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 272, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 272, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
__Pyx_INCREF(__pyx_v_shape);
__Pyx_GIVEREF(__pyx_v_shape);
- PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_shape);
- __pyx_t_10 = PyDict_New(); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 272, __pyx_L1_error)
+ PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_shape);
+ __pyx_t_10 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 272, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_10);
if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_dtype, __pyx_v_dtype) < 0) __PYX_ERR(0, 272, __pyx_L1_error)
- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_6, __pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 272, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_4, __pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 272, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- __Pyx_DECREF_SET(__pyx_v_weighted_histo, __pyx_t_4);
- __pyx_t_4 = 0;
+ __Pyx_DECREF_SET(__pyx_v_weighted_histo, __pyx_t_6);
+ __pyx_t_6 = 0;
/* "silx/math/chistogramnd_lut.pyx":271
* dtype = weighted_histo.dtype
@@ -6035,16 +6325,16 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_2histogramnd_from_lut(C
* raise ValueError('The LUT and weights arrays must have the same '
* 'number of elements.')
*/
- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_histo_lut, __pyx_n_s_size); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 274, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_histo_lut, __pyx_n_s_size); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 274, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
__pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_weights, __pyx_n_s_size); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 274, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_10);
- __pyx_t_6 = PyObject_RichCompare(__pyx_t_4, __pyx_t_10, Py_NE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 274, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 274, __pyx_L1_error)
+ __pyx_t_4 = PyObject_RichCompare(__pyx_t_6, __pyx_t_10, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 274, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- if (__pyx_t_2) {
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 274, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ if (unlikely(__pyx_t_2)) {
/* "silx/math/chistogramnd_lut.pyx":275
*
@@ -6053,10 +6343,10 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_2histogramnd_from_lut(C
* 'number of elements.')
*
*/
- __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 275, __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_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 275, __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, 275, __pyx_L1_error)
/* "silx/math/chistogramnd_lut.pyx":274
@@ -6075,13 +6365,13 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_2histogramnd_from_lut(C
* dtype=weights.dtype.newbyteorder('N'))
*
*/
- __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 278, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
- __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_ascontiguousarray); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 278, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_10);
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_weights, __pyx_n_s_reshape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 278, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 278, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_ascontiguousarray); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 278, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_weights, __pyx_n_s_reshape); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 278, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
__pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_weights, __pyx_n_s_size); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 278, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
__pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 278, __pyx_L1_error)
@@ -6090,35 +6380,35 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_2histogramnd_from_lut(C
PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_7);
__pyx_t_7 = 0;
__pyx_t_7 = NULL;
- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
- __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
+ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
if (likely(__pyx_t_7)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
__Pyx_INCREF(__pyx_t_7);
__Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_4, function);
+ __Pyx_DECREF_SET(__pyx_t_6, function);
}
}
if (!__pyx_t_7) {
- __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 278, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 278, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_GOTREF(__pyx_t_4);
} else {
#if CYTHON_FAST_PYCALL
- if (PyFunction_Check(__pyx_t_4)) {
+ if (PyFunction_Check(__pyx_t_6)) {
PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_5};
- __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 278, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 278, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
- __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
} else
#endif
#if CYTHON_FAST_PYCCALL
- if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_5};
- __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 278, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 278, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
- __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
} else
#endif
@@ -6129,17 +6419,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_2histogramnd_from_lut(C
__Pyx_GIVEREF(__pyx_t_5);
PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_5);
__pyx_t_5 = 0;
- __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 278, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 278, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
}
}
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 278, __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_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 278, __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 = 0;
/* "silx/math/chistogramnd_lut.pyx":279
*
@@ -6148,8 +6438,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_2histogramnd_from_lut(C
*
* h_c = np.ascontiguousarray(histo.reshape((histo.size,)),
*/
- __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 279, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 279, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
__pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_weights, __pyx_n_s_dtype); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 279, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_8);
__pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_newbyteorder); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 279, __pyx_L1_error)
@@ -6158,7 +6448,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_2histogramnd_from_lut(C
__pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 279, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_t_8) < 0) __PYX_ERR(0, 279, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_8) < 0) __PYX_ERR(0, 279, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
/* "silx/math/chistogramnd_lut.pyx":278
@@ -6168,11 +6458,11 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_2histogramnd_from_lut(C
* dtype=weights.dtype.newbyteorder('N'))
*
*/
- __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 278, __pyx_L1_error)
+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 278, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_v_w_c = __pyx_t_8;
__pyx_t_8 = 0;
@@ -6185,11 +6475,11 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_2histogramnd_from_lut(C
*/
__pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 281, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_8);
- __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_ascontiguousarray); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 281, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_histo, __pyx_n_s_reshape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 281, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_ascontiguousarray); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 281, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_histo, __pyx_n_s_reshape); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 281, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
__pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_histo, __pyx_n_s_size); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 281, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_10);
__pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 281, __pyx_L1_error)
@@ -6198,33 +6488,33 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_2histogramnd_from_lut(C
PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_10);
__pyx_t_10 = 0;
__pyx_t_10 = NULL;
- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
- __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_4);
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
+ __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_6);
if (likely(__pyx_t_10)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
__Pyx_INCREF(__pyx_t_10);
__Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_4, function);
+ __Pyx_DECREF_SET(__pyx_t_6, function);
}
}
if (!__pyx_t_10) {
- __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 281, __pyx_L1_error)
+ __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 281, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_GOTREF(__pyx_t_8);
} else {
#if CYTHON_FAST_PYCALL
- if (PyFunction_Check(__pyx_t_4)) {
+ if (PyFunction_Check(__pyx_t_6)) {
PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_t_5};
- __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 281, __pyx_L1_error)
+ __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 281, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
} else
#endif
#if CYTHON_FAST_PYCCALL
- if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_t_5};
- __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 281, __pyx_L1_error)
+ __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 281, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
@@ -6237,16 +6527,16 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_2histogramnd_from_lut(C
__Pyx_GIVEREF(__pyx_t_5);
PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_5);
__pyx_t_5 = 0;
- __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 281, __pyx_L1_error)
+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 281, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
}
}
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 281, __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, 281, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
__Pyx_GIVEREF(__pyx_t_8);
- PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_8);
+ PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8);
__pyx_t_8 = 0;
/* "silx/math/chistogramnd_lut.pyx":282
@@ -6256,7 +6546,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_2histogramnd_from_lut(C
*
* w_h_c = np.ascontiguousarray(weighted_histo.reshape((weighted_histo.size,)),
*/
- __pyx_t_8 = PyDict_New(); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 282, __pyx_L1_error)
+ __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 282, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_8);
__pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_histo, __pyx_n_s_dtype); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 282, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
@@ -6276,10 +6566,10 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_2histogramnd_from_lut(C
* dtype=histo.dtype.newbyteorder('N'))
*
*/
- __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_4, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 281, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 281, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__pyx_v_h_c = __pyx_t_7;
__pyx_t_7 = 0;
@@ -6296,44 +6586,44 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_2histogramnd_from_lut(C
__pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_ascontiguousarray); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 284, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_weighted_histo, __pyx_n_s_reshape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 284, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_weighted_histo, __pyx_n_s_size); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 284, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_weighted_histo, __pyx_n_s_reshape); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 284, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_weighted_histo, __pyx_n_s_size); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 284, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
__pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 284, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
- __Pyx_GIVEREF(__pyx_t_6);
- PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6);
- __pyx_t_6 = 0;
- __pyx_t_6 = NULL;
- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
- __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
- if (likely(__pyx_t_6)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
- __Pyx_INCREF(__pyx_t_6);
+ __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_6))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+ __Pyx_INCREF(__pyx_t_4);
__Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_4, function);
+ __Pyx_DECREF_SET(__pyx_t_6, function);
}
}
- if (!__pyx_t_6) {
- __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 284, __pyx_L1_error)
+ if (!__pyx_t_4) {
+ __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 284, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_GOTREF(__pyx_t_7);
} else {
#if CYTHON_FAST_PYCALL
- if (PyFunction_Check(__pyx_t_4)) {
- PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5};
- __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 284, __pyx_L1_error)
- __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ if (PyFunction_Check(__pyx_t_6)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_5};
+ __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 284, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
} else
#endif
#if CYTHON_FAST_PYCCALL
- if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
- PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5};
- __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 284, __pyx_L1_error)
- __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_5};
+ __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 284, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
} else
@@ -6341,20 +6631,20 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_2histogramnd_from_lut(C
{
__pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 284, __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_4); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_4); __pyx_t_4 = NULL;
__Pyx_GIVEREF(__pyx_t_5);
PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_5);
__pyx_t_5 = 0;
- __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_10, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 284, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 284, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
}
}
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 284, __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, 284, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
__Pyx_GIVEREF(__pyx_t_7);
- PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_7);
+ PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
__pyx_t_7 = 0;
/* "silx/math/chistogramnd_lut.pyx":285
@@ -6364,7 +6654,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_2histogramnd_from_lut(C
*
* h_lut_c = np.ascontiguousarray(histo_lut.reshape((histo_lut.size,)),
*/
- __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 285, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 285, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
__pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_weighted_histo, __pyx_n_s_dtype); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 285, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_10);
@@ -6384,10 +6674,10 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_2histogramnd_from_lut(C
* dtype=weighted_histo.dtype.newbyteorder('N')) # noqa
*
*/
- __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_4, __pyx_t_7); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 284, __pyx_L1_error)
+ __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 284, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_10);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__pyx_v_w_h_c = __pyx_t_10;
__pyx_t_10 = 0;
@@ -6401,17 +6691,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_2histogramnd_from_lut(C
*/
__pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 287, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_ascontiguousarray); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 287, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_ascontiguousarray); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 287, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_histo_lut, __pyx_n_s_reshape); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 287, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_8);
__pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_histo_lut, __pyx_n_s_size); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 287, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 287, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 287, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
__Pyx_GIVEREF(__pyx_t_5);
- PyTuple_SET_ITEM(__pyx_t_6, 0, __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_8))) {
@@ -6424,35 +6714,35 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_2histogramnd_from_lut(C
}
}
if (!__pyx_t_5) {
- __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 287, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 287, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_GOTREF(__pyx_t_7);
} else {
#if CYTHON_FAST_PYCALL
if (PyFunction_Check(__pyx_t_8)) {
- PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_6};
+ PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
__pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 287, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_GOTREF(__pyx_t_7);
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
} else
#endif
#if CYTHON_FAST_PYCCALL
if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
- PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_6};
+ PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
__pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 287, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_GOTREF(__pyx_t_7);
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __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, 287, __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_6);
- PyTuple_SET_ITEM(__pyx_t_11, 0+1, __pyx_t_6);
- __pyx_t_6 = 0;
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_11, 0+1, __pyx_t_4);
+ __pyx_t_4 = 0;
__pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_11, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 287, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
@@ -6477,20 +6767,20 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_2histogramnd_from_lut(C
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
__pyx_t_11 = NULL;
__pyx_t_9 = 0;
- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
- __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_4);
+ if (CYTHON_UNPACK_METHODS && unlikely(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_4);
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
__Pyx_INCREF(__pyx_t_11);
__Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_4, function);
+ __Pyx_DECREF_SET(__pyx_t_6, function);
__pyx_t_9 = 1;
}
}
#if CYTHON_FAST_PYCALL
- if (PyFunction_Check(__pyx_t_4)) {
+ if (PyFunction_Check(__pyx_t_6)) {
PyObject *__pyx_temp[3] = {__pyx_t_11, __pyx_t_7, __pyx_t_8};
- __pyx_t_10 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 287, __pyx_L1_error)
+ __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, 287, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
__Pyx_GOTREF(__pyx_t_10);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
@@ -6498,9 +6788,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_2histogramnd_from_lut(C
} else
#endif
#if CYTHON_FAST_PYCCALL
- if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
PyObject *__pyx_temp[3] = {__pyx_t_11, __pyx_t_7, __pyx_t_8};
- __pyx_t_10 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 287, __pyx_L1_error)
+ __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, 287, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
__Pyx_GOTREF(__pyx_t_10);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
@@ -6508,22 +6798,22 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_2histogramnd_from_lut(C
} else
#endif
{
- __pyx_t_6 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 287, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_4 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 287, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
if (__pyx_t_11) {
- __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_11); __pyx_t_11 = NULL;
+ __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_11); __pyx_t_11 = NULL;
}
__Pyx_GIVEREF(__pyx_t_7);
- PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_9, __pyx_t_7);
+ PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_9, __pyx_t_7);
__Pyx_GIVEREF(__pyx_t_8);
- PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_9, __pyx_t_8);
+ PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_9, __pyx_t_8);
__pyx_t_7 = 0;
__pyx_t_8 = 0;
- __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 287, __pyx_L1_error)
+ __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_4, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 287, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_10);
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
}
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__pyx_v_h_lut_c = __pyx_t_10;
__pyx_t_10 = 0;
@@ -6663,8 +6953,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_2histogramnd_from_lut(C
* h_lut_c,
* h_c,
*/
- __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_histogramnd_from_lut_fused); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 305, __pyx_L26_error)
- __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_histogramnd_from_lut_fused); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 305, __pyx_L26_error)
+ __Pyx_GOTREF(__pyx_t_6);
/* "silx/math/chistogramnd_lut.pyx":309
* h_c,
@@ -6673,8 +6963,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_2histogramnd_from_lut(C
* filt_min_weights,
* w_dtype.type(weight_min),
*/
- __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_weights, __pyx_n_s_size); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 309, __pyx_L26_error)
- __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_weights, __pyx_n_s_size); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 309, __pyx_L26_error)
+ __Pyx_GOTREF(__pyx_t_4);
/* "silx/math/chistogramnd_lut.pyx":310
* w_h_c,
@@ -6803,23 +7093,23 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_2histogramnd_from_lut(C
__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_4))) {
- __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
+ 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_4);
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
__Pyx_INCREF(__pyx_t_5);
__Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_4, function);
+ __Pyx_DECREF_SET(__pyx_t_6, function);
__pyx_t_9 = 1;
}
}
#if CYTHON_FAST_PYCALL
- if (PyFunction_Check(__pyx_t_4)) {
- PyObject *__pyx_temp[10] = {__pyx_t_5, __pyx_v_w_c, __pyx_v_h_lut_c, __pyx_v_h_c, __pyx_v_w_h_c, __pyx_t_6, __pyx_t_8, __pyx_t_7, __pyx_t_11, __pyx_t_15};
- __pyx_t_10 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_9, 9+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 305, __pyx_L26_error)
+ if (PyFunction_Check(__pyx_t_6)) {
+ PyObject *__pyx_temp[10] = {__pyx_t_5, __pyx_v_w_c, __pyx_v_h_lut_c, __pyx_v_h_c, __pyx_v_w_h_c, __pyx_t_4, __pyx_t_8, __pyx_t_7, __pyx_t_11, __pyx_t_15};
+ __pyx_t_10 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 9+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 305, __pyx_L26_error)
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_GOTREF(__pyx_t_10);
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
@@ -6827,12 +7117,12 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_2histogramnd_from_lut(C
} else
#endif
#if CYTHON_FAST_PYCCALL
- if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
- PyObject *__pyx_temp[10] = {__pyx_t_5, __pyx_v_w_c, __pyx_v_h_lut_c, __pyx_v_h_c, __pyx_v_w_h_c, __pyx_t_6, __pyx_t_8, __pyx_t_7, __pyx_t_11, __pyx_t_15};
- __pyx_t_10 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_9, 9+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 305, __pyx_L26_error)
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
+ PyObject *__pyx_temp[10] = {__pyx_t_5, __pyx_v_w_c, __pyx_v_h_lut_c, __pyx_v_h_c, __pyx_v_w_h_c, __pyx_t_4, __pyx_t_8, __pyx_t_7, __pyx_t_11, __pyx_t_15};
+ __pyx_t_10 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 9+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 305, __pyx_L26_error)
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_GOTREF(__pyx_t_10);
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
@@ -6857,8 +7147,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_2histogramnd_from_lut(C
__Pyx_INCREF(__pyx_v_w_h_c);
__Pyx_GIVEREF(__pyx_v_w_h_c);
PyTuple_SET_ITEM(__pyx_t_17, 3+__pyx_t_9, __pyx_v_w_h_c);
- __Pyx_GIVEREF(__pyx_t_6);
- PyTuple_SET_ITEM(__pyx_t_17, 4+__pyx_t_9, __pyx_t_6);
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_17, 4+__pyx_t_9, __pyx_t_4);
__Pyx_GIVEREF(__pyx_t_8);
PyTuple_SET_ITEM(__pyx_t_17, 5+__pyx_t_9, __pyx_t_8);
__Pyx_GIVEREF(__pyx_t_7);
@@ -6867,16 +7157,16 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_2histogramnd_from_lut(C
PyTuple_SET_ITEM(__pyx_t_17, 7+__pyx_t_9, __pyx_t_11);
__Pyx_GIVEREF(__pyx_t_15);
PyTuple_SET_ITEM(__pyx_t_17, 8+__pyx_t_9, __pyx_t_15);
- __pyx_t_6 = 0;
+ __pyx_t_4 = 0;
__pyx_t_8 = 0;
__pyx_t_7 = 0;
__pyx_t_11 = 0;
__pyx_t_15 = 0;
- __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_17, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 305, __pyx_L26_error)
+ __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_17, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 305, __pyx_L26_error)
__Pyx_GOTREF(__pyx_t_10);
__Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
}
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
/* "silx/math/chistogramnd_lut.pyx":304
@@ -6890,18 +7180,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_2histogramnd_from_lut(C
__Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
__Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
__Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
- goto __pyx_L33_try_end;
+ goto __pyx_L31_try_end;
__pyx_L26_error:;
- __Pyx_PyThreadState_assign
__Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
- __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
__Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
__Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
__Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
__Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
/* "silx/math/chistogramnd_lut.pyx":314
@@ -6914,12 +7203,12 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_2histogramnd_from_lut(C
__pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError);
if (__pyx_t_9) {
__Pyx_AddTraceback("silx.math.chistogramnd_lut.histogramnd_from_lut", __pyx_clineno, __pyx_lineno, __pyx_filename);
- if (__Pyx_GetException(&__pyx_t_10, &__pyx_t_4, &__pyx_t_17) < 0) __PYX_ERR(0, 314, __pyx_L28_except_error)
+ if (__Pyx_GetException(&__pyx_t_10, &__pyx_t_6, &__pyx_t_17) < 0) __PYX_ERR(0, 314, __pyx_L28_except_error)
__Pyx_GOTREF(__pyx_t_10);
- __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_GOTREF(__pyx_t_6);
__Pyx_GOTREF(__pyx_t_17);
- __Pyx_INCREF(__pyx_t_4);
- __pyx_v_ex = __pyx_t_4;
+ __Pyx_INCREF(__pyx_t_6);
+ __pyx_v_ex = __pyx_t_6;
/* "silx/math/chistogramnd_lut.pyx":315
* w_dtype.type(weight_max))
@@ -6943,13 +7232,13 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_2histogramnd_from_lut(C
__Pyx_GOTREF(__pyx_t_7);
__pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_histo, __pyx_n_s_dtype); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 318, __pyx_L28_except_error)
__Pyx_GOTREF(__pyx_t_8);
- __pyx_t_6 = NULL;
+ __pyx_t_4 = NULL;
__pyx_t_9 = 0;
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) {
- __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_11);
- if (likely(__pyx_t_6)) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_11);
+ if (likely(__pyx_t_4)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
- __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(__pyx_t_4);
__Pyx_INCREF(function);
__Pyx_DECREF_SET(__pyx_t_11, function);
__pyx_t_9 = 1;
@@ -6957,9 +7246,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_2histogramnd_from_lut(C
}
#if CYTHON_FAST_PYCALL
if (PyFunction_Check(__pyx_t_11)) {
- PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_7, __pyx_t_8};
+ PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_7, __pyx_t_8};
__pyx_t_15 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 318, __pyx_L28_except_error)
- __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_GOTREF(__pyx_t_15);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
@@ -6967,9 +7256,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_2histogramnd_from_lut(C
#endif
#if CYTHON_FAST_PYCCALL
if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) {
- PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_7, __pyx_t_8};
+ PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_7, __pyx_t_8};
__pyx_t_15 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 318, __pyx_L28_except_error)
- __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_GOTREF(__pyx_t_15);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
@@ -6978,8 +7267,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_2histogramnd_from_lut(C
{
__pyx_t_5 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 318, __pyx_L28_except_error)
__Pyx_GOTREF(__pyx_t_5);
- if (__pyx_t_6) {
- __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __pyx_t_6 = NULL;
+ if (__pyx_t_4) {
+ __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
}
__Pyx_GIVEREF(__pyx_t_7);
PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_9, __pyx_t_7);
@@ -7000,16 +7289,11 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_2histogramnd_from_lut(C
* 'and histo:{1}.'
* ''.format(weights.dtype, histo.dtype))
*/
- __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 316, __pyx_L28_except_error)
+ __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_15); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 316, __pyx_L28_except_error)
__Pyx_GOTREF(__pyx_t_11);
- __Pyx_GIVEREF(__pyx_t_15);
- PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_15);
- __pyx_t_15 = 0;
- __pyx_t_15 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_11, NULL); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 316, __pyx_L28_except_error)
- __Pyx_GOTREF(__pyx_t_15);
- __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
- __Pyx_Raise(__pyx_t_15, 0, 0, 0);
__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+ __Pyx_Raise(__pyx_t_11, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
__PYX_ERR(0, 316, __pyx_L28_except_error)
}
goto __pyx_L28_except_error;
@@ -7022,13 +7306,12 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_2histogramnd_from_lut(C
* _histogramnd_from_lut_fused(w_c,
* h_lut_c,
*/
- __Pyx_PyThreadState_assign
__Pyx_XGIVEREF(__pyx_t_12);
__Pyx_XGIVEREF(__pyx_t_13);
__Pyx_XGIVEREF(__pyx_t_14);
__Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
goto __pyx_L1_error;
- __pyx_L33_try_end:;
+ __pyx_L31_try_end:;
}
/* "silx/math/chistogramnd_lut.pyx":320
@@ -7096,7 +7379,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_2histogramnd_from_lut(C
* @cython.cdivision(True)
* def _histogramnd_from_lut_fused(weights_t[:] i_weights, # <<<<<<<<<<<<<<
* lut_t[:] i_lut,
- * np.uint32_t[:] o_histo,
+ * cnumpy.uint32_t[:] o_histo,
*/
/* Python wrapper */
@@ -7119,29 +7402,36 @@ static PyObject *__pyx_pw_4silx_4math_16chistogramnd_lut_5_histogramnd_from_lut_
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
switch (pos_args) {
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
case 0: break;
default: goto __pyx_L5_argtuple_error;
}
kw_args = PyDict_Size(__pyx_kwds);
switch (pos_args) {
case 0:
- if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_signatures)) != 0)) kw_args--;
+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_signatures)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
case 1:
- if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_args)) != 0)) kw_args--;
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_args)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 1, 4, 4, 1); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 2:
- if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_kwargs)) != 0)) kw_args--;
+ if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_kwargs)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 1, 4, 4, 2); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 3:
- if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_defaults)) != 0)) kw_args--;
+ if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_defaults)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 1, 4, 4, 3); __PYX_ERR(0, 332, __pyx_L3_error)
}
@@ -7179,46 +7469,41 @@ static PyObject *__pyx_pw_4silx_4math_16chistogramnd_lut_5_histogramnd_from_lut_
static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_4_histogramnd_from_lut_fused(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_signatures, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs, CYTHON_UNUSED PyObject *__pyx_v_defaults) {
PyObject *__pyx_v_dest_sig = NULL;
+ Py_ssize_t __pyx_v_i;
PyTypeObject *__pyx_v_ndarray = 0;
- PyObject *__pyx_v_numpy = NULL;
__Pyx_memviewslice __pyx_v_memslice;
Py_ssize_t __pyx_v_itemsize;
int __pyx_v_dtype_signed;
char __pyx_v_kind;
- int __pyx_v____pyx_int16_t_is_signed;
- int __pyx_v____pyx_int64_t_is_signed;
int __pyx_v____pyx_int32_t_is_signed;
+ int __pyx_v____pyx_int64_t_is_signed;
+ int __pyx_v____pyx_int16_t_is_signed;
PyObject *__pyx_v_arg = NULL;
PyObject *__pyx_v_dtype = NULL;
PyObject *__pyx_v_arg_base = NULL;
PyObject *__pyx_v_candidates = NULL;
PyObject *__pyx_v_sig = NULL;
int __pyx_v_match_found;
- PyObject *__pyx_v_src_type = NULL;
+ PyObject *__pyx_v_src_sig = NULL;
PyObject *__pyx_v_dst_type = NULL;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
int __pyx_t_2;
int __pyx_t_3;
- PyObject *__pyx_t_4 = NULL;
- PyObject *__pyx_t_5 = NULL;
+ int __pyx_t_4;
+ Py_ssize_t __pyx_t_5;
PyObject *__pyx_t_6 = NULL;
- int __pyx_t_7;
- PyObject *__pyx_t_8 = NULL;
- PyObject *__pyx_t_9 = NULL;
- Py_ssize_t __pyx_t_10;
- long __pyx_t_11;
- __Pyx_memviewslice __pyx_t_12;
+ long __pyx_t_7;
+ __Pyx_memviewslice __pyx_t_8;
+ Py_ssize_t __pyx_t_9;
+ int __pyx_t_10;
+ int __pyx_t_11;
+ PyObject *__pyx_t_12 = NULL;
Py_ssize_t __pyx_t_13;
- int __pyx_t_14;
+ Py_ssize_t __pyx_t_14;
Py_ssize_t __pyx_t_15;
- PyObject *(*__pyx_t_16)(PyObject *);
- PyObject *__pyx_t_17 = NULL;
- PyObject *__pyx_t_18 = NULL;
- PyObject *__pyx_t_19 = NULL;
- PyObject *(*__pyx_t_20)(PyObject *);
- int __pyx_t_21;
+ int __pyx_t_16;
__Pyx_RefNannySetupContext("_histogramnd_from_lut_fused", 0);
__Pyx_INCREF(__pyx_v_kwargs);
__pyx_t_1 = PyList_New(1 * 3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 332, __pyx_L1_error)
@@ -7232,131 +7517,102 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_4_histogramnd_from_lut_
}
__pyx_v_dest_sig = ((PyObject*)__pyx_t_1);
__pyx_t_1 = 0;
- __pyx_t_2 = (__pyx_v_kwargs == Py_None);
- __pyx_t_3 = (__pyx_t_2 != 0);
- if (__pyx_t_3) {
- __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 332, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF_SET(__pyx_v_kwargs, __pyx_t_1);
- __pyx_t_1 = 0;
+ __pyx_t_3 = (__pyx_v_kwargs != Py_None);
+ __pyx_t_4 = (__pyx_t_3 != 0);
+ if (__pyx_t_4) {
+ } else {
+ __pyx_t_2 = __pyx_t_4;
+ goto __pyx_L4_bool_binop_done;
}
- {
- __Pyx_PyThreadState_declare
- __Pyx_PyThreadState_assign
- __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
- __Pyx_XGOTREF(__pyx_t_4);
- __Pyx_XGOTREF(__pyx_t_5);
- __Pyx_XGOTREF(__pyx_t_6);
- /*try:*/ {
- __pyx_t_1 = __Pyx_Import(__pyx_n_s_numpy, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 332, __pyx_L4_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_v_numpy = __pyx_t_1;
- __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_numpy, __pyx_n_s_ndarray); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 332, __pyx_L4_error)
- __Pyx_GOTREF(__pyx_t_1);
- if (!(likely(PyType_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "type", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 332, __pyx_L4_error)
- __pyx_v_ndarray = ((PyTypeObject*)__pyx_t_1);
- __pyx_t_1 = 0;
- }
- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
- __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
- goto __pyx_L11_try_end;
- __pyx_L4_error:;
- __Pyx_PyThreadState_assign
- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ImportError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError);
- if (__pyx_t_7) {
- __Pyx_AddTraceback("silx.math.chistogramnd_lut.__pyx_fused_cpdef", __pyx_clineno, __pyx_lineno, __pyx_filename);
- if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_8, &__pyx_t_9) < 0) __PYX_ERR(0, 332, __pyx_L6_except_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_GOTREF(__pyx_t_8);
- __Pyx_GOTREF(__pyx_t_9);
- __Pyx_INCREF(Py_None);
- __Pyx_XDECREF_SET(__pyx_v_ndarray, ((PyTypeObject*)Py_None));
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- goto __pyx_L5_exception_handled;
- }
- goto __pyx_L6_except_error;
- __pyx_L6_except_error:;
- __Pyx_PyThreadState_assign
- __Pyx_XGIVEREF(__pyx_t_4);
- __Pyx_XGIVEREF(__pyx_t_5);
- __Pyx_XGIVEREF(__pyx_t_6);
- __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
- goto __pyx_L1_error;
- __pyx_L5_exception_handled:;
- __Pyx_PyThreadState_assign
- __Pyx_XGIVEREF(__pyx_t_4);
- __Pyx_XGIVEREF(__pyx_t_5);
- __Pyx_XGIVEREF(__pyx_t_6);
- __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
- __pyx_L11_try_end:;
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_kwargs); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __pyx_t_3 = ((!__pyx_t_4) != 0);
+ __pyx_t_2 = __pyx_t_3;
+ __pyx_L4_bool_binop_done:;
+ if (__pyx_t_2) {
+ __Pyx_INCREF(Py_None);
+ __Pyx_DECREF_SET(__pyx_v_kwargs, Py_None);
}
+ __pyx_t_1 = ((PyObject *)__Pyx_ImportNumPyArrayTypeIfAvailable()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_v_ndarray = ((PyTypeObject*)__pyx_t_1);
+ __pyx_t_1 = 0;
__pyx_v_itemsize = -1L;
- __pyx_v____pyx_int16_t_is_signed = (((__pyx_t_5numpy_int16_t)-1L) < 0);
- __pyx_v____pyx_int64_t_is_signed = (((__pyx_t_5numpy_int64_t)-1L) < 0);
- __pyx_v____pyx_int32_t_is_signed = (((__pyx_t_5numpy_int32_t)-1L) < 0);
+ __pyx_v____pyx_int32_t_is_signed = (!((((__pyx_t_5numpy_int32_t)-1L) > 0) != 0));
+ __pyx_v____pyx_int64_t_is_signed = (!((((__pyx_t_5numpy_int64_t)-1L) > 0) != 0));
+ __pyx_v____pyx_int16_t_is_signed = (!((((__pyx_t_5numpy_int16_t)-1L) > 0) != 0));
if (unlikely(__pyx_v_args == Py_None)) {
PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
__PYX_ERR(0, 332, __pyx_L1_error)
}
- __pyx_t_10 = PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(0, 332, __pyx_L1_error)
- __pyx_t_3 = ((0 < __pyx_t_10) != 0);
- if (__pyx_t_3) {
+ __pyx_t_5 = PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 332, __pyx_L1_error)
+ __pyx_t_2 = ((0 < __pyx_t_5) != 0);
+ if (__pyx_t_2) {
if (unlikely(__pyx_v_args == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
__PYX_ERR(0, 332, __pyx_L1_error)
}
- __pyx_t_9 = PyTuple_GET_ITEM(((PyObject*)__pyx_v_args), 0);
- __Pyx_INCREF(__pyx_t_9);
- __pyx_v_arg = __pyx_t_9;
- __pyx_t_9 = 0;
- goto __pyx_L14;
+ __pyx_t_1 = PyTuple_GET_ITEM(((PyObject*)__pyx_v_args), 0);
+ __Pyx_INCREF(__pyx_t_1);
+ __pyx_v_arg = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L6;
+ }
+ __pyx_t_3 = (__pyx_v_kwargs != Py_None);
+ __pyx_t_4 = (__pyx_t_3 != 0);
+ if (__pyx_t_4) {
+ } else {
+ __pyx_t_2 = __pyx_t_4;
+ goto __pyx_L7_bool_binop_done;
}
if (unlikely(__pyx_v_kwargs == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
__PYX_ERR(0, 332, __pyx_L1_error)
}
- __pyx_t_3 = (__Pyx_PyDict_ContainsTF(__pyx_n_s_i_weights, ((PyObject*)__pyx_v_kwargs), Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 332, __pyx_L1_error)
- __pyx_t_2 = (__pyx_t_3 != 0);
+ __pyx_t_4 = (__Pyx_PyDict_ContainsTF(__pyx_n_s_i_weights, ((PyObject*)__pyx_v_kwargs), Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __pyx_t_3 = (__pyx_t_4 != 0);
+ __pyx_t_2 = __pyx_t_3;
+ __pyx_L7_bool_binop_done:;
if (__pyx_t_2) {
if (unlikely(__pyx_v_kwargs == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
__PYX_ERR(0, 332, __pyx_L1_error)
}
- __pyx_t_9 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_kwargs), __pyx_n_s_i_weights); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 332, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- __pyx_v_arg = __pyx_t_9;
- __pyx_t_9 = 0;
- goto __pyx_L14;
+ __pyx_t_1 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_kwargs), __pyx_n_s_i_weights); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_v_arg = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L6;
}
/*else*/ {
if (unlikely(__pyx_v_args == Py_None)) {
PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
__PYX_ERR(0, 332, __pyx_L1_error)
}
- __pyx_t_10 = PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(0, 332, __pyx_L1_error)
- __pyx_t_9 = PyInt_FromSsize_t(__pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 332, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- __pyx_t_8 = __Pyx_PyString_Format(__pyx_kp_s_Expected_at_least_d_arguments, __pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 332, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_8);
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 332, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- __Pyx_GIVEREF(__pyx_t_8);
- PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8);
- __pyx_t_8 = 0;
- __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_9, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 332, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_8);
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- __Pyx_Raise(__pyx_t_8, 0, 0, 0);
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_5 = PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 332, __pyx_L1_error)
+ __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_INCREF(__pyx_int_9);
+ __Pyx_GIVEREF(__pyx_int_9);
+ PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_int_9);
+ __Pyx_INCREF(__pyx_n_s_s);
+ __Pyx_GIVEREF(__pyx_n_s_s);
+ PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_n_s_s);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Expected_at_least_d_argument_s_g, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_Raise(__pyx_t_6, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__PYX_ERR(0, 332, __pyx_L1_error)
}
- __pyx_L14:;
+ __pyx_L6:;
while (1) {
__pyx_t_2 = (__pyx_v_ndarray != ((PyTypeObject*)Py_None));
__pyx_t_3 = (__pyx_t_2 != 0);
@@ -7364,54 +7620,54 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_4_histogramnd_from_lut_
__pyx_t_3 = __Pyx_TypeCheck(__pyx_v_arg, __pyx_v_ndarray);
__pyx_t_2 = (__pyx_t_3 != 0);
if (__pyx_t_2) {
- __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_dtype); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 332, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_8);
- __pyx_v_dtype = __pyx_t_8;
- __pyx_t_8 = 0;
- goto __pyx_L18;
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_dtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_v_dtype = __pyx_t_6;
+ __pyx_t_6 = 0;
+ goto __pyx_L12;
}
__pyx_t_2 = __pyx_memoryview_check(__pyx_v_arg);
__pyx_t_3 = (__pyx_t_2 != 0);
if (__pyx_t_3) {
- __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_base); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 332, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_8);
- __pyx_v_arg_base = __pyx_t_8;
- __pyx_t_8 = 0;
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_base); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_v_arg_base = __pyx_t_6;
+ __pyx_t_6 = 0;
__pyx_t_3 = __Pyx_TypeCheck(__pyx_v_arg_base, __pyx_v_ndarray);
__pyx_t_2 = (__pyx_t_3 != 0);
if (__pyx_t_2) {
- __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg_base, __pyx_n_s_dtype); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 332, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_8);
- __pyx_v_dtype = __pyx_t_8;
- __pyx_t_8 = 0;
- goto __pyx_L19;
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg_base, __pyx_n_s_dtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_v_dtype = __pyx_t_6;
+ __pyx_t_6 = 0;
+ goto __pyx_L13;
}
/*else*/ {
__Pyx_INCREF(Py_None);
__pyx_v_dtype = Py_None;
}
- __pyx_L19:;
- goto __pyx_L18;
+ __pyx_L13:;
+ goto __pyx_L12;
}
/*else*/ {
__Pyx_INCREF(Py_None);
__pyx_v_dtype = Py_None;
}
- __pyx_L18:;
+ __pyx_L12:;
__pyx_v_itemsize = -1L;
__pyx_t_2 = (__pyx_v_dtype != Py_None);
__pyx_t_3 = (__pyx_t_2 != 0);
if (__pyx_t_3) {
- __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_itemsize); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 332, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_8);
- __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 332, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_v_itemsize = __pyx_t_10;
- __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_kind); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 332, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_8);
- __pyx_t_11 = __Pyx_PyObject_Ord(__pyx_t_8); if (unlikely(__pyx_t_11 == (long)(Py_UCS4)-1)) __PYX_ERR(0, 332, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_v_kind = __pyx_t_11;
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_itemsize); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 332, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_v_itemsize = __pyx_t_5;
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_kind); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_7 = __Pyx_PyObject_Ord(__pyx_t_6); if (unlikely(__pyx_t_7 == ((long)(long)(Py_UCS4)-1))) __PYX_ERR(0, 332, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_v_kind = __pyx_t_7;
__pyx_v_dtype_signed = (__pyx_v_kind == 'i');
switch (__pyx_v_kind) {
case 'i':
@@ -7420,47 +7676,47 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_4_histogramnd_from_lut_
if (__pyx_t_2) {
} else {
__pyx_t_3 = __pyx_t_2;
- goto __pyx_L22_bool_binop_done;
+ goto __pyx_L16_bool_binop_done;
}
- __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 332, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_8);
- __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 332, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_t_2 = ((((Py_ssize_t)__pyx_t_10) == 1) != 0);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 332, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_2 = ((((Py_ssize_t)__pyx_t_5) == 1) != 0);
if (__pyx_t_2) {
} else {
__pyx_t_3 = __pyx_t_2;
- goto __pyx_L22_bool_binop_done;
+ goto __pyx_L16_bool_binop_done;
}
__pyx_t_2 = ((!((__pyx_v____pyx_int32_t_is_signed ^ __pyx_v_dtype_signed) != 0)) != 0);
__pyx_t_3 = __pyx_t_2;
- __pyx_L22_bool_binop_done:;
+ __pyx_L16_bool_binop_done:;
if (__pyx_t_3) {
if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_int32_t, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 332, __pyx_L1_error)
- goto __pyx_L16_break;
+ goto __pyx_L10_break;
}
__pyx_t_2 = (((sizeof(__pyx_t_5numpy_int64_t)) == __pyx_v_itemsize) != 0);
if (__pyx_t_2) {
} else {
__pyx_t_3 = __pyx_t_2;
- goto __pyx_L26_bool_binop_done;
+ goto __pyx_L20_bool_binop_done;
}
- __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 332, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_8);
- __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 332, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_t_2 = ((((Py_ssize_t)__pyx_t_10) == 1) != 0);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 332, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_2 = ((((Py_ssize_t)__pyx_t_5) == 1) != 0);
if (__pyx_t_2) {
} else {
__pyx_t_3 = __pyx_t_2;
- goto __pyx_L26_bool_binop_done;
+ goto __pyx_L20_bool_binop_done;
}
__pyx_t_2 = ((!((__pyx_v____pyx_int64_t_is_signed ^ __pyx_v_dtype_signed) != 0)) != 0);
__pyx_t_3 = __pyx_t_2;
- __pyx_L26_bool_binop_done:;
+ __pyx_L20_bool_binop_done:;
if (__pyx_t_3) {
if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_int64_t, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 332, __pyx_L1_error)
- goto __pyx_L16_break;
+ goto __pyx_L10_break;
}
break;
case 'f':
@@ -7468,35 +7724,35 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_4_histogramnd_from_lut_
if (__pyx_t_2) {
} else {
__pyx_t_3 = __pyx_t_2;
- goto __pyx_L30_bool_binop_done;
+ goto __pyx_L24_bool_binop_done;
}
- __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 332, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_8);
- __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 332, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_t_2 = ((((Py_ssize_t)__pyx_t_10) == 1) != 0);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 332, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_2 = ((((Py_ssize_t)__pyx_t_5) == 1) != 0);
__pyx_t_3 = __pyx_t_2;
- __pyx_L30_bool_binop_done:;
+ __pyx_L24_bool_binop_done:;
if (__pyx_t_3) {
if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_float64_t, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 332, __pyx_L1_error)
- goto __pyx_L16_break;
+ goto __pyx_L10_break;
}
__pyx_t_2 = (((sizeof(__pyx_t_5numpy_float32_t)) == __pyx_v_itemsize) != 0);
if (__pyx_t_2) {
} else {
__pyx_t_3 = __pyx_t_2;
- goto __pyx_L33_bool_binop_done;
+ goto __pyx_L27_bool_binop_done;
}
- __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 332, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_8);
- __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 332, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_t_2 = ((((Py_ssize_t)__pyx_t_10) == 1) != 0);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 332, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_2 = ((((Py_ssize_t)__pyx_t_5) == 1) != 0);
__pyx_t_3 = __pyx_t_2;
- __pyx_L33_bool_binop_done:;
+ __pyx_L27_bool_binop_done:;
if (__pyx_t_3) {
if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_float32_t, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 332, __pyx_L1_error)
- goto __pyx_L16_break;
+ goto __pyx_L10_break;
}
break;
case 'c':
@@ -7511,19 +7767,19 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_4_histogramnd_from_lut_
if (!__pyx_t_2) {
} else {
__pyx_t_3 = __pyx_t_2;
- goto __pyx_L36_bool_binop_done;
+ goto __pyx_L30_bool_binop_done;
}
__pyx_t_2 = ((__pyx_v_itemsize == (sizeof(__pyx_t_5numpy_float64_t))) != 0);
__pyx_t_3 = __pyx_t_2;
- __pyx_L36_bool_binop_done:;
+ __pyx_L30_bool_binop_done:;
if (__pyx_t_3) {
- __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float64_t(__pyx_v_arg);
- __pyx_v_memslice = __pyx_t_12;
+ __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float64_t(__pyx_v_arg, 0);
+ __pyx_v_memslice = __pyx_t_8;
__pyx_t_3 = (__pyx_v_memslice.memview != 0);
if (__pyx_t_3) {
__PYX_XDEC_MEMVIEW((&__pyx_v_memslice), 1);
if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_float64_t, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 332, __pyx_L1_error)
- goto __pyx_L16_break;
+ goto __pyx_L10_break;
}
/*else*/ {
PyErr_Clear();
@@ -7533,19 +7789,19 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_4_histogramnd_from_lut_
if (!__pyx_t_2) {
} else {
__pyx_t_3 = __pyx_t_2;
- goto __pyx_L40_bool_binop_done;
+ goto __pyx_L34_bool_binop_done;
}
__pyx_t_2 = ((__pyx_v_itemsize == (sizeof(__pyx_t_5numpy_float32_t))) != 0);
__pyx_t_3 = __pyx_t_2;
- __pyx_L40_bool_binop_done:;
+ __pyx_L34_bool_binop_done:;
if (__pyx_t_3) {
- __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float32_t(__pyx_v_arg);
- __pyx_v_memslice = __pyx_t_12;
+ __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float32_t(__pyx_v_arg, 0);
+ __pyx_v_memslice = __pyx_t_8;
__pyx_t_3 = (__pyx_v_memslice.memview != 0);
if (__pyx_t_3) {
__PYX_XDEC_MEMVIEW((&__pyx_v_memslice), 1);
if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_float32_t, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 332, __pyx_L1_error)
- goto __pyx_L16_break;
+ goto __pyx_L10_break;
}
/*else*/ {
PyErr_Clear();
@@ -7555,19 +7811,19 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_4_histogramnd_from_lut_
if (!__pyx_t_2) {
} else {
__pyx_t_3 = __pyx_t_2;
- goto __pyx_L44_bool_binop_done;
+ goto __pyx_L38_bool_binop_done;
}
__pyx_t_2 = ((__pyx_v_itemsize == (sizeof(__pyx_t_5numpy_int32_t))) != 0);
__pyx_t_3 = __pyx_t_2;
- __pyx_L44_bool_binop_done:;
+ __pyx_L38_bool_binop_done:;
if (__pyx_t_3) {
- __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(__pyx_v_arg);
- __pyx_v_memslice = __pyx_t_12;
+ __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(__pyx_v_arg, 0);
+ __pyx_v_memslice = __pyx_t_8;
__pyx_t_3 = (__pyx_v_memslice.memview != 0);
if (__pyx_t_3) {
__PYX_XDEC_MEMVIEW((&__pyx_v_memslice), 1);
if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_int32_t, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 332, __pyx_L1_error)
- goto __pyx_L16_break;
+ goto __pyx_L10_break;
}
/*else*/ {
PyErr_Clear();
@@ -7577,213 +7833,228 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_4_histogramnd_from_lut_
if (!__pyx_t_2) {
} else {
__pyx_t_3 = __pyx_t_2;
- goto __pyx_L48_bool_binop_done;
+ goto __pyx_L42_bool_binop_done;
}
__pyx_t_2 = ((__pyx_v_itemsize == (sizeof(__pyx_t_5numpy_int64_t))) != 0);
__pyx_t_3 = __pyx_t_2;
- __pyx_L48_bool_binop_done:;
+ __pyx_L42_bool_binop_done:;
if (__pyx_t_3) {
- __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(__pyx_v_arg);
- __pyx_v_memslice = __pyx_t_12;
+ __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(__pyx_v_arg, 0);
+ __pyx_v_memslice = __pyx_t_8;
__pyx_t_3 = (__pyx_v_memslice.memview != 0);
if (__pyx_t_3) {
__PYX_XDEC_MEMVIEW((&__pyx_v_memslice), 1);
if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_int64_t, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 332, __pyx_L1_error)
- goto __pyx_L16_break;
+ goto __pyx_L10_break;
}
/*else*/ {
PyErr_Clear();
}
}
if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, Py_None, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 332, __pyx_L1_error)
- goto __pyx_L16_break;
+ goto __pyx_L10_break;
}
- __pyx_L16_break:;
+ __pyx_L10_break:;
if (unlikely(__pyx_v_args == Py_None)) {
PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
__PYX_ERR(0, 332, __pyx_L1_error)
}
- __pyx_t_10 = PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(0, 332, __pyx_L1_error)
- __pyx_t_3 = ((1 < __pyx_t_10) != 0);
+ __pyx_t_5 = PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 332, __pyx_L1_error)
+ __pyx_t_3 = ((1 < __pyx_t_5) != 0);
if (__pyx_t_3) {
if (unlikely(__pyx_v_args == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
__PYX_ERR(0, 332, __pyx_L1_error)
}
- __pyx_t_8 = PyTuple_GET_ITEM(((PyObject*)__pyx_v_args), 1);
- __Pyx_INCREF(__pyx_t_8);
- __Pyx_DECREF_SET(__pyx_v_arg, __pyx_t_8);
- __pyx_t_8 = 0;
- goto __pyx_L51;
+ __pyx_t_6 = PyTuple_GET_ITEM(((PyObject*)__pyx_v_args), 1);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_DECREF_SET(__pyx_v_arg, __pyx_t_6);
+ __pyx_t_6 = 0;
+ goto __pyx_L45;
+ }
+ __pyx_t_2 = (__pyx_v_kwargs != Py_None);
+ __pyx_t_4 = (__pyx_t_2 != 0);
+ if (__pyx_t_4) {
+ } else {
+ __pyx_t_3 = __pyx_t_4;
+ goto __pyx_L46_bool_binop_done;
}
if (unlikely(__pyx_v_kwargs == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
__PYX_ERR(0, 332, __pyx_L1_error)
}
- __pyx_t_3 = (__Pyx_PyDict_ContainsTF(__pyx_n_s_i_lut, ((PyObject*)__pyx_v_kwargs), Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 332, __pyx_L1_error)
- __pyx_t_2 = (__pyx_t_3 != 0);
- if (__pyx_t_2) {
+ __pyx_t_4 = (__Pyx_PyDict_ContainsTF(__pyx_n_s_i_lut, ((PyObject*)__pyx_v_kwargs), Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __pyx_t_2 = (__pyx_t_4 != 0);
+ __pyx_t_3 = __pyx_t_2;
+ __pyx_L46_bool_binop_done:;
+ if (__pyx_t_3) {
if (unlikely(__pyx_v_kwargs == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
__PYX_ERR(0, 332, __pyx_L1_error)
}
- __pyx_t_8 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_kwargs), __pyx_n_s_i_lut); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 332, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_8);
- __Pyx_DECREF_SET(__pyx_v_arg, __pyx_t_8);
- __pyx_t_8 = 0;
- goto __pyx_L51;
+ __pyx_t_6 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_kwargs), __pyx_n_s_i_lut); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF_SET(__pyx_v_arg, __pyx_t_6);
+ __pyx_t_6 = 0;
+ goto __pyx_L45;
}
/*else*/ {
if (unlikely(__pyx_v_args == Py_None)) {
PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
__PYX_ERR(0, 332, __pyx_L1_error)
}
- __pyx_t_10 = PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(0, 332, __pyx_L1_error)
- __pyx_t_8 = PyInt_FromSsize_t(__pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 332, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_8);
- __pyx_t_9 = __Pyx_PyString_Format(__pyx_kp_s_Expected_at_least_d_arguments, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 332, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 332, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_8);
- __Pyx_GIVEREF(__pyx_t_9);
- PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_9);
- __pyx_t_9 = 0;
- __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_8, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 332, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __Pyx_Raise(__pyx_t_9, 0, 0, 0);
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __pyx_t_5 = PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 332, __pyx_L1_error)
+ __pyx_t_6 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_int_9);
+ __Pyx_GIVEREF(__pyx_int_9);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_int_9);
+ __Pyx_INCREF(__pyx_n_s_s);
+ __Pyx_GIVEREF(__pyx_n_s_s);
+ PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_s);
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_6);
+ __pyx_t_6 = 0;
+ __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_Expected_at_least_d_argument_s_g, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__PYX_ERR(0, 332, __pyx_L1_error)
}
- __pyx_L51:;
+ __pyx_L45:;
while (1) {
- __pyx_t_2 = (__pyx_v_ndarray != ((PyTypeObject*)Py_None));
- __pyx_t_3 = (__pyx_t_2 != 0);
- if (__pyx_t_3) {
- __pyx_t_3 = __Pyx_TypeCheck(__pyx_v_arg, __pyx_v_ndarray);
- __pyx_t_2 = (__pyx_t_3 != 0);
- if (__pyx_t_2) {
- __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_dtype); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 332, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- __Pyx_XDECREF_SET(__pyx_v_dtype, __pyx_t_9);
- __pyx_t_9 = 0;
- goto __pyx_L55;
- }
- __pyx_t_2 = __pyx_memoryview_check(__pyx_v_arg);
+ __pyx_t_3 = (__pyx_v_ndarray != ((PyTypeObject*)Py_None));
+ __pyx_t_2 = (__pyx_t_3 != 0);
+ if (__pyx_t_2) {
+ __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_arg, __pyx_v_ndarray);
__pyx_t_3 = (__pyx_t_2 != 0);
if (__pyx_t_3) {
- __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_base); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 332, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- __Pyx_XDECREF_SET(__pyx_v_arg_base, __pyx_t_9);
- __pyx_t_9 = 0;
- __pyx_t_3 = __Pyx_TypeCheck(__pyx_v_arg_base, __pyx_v_ndarray);
- __pyx_t_2 = (__pyx_t_3 != 0);
- if (__pyx_t_2) {
- __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg_base, __pyx_n_s_dtype); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 332, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- __Pyx_XDECREF_SET(__pyx_v_dtype, __pyx_t_9);
- __pyx_t_9 = 0;
- goto __pyx_L56;
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_XDECREF_SET(__pyx_v_dtype, __pyx_t_1);
+ __pyx_t_1 = 0;
+ goto __pyx_L51;
+ }
+ __pyx_t_3 = __pyx_memoryview_check(__pyx_v_arg);
+ __pyx_t_2 = (__pyx_t_3 != 0);
+ if (__pyx_t_2) {
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_base); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_XDECREF_SET(__pyx_v_arg_base, __pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_arg_base, __pyx_v_ndarray);
+ __pyx_t_3 = (__pyx_t_2 != 0);
+ if (__pyx_t_3) {
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg_base, __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_XDECREF_SET(__pyx_v_dtype, __pyx_t_1);
+ __pyx_t_1 = 0;
+ goto __pyx_L52;
}
/*else*/ {
__Pyx_INCREF(Py_None);
__Pyx_XDECREF_SET(__pyx_v_dtype, Py_None);
}
- __pyx_L56:;
- goto __pyx_L55;
+ __pyx_L52:;
+ goto __pyx_L51;
}
/*else*/ {
__Pyx_INCREF(Py_None);
__Pyx_XDECREF_SET(__pyx_v_dtype, Py_None);
}
- __pyx_L55:;
+ __pyx_L51:;
__pyx_v_itemsize = -1L;
- __pyx_t_2 = (__pyx_v_dtype != Py_None);
- __pyx_t_3 = (__pyx_t_2 != 0);
- if (__pyx_t_3) {
- __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_itemsize); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 332, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_9); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 332, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- __pyx_v_itemsize = __pyx_t_10;
- __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_kind); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 332, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- __pyx_t_11 = __Pyx_PyObject_Ord(__pyx_t_9); if (unlikely(__pyx_t_11 == (long)(Py_UCS4)-1)) __PYX_ERR(0, 332, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- __pyx_v_kind = __pyx_t_11;
+ __pyx_t_3 = (__pyx_v_dtype != Py_None);
+ __pyx_t_2 = (__pyx_t_3 != 0);
+ if (__pyx_t_2) {
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_itemsize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 332, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_v_itemsize = __pyx_t_5;
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_kind); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_7 = __Pyx_PyObject_Ord(__pyx_t_1); if (unlikely(__pyx_t_7 == ((long)(long)(Py_UCS4)-1))) __PYX_ERR(0, 332, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_v_kind = __pyx_t_7;
__pyx_v_dtype_signed = (__pyx_v_kind == 'i');
switch (__pyx_v_kind) {
case 'i':
case 'u':
- __pyx_t_2 = (((sizeof(__pyx_t_5numpy_int64_t)) == __pyx_v_itemsize) != 0);
- if (__pyx_t_2) {
+ __pyx_t_3 = (((sizeof(__pyx_t_5numpy_int64_t)) == __pyx_v_itemsize) != 0);
+ if (__pyx_t_3) {
} else {
- __pyx_t_3 = __pyx_t_2;
- goto __pyx_L59_bool_binop_done;
+ __pyx_t_2 = __pyx_t_3;
+ goto __pyx_L55_bool_binop_done;
+ }
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 332, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_3 = ((((Py_ssize_t)__pyx_t_5) == 1) != 0);
+ if (__pyx_t_3) {
+ } else {
+ __pyx_t_2 = __pyx_t_3;
+ goto __pyx_L55_bool_binop_done;
}
- __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 332, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_9); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 332, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- __pyx_t_2 = ((((Py_ssize_t)__pyx_t_10) == 1) != 0);
+ __pyx_t_3 = ((!((__pyx_v____pyx_int64_t_is_signed ^ __pyx_v_dtype_signed) != 0)) != 0);
+ __pyx_t_2 = __pyx_t_3;
+ __pyx_L55_bool_binop_done:;
if (__pyx_t_2) {
+ if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 1, __pyx_n_s_int64_t, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 332, __pyx_L1_error)
+ goto __pyx_L49_break;
+ }
+ __pyx_t_3 = (((sizeof(__pyx_t_5numpy_int32_t)) == __pyx_v_itemsize) != 0);
+ if (__pyx_t_3) {
} else {
- __pyx_t_3 = __pyx_t_2;
+ __pyx_t_2 = __pyx_t_3;
goto __pyx_L59_bool_binop_done;
}
- __pyx_t_2 = ((!((__pyx_v____pyx_int64_t_is_signed ^ __pyx_v_dtype_signed) != 0)) != 0);
- __pyx_t_3 = __pyx_t_2;
- __pyx_L59_bool_binop_done:;
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 332, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_3 = ((((Py_ssize_t)__pyx_t_5) == 1) != 0);
if (__pyx_t_3) {
- if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 1, __pyx_n_s_int64_t, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 332, __pyx_L1_error)
- goto __pyx_L53_break;
- }
- __pyx_t_2 = (((sizeof(__pyx_t_5numpy_int32_t)) == __pyx_v_itemsize) != 0);
- if (__pyx_t_2) {
} else {
- __pyx_t_3 = __pyx_t_2;
- goto __pyx_L63_bool_binop_done;
+ __pyx_t_2 = __pyx_t_3;
+ goto __pyx_L59_bool_binop_done;
}
- __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 332, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_9); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 332, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- __pyx_t_2 = ((((Py_ssize_t)__pyx_t_10) == 1) != 0);
+ __pyx_t_3 = ((!((__pyx_v____pyx_int32_t_is_signed ^ __pyx_v_dtype_signed) != 0)) != 0);
+ __pyx_t_2 = __pyx_t_3;
+ __pyx_L59_bool_binop_done:;
if (__pyx_t_2) {
+ if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 1, __pyx_n_s_int32_t, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 332, __pyx_L1_error)
+ goto __pyx_L49_break;
+ }
+ __pyx_t_3 = (((sizeof(__pyx_t_5numpy_int16_t)) == __pyx_v_itemsize) != 0);
+ if (__pyx_t_3) {
} else {
- __pyx_t_3 = __pyx_t_2;
+ __pyx_t_2 = __pyx_t_3;
goto __pyx_L63_bool_binop_done;
}
- __pyx_t_2 = ((!((__pyx_v____pyx_int32_t_is_signed ^ __pyx_v_dtype_signed) != 0)) != 0);
- __pyx_t_3 = __pyx_t_2;
- __pyx_L63_bool_binop_done:;
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 332, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_3 = ((((Py_ssize_t)__pyx_t_5) == 1) != 0);
if (__pyx_t_3) {
- if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 1, __pyx_n_s_int32_t, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 332, __pyx_L1_error)
- goto __pyx_L53_break;
- }
- __pyx_t_2 = (((sizeof(__pyx_t_5numpy_int16_t)) == __pyx_v_itemsize) != 0);
- if (__pyx_t_2) {
} else {
- __pyx_t_3 = __pyx_t_2;
- goto __pyx_L67_bool_binop_done;
+ __pyx_t_2 = __pyx_t_3;
+ goto __pyx_L63_bool_binop_done;
}
- __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 332, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_9); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 332, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- __pyx_t_2 = ((((Py_ssize_t)__pyx_t_10) == 1) != 0);
+ __pyx_t_3 = ((!((__pyx_v____pyx_int16_t_is_signed ^ __pyx_v_dtype_signed) != 0)) != 0);
+ __pyx_t_2 = __pyx_t_3;
+ __pyx_L63_bool_binop_done:;
if (__pyx_t_2) {
- } else {
- __pyx_t_3 = __pyx_t_2;
- goto __pyx_L67_bool_binop_done;
- }
- __pyx_t_2 = ((!((__pyx_v____pyx_int16_t_is_signed ^ __pyx_v_dtype_signed) != 0)) != 0);
- __pyx_t_3 = __pyx_t_2;
- __pyx_L67_bool_binop_done:;
- if (__pyx_t_3) {
if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 1, __pyx_n_s_int16_t, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 332, __pyx_L1_error)
- goto __pyx_L53_break;
+ goto __pyx_L49_break;
}
break;
case 'f':
@@ -7796,134 +8067,149 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_4_histogramnd_from_lut_
}
}
}
- __pyx_t_2 = ((__pyx_v_itemsize == -1L) != 0);
- if (!__pyx_t_2) {
+ __pyx_t_3 = ((__pyx_v_itemsize == -1L) != 0);
+ if (!__pyx_t_3) {
} else {
- __pyx_t_3 = __pyx_t_2;
- goto __pyx_L71_bool_binop_done;
+ __pyx_t_2 = __pyx_t_3;
+ goto __pyx_L67_bool_binop_done;
}
- __pyx_t_2 = ((__pyx_v_itemsize == (sizeof(__pyx_t_5numpy_int64_t))) != 0);
- __pyx_t_3 = __pyx_t_2;
- __pyx_L71_bool_binop_done:;
- if (__pyx_t_3) {
- __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(__pyx_v_arg);
- __pyx_v_memslice = __pyx_t_12;
- __pyx_t_3 = (__pyx_v_memslice.memview != 0);
- if (__pyx_t_3) {
+ __pyx_t_3 = ((__pyx_v_itemsize == (sizeof(__pyx_t_5numpy_int64_t))) != 0);
+ __pyx_t_2 = __pyx_t_3;
+ __pyx_L67_bool_binop_done:;
+ if (__pyx_t_2) {
+ __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(__pyx_v_arg, 0);
+ __pyx_v_memslice = __pyx_t_8;
+ __pyx_t_2 = (__pyx_v_memslice.memview != 0);
+ if (__pyx_t_2) {
__PYX_XDEC_MEMVIEW((&__pyx_v_memslice), 1);
if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 1, __pyx_n_s_int64_t, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 332, __pyx_L1_error)
- goto __pyx_L53_break;
+ goto __pyx_L49_break;
}
/*else*/ {
PyErr_Clear();
}
}
- __pyx_t_2 = ((__pyx_v_itemsize == -1L) != 0);
- if (!__pyx_t_2) {
+ __pyx_t_3 = ((__pyx_v_itemsize == -1L) != 0);
+ if (!__pyx_t_3) {
} else {
- __pyx_t_3 = __pyx_t_2;
- goto __pyx_L75_bool_binop_done;
+ __pyx_t_2 = __pyx_t_3;
+ goto __pyx_L71_bool_binop_done;
}
- __pyx_t_2 = ((__pyx_v_itemsize == (sizeof(__pyx_t_5numpy_int32_t))) != 0);
- __pyx_t_3 = __pyx_t_2;
- __pyx_L75_bool_binop_done:;
- if (__pyx_t_3) {
- __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(__pyx_v_arg);
- __pyx_v_memslice = __pyx_t_12;
- __pyx_t_3 = (__pyx_v_memslice.memview != 0);
- if (__pyx_t_3) {
+ __pyx_t_3 = ((__pyx_v_itemsize == (sizeof(__pyx_t_5numpy_int32_t))) != 0);
+ __pyx_t_2 = __pyx_t_3;
+ __pyx_L71_bool_binop_done:;
+ if (__pyx_t_2) {
+ __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(__pyx_v_arg, 0);
+ __pyx_v_memslice = __pyx_t_8;
+ __pyx_t_2 = (__pyx_v_memslice.memview != 0);
+ if (__pyx_t_2) {
__PYX_XDEC_MEMVIEW((&__pyx_v_memslice), 1);
if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 1, __pyx_n_s_int32_t, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 332, __pyx_L1_error)
- goto __pyx_L53_break;
+ goto __pyx_L49_break;
}
/*else*/ {
PyErr_Clear();
}
}
- __pyx_t_2 = ((__pyx_v_itemsize == -1L) != 0);
- if (!__pyx_t_2) {
+ __pyx_t_3 = ((__pyx_v_itemsize == -1L) != 0);
+ if (!__pyx_t_3) {
} else {
- __pyx_t_3 = __pyx_t_2;
- goto __pyx_L79_bool_binop_done;
+ __pyx_t_2 = __pyx_t_3;
+ goto __pyx_L75_bool_binop_done;
}
- __pyx_t_2 = ((__pyx_v_itemsize == (sizeof(__pyx_t_5numpy_int16_t))) != 0);
- __pyx_t_3 = __pyx_t_2;
- __pyx_L79_bool_binop_done:;
- if (__pyx_t_3) {
- __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int16_t(__pyx_v_arg);
- __pyx_v_memslice = __pyx_t_12;
- __pyx_t_3 = (__pyx_v_memslice.memview != 0);
- if (__pyx_t_3) {
+ __pyx_t_3 = ((__pyx_v_itemsize == (sizeof(__pyx_t_5numpy_int16_t))) != 0);
+ __pyx_t_2 = __pyx_t_3;
+ __pyx_L75_bool_binop_done:;
+ if (__pyx_t_2) {
+ __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int16_t(__pyx_v_arg, 0);
+ __pyx_v_memslice = __pyx_t_8;
+ __pyx_t_2 = (__pyx_v_memslice.memview != 0);
+ if (__pyx_t_2) {
__PYX_XDEC_MEMVIEW((&__pyx_v_memslice), 1);
if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 1, __pyx_n_s_int16_t, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 332, __pyx_L1_error)
- goto __pyx_L53_break;
+ goto __pyx_L49_break;
}
/*else*/ {
PyErr_Clear();
}
}
if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 1, Py_None, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 332, __pyx_L1_error)
- goto __pyx_L53_break;
+ goto __pyx_L49_break;
}
- __pyx_L53_break:;
+ __pyx_L49_break:;
if (unlikely(__pyx_v_args == Py_None)) {
PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
__PYX_ERR(0, 332, __pyx_L1_error)
}
- __pyx_t_10 = PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(0, 332, __pyx_L1_error)
- __pyx_t_3 = ((3 < __pyx_t_10) != 0);
- if (__pyx_t_3) {
+ __pyx_t_5 = PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 332, __pyx_L1_error)
+ __pyx_t_2 = ((3 < __pyx_t_5) != 0);
+ if (__pyx_t_2) {
if (unlikely(__pyx_v_args == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
__PYX_ERR(0, 332, __pyx_L1_error)
}
- __pyx_t_9 = PyTuple_GET_ITEM(((PyObject*)__pyx_v_args), 3);
- __Pyx_INCREF(__pyx_t_9);
- __Pyx_DECREF_SET(__pyx_v_arg, __pyx_t_9);
- __pyx_t_9 = 0;
- goto __pyx_L82;
+ __pyx_t_1 = PyTuple_GET_ITEM(((PyObject*)__pyx_v_args), 3);
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_DECREF_SET(__pyx_v_arg, __pyx_t_1);
+ __pyx_t_1 = 0;
+ goto __pyx_L78;
+ }
+ __pyx_t_3 = (__pyx_v_kwargs != Py_None);
+ __pyx_t_4 = (__pyx_t_3 != 0);
+ if (__pyx_t_4) {
+ } else {
+ __pyx_t_2 = __pyx_t_4;
+ goto __pyx_L79_bool_binop_done;
}
if (unlikely(__pyx_v_kwargs == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
__PYX_ERR(0, 332, __pyx_L1_error)
}
- __pyx_t_3 = (__Pyx_PyDict_ContainsTF(__pyx_n_s_o_weighted_histo, ((PyObject*)__pyx_v_kwargs), Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 332, __pyx_L1_error)
- __pyx_t_2 = (__pyx_t_3 != 0);
+ __pyx_t_4 = (__Pyx_PyDict_ContainsTF(__pyx_n_s_o_weighted_histo, ((PyObject*)__pyx_v_kwargs), Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __pyx_t_3 = (__pyx_t_4 != 0);
+ __pyx_t_2 = __pyx_t_3;
+ __pyx_L79_bool_binop_done:;
if (__pyx_t_2) {
if (unlikely(__pyx_v_kwargs == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
__PYX_ERR(0, 332, __pyx_L1_error)
}
- __pyx_t_9 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_kwargs), __pyx_n_s_o_weighted_histo); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 332, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- __Pyx_DECREF_SET(__pyx_v_arg, __pyx_t_9);
- __pyx_t_9 = 0;
- goto __pyx_L82;
+ __pyx_t_1 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_kwargs), __pyx_n_s_o_weighted_histo); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF_SET(__pyx_v_arg, __pyx_t_1);
+ __pyx_t_1 = 0;
+ goto __pyx_L78;
}
/*else*/ {
if (unlikely(__pyx_v_args == Py_None)) {
PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
__PYX_ERR(0, 332, __pyx_L1_error)
}
- __pyx_t_10 = PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(0, 332, __pyx_L1_error)
- __pyx_t_9 = PyInt_FromSsize_t(__pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 332, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- __pyx_t_8 = __Pyx_PyString_Format(__pyx_kp_s_Expected_at_least_d_arguments, __pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 332, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_8);
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 332, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- __Pyx_GIVEREF(__pyx_t_8);
- PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8);
- __pyx_t_8 = 0;
- __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_9, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 332, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_8);
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- __Pyx_Raise(__pyx_t_8, 0, 0, 0);
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_5 = PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 332, __pyx_L1_error)
+ __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_INCREF(__pyx_int_9);
+ __Pyx_GIVEREF(__pyx_int_9);
+ PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_int_9);
+ __Pyx_INCREF(__pyx_n_s_s);
+ __Pyx_GIVEREF(__pyx_n_s_s);
+ PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_n_s_s);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Expected_at_least_d_argument_s_g, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_Raise(__pyx_t_6, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__PYX_ERR(0, 332, __pyx_L1_error)
}
- __pyx_L82:;
+ __pyx_L78:;
while (1) {
__pyx_t_2 = (__pyx_v_ndarray != ((PyTypeObject*)Py_None));
__pyx_t_3 = (__pyx_t_2 != 0);
@@ -7931,54 +8217,54 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_4_histogramnd_from_lut_
__pyx_t_3 = __Pyx_TypeCheck(__pyx_v_arg, __pyx_v_ndarray);
__pyx_t_2 = (__pyx_t_3 != 0);
if (__pyx_t_2) {
- __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_dtype); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 332, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_8);
- __Pyx_XDECREF_SET(__pyx_v_dtype, __pyx_t_8);
- __pyx_t_8 = 0;
- goto __pyx_L86;
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_dtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_XDECREF_SET(__pyx_v_dtype, __pyx_t_6);
+ __pyx_t_6 = 0;
+ goto __pyx_L84;
}
__pyx_t_2 = __pyx_memoryview_check(__pyx_v_arg);
__pyx_t_3 = (__pyx_t_2 != 0);
if (__pyx_t_3) {
- __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_base); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 332, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_8);
- __Pyx_XDECREF_SET(__pyx_v_arg_base, __pyx_t_8);
- __pyx_t_8 = 0;
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_base); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_XDECREF_SET(__pyx_v_arg_base, __pyx_t_6);
+ __pyx_t_6 = 0;
__pyx_t_3 = __Pyx_TypeCheck(__pyx_v_arg_base, __pyx_v_ndarray);
__pyx_t_2 = (__pyx_t_3 != 0);
if (__pyx_t_2) {
- __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg_base, __pyx_n_s_dtype); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 332, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_8);
- __Pyx_XDECREF_SET(__pyx_v_dtype, __pyx_t_8);
- __pyx_t_8 = 0;
- goto __pyx_L87;
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg_base, __pyx_n_s_dtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_XDECREF_SET(__pyx_v_dtype, __pyx_t_6);
+ __pyx_t_6 = 0;
+ goto __pyx_L85;
}
/*else*/ {
__Pyx_INCREF(Py_None);
__Pyx_XDECREF_SET(__pyx_v_dtype, Py_None);
}
- __pyx_L87:;
- goto __pyx_L86;
+ __pyx_L85:;
+ goto __pyx_L84;
}
/*else*/ {
__Pyx_INCREF(Py_None);
__Pyx_XDECREF_SET(__pyx_v_dtype, Py_None);
}
- __pyx_L86:;
+ __pyx_L84:;
__pyx_v_itemsize = -1L;
__pyx_t_2 = (__pyx_v_dtype != Py_None);
__pyx_t_3 = (__pyx_t_2 != 0);
if (__pyx_t_3) {
- __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_itemsize); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 332, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_8);
- __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 332, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_v_itemsize = __pyx_t_10;
- __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_kind); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 332, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_8);
- __pyx_t_11 = __Pyx_PyObject_Ord(__pyx_t_8); if (unlikely(__pyx_t_11 == (long)(Py_UCS4)-1)) __PYX_ERR(0, 332, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_v_kind = __pyx_t_11;
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_itemsize); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 332, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_v_itemsize = __pyx_t_5;
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_kind); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_7 = __Pyx_PyObject_Ord(__pyx_t_6); if (unlikely(__pyx_t_7 == ((long)(long)(Py_UCS4)-1))) __PYX_ERR(0, 332, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_v_kind = __pyx_t_7;
__pyx_v_dtype_signed = (__pyx_v_kind == 'i');
switch (__pyx_v_kind) {
case 'i':
@@ -7987,47 +8273,47 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_4_histogramnd_from_lut_
if (__pyx_t_2) {
} else {
__pyx_t_3 = __pyx_t_2;
- goto __pyx_L90_bool_binop_done;
+ goto __pyx_L88_bool_binop_done;
}
- __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 332, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_8);
- __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 332, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_t_2 = ((((Py_ssize_t)__pyx_t_10) == 1) != 0);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 332, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_2 = ((((Py_ssize_t)__pyx_t_5) == 1) != 0);
if (__pyx_t_2) {
} else {
__pyx_t_3 = __pyx_t_2;
- goto __pyx_L90_bool_binop_done;
+ goto __pyx_L88_bool_binop_done;
}
__pyx_t_2 = ((!((__pyx_v____pyx_int32_t_is_signed ^ __pyx_v_dtype_signed) != 0)) != 0);
__pyx_t_3 = __pyx_t_2;
- __pyx_L90_bool_binop_done:;
+ __pyx_L88_bool_binop_done:;
if (__pyx_t_3) {
if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 2, __pyx_n_s_int32_t, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 332, __pyx_L1_error)
- goto __pyx_L84_break;
+ goto __pyx_L82_break;
}
__pyx_t_2 = (((sizeof(__pyx_t_5numpy_int64_t)) == __pyx_v_itemsize) != 0);
if (__pyx_t_2) {
} else {
__pyx_t_3 = __pyx_t_2;
- goto __pyx_L94_bool_binop_done;
+ goto __pyx_L92_bool_binop_done;
}
- __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 332, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_8);
- __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 332, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_t_2 = ((((Py_ssize_t)__pyx_t_10) == 1) != 0);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 332, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_2 = ((((Py_ssize_t)__pyx_t_5) == 1) != 0);
if (__pyx_t_2) {
} else {
__pyx_t_3 = __pyx_t_2;
- goto __pyx_L94_bool_binop_done;
+ goto __pyx_L92_bool_binop_done;
}
__pyx_t_2 = ((!((__pyx_v____pyx_int64_t_is_signed ^ __pyx_v_dtype_signed) != 0)) != 0);
__pyx_t_3 = __pyx_t_2;
- __pyx_L94_bool_binop_done:;
+ __pyx_L92_bool_binop_done:;
if (__pyx_t_3) {
if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 2, __pyx_n_s_int64_t, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 332, __pyx_L1_error)
- goto __pyx_L84_break;
+ goto __pyx_L82_break;
}
break;
case 'f':
@@ -8035,35 +8321,35 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_4_histogramnd_from_lut_
if (__pyx_t_2) {
} else {
__pyx_t_3 = __pyx_t_2;
- goto __pyx_L98_bool_binop_done;
+ goto __pyx_L96_bool_binop_done;
}
- __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 332, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_8);
- __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 332, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_t_2 = ((((Py_ssize_t)__pyx_t_10) == 1) != 0);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 332, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_2 = ((((Py_ssize_t)__pyx_t_5) == 1) != 0);
__pyx_t_3 = __pyx_t_2;
- __pyx_L98_bool_binop_done:;
+ __pyx_L96_bool_binop_done:;
if (__pyx_t_3) {
if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 2, __pyx_n_s_float64_t, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 332, __pyx_L1_error)
- goto __pyx_L84_break;
+ goto __pyx_L82_break;
}
__pyx_t_2 = (((sizeof(__pyx_t_5numpy_float32_t)) == __pyx_v_itemsize) != 0);
if (__pyx_t_2) {
} else {
__pyx_t_3 = __pyx_t_2;
- goto __pyx_L101_bool_binop_done;
+ goto __pyx_L99_bool_binop_done;
}
- __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 332, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_8);
- __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 332, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_t_2 = ((((Py_ssize_t)__pyx_t_10) == 1) != 0);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 332, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_2 = ((((Py_ssize_t)__pyx_t_5) == 1) != 0);
__pyx_t_3 = __pyx_t_2;
- __pyx_L101_bool_binop_done:;
+ __pyx_L99_bool_binop_done:;
if (__pyx_t_3) {
if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 2, __pyx_n_s_float32_t, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 332, __pyx_L1_error)
- goto __pyx_L84_break;
+ goto __pyx_L82_break;
}
break;
case 'c':
@@ -8078,19 +8364,19 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_4_histogramnd_from_lut_
if (!__pyx_t_2) {
} else {
__pyx_t_3 = __pyx_t_2;
- goto __pyx_L104_bool_binop_done;
+ goto __pyx_L102_bool_binop_done;
}
__pyx_t_2 = ((__pyx_v_itemsize == (sizeof(__pyx_t_5numpy_float64_t))) != 0);
__pyx_t_3 = __pyx_t_2;
- __pyx_L104_bool_binop_done:;
+ __pyx_L102_bool_binop_done:;
if (__pyx_t_3) {
- __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float64_t(__pyx_v_arg);
- __pyx_v_memslice = __pyx_t_12;
+ __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float64_t(__pyx_v_arg, 0);
+ __pyx_v_memslice = __pyx_t_8;
__pyx_t_3 = (__pyx_v_memslice.memview != 0);
if (__pyx_t_3) {
__PYX_XDEC_MEMVIEW((&__pyx_v_memslice), 1);
if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 2, __pyx_n_s_float64_t, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 332, __pyx_L1_error)
- goto __pyx_L84_break;
+ goto __pyx_L82_break;
}
/*else*/ {
PyErr_Clear();
@@ -8100,19 +8386,19 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_4_histogramnd_from_lut_
if (!__pyx_t_2) {
} else {
__pyx_t_3 = __pyx_t_2;
- goto __pyx_L108_bool_binop_done;
+ goto __pyx_L106_bool_binop_done;
}
__pyx_t_2 = ((__pyx_v_itemsize == (sizeof(__pyx_t_5numpy_float32_t))) != 0);
__pyx_t_3 = __pyx_t_2;
- __pyx_L108_bool_binop_done:;
+ __pyx_L106_bool_binop_done:;
if (__pyx_t_3) {
- __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float32_t(__pyx_v_arg);
- __pyx_v_memslice = __pyx_t_12;
+ __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float32_t(__pyx_v_arg, 0);
+ __pyx_v_memslice = __pyx_t_8;
__pyx_t_3 = (__pyx_v_memslice.memview != 0);
if (__pyx_t_3) {
__PYX_XDEC_MEMVIEW((&__pyx_v_memslice), 1);
if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 2, __pyx_n_s_float32_t, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 332, __pyx_L1_error)
- goto __pyx_L84_break;
+ goto __pyx_L82_break;
}
/*else*/ {
PyErr_Clear();
@@ -8122,19 +8408,19 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_4_histogramnd_from_lut_
if (!__pyx_t_2) {
} else {
__pyx_t_3 = __pyx_t_2;
- goto __pyx_L112_bool_binop_done;
+ goto __pyx_L110_bool_binop_done;
}
__pyx_t_2 = ((__pyx_v_itemsize == (sizeof(__pyx_t_5numpy_int32_t))) != 0);
__pyx_t_3 = __pyx_t_2;
- __pyx_L112_bool_binop_done:;
+ __pyx_L110_bool_binop_done:;
if (__pyx_t_3) {
- __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(__pyx_v_arg);
- __pyx_v_memslice = __pyx_t_12;
+ __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(__pyx_v_arg, 0);
+ __pyx_v_memslice = __pyx_t_8;
__pyx_t_3 = (__pyx_v_memslice.memview != 0);
if (__pyx_t_3) {
__PYX_XDEC_MEMVIEW((&__pyx_v_memslice), 1);
if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 2, __pyx_n_s_int32_t, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 332, __pyx_L1_error)
- goto __pyx_L84_break;
+ goto __pyx_L82_break;
}
/*else*/ {
PyErr_Clear();
@@ -8144,207 +8430,114 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_4_histogramnd_from_lut_
if (!__pyx_t_2) {
} else {
__pyx_t_3 = __pyx_t_2;
- goto __pyx_L116_bool_binop_done;
+ goto __pyx_L114_bool_binop_done;
}
__pyx_t_2 = ((__pyx_v_itemsize == (sizeof(__pyx_t_5numpy_int64_t))) != 0);
__pyx_t_3 = __pyx_t_2;
- __pyx_L116_bool_binop_done:;
+ __pyx_L114_bool_binop_done:;
if (__pyx_t_3) {
- __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(__pyx_v_arg);
- __pyx_v_memslice = __pyx_t_12;
+ __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(__pyx_v_arg, 0);
+ __pyx_v_memslice = __pyx_t_8;
__pyx_t_3 = (__pyx_v_memslice.memview != 0);
if (__pyx_t_3) {
__PYX_XDEC_MEMVIEW((&__pyx_v_memslice), 1);
if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 2, __pyx_n_s_int64_t, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 332, __pyx_L1_error)
- goto __pyx_L84_break;
+ goto __pyx_L82_break;
}
/*else*/ {
PyErr_Clear();
}
}
if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 2, Py_None, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 332, __pyx_L1_error)
- goto __pyx_L84_break;
+ goto __pyx_L82_break;
}
- __pyx_L84_break:;
- __pyx_t_8 = PyList_New(0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 332, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_8);
- __pyx_v_candidates = ((PyObject*)__pyx_t_8);
- __pyx_t_8 = 0;
- __pyx_t_10 = 0;
+ __pyx_L82_break:;
+ __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_v_candidates = ((PyObject*)__pyx_t_6);
+ __pyx_t_6 = 0;
+ __pyx_t_5 = 0;
if (unlikely(__pyx_v_signatures == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
__PYX_ERR(0, 332, __pyx_L1_error)
}
- __pyx_t_9 = __Pyx_dict_iterator(((PyObject*)__pyx_v_signatures), 1, ((PyObject *)NULL), (&__pyx_t_13), (&__pyx_t_7)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 332, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- __Pyx_XDECREF(__pyx_t_8);
- __pyx_t_8 = __pyx_t_9;
- __pyx_t_9 = 0;
+ __pyx_t_1 = __Pyx_dict_iterator(((PyObject*)__pyx_v_signatures), 1, ((PyObject *)NULL), (&__pyx_t_9), (&__pyx_t_10)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_6);
+ __pyx_t_6 = __pyx_t_1;
+ __pyx_t_1 = 0;
while (1) {
- __pyx_t_14 = __Pyx_dict_iter_next(__pyx_t_8, __pyx_t_13, &__pyx_t_10, &__pyx_t_9, NULL, NULL, __pyx_t_7);
- if (unlikely(__pyx_t_14 == 0)) break;
- if (unlikely(__pyx_t_14 == -1)) __PYX_ERR(0, 332, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- __Pyx_XDECREF_SET(__pyx_v_sig, __pyx_t_9);
- __pyx_t_9 = 0;
+ __pyx_t_11 = __Pyx_dict_iter_next(__pyx_t_6, __pyx_t_9, &__pyx_t_5, &__pyx_t_1, NULL, NULL, __pyx_t_10);
+ if (unlikely(__pyx_t_11 == 0)) break;
+ if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_XDECREF_SET(__pyx_v_sig, __pyx_t_1);
+ __pyx_t_1 = 0;
__pyx_v_match_found = 0;
- __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_sig, __pyx_n_s_strip); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 332, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sig, __pyx_n_s_strip); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_split); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 332, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_tuple__24, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_split); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 332, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- __Pyx_GIVEREF(__pyx_t_1);
- PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_1);
- __Pyx_INCREF(__pyx_v_dest_sig);
- __Pyx_GIVEREF(__pyx_v_dest_sig);
- PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v_dest_sig);
- __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 332, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
- __pyx_t_9 = __pyx_t_1; __Pyx_INCREF(__pyx_t_9); __pyx_t_15 = 0;
- __pyx_t_16 = NULL;
- } else {
- __pyx_t_15 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 332, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- __pyx_t_16 = Py_TYPE(__pyx_t_9)->tp_iternext; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 332, __pyx_L1_error)
- }
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__24, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- for (;;) {
- if (likely(!__pyx_t_16)) {
- if (likely(PyList_CheckExact(__pyx_t_9))) {
- if (__pyx_t_15 >= PyList_GET_SIZE(__pyx_t_9)) break;
- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
- __pyx_t_1 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_15); __Pyx_INCREF(__pyx_t_1); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 332, __pyx_L1_error)
- #else
- __pyx_t_1 = PySequence_ITEM(__pyx_t_9, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 332, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- #endif
- } else {
- if (__pyx_t_15 >= PyTuple_GET_SIZE(__pyx_t_9)) break;
- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
- __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_9, __pyx_t_15); __Pyx_INCREF(__pyx_t_1); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 332, __pyx_L1_error)
- #else
- __pyx_t_1 = PySequence_ITEM(__pyx_t_9, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 332, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- #endif
- }
- } else {
- __pyx_t_1 = __pyx_t_16(__pyx_t_9);
- if (unlikely(!__pyx_t_1)) {
- PyObject* exc_type = PyErr_Occurred();
- if (exc_type) {
- if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
- else __PYX_ERR(0, 332, __pyx_L1_error)
- }
- break;
- }
- __Pyx_GOTREF(__pyx_t_1);
- }
- if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
- PyObject* sequence = __pyx_t_1;
- #if !CYTHON_COMPILING_IN_PYPY
- Py_ssize_t size = Py_SIZE(sequence);
- #else
- Py_ssize_t size = PySequence_Size(sequence);
- #endif
- if (unlikely(size != 2)) {
- if (size > 2) __Pyx_RaiseTooManyValuesError(2);
- else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
- __PYX_ERR(0, 332, __pyx_L1_error)
- }
- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
- if (likely(PyTuple_CheckExact(sequence))) {
- __pyx_t_17 = PyTuple_GET_ITEM(sequence, 0);
- __pyx_t_18 = PyTuple_GET_ITEM(sequence, 1);
- } else {
- __pyx_t_17 = PyList_GET_ITEM(sequence, 0);
- __pyx_t_18 = PyList_GET_ITEM(sequence, 1);
- }
- __Pyx_INCREF(__pyx_t_17);
- __Pyx_INCREF(__pyx_t_18);
- #else
- __pyx_t_17 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 332, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_17);
- __pyx_t_18 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 332, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_18);
- #endif
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- } else {
- Py_ssize_t index = -1;
- __pyx_t_19 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 332, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_19);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_20 = Py_TYPE(__pyx_t_19)->tp_iternext;
- index = 0; __pyx_t_17 = __pyx_t_20(__pyx_t_19); if (unlikely(!__pyx_t_17)) goto __pyx_L123_unpacking_failed;
- __Pyx_GOTREF(__pyx_t_17);
- index = 1; __pyx_t_18 = __pyx_t_20(__pyx_t_19); if (unlikely(!__pyx_t_18)) goto __pyx_L123_unpacking_failed;
- __Pyx_GOTREF(__pyx_t_18);
- if (__Pyx_IternextUnpackEndCheck(__pyx_t_20(__pyx_t_19), 2) < 0) __PYX_ERR(0, 332, __pyx_L1_error)
- __pyx_t_20 = NULL;
- __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
- goto __pyx_L124_unpacking_done;
- __pyx_L123_unpacking_failed:;
- __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
- __pyx_t_20 = NULL;
- if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
- __PYX_ERR(0, 332, __pyx_L1_error)
- __pyx_L124_unpacking_done:;
- }
- __Pyx_XDECREF_SET(__pyx_v_src_type, __pyx_t_17);
- __pyx_t_17 = 0;
- __Pyx_XDECREF_SET(__pyx_v_dst_type, __pyx_t_18);
- __pyx_t_18 = 0;
+ __Pyx_XDECREF_SET(__pyx_v_src_sig, __pyx_t_12);
+ __pyx_t_12 = 0;
+ __pyx_t_13 = PyList_GET_SIZE(__pyx_v_dest_sig); if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(0, 332, __pyx_L1_error)
+ __pyx_t_14 = __pyx_t_13;
+ for (__pyx_t_15 = 0; __pyx_t_15 < __pyx_t_14; __pyx_t_15+=1) {
+ __pyx_v_i = __pyx_t_15;
+ __pyx_t_12 = PyList_GET_ITEM(__pyx_v_dest_sig, __pyx_v_i);
+ __Pyx_INCREF(__pyx_t_12);
+ __Pyx_XDECREF_SET(__pyx_v_dst_type, __pyx_t_12);
+ __pyx_t_12 = 0;
__pyx_t_3 = (__pyx_v_dst_type != Py_None);
__pyx_t_2 = (__pyx_t_3 != 0);
if (__pyx_t_2) {
- __pyx_t_1 = PyObject_RichCompare(__pyx_v_src_type, __pyx_v_dst_type, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __pyx_t_12 = __Pyx_GetItemInt(__pyx_v_src_sig, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 0, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __pyx_t_1 = PyObject_RichCompare(__pyx_t_12, __pyx_v_dst_type, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
__pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (__pyx_t_2) {
__pyx_v_match_found = 1;
- goto __pyx_L126;
+ goto __pyx_L122;
}
/*else*/ {
__pyx_v_match_found = 0;
- goto __pyx_L122_break;
+ goto __pyx_L120_break;
}
- __pyx_L126:;
+ __pyx_L122:;
}
}
- __pyx_L122_break:;
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __pyx_L120_break:;
__pyx_t_2 = (__pyx_v_match_found != 0);
if (__pyx_t_2) {
- __pyx_t_21 = __Pyx_PyList_Append(__pyx_v_candidates, __pyx_v_sig); if (unlikely(__pyx_t_21 == -1)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __pyx_t_16 = __Pyx_PyList_Append(__pyx_v_candidates, __pyx_v_sig); if (unlikely(__pyx_t_16 == ((int)-1))) __PYX_ERR(0, 332, __pyx_L1_error)
}
}
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_t_2 = (__pyx_v_candidates != Py_None) && (PyList_GET_SIZE(__pyx_v_candidates) != 0);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_2 = (PyList_GET_SIZE(__pyx_v_candidates) != 0);
__pyx_t_3 = ((!__pyx_t_2) != 0);
if (__pyx_t_3) {
- __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__25, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 332, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_8);
- __Pyx_Raise(__pyx_t_8, 0, 0, 0);
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__25, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 332, __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, 332, __pyx_L1_error)
}
- __pyx_t_13 = PyList_GET_SIZE(__pyx_v_candidates); if (unlikely(__pyx_t_13 == -1)) __PYX_ERR(0, 332, __pyx_L1_error)
- __pyx_t_3 = ((__pyx_t_13 > 1) != 0);
+ __pyx_t_9 = PyList_GET_SIZE(__pyx_v_candidates); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 332, __pyx_L1_error)
+ __pyx_t_3 = ((__pyx_t_9 > 1) != 0);
if (__pyx_t_3) {
- __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__26, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 332, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_8);
- __Pyx_Raise(__pyx_t_8, 0, 0, 0);
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__26, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 332, __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, 332, __pyx_L1_error)
}
/*else*/ {
@@ -8353,33 +8546,29 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_4_histogramnd_from_lut_
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
__PYX_ERR(0, 332, __pyx_L1_error)
}
- __pyx_t_8 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_signatures), PyList_GET_ITEM(__pyx_v_candidates, 0)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 332, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_8);
- __pyx_r = __pyx_t_8;
- __pyx_t_8 = 0;
+ __pyx_t_6 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_signatures), PyList_GET_ITEM(__pyx_v_candidates, 0)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_r = __pyx_t_6;
+ __pyx_t_6 = 0;
goto __pyx_L0;
}
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
- __Pyx_XDECREF(__pyx_t_8);
- __Pyx_XDECREF(__pyx_t_9);
- __Pyx_XDECREF(__pyx_t_17);
- __Pyx_XDECREF(__pyx_t_18);
- __Pyx_XDECREF(__pyx_t_19);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_12);
__Pyx_AddTraceback("silx.math.chistogramnd_lut.__pyx_fused_cpdef", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_dest_sig);
__Pyx_XDECREF(__pyx_v_ndarray);
- __Pyx_XDECREF(__pyx_v_numpy);
__Pyx_XDECREF(__pyx_v_arg);
__Pyx_XDECREF(__pyx_v_dtype);
__Pyx_XDECREF(__pyx_v_arg_base);
__Pyx_XDECREF(__pyx_v_candidates);
__Pyx_XDECREF(__pyx_v_sig);
- __Pyx_XDECREF(__pyx_v_src_type);
+ __Pyx_XDECREF(__pyx_v_src_sig);
__Pyx_XDECREF(__pyx_v_dst_type);
__Pyx_XDECREF(__pyx_v_kwargs);
__Pyx_XGIVEREF(__pyx_r);
@@ -8411,59 +8600,76 @@ static PyObject *__pyx_fuse_0_0_0__pyx_pw_4silx_4math_16chistogramnd_lut_9_histo
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
switch (pos_args) {
case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
+ CYTHON_FALLTHROUGH;
case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
+ CYTHON_FALLTHROUGH;
case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
+ CYTHON_FALLTHROUGH;
case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ CYTHON_FALLTHROUGH;
case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
case 0: break;
default: goto __pyx_L5_argtuple_error;
}
kw_args = PyDict_Size(__pyx_kwds);
switch (pos_args) {
case 0:
- if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
case 1:
- if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 1); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 2:
- if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
+ if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 2); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 3:
- if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
+ if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 3); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 4:
- if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
+ if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 4); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 5:
- if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
+ if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 5); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 6:
- if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
+ if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 6); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 7:
- if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
+ if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 7); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 8:
- if (likely((values[8] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
+ if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 8); __PYX_ERR(0, 332, __pyx_L3_error)
}
@@ -8484,10 +8690,10 @@ static PyObject *__pyx_fuse_0_0_0__pyx_pw_4silx_4math_16chistogramnd_lut_9_histo
values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
}
- __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float64_t(values[0]); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
- __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[1]); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
- __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2]); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
- __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float64_t(values[3]); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
+ __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float64_t(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
+ __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
+ __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
+ __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float64_t(values[3], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
__pyx_v_i_n_elems = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_i_n_elems == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 336, __pyx_L3_error)
__pyx_v_i_filt_min_weights = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_i_filt_min_weights == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 337, __pyx_L3_error)
__pyx_v_i_weight_min = __pyx_PyFloat_AsDouble(values[6]); if (unlikely((__pyx_v_i_weight_min == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 338, __pyx_L3_error)
@@ -8515,16 +8721,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_8_histogramnd_from_lut_
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
- Py_ssize_t __pyx_t_3;
- int __pyx_t_4;
+ int __pyx_t_3;
+ Py_ssize_t __pyx_t_4;
int __pyx_t_5;
- Py_ssize_t __pyx_t_6;
+ int __pyx_t_6;
Py_ssize_t __pyx_t_7;
Py_ssize_t __pyx_t_8;
- __pyx_t_5numpy_int64_t __pyx_t_9;
- Py_ssize_t __pyx_t_10;
+ Py_ssize_t __pyx_t_9;
+ __pyx_t_5numpy_int64_t __pyx_t_10;
Py_ssize_t __pyx_t_11;
- __pyx_t_5numpy_int64_t __pyx_t_12;
+ Py_ssize_t __pyx_t_12;
+ __pyx_t_5numpy_int64_t __pyx_t_13;
__Pyx_RefNannySetupContext("__pyx_fuse_0_0_0_histogramnd_from_lut_fused", 0);
/* "silx/math/chistogramnd_lut.pyx":341
@@ -8538,6 +8745,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_8_histogramnd_from_lut_
#ifdef WITH_THREAD
PyThreadState *_save;
Py_UNBLOCK_THREADS
+ __Pyx_FastGIL_Remember();
#endif
/*try:*/ {
@@ -8549,8 +8757,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_8_histogramnd_from_lut_
* if i_filt_min_weights and i_weights[i] < i_weight_min:
*/
__pyx_t_1 = __pyx_v_i_n_elems;
- for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
- __pyx_v_i = __pyx_t_2;
+ __pyx_t_2 = __pyx_t_1;
+ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
+ __pyx_v_i = __pyx_t_3;
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -8559,9 +8768,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_8_histogramnd_from_lut_
* if i_filt_min_weights and i_weights[i] < i_weight_min:
* continue
*/
- __pyx_t_3 = __pyx_v_i;
- __pyx_t_4 = (((*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_3 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
- if (__pyx_t_4) {
+ __pyx_t_4 = __pyx_v_i;
+ __pyx_t_5 = (((*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_4 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":344
* for i in range(i_n_elems):
@@ -8570,17 +8779,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_8_histogramnd_from_lut_
* continue
* if i_filt_max_weights and i_weights[i] > i_weight_max:
*/
- __pyx_t_5 = (__pyx_v_i_filt_min_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_min_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L10_bool_binop_done;
}
- __pyx_t_6 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_6 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_7 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L10_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":345
* if (i_lut[i] >= 0):
@@ -8607,17 +8816,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_8_histogramnd_from_lut_
* continue
* o_histo[i_lut[i]] += 1
*/
- __pyx_t_5 = (__pyx_v_i_filt_max_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_max_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L13_bool_binop_done;
}
- __pyx_t_7 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_8 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_8 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L13_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":347
* continue
@@ -8644,9 +8853,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_8_histogramnd_from_lut_
* o_weighted_histo[i_lut[i]] += <cumul_t>i_weights[i] # noqa
*
*/
- __pyx_t_8 = __pyx_v_i;
- __pyx_t_9 = (*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_8 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_9 * __pyx_v_o_histo.strides[0]) )) += 1;
+ __pyx_t_9 = __pyx_v_i;
+ __pyx_t_10 = (*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_9 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_10 * __pyx_v_o_histo.strides[0]) )) += 1;
/* "silx/math/chistogramnd_lut.pyx":349
* continue
@@ -8655,10 +8864,10 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_8_histogramnd_from_lut_
*
*
*/
- __pyx_t_10 = __pyx_v_i;
__pyx_t_11 = __pyx_v_i;
- __pyx_t_12 = (*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_11 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_12 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_float64_t)(*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_10 * __pyx_v_i_weights.strides[0]) ))));
+ __pyx_t_12 = __pyx_v_i;
+ __pyx_t_13 = (*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_12 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_13 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_float64_t)(*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_11 * __pyx_v_i_weights.strides[0]) ))));
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -8682,6 +8891,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_8_histogramnd_from_lut_
/*finally:*/ {
/*normal exit:*/{
#ifdef WITH_THREAD
+ __Pyx_FastGIL_Forget();
Py_BLOCK_THREADS
#endif
goto __pyx_L5;
@@ -8695,7 +8905,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_8_histogramnd_from_lut_
* @cython.cdivision(True)
* def _histogramnd_from_lut_fused(weights_t[:] i_weights, # <<<<<<<<<<<<<<
* lut_t[:] i_lut,
- * np.uint32_t[:] o_histo,
+ * cnumpy.uint32_t[:] o_histo,
*/
/* function exit code */
@@ -8733,59 +8943,76 @@ static PyObject *__pyx_fuse_0_0_1__pyx_pw_4silx_4math_16chistogramnd_lut_11_hist
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
switch (pos_args) {
case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
+ CYTHON_FALLTHROUGH;
case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
+ CYTHON_FALLTHROUGH;
case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
+ CYTHON_FALLTHROUGH;
case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ CYTHON_FALLTHROUGH;
case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
case 0: break;
default: goto __pyx_L5_argtuple_error;
}
kw_args = PyDict_Size(__pyx_kwds);
switch (pos_args) {
case 0:
- if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
case 1:
- if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 1); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 2:
- if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
+ if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 2); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 3:
- if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
+ if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 3); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 4:
- if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
+ if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 4); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 5:
- if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
+ if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 5); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 6:
- if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
+ if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 6); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 7:
- if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
+ if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 7); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 8:
- if (likely((values[8] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
+ if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 8); __PYX_ERR(0, 332, __pyx_L3_error)
}
@@ -8806,10 +9033,10 @@ static PyObject *__pyx_fuse_0_0_1__pyx_pw_4silx_4math_16chistogramnd_lut_11_hist
values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
}
- __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float64_t(values[0]); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
- __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[1]); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
- __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2]); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
- __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float32_t(values[3]); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
+ __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float64_t(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
+ __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
+ __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
+ __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float32_t(values[3], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
__pyx_v_i_n_elems = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_i_n_elems == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 336, __pyx_L3_error)
__pyx_v_i_filt_min_weights = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_i_filt_min_weights == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 337, __pyx_L3_error)
__pyx_v_i_weight_min = __pyx_PyFloat_AsDouble(values[6]); if (unlikely((__pyx_v_i_weight_min == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 338, __pyx_L3_error)
@@ -8837,16 +9064,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_10_histogramnd_from_lut
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
- Py_ssize_t __pyx_t_3;
- int __pyx_t_4;
+ int __pyx_t_3;
+ Py_ssize_t __pyx_t_4;
int __pyx_t_5;
- Py_ssize_t __pyx_t_6;
+ int __pyx_t_6;
Py_ssize_t __pyx_t_7;
Py_ssize_t __pyx_t_8;
- __pyx_t_5numpy_int64_t __pyx_t_9;
- Py_ssize_t __pyx_t_10;
+ Py_ssize_t __pyx_t_9;
+ __pyx_t_5numpy_int64_t __pyx_t_10;
Py_ssize_t __pyx_t_11;
- __pyx_t_5numpy_int64_t __pyx_t_12;
+ Py_ssize_t __pyx_t_12;
+ __pyx_t_5numpy_int64_t __pyx_t_13;
__Pyx_RefNannySetupContext("__pyx_fuse_0_0_1_histogramnd_from_lut_fused", 0);
/* "silx/math/chistogramnd_lut.pyx":341
@@ -8860,6 +9088,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_10_histogramnd_from_lut
#ifdef WITH_THREAD
PyThreadState *_save;
Py_UNBLOCK_THREADS
+ __Pyx_FastGIL_Remember();
#endif
/*try:*/ {
@@ -8871,8 +9100,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_10_histogramnd_from_lut
* if i_filt_min_weights and i_weights[i] < i_weight_min:
*/
__pyx_t_1 = __pyx_v_i_n_elems;
- for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
- __pyx_v_i = __pyx_t_2;
+ __pyx_t_2 = __pyx_t_1;
+ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
+ __pyx_v_i = __pyx_t_3;
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -8881,9 +9111,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_10_histogramnd_from_lut
* if i_filt_min_weights and i_weights[i] < i_weight_min:
* continue
*/
- __pyx_t_3 = __pyx_v_i;
- __pyx_t_4 = (((*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_3 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
- if (__pyx_t_4) {
+ __pyx_t_4 = __pyx_v_i;
+ __pyx_t_5 = (((*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_4 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":344
* for i in range(i_n_elems):
@@ -8892,17 +9122,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_10_histogramnd_from_lut
* continue
* if i_filt_max_weights and i_weights[i] > i_weight_max:
*/
- __pyx_t_5 = (__pyx_v_i_filt_min_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_min_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L10_bool_binop_done;
}
- __pyx_t_6 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_6 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_7 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L10_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":345
* if (i_lut[i] >= 0):
@@ -8929,17 +9159,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_10_histogramnd_from_lut
* continue
* o_histo[i_lut[i]] += 1
*/
- __pyx_t_5 = (__pyx_v_i_filt_max_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_max_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L13_bool_binop_done;
}
- __pyx_t_7 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_8 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_8 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L13_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":347
* continue
@@ -8966,9 +9196,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_10_histogramnd_from_lut
* o_weighted_histo[i_lut[i]] += <cumul_t>i_weights[i] # noqa
*
*/
- __pyx_t_8 = __pyx_v_i;
- __pyx_t_9 = (*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_8 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_9 * __pyx_v_o_histo.strides[0]) )) += 1;
+ __pyx_t_9 = __pyx_v_i;
+ __pyx_t_10 = (*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_9 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_10 * __pyx_v_o_histo.strides[0]) )) += 1;
/* "silx/math/chistogramnd_lut.pyx":349
* continue
@@ -8977,10 +9207,10 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_10_histogramnd_from_lut
*
*
*/
- __pyx_t_10 = __pyx_v_i;
__pyx_t_11 = __pyx_v_i;
- __pyx_t_12 = (*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_11 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_12 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_float32_t)(*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_10 * __pyx_v_i_weights.strides[0]) ))));
+ __pyx_t_12 = __pyx_v_i;
+ __pyx_t_13 = (*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_12 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_13 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_float32_t)(*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_11 * __pyx_v_i_weights.strides[0]) ))));
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -9004,6 +9234,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_10_histogramnd_from_lut
/*finally:*/ {
/*normal exit:*/{
#ifdef WITH_THREAD
+ __Pyx_FastGIL_Forget();
Py_BLOCK_THREADS
#endif
goto __pyx_L5;
@@ -9017,7 +9248,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_10_histogramnd_from_lut
* @cython.cdivision(True)
* def _histogramnd_from_lut_fused(weights_t[:] i_weights, # <<<<<<<<<<<<<<
* lut_t[:] i_lut,
- * np.uint32_t[:] o_histo,
+ * cnumpy.uint32_t[:] o_histo,
*/
/* function exit code */
@@ -9055,59 +9286,76 @@ static PyObject *__pyx_fuse_0_0_2__pyx_pw_4silx_4math_16chistogramnd_lut_13_hist
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
switch (pos_args) {
case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
+ CYTHON_FALLTHROUGH;
case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
+ CYTHON_FALLTHROUGH;
case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
+ CYTHON_FALLTHROUGH;
case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ CYTHON_FALLTHROUGH;
case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
case 0: break;
default: goto __pyx_L5_argtuple_error;
}
kw_args = PyDict_Size(__pyx_kwds);
switch (pos_args) {
case 0:
- if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
case 1:
- if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 1); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 2:
- if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
+ if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 2); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 3:
- if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
+ if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 3); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 4:
- if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
+ if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 4); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 5:
- if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
+ if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 5); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 6:
- if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
+ if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 6); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 7:
- if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
+ if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 7); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 8:
- if (likely((values[8] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
+ if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 8); __PYX_ERR(0, 332, __pyx_L3_error)
}
@@ -9128,10 +9376,10 @@ static PyObject *__pyx_fuse_0_0_2__pyx_pw_4silx_4math_16chistogramnd_lut_13_hist
values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
}
- __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float64_t(values[0]); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
- __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[1]); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
- __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2]); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
- __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[3]); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
+ __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float64_t(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
+ __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
+ __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
+ __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[3], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
__pyx_v_i_n_elems = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_i_n_elems == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 336, __pyx_L3_error)
__pyx_v_i_filt_min_weights = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_i_filt_min_weights == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 337, __pyx_L3_error)
__pyx_v_i_weight_min = __pyx_PyFloat_AsDouble(values[6]); if (unlikely((__pyx_v_i_weight_min == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 338, __pyx_L3_error)
@@ -9159,16 +9407,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_12_histogramnd_from_lut
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
- Py_ssize_t __pyx_t_3;
- int __pyx_t_4;
+ int __pyx_t_3;
+ Py_ssize_t __pyx_t_4;
int __pyx_t_5;
- Py_ssize_t __pyx_t_6;
+ int __pyx_t_6;
Py_ssize_t __pyx_t_7;
Py_ssize_t __pyx_t_8;
- __pyx_t_5numpy_int64_t __pyx_t_9;
- Py_ssize_t __pyx_t_10;
+ Py_ssize_t __pyx_t_9;
+ __pyx_t_5numpy_int64_t __pyx_t_10;
Py_ssize_t __pyx_t_11;
- __pyx_t_5numpy_int64_t __pyx_t_12;
+ Py_ssize_t __pyx_t_12;
+ __pyx_t_5numpy_int64_t __pyx_t_13;
__Pyx_RefNannySetupContext("__pyx_fuse_0_0_2_histogramnd_from_lut_fused", 0);
/* "silx/math/chistogramnd_lut.pyx":341
@@ -9182,6 +9431,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_12_histogramnd_from_lut
#ifdef WITH_THREAD
PyThreadState *_save;
Py_UNBLOCK_THREADS
+ __Pyx_FastGIL_Remember();
#endif
/*try:*/ {
@@ -9193,8 +9443,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_12_histogramnd_from_lut
* if i_filt_min_weights and i_weights[i] < i_weight_min:
*/
__pyx_t_1 = __pyx_v_i_n_elems;
- for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
- __pyx_v_i = __pyx_t_2;
+ __pyx_t_2 = __pyx_t_1;
+ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
+ __pyx_v_i = __pyx_t_3;
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -9203,9 +9454,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_12_histogramnd_from_lut
* if i_filt_min_weights and i_weights[i] < i_weight_min:
* continue
*/
- __pyx_t_3 = __pyx_v_i;
- __pyx_t_4 = (((*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_3 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
- if (__pyx_t_4) {
+ __pyx_t_4 = __pyx_v_i;
+ __pyx_t_5 = (((*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_4 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":344
* for i in range(i_n_elems):
@@ -9214,17 +9465,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_12_histogramnd_from_lut
* continue
* if i_filt_max_weights and i_weights[i] > i_weight_max:
*/
- __pyx_t_5 = (__pyx_v_i_filt_min_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_min_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L10_bool_binop_done;
}
- __pyx_t_6 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_6 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_7 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L10_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":345
* if (i_lut[i] >= 0):
@@ -9251,17 +9502,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_12_histogramnd_from_lut
* continue
* o_histo[i_lut[i]] += 1
*/
- __pyx_t_5 = (__pyx_v_i_filt_max_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_max_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L13_bool_binop_done;
}
- __pyx_t_7 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_8 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_8 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L13_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":347
* continue
@@ -9288,9 +9539,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_12_histogramnd_from_lut
* o_weighted_histo[i_lut[i]] += <cumul_t>i_weights[i] # noqa
*
*/
- __pyx_t_8 = __pyx_v_i;
- __pyx_t_9 = (*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_8 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_9 * __pyx_v_o_histo.strides[0]) )) += 1;
+ __pyx_t_9 = __pyx_v_i;
+ __pyx_t_10 = (*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_9 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_10 * __pyx_v_o_histo.strides[0]) )) += 1;
/* "silx/math/chistogramnd_lut.pyx":349
* continue
@@ -9299,10 +9550,10 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_12_histogramnd_from_lut
*
*
*/
- __pyx_t_10 = __pyx_v_i;
__pyx_t_11 = __pyx_v_i;
- __pyx_t_12 = (*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_11 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_12 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_int32_t)(*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_10 * __pyx_v_i_weights.strides[0]) ))));
+ __pyx_t_12 = __pyx_v_i;
+ __pyx_t_13 = (*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_12 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_13 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_int32_t)(*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_11 * __pyx_v_i_weights.strides[0]) ))));
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -9326,6 +9577,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_12_histogramnd_from_lut
/*finally:*/ {
/*normal exit:*/{
#ifdef WITH_THREAD
+ __Pyx_FastGIL_Forget();
Py_BLOCK_THREADS
#endif
goto __pyx_L5;
@@ -9339,7 +9591,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_12_histogramnd_from_lut
* @cython.cdivision(True)
* def _histogramnd_from_lut_fused(weights_t[:] i_weights, # <<<<<<<<<<<<<<
* lut_t[:] i_lut,
- * np.uint32_t[:] o_histo,
+ * cnumpy.uint32_t[:] o_histo,
*/
/* function exit code */
@@ -9377,59 +9629,76 @@ static PyObject *__pyx_fuse_0_0_3__pyx_pw_4silx_4math_16chistogramnd_lut_15_hist
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
switch (pos_args) {
case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
+ CYTHON_FALLTHROUGH;
case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
+ CYTHON_FALLTHROUGH;
case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
+ CYTHON_FALLTHROUGH;
case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ CYTHON_FALLTHROUGH;
case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
case 0: break;
default: goto __pyx_L5_argtuple_error;
}
kw_args = PyDict_Size(__pyx_kwds);
switch (pos_args) {
case 0:
- if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
case 1:
- if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 1); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 2:
- if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
+ if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 2); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 3:
- if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
+ if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 3); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 4:
- if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
+ if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 4); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 5:
- if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
+ if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 5); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 6:
- if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
+ if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 6); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 7:
- if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
+ if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 7); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 8:
- if (likely((values[8] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
+ if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 8); __PYX_ERR(0, 332, __pyx_L3_error)
}
@@ -9450,10 +9719,10 @@ static PyObject *__pyx_fuse_0_0_3__pyx_pw_4silx_4math_16chistogramnd_lut_15_hist
values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
}
- __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float64_t(values[0]); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
- __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[1]); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
- __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2]); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
- __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[3]); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
+ __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float64_t(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
+ __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
+ __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
+ __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[3], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
__pyx_v_i_n_elems = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_i_n_elems == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 336, __pyx_L3_error)
__pyx_v_i_filt_min_weights = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_i_filt_min_weights == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 337, __pyx_L3_error)
__pyx_v_i_weight_min = __pyx_PyFloat_AsDouble(values[6]); if (unlikely((__pyx_v_i_weight_min == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 338, __pyx_L3_error)
@@ -9481,16 +9750,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_14_histogramnd_from_lut
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
- Py_ssize_t __pyx_t_3;
- int __pyx_t_4;
+ int __pyx_t_3;
+ Py_ssize_t __pyx_t_4;
int __pyx_t_5;
- Py_ssize_t __pyx_t_6;
+ int __pyx_t_6;
Py_ssize_t __pyx_t_7;
Py_ssize_t __pyx_t_8;
- __pyx_t_5numpy_int64_t __pyx_t_9;
- Py_ssize_t __pyx_t_10;
+ Py_ssize_t __pyx_t_9;
+ __pyx_t_5numpy_int64_t __pyx_t_10;
Py_ssize_t __pyx_t_11;
- __pyx_t_5numpy_int64_t __pyx_t_12;
+ Py_ssize_t __pyx_t_12;
+ __pyx_t_5numpy_int64_t __pyx_t_13;
__Pyx_RefNannySetupContext("__pyx_fuse_0_0_3_histogramnd_from_lut_fused", 0);
/* "silx/math/chistogramnd_lut.pyx":341
@@ -9504,6 +9774,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_14_histogramnd_from_lut
#ifdef WITH_THREAD
PyThreadState *_save;
Py_UNBLOCK_THREADS
+ __Pyx_FastGIL_Remember();
#endif
/*try:*/ {
@@ -9515,8 +9786,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_14_histogramnd_from_lut
* if i_filt_min_weights and i_weights[i] < i_weight_min:
*/
__pyx_t_1 = __pyx_v_i_n_elems;
- for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
- __pyx_v_i = __pyx_t_2;
+ __pyx_t_2 = __pyx_t_1;
+ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
+ __pyx_v_i = __pyx_t_3;
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -9525,9 +9797,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_14_histogramnd_from_lut
* if i_filt_min_weights and i_weights[i] < i_weight_min:
* continue
*/
- __pyx_t_3 = __pyx_v_i;
- __pyx_t_4 = (((*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_3 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
- if (__pyx_t_4) {
+ __pyx_t_4 = __pyx_v_i;
+ __pyx_t_5 = (((*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_4 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":344
* for i in range(i_n_elems):
@@ -9536,17 +9808,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_14_histogramnd_from_lut
* continue
* if i_filt_max_weights and i_weights[i] > i_weight_max:
*/
- __pyx_t_5 = (__pyx_v_i_filt_min_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_min_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L10_bool_binop_done;
}
- __pyx_t_6 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_6 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_7 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L10_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":345
* if (i_lut[i] >= 0):
@@ -9573,17 +9845,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_14_histogramnd_from_lut
* continue
* o_histo[i_lut[i]] += 1
*/
- __pyx_t_5 = (__pyx_v_i_filt_max_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_max_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L13_bool_binop_done;
}
- __pyx_t_7 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_8 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_8 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L13_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":347
* continue
@@ -9610,9 +9882,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_14_histogramnd_from_lut
* o_weighted_histo[i_lut[i]] += <cumul_t>i_weights[i] # noqa
*
*/
- __pyx_t_8 = __pyx_v_i;
- __pyx_t_9 = (*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_8 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_9 * __pyx_v_o_histo.strides[0]) )) += 1;
+ __pyx_t_9 = __pyx_v_i;
+ __pyx_t_10 = (*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_9 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_10 * __pyx_v_o_histo.strides[0]) )) += 1;
/* "silx/math/chistogramnd_lut.pyx":349
* continue
@@ -9621,10 +9893,10 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_14_histogramnd_from_lut
*
*
*/
- __pyx_t_10 = __pyx_v_i;
__pyx_t_11 = __pyx_v_i;
- __pyx_t_12 = (*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_11 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_12 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_int64_t)(*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_10 * __pyx_v_i_weights.strides[0]) ))));
+ __pyx_t_12 = __pyx_v_i;
+ __pyx_t_13 = (*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_12 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_13 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_int64_t)(*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_11 * __pyx_v_i_weights.strides[0]) ))));
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -9648,6 +9920,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_14_histogramnd_from_lut
/*finally:*/ {
/*normal exit:*/{
#ifdef WITH_THREAD
+ __Pyx_FastGIL_Forget();
Py_BLOCK_THREADS
#endif
goto __pyx_L5;
@@ -9661,7 +9934,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_14_histogramnd_from_lut
* @cython.cdivision(True)
* def _histogramnd_from_lut_fused(weights_t[:] i_weights, # <<<<<<<<<<<<<<
* lut_t[:] i_lut,
- * np.uint32_t[:] o_histo,
+ * cnumpy.uint32_t[:] o_histo,
*/
/* function exit code */
@@ -9699,59 +9972,76 @@ static PyObject *__pyx_fuse_0_1_0__pyx_pw_4silx_4math_16chistogramnd_lut_17_hist
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
switch (pos_args) {
case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
+ CYTHON_FALLTHROUGH;
case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
+ CYTHON_FALLTHROUGH;
case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
+ CYTHON_FALLTHROUGH;
case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ CYTHON_FALLTHROUGH;
case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
case 0: break;
default: goto __pyx_L5_argtuple_error;
}
kw_args = PyDict_Size(__pyx_kwds);
switch (pos_args) {
case 0:
- if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
case 1:
- if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 1); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 2:
- if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
+ if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 2); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 3:
- if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
+ if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 3); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 4:
- if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
+ if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 4); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 5:
- if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
+ if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 5); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 6:
- if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
+ if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 6); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 7:
- if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
+ if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 7); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 8:
- if (likely((values[8] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
+ if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 8); __PYX_ERR(0, 332, __pyx_L3_error)
}
@@ -9772,10 +10062,10 @@ static PyObject *__pyx_fuse_0_1_0__pyx_pw_4silx_4math_16chistogramnd_lut_17_hist
values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
}
- __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float64_t(values[0]); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
- __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[1]); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
- __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2]); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
- __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float64_t(values[3]); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
+ __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float64_t(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
+ __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
+ __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
+ __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float64_t(values[3], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
__pyx_v_i_n_elems = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_i_n_elems == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 336, __pyx_L3_error)
__pyx_v_i_filt_min_weights = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_i_filt_min_weights == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 337, __pyx_L3_error)
__pyx_v_i_weight_min = __pyx_PyFloat_AsDouble(values[6]); if (unlikely((__pyx_v_i_weight_min == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 338, __pyx_L3_error)
@@ -9803,16 +10093,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_16_histogramnd_from_lut
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
- Py_ssize_t __pyx_t_3;
- int __pyx_t_4;
+ int __pyx_t_3;
+ Py_ssize_t __pyx_t_4;
int __pyx_t_5;
- Py_ssize_t __pyx_t_6;
+ int __pyx_t_6;
Py_ssize_t __pyx_t_7;
Py_ssize_t __pyx_t_8;
Py_ssize_t __pyx_t_9;
Py_ssize_t __pyx_t_10;
Py_ssize_t __pyx_t_11;
Py_ssize_t __pyx_t_12;
+ Py_ssize_t __pyx_t_13;
__Pyx_RefNannySetupContext("__pyx_fuse_0_1_0_histogramnd_from_lut_fused", 0);
/* "silx/math/chistogramnd_lut.pyx":341
@@ -9826,6 +10117,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_16_histogramnd_from_lut
#ifdef WITH_THREAD
PyThreadState *_save;
Py_UNBLOCK_THREADS
+ __Pyx_FastGIL_Remember();
#endif
/*try:*/ {
@@ -9837,8 +10129,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_16_histogramnd_from_lut
* if i_filt_min_weights and i_weights[i] < i_weight_min:
*/
__pyx_t_1 = __pyx_v_i_n_elems;
- for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
- __pyx_v_i = __pyx_t_2;
+ __pyx_t_2 = __pyx_t_1;
+ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
+ __pyx_v_i = __pyx_t_3;
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -9847,9 +10140,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_16_histogramnd_from_lut
* if i_filt_min_weights and i_weights[i] < i_weight_min:
* continue
*/
- __pyx_t_3 = __pyx_v_i;
- __pyx_t_4 = (((*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_3 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
- if (__pyx_t_4) {
+ __pyx_t_4 = __pyx_v_i;
+ __pyx_t_5 = (((*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_4 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":344
* for i in range(i_n_elems):
@@ -9858,17 +10151,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_16_histogramnd_from_lut
* continue
* if i_filt_max_weights and i_weights[i] > i_weight_max:
*/
- __pyx_t_5 = (__pyx_v_i_filt_min_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_min_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L10_bool_binop_done;
}
- __pyx_t_6 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_6 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_7 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L10_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":345
* if (i_lut[i] >= 0):
@@ -9895,17 +10188,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_16_histogramnd_from_lut
* continue
* o_histo[i_lut[i]] += 1
*/
- __pyx_t_5 = (__pyx_v_i_filt_max_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_max_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L13_bool_binop_done;
}
- __pyx_t_7 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_8 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_8 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L13_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":347
* continue
@@ -9932,9 +10225,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_16_histogramnd_from_lut
* o_weighted_histo[i_lut[i]] += <cumul_t>i_weights[i] # noqa
*
*/
- __pyx_t_8 = __pyx_v_i;
- __pyx_t_9 = (*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_8 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_9 * __pyx_v_o_histo.strides[0]) )) += 1;
+ __pyx_t_9 = __pyx_v_i;
+ __pyx_t_10 = (*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_9 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_10 * __pyx_v_o_histo.strides[0]) )) += 1;
/* "silx/math/chistogramnd_lut.pyx":349
* continue
@@ -9943,10 +10236,10 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_16_histogramnd_from_lut
*
*
*/
- __pyx_t_10 = __pyx_v_i;
__pyx_t_11 = __pyx_v_i;
- __pyx_t_12 = (*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_11 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_12 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_float64_t)(*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_10 * __pyx_v_i_weights.strides[0]) ))));
+ __pyx_t_12 = __pyx_v_i;
+ __pyx_t_13 = (*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_12 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_13 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_float64_t)(*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_11 * __pyx_v_i_weights.strides[0]) ))));
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -9970,6 +10263,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_16_histogramnd_from_lut
/*finally:*/ {
/*normal exit:*/{
#ifdef WITH_THREAD
+ __Pyx_FastGIL_Forget();
Py_BLOCK_THREADS
#endif
goto __pyx_L5;
@@ -9983,7 +10277,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_16_histogramnd_from_lut
* @cython.cdivision(True)
* def _histogramnd_from_lut_fused(weights_t[:] i_weights, # <<<<<<<<<<<<<<
* lut_t[:] i_lut,
- * np.uint32_t[:] o_histo,
+ * cnumpy.uint32_t[:] o_histo,
*/
/* function exit code */
@@ -10021,59 +10315,76 @@ static PyObject *__pyx_fuse_0_1_1__pyx_pw_4silx_4math_16chistogramnd_lut_19_hist
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
switch (pos_args) {
case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
+ CYTHON_FALLTHROUGH;
case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
+ CYTHON_FALLTHROUGH;
case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
+ CYTHON_FALLTHROUGH;
case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ CYTHON_FALLTHROUGH;
case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
case 0: break;
default: goto __pyx_L5_argtuple_error;
}
kw_args = PyDict_Size(__pyx_kwds);
switch (pos_args) {
case 0:
- if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
case 1:
- if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 1); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 2:
- if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
+ if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 2); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 3:
- if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
+ if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 3); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 4:
- if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
+ if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 4); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 5:
- if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
+ if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 5); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 6:
- if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
+ if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 6); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 7:
- if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
+ if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 7); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 8:
- if (likely((values[8] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
+ if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 8); __PYX_ERR(0, 332, __pyx_L3_error)
}
@@ -10094,10 +10405,10 @@ static PyObject *__pyx_fuse_0_1_1__pyx_pw_4silx_4math_16chistogramnd_lut_19_hist
values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
}
- __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float64_t(values[0]); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
- __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[1]); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
- __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2]); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
- __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float32_t(values[3]); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
+ __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float64_t(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
+ __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
+ __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
+ __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float32_t(values[3], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
__pyx_v_i_n_elems = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_i_n_elems == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 336, __pyx_L3_error)
__pyx_v_i_filt_min_weights = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_i_filt_min_weights == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 337, __pyx_L3_error)
__pyx_v_i_weight_min = __pyx_PyFloat_AsDouble(values[6]); if (unlikely((__pyx_v_i_weight_min == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 338, __pyx_L3_error)
@@ -10125,16 +10436,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_18_histogramnd_from_lut
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
- Py_ssize_t __pyx_t_3;
- int __pyx_t_4;
+ int __pyx_t_3;
+ Py_ssize_t __pyx_t_4;
int __pyx_t_5;
- Py_ssize_t __pyx_t_6;
+ int __pyx_t_6;
Py_ssize_t __pyx_t_7;
Py_ssize_t __pyx_t_8;
Py_ssize_t __pyx_t_9;
Py_ssize_t __pyx_t_10;
Py_ssize_t __pyx_t_11;
Py_ssize_t __pyx_t_12;
+ Py_ssize_t __pyx_t_13;
__Pyx_RefNannySetupContext("__pyx_fuse_0_1_1_histogramnd_from_lut_fused", 0);
/* "silx/math/chistogramnd_lut.pyx":341
@@ -10148,6 +10460,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_18_histogramnd_from_lut
#ifdef WITH_THREAD
PyThreadState *_save;
Py_UNBLOCK_THREADS
+ __Pyx_FastGIL_Remember();
#endif
/*try:*/ {
@@ -10159,8 +10472,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_18_histogramnd_from_lut
* if i_filt_min_weights and i_weights[i] < i_weight_min:
*/
__pyx_t_1 = __pyx_v_i_n_elems;
- for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
- __pyx_v_i = __pyx_t_2;
+ __pyx_t_2 = __pyx_t_1;
+ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
+ __pyx_v_i = __pyx_t_3;
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -10169,9 +10483,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_18_histogramnd_from_lut
* if i_filt_min_weights and i_weights[i] < i_weight_min:
* continue
*/
- __pyx_t_3 = __pyx_v_i;
- __pyx_t_4 = (((*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_3 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
- if (__pyx_t_4) {
+ __pyx_t_4 = __pyx_v_i;
+ __pyx_t_5 = (((*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_4 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":344
* for i in range(i_n_elems):
@@ -10180,17 +10494,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_18_histogramnd_from_lut
* continue
* if i_filt_max_weights and i_weights[i] > i_weight_max:
*/
- __pyx_t_5 = (__pyx_v_i_filt_min_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_min_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L10_bool_binop_done;
}
- __pyx_t_6 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_6 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_7 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L10_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":345
* if (i_lut[i] >= 0):
@@ -10217,17 +10531,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_18_histogramnd_from_lut
* continue
* o_histo[i_lut[i]] += 1
*/
- __pyx_t_5 = (__pyx_v_i_filt_max_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_max_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L13_bool_binop_done;
}
- __pyx_t_7 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_8 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_8 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L13_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":347
* continue
@@ -10254,9 +10568,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_18_histogramnd_from_lut
* o_weighted_histo[i_lut[i]] += <cumul_t>i_weights[i] # noqa
*
*/
- __pyx_t_8 = __pyx_v_i;
- __pyx_t_9 = (*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_8 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_9 * __pyx_v_o_histo.strides[0]) )) += 1;
+ __pyx_t_9 = __pyx_v_i;
+ __pyx_t_10 = (*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_9 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_10 * __pyx_v_o_histo.strides[0]) )) += 1;
/* "silx/math/chistogramnd_lut.pyx":349
* continue
@@ -10265,10 +10579,10 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_18_histogramnd_from_lut
*
*
*/
- __pyx_t_10 = __pyx_v_i;
__pyx_t_11 = __pyx_v_i;
- __pyx_t_12 = (*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_11 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_12 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_float32_t)(*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_10 * __pyx_v_i_weights.strides[0]) ))));
+ __pyx_t_12 = __pyx_v_i;
+ __pyx_t_13 = (*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_12 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_13 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_float32_t)(*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_11 * __pyx_v_i_weights.strides[0]) ))));
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -10292,6 +10606,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_18_histogramnd_from_lut
/*finally:*/ {
/*normal exit:*/{
#ifdef WITH_THREAD
+ __Pyx_FastGIL_Forget();
Py_BLOCK_THREADS
#endif
goto __pyx_L5;
@@ -10305,7 +10620,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_18_histogramnd_from_lut
* @cython.cdivision(True)
* def _histogramnd_from_lut_fused(weights_t[:] i_weights, # <<<<<<<<<<<<<<
* lut_t[:] i_lut,
- * np.uint32_t[:] o_histo,
+ * cnumpy.uint32_t[:] o_histo,
*/
/* function exit code */
@@ -10343,59 +10658,76 @@ static PyObject *__pyx_fuse_0_1_2__pyx_pw_4silx_4math_16chistogramnd_lut_21_hist
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
switch (pos_args) {
case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
+ CYTHON_FALLTHROUGH;
case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
+ CYTHON_FALLTHROUGH;
case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
+ CYTHON_FALLTHROUGH;
case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ CYTHON_FALLTHROUGH;
case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
case 0: break;
default: goto __pyx_L5_argtuple_error;
}
kw_args = PyDict_Size(__pyx_kwds);
switch (pos_args) {
case 0:
- if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
case 1:
- if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 1); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 2:
- if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
+ if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 2); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 3:
- if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
+ if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 3); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 4:
- if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
+ if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 4); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 5:
- if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
+ if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 5); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 6:
- if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
+ if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 6); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 7:
- if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
+ if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 7); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 8:
- if (likely((values[8] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
+ if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 8); __PYX_ERR(0, 332, __pyx_L3_error)
}
@@ -10416,10 +10748,10 @@ static PyObject *__pyx_fuse_0_1_2__pyx_pw_4silx_4math_16chistogramnd_lut_21_hist
values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
}
- __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float64_t(values[0]); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
- __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[1]); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
- __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2]); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
- __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[3]); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
+ __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float64_t(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
+ __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
+ __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
+ __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[3], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
__pyx_v_i_n_elems = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_i_n_elems == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 336, __pyx_L3_error)
__pyx_v_i_filt_min_weights = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_i_filt_min_weights == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 337, __pyx_L3_error)
__pyx_v_i_weight_min = __pyx_PyFloat_AsDouble(values[6]); if (unlikely((__pyx_v_i_weight_min == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 338, __pyx_L3_error)
@@ -10447,16 +10779,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_20_histogramnd_from_lut
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
- Py_ssize_t __pyx_t_3;
- int __pyx_t_4;
+ int __pyx_t_3;
+ Py_ssize_t __pyx_t_4;
int __pyx_t_5;
- Py_ssize_t __pyx_t_6;
+ int __pyx_t_6;
Py_ssize_t __pyx_t_7;
Py_ssize_t __pyx_t_8;
Py_ssize_t __pyx_t_9;
Py_ssize_t __pyx_t_10;
Py_ssize_t __pyx_t_11;
Py_ssize_t __pyx_t_12;
+ Py_ssize_t __pyx_t_13;
__Pyx_RefNannySetupContext("__pyx_fuse_0_1_2_histogramnd_from_lut_fused", 0);
/* "silx/math/chistogramnd_lut.pyx":341
@@ -10470,6 +10803,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_20_histogramnd_from_lut
#ifdef WITH_THREAD
PyThreadState *_save;
Py_UNBLOCK_THREADS
+ __Pyx_FastGIL_Remember();
#endif
/*try:*/ {
@@ -10481,8 +10815,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_20_histogramnd_from_lut
* if i_filt_min_weights and i_weights[i] < i_weight_min:
*/
__pyx_t_1 = __pyx_v_i_n_elems;
- for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
- __pyx_v_i = __pyx_t_2;
+ __pyx_t_2 = __pyx_t_1;
+ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
+ __pyx_v_i = __pyx_t_3;
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -10491,9 +10826,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_20_histogramnd_from_lut
* if i_filt_min_weights and i_weights[i] < i_weight_min:
* continue
*/
- __pyx_t_3 = __pyx_v_i;
- __pyx_t_4 = (((*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_3 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
- if (__pyx_t_4) {
+ __pyx_t_4 = __pyx_v_i;
+ __pyx_t_5 = (((*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_4 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":344
* for i in range(i_n_elems):
@@ -10502,17 +10837,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_20_histogramnd_from_lut
* continue
* if i_filt_max_weights and i_weights[i] > i_weight_max:
*/
- __pyx_t_5 = (__pyx_v_i_filt_min_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_min_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L10_bool_binop_done;
}
- __pyx_t_6 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_6 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_7 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L10_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":345
* if (i_lut[i] >= 0):
@@ -10539,17 +10874,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_20_histogramnd_from_lut
* continue
* o_histo[i_lut[i]] += 1
*/
- __pyx_t_5 = (__pyx_v_i_filt_max_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_max_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L13_bool_binop_done;
}
- __pyx_t_7 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_8 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_8 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L13_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":347
* continue
@@ -10576,9 +10911,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_20_histogramnd_from_lut
* o_weighted_histo[i_lut[i]] += <cumul_t>i_weights[i] # noqa
*
*/
- __pyx_t_8 = __pyx_v_i;
- __pyx_t_9 = (*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_8 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_9 * __pyx_v_o_histo.strides[0]) )) += 1;
+ __pyx_t_9 = __pyx_v_i;
+ __pyx_t_10 = (*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_9 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_10 * __pyx_v_o_histo.strides[0]) )) += 1;
/* "silx/math/chistogramnd_lut.pyx":349
* continue
@@ -10587,10 +10922,10 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_20_histogramnd_from_lut
*
*
*/
- __pyx_t_10 = __pyx_v_i;
__pyx_t_11 = __pyx_v_i;
- __pyx_t_12 = (*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_11 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_12 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_int32_t)(*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_10 * __pyx_v_i_weights.strides[0]) ))));
+ __pyx_t_12 = __pyx_v_i;
+ __pyx_t_13 = (*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_12 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_13 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_int32_t)(*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_11 * __pyx_v_i_weights.strides[0]) ))));
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -10614,6 +10949,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_20_histogramnd_from_lut
/*finally:*/ {
/*normal exit:*/{
#ifdef WITH_THREAD
+ __Pyx_FastGIL_Forget();
Py_BLOCK_THREADS
#endif
goto __pyx_L5;
@@ -10627,7 +10963,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_20_histogramnd_from_lut
* @cython.cdivision(True)
* def _histogramnd_from_lut_fused(weights_t[:] i_weights, # <<<<<<<<<<<<<<
* lut_t[:] i_lut,
- * np.uint32_t[:] o_histo,
+ * cnumpy.uint32_t[:] o_histo,
*/
/* function exit code */
@@ -10665,59 +11001,76 @@ static PyObject *__pyx_fuse_0_1_3__pyx_pw_4silx_4math_16chistogramnd_lut_23_hist
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
switch (pos_args) {
case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
+ CYTHON_FALLTHROUGH;
case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
+ CYTHON_FALLTHROUGH;
case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
+ CYTHON_FALLTHROUGH;
case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ CYTHON_FALLTHROUGH;
case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
case 0: break;
default: goto __pyx_L5_argtuple_error;
}
kw_args = PyDict_Size(__pyx_kwds);
switch (pos_args) {
case 0:
- if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
case 1:
- if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 1); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 2:
- if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
+ if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 2); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 3:
- if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
+ if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 3); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 4:
- if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
+ if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 4); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 5:
- if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
+ if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 5); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 6:
- if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
+ if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 6); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 7:
- if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
+ if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 7); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 8:
- if (likely((values[8] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
+ if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 8); __PYX_ERR(0, 332, __pyx_L3_error)
}
@@ -10738,10 +11091,10 @@ static PyObject *__pyx_fuse_0_1_3__pyx_pw_4silx_4math_16chistogramnd_lut_23_hist
values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
}
- __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float64_t(values[0]); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
- __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[1]); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
- __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2]); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
- __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[3]); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
+ __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float64_t(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
+ __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
+ __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
+ __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[3], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
__pyx_v_i_n_elems = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_i_n_elems == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 336, __pyx_L3_error)
__pyx_v_i_filt_min_weights = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_i_filt_min_weights == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 337, __pyx_L3_error)
__pyx_v_i_weight_min = __pyx_PyFloat_AsDouble(values[6]); if (unlikely((__pyx_v_i_weight_min == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 338, __pyx_L3_error)
@@ -10769,16 +11122,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_22_histogramnd_from_lut
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
- Py_ssize_t __pyx_t_3;
- int __pyx_t_4;
+ int __pyx_t_3;
+ Py_ssize_t __pyx_t_4;
int __pyx_t_5;
- Py_ssize_t __pyx_t_6;
+ int __pyx_t_6;
Py_ssize_t __pyx_t_7;
Py_ssize_t __pyx_t_8;
Py_ssize_t __pyx_t_9;
Py_ssize_t __pyx_t_10;
Py_ssize_t __pyx_t_11;
Py_ssize_t __pyx_t_12;
+ Py_ssize_t __pyx_t_13;
__Pyx_RefNannySetupContext("__pyx_fuse_0_1_3_histogramnd_from_lut_fused", 0);
/* "silx/math/chistogramnd_lut.pyx":341
@@ -10792,6 +11146,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_22_histogramnd_from_lut
#ifdef WITH_THREAD
PyThreadState *_save;
Py_UNBLOCK_THREADS
+ __Pyx_FastGIL_Remember();
#endif
/*try:*/ {
@@ -10803,8 +11158,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_22_histogramnd_from_lut
* if i_filt_min_weights and i_weights[i] < i_weight_min:
*/
__pyx_t_1 = __pyx_v_i_n_elems;
- for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
- __pyx_v_i = __pyx_t_2;
+ __pyx_t_2 = __pyx_t_1;
+ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
+ __pyx_v_i = __pyx_t_3;
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -10813,9 +11169,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_22_histogramnd_from_lut
* if i_filt_min_weights and i_weights[i] < i_weight_min:
* continue
*/
- __pyx_t_3 = __pyx_v_i;
- __pyx_t_4 = (((*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_3 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
- if (__pyx_t_4) {
+ __pyx_t_4 = __pyx_v_i;
+ __pyx_t_5 = (((*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_4 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":344
* for i in range(i_n_elems):
@@ -10824,17 +11180,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_22_histogramnd_from_lut
* continue
* if i_filt_max_weights and i_weights[i] > i_weight_max:
*/
- __pyx_t_5 = (__pyx_v_i_filt_min_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_min_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L10_bool_binop_done;
}
- __pyx_t_6 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_6 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_7 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L10_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":345
* if (i_lut[i] >= 0):
@@ -10861,17 +11217,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_22_histogramnd_from_lut
* continue
* o_histo[i_lut[i]] += 1
*/
- __pyx_t_5 = (__pyx_v_i_filt_max_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_max_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L13_bool_binop_done;
}
- __pyx_t_7 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_8 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_8 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L13_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":347
* continue
@@ -10898,9 +11254,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_22_histogramnd_from_lut
* o_weighted_histo[i_lut[i]] += <cumul_t>i_weights[i] # noqa
*
*/
- __pyx_t_8 = __pyx_v_i;
- __pyx_t_9 = (*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_8 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_9 * __pyx_v_o_histo.strides[0]) )) += 1;
+ __pyx_t_9 = __pyx_v_i;
+ __pyx_t_10 = (*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_9 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_10 * __pyx_v_o_histo.strides[0]) )) += 1;
/* "silx/math/chistogramnd_lut.pyx":349
* continue
@@ -10909,10 +11265,10 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_22_histogramnd_from_lut
*
*
*/
- __pyx_t_10 = __pyx_v_i;
__pyx_t_11 = __pyx_v_i;
- __pyx_t_12 = (*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_11 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_12 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_int64_t)(*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_10 * __pyx_v_i_weights.strides[0]) ))));
+ __pyx_t_12 = __pyx_v_i;
+ __pyx_t_13 = (*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_12 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_13 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_int64_t)(*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_11 * __pyx_v_i_weights.strides[0]) ))));
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -10936,6 +11292,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_22_histogramnd_from_lut
/*finally:*/ {
/*normal exit:*/{
#ifdef WITH_THREAD
+ __Pyx_FastGIL_Forget();
Py_BLOCK_THREADS
#endif
goto __pyx_L5;
@@ -10949,7 +11306,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_22_histogramnd_from_lut
* @cython.cdivision(True)
* def _histogramnd_from_lut_fused(weights_t[:] i_weights, # <<<<<<<<<<<<<<
* lut_t[:] i_lut,
- * np.uint32_t[:] o_histo,
+ * cnumpy.uint32_t[:] o_histo,
*/
/* function exit code */
@@ -10987,59 +11344,76 @@ static PyObject *__pyx_fuse_0_2_0__pyx_pw_4silx_4math_16chistogramnd_lut_25_hist
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
switch (pos_args) {
case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
+ CYTHON_FALLTHROUGH;
case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
+ CYTHON_FALLTHROUGH;
case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
+ CYTHON_FALLTHROUGH;
case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ CYTHON_FALLTHROUGH;
case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
case 0: break;
default: goto __pyx_L5_argtuple_error;
}
kw_args = PyDict_Size(__pyx_kwds);
switch (pos_args) {
case 0:
- if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
case 1:
- if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 1); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 2:
- if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
+ if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 2); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 3:
- if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
+ if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 3); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 4:
- if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
+ if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 4); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 5:
- if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
+ if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 5); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 6:
- if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
+ if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 6); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 7:
- if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
+ if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 7); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 8:
- if (likely((values[8] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
+ if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 8); __PYX_ERR(0, 332, __pyx_L3_error)
}
@@ -11060,10 +11434,10 @@ static PyObject *__pyx_fuse_0_2_0__pyx_pw_4silx_4math_16chistogramnd_lut_25_hist
values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
}
- __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float64_t(values[0]); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
- __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int16_t(values[1]); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
- __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2]); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
- __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float64_t(values[3]); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
+ __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float64_t(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
+ __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int16_t(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
+ __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
+ __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float64_t(values[3], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
__pyx_v_i_n_elems = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_i_n_elems == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 336, __pyx_L3_error)
__pyx_v_i_filt_min_weights = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_i_filt_min_weights == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 337, __pyx_L3_error)
__pyx_v_i_weight_min = __pyx_PyFloat_AsDouble(values[6]); if (unlikely((__pyx_v_i_weight_min == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 338, __pyx_L3_error)
@@ -11091,16 +11465,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_24_histogramnd_from_lut
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
- Py_ssize_t __pyx_t_3;
- int __pyx_t_4;
+ int __pyx_t_3;
+ Py_ssize_t __pyx_t_4;
int __pyx_t_5;
- Py_ssize_t __pyx_t_6;
+ int __pyx_t_6;
Py_ssize_t __pyx_t_7;
Py_ssize_t __pyx_t_8;
Py_ssize_t __pyx_t_9;
Py_ssize_t __pyx_t_10;
Py_ssize_t __pyx_t_11;
Py_ssize_t __pyx_t_12;
+ Py_ssize_t __pyx_t_13;
__Pyx_RefNannySetupContext("__pyx_fuse_0_2_0_histogramnd_from_lut_fused", 0);
/* "silx/math/chistogramnd_lut.pyx":341
@@ -11114,6 +11489,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_24_histogramnd_from_lut
#ifdef WITH_THREAD
PyThreadState *_save;
Py_UNBLOCK_THREADS
+ __Pyx_FastGIL_Remember();
#endif
/*try:*/ {
@@ -11125,8 +11501,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_24_histogramnd_from_lut
* if i_filt_min_weights and i_weights[i] < i_weight_min:
*/
__pyx_t_1 = __pyx_v_i_n_elems;
- for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
- __pyx_v_i = __pyx_t_2;
+ __pyx_t_2 = __pyx_t_1;
+ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
+ __pyx_v_i = __pyx_t_3;
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -11135,9 +11512,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_24_histogramnd_from_lut
* if i_filt_min_weights and i_weights[i] < i_weight_min:
* continue
*/
- __pyx_t_3 = __pyx_v_i;
- __pyx_t_4 = (((*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_3 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
- if (__pyx_t_4) {
+ __pyx_t_4 = __pyx_v_i;
+ __pyx_t_5 = (((*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_4 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":344
* for i in range(i_n_elems):
@@ -11146,17 +11523,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_24_histogramnd_from_lut
* continue
* if i_filt_max_weights and i_weights[i] > i_weight_max:
*/
- __pyx_t_5 = (__pyx_v_i_filt_min_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_min_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L10_bool_binop_done;
}
- __pyx_t_6 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_6 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_7 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L10_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":345
* if (i_lut[i] >= 0):
@@ -11183,17 +11560,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_24_histogramnd_from_lut
* continue
* o_histo[i_lut[i]] += 1
*/
- __pyx_t_5 = (__pyx_v_i_filt_max_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_max_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L13_bool_binop_done;
}
- __pyx_t_7 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_8 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_8 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L13_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":347
* continue
@@ -11220,9 +11597,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_24_histogramnd_from_lut
* o_weighted_histo[i_lut[i]] += <cumul_t>i_weights[i] # noqa
*
*/
- __pyx_t_8 = __pyx_v_i;
- __pyx_t_9 = (*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_8 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_9 * __pyx_v_o_histo.strides[0]) )) += 1;
+ __pyx_t_9 = __pyx_v_i;
+ __pyx_t_10 = (*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_9 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_10 * __pyx_v_o_histo.strides[0]) )) += 1;
/* "silx/math/chistogramnd_lut.pyx":349
* continue
@@ -11231,10 +11608,10 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_24_histogramnd_from_lut
*
*
*/
- __pyx_t_10 = __pyx_v_i;
__pyx_t_11 = __pyx_v_i;
- __pyx_t_12 = (*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_11 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_12 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_float64_t)(*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_10 * __pyx_v_i_weights.strides[0]) ))));
+ __pyx_t_12 = __pyx_v_i;
+ __pyx_t_13 = (*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_12 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_13 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_float64_t)(*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_11 * __pyx_v_i_weights.strides[0]) ))));
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -11258,6 +11635,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_24_histogramnd_from_lut
/*finally:*/ {
/*normal exit:*/{
#ifdef WITH_THREAD
+ __Pyx_FastGIL_Forget();
Py_BLOCK_THREADS
#endif
goto __pyx_L5;
@@ -11271,7 +11649,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_24_histogramnd_from_lut
* @cython.cdivision(True)
* def _histogramnd_from_lut_fused(weights_t[:] i_weights, # <<<<<<<<<<<<<<
* lut_t[:] i_lut,
- * np.uint32_t[:] o_histo,
+ * cnumpy.uint32_t[:] o_histo,
*/
/* function exit code */
@@ -11309,59 +11687,76 @@ static PyObject *__pyx_fuse_0_2_1__pyx_pw_4silx_4math_16chistogramnd_lut_27_hist
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
switch (pos_args) {
case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
+ CYTHON_FALLTHROUGH;
case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
+ CYTHON_FALLTHROUGH;
case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
+ CYTHON_FALLTHROUGH;
case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ CYTHON_FALLTHROUGH;
case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
case 0: break;
default: goto __pyx_L5_argtuple_error;
}
kw_args = PyDict_Size(__pyx_kwds);
switch (pos_args) {
case 0:
- if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
case 1:
- if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 1); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 2:
- if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
+ if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 2); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 3:
- if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
+ if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 3); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 4:
- if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
+ if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 4); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 5:
- if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
+ if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 5); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 6:
- if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
+ if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 6); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 7:
- if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
+ if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 7); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 8:
- if (likely((values[8] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
+ if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 8); __PYX_ERR(0, 332, __pyx_L3_error)
}
@@ -11382,10 +11777,10 @@ static PyObject *__pyx_fuse_0_2_1__pyx_pw_4silx_4math_16chistogramnd_lut_27_hist
values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
}
- __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float64_t(values[0]); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
- __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int16_t(values[1]); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
- __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2]); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
- __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float32_t(values[3]); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
+ __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float64_t(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
+ __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int16_t(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
+ __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
+ __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float32_t(values[3], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
__pyx_v_i_n_elems = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_i_n_elems == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 336, __pyx_L3_error)
__pyx_v_i_filt_min_weights = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_i_filt_min_weights == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 337, __pyx_L3_error)
__pyx_v_i_weight_min = __pyx_PyFloat_AsDouble(values[6]); if (unlikely((__pyx_v_i_weight_min == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 338, __pyx_L3_error)
@@ -11413,16 +11808,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_26_histogramnd_from_lut
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
- Py_ssize_t __pyx_t_3;
- int __pyx_t_4;
+ int __pyx_t_3;
+ Py_ssize_t __pyx_t_4;
int __pyx_t_5;
- Py_ssize_t __pyx_t_6;
+ int __pyx_t_6;
Py_ssize_t __pyx_t_7;
Py_ssize_t __pyx_t_8;
Py_ssize_t __pyx_t_9;
Py_ssize_t __pyx_t_10;
Py_ssize_t __pyx_t_11;
Py_ssize_t __pyx_t_12;
+ Py_ssize_t __pyx_t_13;
__Pyx_RefNannySetupContext("__pyx_fuse_0_2_1_histogramnd_from_lut_fused", 0);
/* "silx/math/chistogramnd_lut.pyx":341
@@ -11436,6 +11832,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_26_histogramnd_from_lut
#ifdef WITH_THREAD
PyThreadState *_save;
Py_UNBLOCK_THREADS
+ __Pyx_FastGIL_Remember();
#endif
/*try:*/ {
@@ -11447,8 +11844,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_26_histogramnd_from_lut
* if i_filt_min_weights and i_weights[i] < i_weight_min:
*/
__pyx_t_1 = __pyx_v_i_n_elems;
- for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
- __pyx_v_i = __pyx_t_2;
+ __pyx_t_2 = __pyx_t_1;
+ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
+ __pyx_v_i = __pyx_t_3;
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -11457,9 +11855,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_26_histogramnd_from_lut
* if i_filt_min_weights and i_weights[i] < i_weight_min:
* continue
*/
- __pyx_t_3 = __pyx_v_i;
- __pyx_t_4 = (((*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_3 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
- if (__pyx_t_4) {
+ __pyx_t_4 = __pyx_v_i;
+ __pyx_t_5 = (((*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_4 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":344
* for i in range(i_n_elems):
@@ -11468,17 +11866,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_26_histogramnd_from_lut
* continue
* if i_filt_max_weights and i_weights[i] > i_weight_max:
*/
- __pyx_t_5 = (__pyx_v_i_filt_min_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_min_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L10_bool_binop_done;
}
- __pyx_t_6 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_6 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_7 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L10_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":345
* if (i_lut[i] >= 0):
@@ -11505,17 +11903,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_26_histogramnd_from_lut
* continue
* o_histo[i_lut[i]] += 1
*/
- __pyx_t_5 = (__pyx_v_i_filt_max_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_max_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L13_bool_binop_done;
}
- __pyx_t_7 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_8 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_8 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L13_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":347
* continue
@@ -11542,9 +11940,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_26_histogramnd_from_lut
* o_weighted_histo[i_lut[i]] += <cumul_t>i_weights[i] # noqa
*
*/
- __pyx_t_8 = __pyx_v_i;
- __pyx_t_9 = (*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_8 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_9 * __pyx_v_o_histo.strides[0]) )) += 1;
+ __pyx_t_9 = __pyx_v_i;
+ __pyx_t_10 = (*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_9 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_10 * __pyx_v_o_histo.strides[0]) )) += 1;
/* "silx/math/chistogramnd_lut.pyx":349
* continue
@@ -11553,10 +11951,10 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_26_histogramnd_from_lut
*
*
*/
- __pyx_t_10 = __pyx_v_i;
__pyx_t_11 = __pyx_v_i;
- __pyx_t_12 = (*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_11 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_12 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_float32_t)(*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_10 * __pyx_v_i_weights.strides[0]) ))));
+ __pyx_t_12 = __pyx_v_i;
+ __pyx_t_13 = (*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_12 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_13 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_float32_t)(*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_11 * __pyx_v_i_weights.strides[0]) ))));
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -11580,6 +11978,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_26_histogramnd_from_lut
/*finally:*/ {
/*normal exit:*/{
#ifdef WITH_THREAD
+ __Pyx_FastGIL_Forget();
Py_BLOCK_THREADS
#endif
goto __pyx_L5;
@@ -11593,7 +11992,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_26_histogramnd_from_lut
* @cython.cdivision(True)
* def _histogramnd_from_lut_fused(weights_t[:] i_weights, # <<<<<<<<<<<<<<
* lut_t[:] i_lut,
- * np.uint32_t[:] o_histo,
+ * cnumpy.uint32_t[:] o_histo,
*/
/* function exit code */
@@ -11631,59 +12030,76 @@ static PyObject *__pyx_fuse_0_2_2__pyx_pw_4silx_4math_16chistogramnd_lut_29_hist
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
switch (pos_args) {
case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
+ CYTHON_FALLTHROUGH;
case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
+ CYTHON_FALLTHROUGH;
case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
+ CYTHON_FALLTHROUGH;
case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ CYTHON_FALLTHROUGH;
case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
case 0: break;
default: goto __pyx_L5_argtuple_error;
}
kw_args = PyDict_Size(__pyx_kwds);
switch (pos_args) {
case 0:
- if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
case 1:
- if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 1); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 2:
- if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
+ if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 2); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 3:
- if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
+ if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 3); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 4:
- if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
+ if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 4); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 5:
- if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
+ if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 5); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 6:
- if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
+ if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 6); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 7:
- if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
+ if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 7); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 8:
- if (likely((values[8] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
+ if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 8); __PYX_ERR(0, 332, __pyx_L3_error)
}
@@ -11704,10 +12120,10 @@ static PyObject *__pyx_fuse_0_2_2__pyx_pw_4silx_4math_16chistogramnd_lut_29_hist
values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
}
- __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float64_t(values[0]); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
- __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int16_t(values[1]); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
- __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2]); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
- __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[3]); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
+ __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float64_t(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
+ __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int16_t(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
+ __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
+ __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[3], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
__pyx_v_i_n_elems = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_i_n_elems == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 336, __pyx_L3_error)
__pyx_v_i_filt_min_weights = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_i_filt_min_weights == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 337, __pyx_L3_error)
__pyx_v_i_weight_min = __pyx_PyFloat_AsDouble(values[6]); if (unlikely((__pyx_v_i_weight_min == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 338, __pyx_L3_error)
@@ -11735,16 +12151,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_28_histogramnd_from_lut
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
- Py_ssize_t __pyx_t_3;
- int __pyx_t_4;
+ int __pyx_t_3;
+ Py_ssize_t __pyx_t_4;
int __pyx_t_5;
- Py_ssize_t __pyx_t_6;
+ int __pyx_t_6;
Py_ssize_t __pyx_t_7;
Py_ssize_t __pyx_t_8;
Py_ssize_t __pyx_t_9;
Py_ssize_t __pyx_t_10;
Py_ssize_t __pyx_t_11;
Py_ssize_t __pyx_t_12;
+ Py_ssize_t __pyx_t_13;
__Pyx_RefNannySetupContext("__pyx_fuse_0_2_2_histogramnd_from_lut_fused", 0);
/* "silx/math/chistogramnd_lut.pyx":341
@@ -11758,6 +12175,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_28_histogramnd_from_lut
#ifdef WITH_THREAD
PyThreadState *_save;
Py_UNBLOCK_THREADS
+ __Pyx_FastGIL_Remember();
#endif
/*try:*/ {
@@ -11769,8 +12187,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_28_histogramnd_from_lut
* if i_filt_min_weights and i_weights[i] < i_weight_min:
*/
__pyx_t_1 = __pyx_v_i_n_elems;
- for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
- __pyx_v_i = __pyx_t_2;
+ __pyx_t_2 = __pyx_t_1;
+ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
+ __pyx_v_i = __pyx_t_3;
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -11779,9 +12198,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_28_histogramnd_from_lut
* if i_filt_min_weights and i_weights[i] < i_weight_min:
* continue
*/
- __pyx_t_3 = __pyx_v_i;
- __pyx_t_4 = (((*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_3 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
- if (__pyx_t_4) {
+ __pyx_t_4 = __pyx_v_i;
+ __pyx_t_5 = (((*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_4 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":344
* for i in range(i_n_elems):
@@ -11790,17 +12209,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_28_histogramnd_from_lut
* continue
* if i_filt_max_weights and i_weights[i] > i_weight_max:
*/
- __pyx_t_5 = (__pyx_v_i_filt_min_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_min_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L10_bool_binop_done;
}
- __pyx_t_6 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_6 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_7 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L10_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":345
* if (i_lut[i] >= 0):
@@ -11827,17 +12246,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_28_histogramnd_from_lut
* continue
* o_histo[i_lut[i]] += 1
*/
- __pyx_t_5 = (__pyx_v_i_filt_max_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_max_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L13_bool_binop_done;
}
- __pyx_t_7 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_8 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_8 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L13_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":347
* continue
@@ -11864,9 +12283,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_28_histogramnd_from_lut
* o_weighted_histo[i_lut[i]] += <cumul_t>i_weights[i] # noqa
*
*/
- __pyx_t_8 = __pyx_v_i;
- __pyx_t_9 = (*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_8 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_9 * __pyx_v_o_histo.strides[0]) )) += 1;
+ __pyx_t_9 = __pyx_v_i;
+ __pyx_t_10 = (*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_9 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_10 * __pyx_v_o_histo.strides[0]) )) += 1;
/* "silx/math/chistogramnd_lut.pyx":349
* continue
@@ -11875,10 +12294,10 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_28_histogramnd_from_lut
*
*
*/
- __pyx_t_10 = __pyx_v_i;
__pyx_t_11 = __pyx_v_i;
- __pyx_t_12 = (*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_11 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_12 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_int32_t)(*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_10 * __pyx_v_i_weights.strides[0]) ))));
+ __pyx_t_12 = __pyx_v_i;
+ __pyx_t_13 = (*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_12 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_13 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_int32_t)(*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_11 * __pyx_v_i_weights.strides[0]) ))));
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -11902,6 +12321,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_28_histogramnd_from_lut
/*finally:*/ {
/*normal exit:*/{
#ifdef WITH_THREAD
+ __Pyx_FastGIL_Forget();
Py_BLOCK_THREADS
#endif
goto __pyx_L5;
@@ -11915,7 +12335,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_28_histogramnd_from_lut
* @cython.cdivision(True)
* def _histogramnd_from_lut_fused(weights_t[:] i_weights, # <<<<<<<<<<<<<<
* lut_t[:] i_lut,
- * np.uint32_t[:] o_histo,
+ * cnumpy.uint32_t[:] o_histo,
*/
/* function exit code */
@@ -11953,59 +12373,76 @@ static PyObject *__pyx_fuse_0_2_3__pyx_pw_4silx_4math_16chistogramnd_lut_31_hist
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
switch (pos_args) {
case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
+ CYTHON_FALLTHROUGH;
case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
+ CYTHON_FALLTHROUGH;
case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
+ CYTHON_FALLTHROUGH;
case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ CYTHON_FALLTHROUGH;
case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
case 0: break;
default: goto __pyx_L5_argtuple_error;
}
kw_args = PyDict_Size(__pyx_kwds);
switch (pos_args) {
case 0:
- if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
case 1:
- if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 1); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 2:
- if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
+ if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 2); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 3:
- if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
+ if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 3); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 4:
- if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
+ if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 4); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 5:
- if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
+ if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 5); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 6:
- if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
+ if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 6); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 7:
- if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
+ if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 7); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 8:
- if (likely((values[8] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
+ if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 8); __PYX_ERR(0, 332, __pyx_L3_error)
}
@@ -12026,10 +12463,10 @@ static PyObject *__pyx_fuse_0_2_3__pyx_pw_4silx_4math_16chistogramnd_lut_31_hist
values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
}
- __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float64_t(values[0]); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
- __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int16_t(values[1]); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
- __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2]); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
- __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[3]); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
+ __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float64_t(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
+ __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int16_t(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
+ __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
+ __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[3], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
__pyx_v_i_n_elems = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_i_n_elems == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 336, __pyx_L3_error)
__pyx_v_i_filt_min_weights = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_i_filt_min_weights == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 337, __pyx_L3_error)
__pyx_v_i_weight_min = __pyx_PyFloat_AsDouble(values[6]); if (unlikely((__pyx_v_i_weight_min == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 338, __pyx_L3_error)
@@ -12057,16 +12494,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_30_histogramnd_from_lut
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
- Py_ssize_t __pyx_t_3;
- int __pyx_t_4;
+ int __pyx_t_3;
+ Py_ssize_t __pyx_t_4;
int __pyx_t_5;
- Py_ssize_t __pyx_t_6;
+ int __pyx_t_6;
Py_ssize_t __pyx_t_7;
Py_ssize_t __pyx_t_8;
Py_ssize_t __pyx_t_9;
Py_ssize_t __pyx_t_10;
Py_ssize_t __pyx_t_11;
Py_ssize_t __pyx_t_12;
+ Py_ssize_t __pyx_t_13;
__Pyx_RefNannySetupContext("__pyx_fuse_0_2_3_histogramnd_from_lut_fused", 0);
/* "silx/math/chistogramnd_lut.pyx":341
@@ -12080,6 +12518,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_30_histogramnd_from_lut
#ifdef WITH_THREAD
PyThreadState *_save;
Py_UNBLOCK_THREADS
+ __Pyx_FastGIL_Remember();
#endif
/*try:*/ {
@@ -12091,8 +12530,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_30_histogramnd_from_lut
* if i_filt_min_weights and i_weights[i] < i_weight_min:
*/
__pyx_t_1 = __pyx_v_i_n_elems;
- for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
- __pyx_v_i = __pyx_t_2;
+ __pyx_t_2 = __pyx_t_1;
+ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
+ __pyx_v_i = __pyx_t_3;
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -12101,9 +12541,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_30_histogramnd_from_lut
* if i_filt_min_weights and i_weights[i] < i_weight_min:
* continue
*/
- __pyx_t_3 = __pyx_v_i;
- __pyx_t_4 = (((*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_3 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
- if (__pyx_t_4) {
+ __pyx_t_4 = __pyx_v_i;
+ __pyx_t_5 = (((*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_4 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":344
* for i in range(i_n_elems):
@@ -12112,17 +12552,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_30_histogramnd_from_lut
* continue
* if i_filt_max_weights and i_weights[i] > i_weight_max:
*/
- __pyx_t_5 = (__pyx_v_i_filt_min_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_min_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L10_bool_binop_done;
}
- __pyx_t_6 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_6 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_7 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L10_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":345
* if (i_lut[i] >= 0):
@@ -12149,17 +12589,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_30_histogramnd_from_lut
* continue
* o_histo[i_lut[i]] += 1
*/
- __pyx_t_5 = (__pyx_v_i_filt_max_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_max_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L13_bool_binop_done;
}
- __pyx_t_7 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_8 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_8 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L13_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":347
* continue
@@ -12186,9 +12626,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_30_histogramnd_from_lut
* o_weighted_histo[i_lut[i]] += <cumul_t>i_weights[i] # noqa
*
*/
- __pyx_t_8 = __pyx_v_i;
- __pyx_t_9 = (*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_8 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_9 * __pyx_v_o_histo.strides[0]) )) += 1;
+ __pyx_t_9 = __pyx_v_i;
+ __pyx_t_10 = (*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_9 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_10 * __pyx_v_o_histo.strides[0]) )) += 1;
/* "silx/math/chistogramnd_lut.pyx":349
* continue
@@ -12197,10 +12637,10 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_30_histogramnd_from_lut
*
*
*/
- __pyx_t_10 = __pyx_v_i;
__pyx_t_11 = __pyx_v_i;
- __pyx_t_12 = (*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_11 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_12 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_int64_t)(*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_10 * __pyx_v_i_weights.strides[0]) ))));
+ __pyx_t_12 = __pyx_v_i;
+ __pyx_t_13 = (*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_12 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_13 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_int64_t)(*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_11 * __pyx_v_i_weights.strides[0]) ))));
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -12224,6 +12664,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_30_histogramnd_from_lut
/*finally:*/ {
/*normal exit:*/{
#ifdef WITH_THREAD
+ __Pyx_FastGIL_Forget();
Py_BLOCK_THREADS
#endif
goto __pyx_L5;
@@ -12237,7 +12678,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_30_histogramnd_from_lut
* @cython.cdivision(True)
* def _histogramnd_from_lut_fused(weights_t[:] i_weights, # <<<<<<<<<<<<<<
* lut_t[:] i_lut,
- * np.uint32_t[:] o_histo,
+ * cnumpy.uint32_t[:] o_histo,
*/
/* function exit code */
@@ -12275,59 +12716,76 @@ static PyObject *__pyx_fuse_1_0_0__pyx_pw_4silx_4math_16chistogramnd_lut_33_hist
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
switch (pos_args) {
case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
+ CYTHON_FALLTHROUGH;
case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
+ CYTHON_FALLTHROUGH;
case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
+ CYTHON_FALLTHROUGH;
case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ CYTHON_FALLTHROUGH;
case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
case 0: break;
default: goto __pyx_L5_argtuple_error;
}
kw_args = PyDict_Size(__pyx_kwds);
switch (pos_args) {
case 0:
- if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
case 1:
- if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 1); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 2:
- if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
+ if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 2); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 3:
- if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
+ if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 3); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 4:
- if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
+ if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 4); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 5:
- if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
+ if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 5); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 6:
- if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
+ if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 6); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 7:
- if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
+ if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 7); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 8:
- if (likely((values[8] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
+ if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 8); __PYX_ERR(0, 332, __pyx_L3_error)
}
@@ -12348,10 +12806,10 @@ static PyObject *__pyx_fuse_1_0_0__pyx_pw_4silx_4math_16chistogramnd_lut_33_hist
values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
}
- __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float32_t(values[0]); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
- __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[1]); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
- __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2]); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
- __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float64_t(values[3]); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
+ __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float32_t(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
+ __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
+ __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
+ __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float64_t(values[3], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
__pyx_v_i_n_elems = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_i_n_elems == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 336, __pyx_L3_error)
__pyx_v_i_filt_min_weights = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_i_filt_min_weights == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 337, __pyx_L3_error)
__pyx_v_i_weight_min = __pyx_PyFloat_AsFloat(values[6]); if (unlikely((__pyx_v_i_weight_min == ((npy_float32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 338, __pyx_L3_error)
@@ -12379,16 +12837,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_32_histogramnd_from_lut
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
- Py_ssize_t __pyx_t_3;
- int __pyx_t_4;
+ int __pyx_t_3;
+ Py_ssize_t __pyx_t_4;
int __pyx_t_5;
- Py_ssize_t __pyx_t_6;
+ int __pyx_t_6;
Py_ssize_t __pyx_t_7;
Py_ssize_t __pyx_t_8;
- __pyx_t_5numpy_int64_t __pyx_t_9;
- Py_ssize_t __pyx_t_10;
+ Py_ssize_t __pyx_t_9;
+ __pyx_t_5numpy_int64_t __pyx_t_10;
Py_ssize_t __pyx_t_11;
- __pyx_t_5numpy_int64_t __pyx_t_12;
+ Py_ssize_t __pyx_t_12;
+ __pyx_t_5numpy_int64_t __pyx_t_13;
__Pyx_RefNannySetupContext("__pyx_fuse_1_0_0_histogramnd_from_lut_fused", 0);
/* "silx/math/chistogramnd_lut.pyx":341
@@ -12402,6 +12861,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_32_histogramnd_from_lut
#ifdef WITH_THREAD
PyThreadState *_save;
Py_UNBLOCK_THREADS
+ __Pyx_FastGIL_Remember();
#endif
/*try:*/ {
@@ -12413,8 +12873,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_32_histogramnd_from_lut
* if i_filt_min_weights and i_weights[i] < i_weight_min:
*/
__pyx_t_1 = __pyx_v_i_n_elems;
- for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
- __pyx_v_i = __pyx_t_2;
+ __pyx_t_2 = __pyx_t_1;
+ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
+ __pyx_v_i = __pyx_t_3;
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -12423,9 +12884,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_32_histogramnd_from_lut
* if i_filt_min_weights and i_weights[i] < i_weight_min:
* continue
*/
- __pyx_t_3 = __pyx_v_i;
- __pyx_t_4 = (((*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_3 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
- if (__pyx_t_4) {
+ __pyx_t_4 = __pyx_v_i;
+ __pyx_t_5 = (((*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_4 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":344
* for i in range(i_n_elems):
@@ -12434,17 +12895,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_32_histogramnd_from_lut
* continue
* if i_filt_max_weights and i_weights[i] > i_weight_max:
*/
- __pyx_t_5 = (__pyx_v_i_filt_min_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_min_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L10_bool_binop_done;
}
- __pyx_t_6 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_6 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_7 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L10_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":345
* if (i_lut[i] >= 0):
@@ -12471,17 +12932,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_32_histogramnd_from_lut
* continue
* o_histo[i_lut[i]] += 1
*/
- __pyx_t_5 = (__pyx_v_i_filt_max_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_max_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L13_bool_binop_done;
}
- __pyx_t_7 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_8 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_8 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L13_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":347
* continue
@@ -12508,9 +12969,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_32_histogramnd_from_lut
* o_weighted_histo[i_lut[i]] += <cumul_t>i_weights[i] # noqa
*
*/
- __pyx_t_8 = __pyx_v_i;
- __pyx_t_9 = (*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_8 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_9 * __pyx_v_o_histo.strides[0]) )) += 1;
+ __pyx_t_9 = __pyx_v_i;
+ __pyx_t_10 = (*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_9 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_10 * __pyx_v_o_histo.strides[0]) )) += 1;
/* "silx/math/chistogramnd_lut.pyx":349
* continue
@@ -12519,10 +12980,10 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_32_histogramnd_from_lut
*
*
*/
- __pyx_t_10 = __pyx_v_i;
__pyx_t_11 = __pyx_v_i;
- __pyx_t_12 = (*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_11 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_12 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_float64_t)(*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_10 * __pyx_v_i_weights.strides[0]) ))));
+ __pyx_t_12 = __pyx_v_i;
+ __pyx_t_13 = (*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_12 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_13 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_float64_t)(*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_11 * __pyx_v_i_weights.strides[0]) ))));
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -12546,6 +13007,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_32_histogramnd_from_lut
/*finally:*/ {
/*normal exit:*/{
#ifdef WITH_THREAD
+ __Pyx_FastGIL_Forget();
Py_BLOCK_THREADS
#endif
goto __pyx_L5;
@@ -12559,7 +13021,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_32_histogramnd_from_lut
* @cython.cdivision(True)
* def _histogramnd_from_lut_fused(weights_t[:] i_weights, # <<<<<<<<<<<<<<
* lut_t[:] i_lut,
- * np.uint32_t[:] o_histo,
+ * cnumpy.uint32_t[:] o_histo,
*/
/* function exit code */
@@ -12597,59 +13059,76 @@ static PyObject *__pyx_fuse_1_0_1__pyx_pw_4silx_4math_16chistogramnd_lut_35_hist
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
switch (pos_args) {
case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
+ CYTHON_FALLTHROUGH;
case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
+ CYTHON_FALLTHROUGH;
case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
+ CYTHON_FALLTHROUGH;
case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ CYTHON_FALLTHROUGH;
case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
case 0: break;
default: goto __pyx_L5_argtuple_error;
}
kw_args = PyDict_Size(__pyx_kwds);
switch (pos_args) {
case 0:
- if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
case 1:
- if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 1); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 2:
- if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
+ if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 2); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 3:
- if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
+ if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 3); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 4:
- if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
+ if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 4); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 5:
- if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
+ if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 5); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 6:
- if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
+ if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 6); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 7:
- if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
+ if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 7); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 8:
- if (likely((values[8] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
+ if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 8); __PYX_ERR(0, 332, __pyx_L3_error)
}
@@ -12670,10 +13149,10 @@ static PyObject *__pyx_fuse_1_0_1__pyx_pw_4silx_4math_16chistogramnd_lut_35_hist
values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
}
- __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float32_t(values[0]); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
- __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[1]); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
- __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2]); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
- __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float32_t(values[3]); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
+ __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float32_t(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
+ __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
+ __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
+ __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float32_t(values[3], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
__pyx_v_i_n_elems = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_i_n_elems == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 336, __pyx_L3_error)
__pyx_v_i_filt_min_weights = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_i_filt_min_weights == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 337, __pyx_L3_error)
__pyx_v_i_weight_min = __pyx_PyFloat_AsFloat(values[6]); if (unlikely((__pyx_v_i_weight_min == ((npy_float32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 338, __pyx_L3_error)
@@ -12701,16 +13180,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_34_histogramnd_from_lut
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
- Py_ssize_t __pyx_t_3;
- int __pyx_t_4;
+ int __pyx_t_3;
+ Py_ssize_t __pyx_t_4;
int __pyx_t_5;
- Py_ssize_t __pyx_t_6;
+ int __pyx_t_6;
Py_ssize_t __pyx_t_7;
Py_ssize_t __pyx_t_8;
- __pyx_t_5numpy_int64_t __pyx_t_9;
- Py_ssize_t __pyx_t_10;
+ Py_ssize_t __pyx_t_9;
+ __pyx_t_5numpy_int64_t __pyx_t_10;
Py_ssize_t __pyx_t_11;
- __pyx_t_5numpy_int64_t __pyx_t_12;
+ Py_ssize_t __pyx_t_12;
+ __pyx_t_5numpy_int64_t __pyx_t_13;
__Pyx_RefNannySetupContext("__pyx_fuse_1_0_1_histogramnd_from_lut_fused", 0);
/* "silx/math/chistogramnd_lut.pyx":341
@@ -12724,6 +13204,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_34_histogramnd_from_lut
#ifdef WITH_THREAD
PyThreadState *_save;
Py_UNBLOCK_THREADS
+ __Pyx_FastGIL_Remember();
#endif
/*try:*/ {
@@ -12735,8 +13216,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_34_histogramnd_from_lut
* if i_filt_min_weights and i_weights[i] < i_weight_min:
*/
__pyx_t_1 = __pyx_v_i_n_elems;
- for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
- __pyx_v_i = __pyx_t_2;
+ __pyx_t_2 = __pyx_t_1;
+ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
+ __pyx_v_i = __pyx_t_3;
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -12745,9 +13227,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_34_histogramnd_from_lut
* if i_filt_min_weights and i_weights[i] < i_weight_min:
* continue
*/
- __pyx_t_3 = __pyx_v_i;
- __pyx_t_4 = (((*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_3 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
- if (__pyx_t_4) {
+ __pyx_t_4 = __pyx_v_i;
+ __pyx_t_5 = (((*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_4 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":344
* for i in range(i_n_elems):
@@ -12756,17 +13238,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_34_histogramnd_from_lut
* continue
* if i_filt_max_weights and i_weights[i] > i_weight_max:
*/
- __pyx_t_5 = (__pyx_v_i_filt_min_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_min_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L10_bool_binop_done;
}
- __pyx_t_6 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_6 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_7 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L10_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":345
* if (i_lut[i] >= 0):
@@ -12793,17 +13275,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_34_histogramnd_from_lut
* continue
* o_histo[i_lut[i]] += 1
*/
- __pyx_t_5 = (__pyx_v_i_filt_max_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_max_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L13_bool_binop_done;
}
- __pyx_t_7 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_8 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_8 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L13_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":347
* continue
@@ -12830,9 +13312,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_34_histogramnd_from_lut
* o_weighted_histo[i_lut[i]] += <cumul_t>i_weights[i] # noqa
*
*/
- __pyx_t_8 = __pyx_v_i;
- __pyx_t_9 = (*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_8 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_9 * __pyx_v_o_histo.strides[0]) )) += 1;
+ __pyx_t_9 = __pyx_v_i;
+ __pyx_t_10 = (*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_9 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_10 * __pyx_v_o_histo.strides[0]) )) += 1;
/* "silx/math/chistogramnd_lut.pyx":349
* continue
@@ -12841,10 +13323,10 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_34_histogramnd_from_lut
*
*
*/
- __pyx_t_10 = __pyx_v_i;
__pyx_t_11 = __pyx_v_i;
- __pyx_t_12 = (*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_11 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_12 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_float32_t)(*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_10 * __pyx_v_i_weights.strides[0]) ))));
+ __pyx_t_12 = __pyx_v_i;
+ __pyx_t_13 = (*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_12 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_13 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_float32_t)(*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_11 * __pyx_v_i_weights.strides[0]) ))));
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -12868,6 +13350,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_34_histogramnd_from_lut
/*finally:*/ {
/*normal exit:*/{
#ifdef WITH_THREAD
+ __Pyx_FastGIL_Forget();
Py_BLOCK_THREADS
#endif
goto __pyx_L5;
@@ -12881,7 +13364,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_34_histogramnd_from_lut
* @cython.cdivision(True)
* def _histogramnd_from_lut_fused(weights_t[:] i_weights, # <<<<<<<<<<<<<<
* lut_t[:] i_lut,
- * np.uint32_t[:] o_histo,
+ * cnumpy.uint32_t[:] o_histo,
*/
/* function exit code */
@@ -12919,59 +13402,76 @@ static PyObject *__pyx_fuse_1_0_2__pyx_pw_4silx_4math_16chistogramnd_lut_37_hist
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
switch (pos_args) {
case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
+ CYTHON_FALLTHROUGH;
case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
+ CYTHON_FALLTHROUGH;
case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
+ CYTHON_FALLTHROUGH;
case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ CYTHON_FALLTHROUGH;
case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
case 0: break;
default: goto __pyx_L5_argtuple_error;
}
kw_args = PyDict_Size(__pyx_kwds);
switch (pos_args) {
case 0:
- if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
case 1:
- if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 1); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 2:
- if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
+ if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 2); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 3:
- if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
+ if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 3); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 4:
- if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
+ if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 4); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 5:
- if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
+ if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 5); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 6:
- if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
+ if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 6); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 7:
- if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
+ if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 7); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 8:
- if (likely((values[8] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
+ if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 8); __PYX_ERR(0, 332, __pyx_L3_error)
}
@@ -12992,10 +13492,10 @@ static PyObject *__pyx_fuse_1_0_2__pyx_pw_4silx_4math_16chistogramnd_lut_37_hist
values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
}
- __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float32_t(values[0]); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
- __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[1]); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
- __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2]); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
- __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[3]); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
+ __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float32_t(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
+ __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
+ __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
+ __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[3], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
__pyx_v_i_n_elems = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_i_n_elems == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 336, __pyx_L3_error)
__pyx_v_i_filt_min_weights = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_i_filt_min_weights == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 337, __pyx_L3_error)
__pyx_v_i_weight_min = __pyx_PyFloat_AsFloat(values[6]); if (unlikely((__pyx_v_i_weight_min == ((npy_float32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 338, __pyx_L3_error)
@@ -13023,16 +13523,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_36_histogramnd_from_lut
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
- Py_ssize_t __pyx_t_3;
- int __pyx_t_4;
+ int __pyx_t_3;
+ Py_ssize_t __pyx_t_4;
int __pyx_t_5;
- Py_ssize_t __pyx_t_6;
+ int __pyx_t_6;
Py_ssize_t __pyx_t_7;
Py_ssize_t __pyx_t_8;
- __pyx_t_5numpy_int64_t __pyx_t_9;
- Py_ssize_t __pyx_t_10;
+ Py_ssize_t __pyx_t_9;
+ __pyx_t_5numpy_int64_t __pyx_t_10;
Py_ssize_t __pyx_t_11;
- __pyx_t_5numpy_int64_t __pyx_t_12;
+ Py_ssize_t __pyx_t_12;
+ __pyx_t_5numpy_int64_t __pyx_t_13;
__Pyx_RefNannySetupContext("__pyx_fuse_1_0_2_histogramnd_from_lut_fused", 0);
/* "silx/math/chistogramnd_lut.pyx":341
@@ -13046,6 +13547,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_36_histogramnd_from_lut
#ifdef WITH_THREAD
PyThreadState *_save;
Py_UNBLOCK_THREADS
+ __Pyx_FastGIL_Remember();
#endif
/*try:*/ {
@@ -13057,8 +13559,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_36_histogramnd_from_lut
* if i_filt_min_weights and i_weights[i] < i_weight_min:
*/
__pyx_t_1 = __pyx_v_i_n_elems;
- for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
- __pyx_v_i = __pyx_t_2;
+ __pyx_t_2 = __pyx_t_1;
+ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
+ __pyx_v_i = __pyx_t_3;
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -13067,9 +13570,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_36_histogramnd_from_lut
* if i_filt_min_weights and i_weights[i] < i_weight_min:
* continue
*/
- __pyx_t_3 = __pyx_v_i;
- __pyx_t_4 = (((*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_3 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
- if (__pyx_t_4) {
+ __pyx_t_4 = __pyx_v_i;
+ __pyx_t_5 = (((*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_4 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":344
* for i in range(i_n_elems):
@@ -13078,17 +13581,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_36_histogramnd_from_lut
* continue
* if i_filt_max_weights and i_weights[i] > i_weight_max:
*/
- __pyx_t_5 = (__pyx_v_i_filt_min_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_min_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L10_bool_binop_done;
}
- __pyx_t_6 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_6 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_7 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L10_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":345
* if (i_lut[i] >= 0):
@@ -13115,17 +13618,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_36_histogramnd_from_lut
* continue
* o_histo[i_lut[i]] += 1
*/
- __pyx_t_5 = (__pyx_v_i_filt_max_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_max_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L13_bool_binop_done;
}
- __pyx_t_7 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_8 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_8 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L13_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":347
* continue
@@ -13152,9 +13655,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_36_histogramnd_from_lut
* o_weighted_histo[i_lut[i]] += <cumul_t>i_weights[i] # noqa
*
*/
- __pyx_t_8 = __pyx_v_i;
- __pyx_t_9 = (*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_8 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_9 * __pyx_v_o_histo.strides[0]) )) += 1;
+ __pyx_t_9 = __pyx_v_i;
+ __pyx_t_10 = (*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_9 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_10 * __pyx_v_o_histo.strides[0]) )) += 1;
/* "silx/math/chistogramnd_lut.pyx":349
* continue
@@ -13163,10 +13666,10 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_36_histogramnd_from_lut
*
*
*/
- __pyx_t_10 = __pyx_v_i;
__pyx_t_11 = __pyx_v_i;
- __pyx_t_12 = (*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_11 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_12 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_int32_t)(*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_10 * __pyx_v_i_weights.strides[0]) ))));
+ __pyx_t_12 = __pyx_v_i;
+ __pyx_t_13 = (*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_12 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_13 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_int32_t)(*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_11 * __pyx_v_i_weights.strides[0]) ))));
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -13190,6 +13693,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_36_histogramnd_from_lut
/*finally:*/ {
/*normal exit:*/{
#ifdef WITH_THREAD
+ __Pyx_FastGIL_Forget();
Py_BLOCK_THREADS
#endif
goto __pyx_L5;
@@ -13203,7 +13707,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_36_histogramnd_from_lut
* @cython.cdivision(True)
* def _histogramnd_from_lut_fused(weights_t[:] i_weights, # <<<<<<<<<<<<<<
* lut_t[:] i_lut,
- * np.uint32_t[:] o_histo,
+ * cnumpy.uint32_t[:] o_histo,
*/
/* function exit code */
@@ -13241,59 +13745,76 @@ static PyObject *__pyx_fuse_1_0_3__pyx_pw_4silx_4math_16chistogramnd_lut_39_hist
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
switch (pos_args) {
case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
+ CYTHON_FALLTHROUGH;
case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
+ CYTHON_FALLTHROUGH;
case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
+ CYTHON_FALLTHROUGH;
case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ CYTHON_FALLTHROUGH;
case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
case 0: break;
default: goto __pyx_L5_argtuple_error;
}
kw_args = PyDict_Size(__pyx_kwds);
switch (pos_args) {
case 0:
- if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
case 1:
- if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 1); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 2:
- if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
+ if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 2); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 3:
- if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
+ if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 3); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 4:
- if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
+ if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 4); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 5:
- if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
+ if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 5); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 6:
- if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
+ if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 6); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 7:
- if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
+ if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 7); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 8:
- if (likely((values[8] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
+ if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 8); __PYX_ERR(0, 332, __pyx_L3_error)
}
@@ -13314,10 +13835,10 @@ static PyObject *__pyx_fuse_1_0_3__pyx_pw_4silx_4math_16chistogramnd_lut_39_hist
values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
}
- __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float32_t(values[0]); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
- __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[1]); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
- __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2]); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
- __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[3]); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
+ __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float32_t(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
+ __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
+ __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
+ __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[3], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
__pyx_v_i_n_elems = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_i_n_elems == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 336, __pyx_L3_error)
__pyx_v_i_filt_min_weights = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_i_filt_min_weights == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 337, __pyx_L3_error)
__pyx_v_i_weight_min = __pyx_PyFloat_AsFloat(values[6]); if (unlikely((__pyx_v_i_weight_min == ((npy_float32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 338, __pyx_L3_error)
@@ -13345,16 +13866,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_38_histogramnd_from_lut
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
- Py_ssize_t __pyx_t_3;
- int __pyx_t_4;
+ int __pyx_t_3;
+ Py_ssize_t __pyx_t_4;
int __pyx_t_5;
- Py_ssize_t __pyx_t_6;
+ int __pyx_t_6;
Py_ssize_t __pyx_t_7;
Py_ssize_t __pyx_t_8;
- __pyx_t_5numpy_int64_t __pyx_t_9;
- Py_ssize_t __pyx_t_10;
+ Py_ssize_t __pyx_t_9;
+ __pyx_t_5numpy_int64_t __pyx_t_10;
Py_ssize_t __pyx_t_11;
- __pyx_t_5numpy_int64_t __pyx_t_12;
+ Py_ssize_t __pyx_t_12;
+ __pyx_t_5numpy_int64_t __pyx_t_13;
__Pyx_RefNannySetupContext("__pyx_fuse_1_0_3_histogramnd_from_lut_fused", 0);
/* "silx/math/chistogramnd_lut.pyx":341
@@ -13368,6 +13890,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_38_histogramnd_from_lut
#ifdef WITH_THREAD
PyThreadState *_save;
Py_UNBLOCK_THREADS
+ __Pyx_FastGIL_Remember();
#endif
/*try:*/ {
@@ -13379,8 +13902,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_38_histogramnd_from_lut
* if i_filt_min_weights and i_weights[i] < i_weight_min:
*/
__pyx_t_1 = __pyx_v_i_n_elems;
- for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
- __pyx_v_i = __pyx_t_2;
+ __pyx_t_2 = __pyx_t_1;
+ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
+ __pyx_v_i = __pyx_t_3;
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -13389,9 +13913,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_38_histogramnd_from_lut
* if i_filt_min_weights and i_weights[i] < i_weight_min:
* continue
*/
- __pyx_t_3 = __pyx_v_i;
- __pyx_t_4 = (((*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_3 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
- if (__pyx_t_4) {
+ __pyx_t_4 = __pyx_v_i;
+ __pyx_t_5 = (((*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_4 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":344
* for i in range(i_n_elems):
@@ -13400,17 +13924,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_38_histogramnd_from_lut
* continue
* if i_filt_max_weights and i_weights[i] > i_weight_max:
*/
- __pyx_t_5 = (__pyx_v_i_filt_min_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_min_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L10_bool_binop_done;
}
- __pyx_t_6 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_6 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_7 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L10_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":345
* if (i_lut[i] >= 0):
@@ -13437,17 +13961,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_38_histogramnd_from_lut
* continue
* o_histo[i_lut[i]] += 1
*/
- __pyx_t_5 = (__pyx_v_i_filt_max_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_max_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L13_bool_binop_done;
}
- __pyx_t_7 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_8 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_8 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L13_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":347
* continue
@@ -13474,9 +13998,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_38_histogramnd_from_lut
* o_weighted_histo[i_lut[i]] += <cumul_t>i_weights[i] # noqa
*
*/
- __pyx_t_8 = __pyx_v_i;
- __pyx_t_9 = (*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_8 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_9 * __pyx_v_o_histo.strides[0]) )) += 1;
+ __pyx_t_9 = __pyx_v_i;
+ __pyx_t_10 = (*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_9 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_10 * __pyx_v_o_histo.strides[0]) )) += 1;
/* "silx/math/chistogramnd_lut.pyx":349
* continue
@@ -13485,10 +14009,10 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_38_histogramnd_from_lut
*
*
*/
- __pyx_t_10 = __pyx_v_i;
__pyx_t_11 = __pyx_v_i;
- __pyx_t_12 = (*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_11 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_12 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_int64_t)(*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_10 * __pyx_v_i_weights.strides[0]) ))));
+ __pyx_t_12 = __pyx_v_i;
+ __pyx_t_13 = (*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_12 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_13 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_int64_t)(*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_11 * __pyx_v_i_weights.strides[0]) ))));
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -13512,6 +14036,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_38_histogramnd_from_lut
/*finally:*/ {
/*normal exit:*/{
#ifdef WITH_THREAD
+ __Pyx_FastGIL_Forget();
Py_BLOCK_THREADS
#endif
goto __pyx_L5;
@@ -13525,7 +14050,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_38_histogramnd_from_lut
* @cython.cdivision(True)
* def _histogramnd_from_lut_fused(weights_t[:] i_weights, # <<<<<<<<<<<<<<
* lut_t[:] i_lut,
- * np.uint32_t[:] o_histo,
+ * cnumpy.uint32_t[:] o_histo,
*/
/* function exit code */
@@ -13563,59 +14088,76 @@ static PyObject *__pyx_fuse_1_1_0__pyx_pw_4silx_4math_16chistogramnd_lut_41_hist
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
switch (pos_args) {
case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
+ CYTHON_FALLTHROUGH;
case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
+ CYTHON_FALLTHROUGH;
case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
+ CYTHON_FALLTHROUGH;
case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ CYTHON_FALLTHROUGH;
case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
case 0: break;
default: goto __pyx_L5_argtuple_error;
}
kw_args = PyDict_Size(__pyx_kwds);
switch (pos_args) {
case 0:
- if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
case 1:
- if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 1); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 2:
- if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
+ if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 2); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 3:
- if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
+ if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 3); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 4:
- if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
+ if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 4); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 5:
- if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
+ if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 5); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 6:
- if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
+ if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 6); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 7:
- if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
+ if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 7); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 8:
- if (likely((values[8] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
+ if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 8); __PYX_ERR(0, 332, __pyx_L3_error)
}
@@ -13636,10 +14178,10 @@ static PyObject *__pyx_fuse_1_1_0__pyx_pw_4silx_4math_16chistogramnd_lut_41_hist
values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
}
- __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float32_t(values[0]); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
- __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[1]); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
- __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2]); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
- __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float64_t(values[3]); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
+ __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float32_t(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
+ __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
+ __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
+ __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float64_t(values[3], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
__pyx_v_i_n_elems = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_i_n_elems == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 336, __pyx_L3_error)
__pyx_v_i_filt_min_weights = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_i_filt_min_weights == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 337, __pyx_L3_error)
__pyx_v_i_weight_min = __pyx_PyFloat_AsFloat(values[6]); if (unlikely((__pyx_v_i_weight_min == ((npy_float32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 338, __pyx_L3_error)
@@ -13667,16 +14209,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_40_histogramnd_from_lut
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
- Py_ssize_t __pyx_t_3;
- int __pyx_t_4;
+ int __pyx_t_3;
+ Py_ssize_t __pyx_t_4;
int __pyx_t_5;
- Py_ssize_t __pyx_t_6;
+ int __pyx_t_6;
Py_ssize_t __pyx_t_7;
Py_ssize_t __pyx_t_8;
Py_ssize_t __pyx_t_9;
Py_ssize_t __pyx_t_10;
Py_ssize_t __pyx_t_11;
Py_ssize_t __pyx_t_12;
+ Py_ssize_t __pyx_t_13;
__Pyx_RefNannySetupContext("__pyx_fuse_1_1_0_histogramnd_from_lut_fused", 0);
/* "silx/math/chistogramnd_lut.pyx":341
@@ -13690,6 +14233,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_40_histogramnd_from_lut
#ifdef WITH_THREAD
PyThreadState *_save;
Py_UNBLOCK_THREADS
+ __Pyx_FastGIL_Remember();
#endif
/*try:*/ {
@@ -13701,8 +14245,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_40_histogramnd_from_lut
* if i_filt_min_weights and i_weights[i] < i_weight_min:
*/
__pyx_t_1 = __pyx_v_i_n_elems;
- for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
- __pyx_v_i = __pyx_t_2;
+ __pyx_t_2 = __pyx_t_1;
+ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
+ __pyx_v_i = __pyx_t_3;
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -13711,9 +14256,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_40_histogramnd_from_lut
* if i_filt_min_weights and i_weights[i] < i_weight_min:
* continue
*/
- __pyx_t_3 = __pyx_v_i;
- __pyx_t_4 = (((*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_3 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
- if (__pyx_t_4) {
+ __pyx_t_4 = __pyx_v_i;
+ __pyx_t_5 = (((*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_4 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":344
* for i in range(i_n_elems):
@@ -13722,17 +14267,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_40_histogramnd_from_lut
* continue
* if i_filt_max_weights and i_weights[i] > i_weight_max:
*/
- __pyx_t_5 = (__pyx_v_i_filt_min_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_min_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L10_bool_binop_done;
}
- __pyx_t_6 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_6 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_7 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L10_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":345
* if (i_lut[i] >= 0):
@@ -13759,17 +14304,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_40_histogramnd_from_lut
* continue
* o_histo[i_lut[i]] += 1
*/
- __pyx_t_5 = (__pyx_v_i_filt_max_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_max_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L13_bool_binop_done;
}
- __pyx_t_7 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_8 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_8 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L13_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":347
* continue
@@ -13796,9 +14341,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_40_histogramnd_from_lut
* o_weighted_histo[i_lut[i]] += <cumul_t>i_weights[i] # noqa
*
*/
- __pyx_t_8 = __pyx_v_i;
- __pyx_t_9 = (*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_8 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_9 * __pyx_v_o_histo.strides[0]) )) += 1;
+ __pyx_t_9 = __pyx_v_i;
+ __pyx_t_10 = (*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_9 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_10 * __pyx_v_o_histo.strides[0]) )) += 1;
/* "silx/math/chistogramnd_lut.pyx":349
* continue
@@ -13807,10 +14352,10 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_40_histogramnd_from_lut
*
*
*/
- __pyx_t_10 = __pyx_v_i;
__pyx_t_11 = __pyx_v_i;
- __pyx_t_12 = (*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_11 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_12 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_float64_t)(*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_10 * __pyx_v_i_weights.strides[0]) ))));
+ __pyx_t_12 = __pyx_v_i;
+ __pyx_t_13 = (*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_12 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_13 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_float64_t)(*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_11 * __pyx_v_i_weights.strides[0]) ))));
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -13834,6 +14379,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_40_histogramnd_from_lut
/*finally:*/ {
/*normal exit:*/{
#ifdef WITH_THREAD
+ __Pyx_FastGIL_Forget();
Py_BLOCK_THREADS
#endif
goto __pyx_L5;
@@ -13847,7 +14393,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_40_histogramnd_from_lut
* @cython.cdivision(True)
* def _histogramnd_from_lut_fused(weights_t[:] i_weights, # <<<<<<<<<<<<<<
* lut_t[:] i_lut,
- * np.uint32_t[:] o_histo,
+ * cnumpy.uint32_t[:] o_histo,
*/
/* function exit code */
@@ -13885,59 +14431,76 @@ static PyObject *__pyx_fuse_1_1_1__pyx_pw_4silx_4math_16chistogramnd_lut_43_hist
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
switch (pos_args) {
case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
+ CYTHON_FALLTHROUGH;
case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
+ CYTHON_FALLTHROUGH;
case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
+ CYTHON_FALLTHROUGH;
case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ CYTHON_FALLTHROUGH;
case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
case 0: break;
default: goto __pyx_L5_argtuple_error;
}
kw_args = PyDict_Size(__pyx_kwds);
switch (pos_args) {
case 0:
- if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
case 1:
- if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 1); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 2:
- if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
+ if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 2); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 3:
- if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
+ if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 3); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 4:
- if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
+ if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 4); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 5:
- if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
+ if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 5); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 6:
- if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
+ if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 6); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 7:
- if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
+ if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 7); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 8:
- if (likely((values[8] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
+ if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 8); __PYX_ERR(0, 332, __pyx_L3_error)
}
@@ -13958,10 +14521,10 @@ static PyObject *__pyx_fuse_1_1_1__pyx_pw_4silx_4math_16chistogramnd_lut_43_hist
values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
}
- __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float32_t(values[0]); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
- __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[1]); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
- __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2]); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
- __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float32_t(values[3]); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
+ __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float32_t(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
+ __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
+ __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
+ __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float32_t(values[3], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
__pyx_v_i_n_elems = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_i_n_elems == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 336, __pyx_L3_error)
__pyx_v_i_filt_min_weights = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_i_filt_min_weights == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 337, __pyx_L3_error)
__pyx_v_i_weight_min = __pyx_PyFloat_AsFloat(values[6]); if (unlikely((__pyx_v_i_weight_min == ((npy_float32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 338, __pyx_L3_error)
@@ -13989,16 +14552,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_42_histogramnd_from_lut
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
- Py_ssize_t __pyx_t_3;
- int __pyx_t_4;
+ int __pyx_t_3;
+ Py_ssize_t __pyx_t_4;
int __pyx_t_5;
- Py_ssize_t __pyx_t_6;
+ int __pyx_t_6;
Py_ssize_t __pyx_t_7;
Py_ssize_t __pyx_t_8;
Py_ssize_t __pyx_t_9;
Py_ssize_t __pyx_t_10;
Py_ssize_t __pyx_t_11;
Py_ssize_t __pyx_t_12;
+ Py_ssize_t __pyx_t_13;
__Pyx_RefNannySetupContext("__pyx_fuse_1_1_1_histogramnd_from_lut_fused", 0);
/* "silx/math/chistogramnd_lut.pyx":341
@@ -14012,6 +14576,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_42_histogramnd_from_lut
#ifdef WITH_THREAD
PyThreadState *_save;
Py_UNBLOCK_THREADS
+ __Pyx_FastGIL_Remember();
#endif
/*try:*/ {
@@ -14023,8 +14588,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_42_histogramnd_from_lut
* if i_filt_min_weights and i_weights[i] < i_weight_min:
*/
__pyx_t_1 = __pyx_v_i_n_elems;
- for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
- __pyx_v_i = __pyx_t_2;
+ __pyx_t_2 = __pyx_t_1;
+ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
+ __pyx_v_i = __pyx_t_3;
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -14033,9 +14599,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_42_histogramnd_from_lut
* if i_filt_min_weights and i_weights[i] < i_weight_min:
* continue
*/
- __pyx_t_3 = __pyx_v_i;
- __pyx_t_4 = (((*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_3 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
- if (__pyx_t_4) {
+ __pyx_t_4 = __pyx_v_i;
+ __pyx_t_5 = (((*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_4 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":344
* for i in range(i_n_elems):
@@ -14044,17 +14610,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_42_histogramnd_from_lut
* continue
* if i_filt_max_weights and i_weights[i] > i_weight_max:
*/
- __pyx_t_5 = (__pyx_v_i_filt_min_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_min_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L10_bool_binop_done;
}
- __pyx_t_6 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_6 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_7 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L10_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":345
* if (i_lut[i] >= 0):
@@ -14081,17 +14647,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_42_histogramnd_from_lut
* continue
* o_histo[i_lut[i]] += 1
*/
- __pyx_t_5 = (__pyx_v_i_filt_max_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_max_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L13_bool_binop_done;
}
- __pyx_t_7 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_8 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_8 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L13_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":347
* continue
@@ -14118,9 +14684,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_42_histogramnd_from_lut
* o_weighted_histo[i_lut[i]] += <cumul_t>i_weights[i] # noqa
*
*/
- __pyx_t_8 = __pyx_v_i;
- __pyx_t_9 = (*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_8 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_9 * __pyx_v_o_histo.strides[0]) )) += 1;
+ __pyx_t_9 = __pyx_v_i;
+ __pyx_t_10 = (*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_9 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_10 * __pyx_v_o_histo.strides[0]) )) += 1;
/* "silx/math/chistogramnd_lut.pyx":349
* continue
@@ -14129,10 +14695,10 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_42_histogramnd_from_lut
*
*
*/
- __pyx_t_10 = __pyx_v_i;
__pyx_t_11 = __pyx_v_i;
- __pyx_t_12 = (*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_11 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_12 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_float32_t)(*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_10 * __pyx_v_i_weights.strides[0]) ))));
+ __pyx_t_12 = __pyx_v_i;
+ __pyx_t_13 = (*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_12 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_13 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_float32_t)(*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_11 * __pyx_v_i_weights.strides[0]) ))));
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -14156,6 +14722,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_42_histogramnd_from_lut
/*finally:*/ {
/*normal exit:*/{
#ifdef WITH_THREAD
+ __Pyx_FastGIL_Forget();
Py_BLOCK_THREADS
#endif
goto __pyx_L5;
@@ -14169,7 +14736,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_42_histogramnd_from_lut
* @cython.cdivision(True)
* def _histogramnd_from_lut_fused(weights_t[:] i_weights, # <<<<<<<<<<<<<<
* lut_t[:] i_lut,
- * np.uint32_t[:] o_histo,
+ * cnumpy.uint32_t[:] o_histo,
*/
/* function exit code */
@@ -14207,59 +14774,76 @@ static PyObject *__pyx_fuse_1_1_2__pyx_pw_4silx_4math_16chistogramnd_lut_45_hist
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
switch (pos_args) {
case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
+ CYTHON_FALLTHROUGH;
case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
+ CYTHON_FALLTHROUGH;
case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
+ CYTHON_FALLTHROUGH;
case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ CYTHON_FALLTHROUGH;
case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
case 0: break;
default: goto __pyx_L5_argtuple_error;
}
kw_args = PyDict_Size(__pyx_kwds);
switch (pos_args) {
case 0:
- if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
case 1:
- if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 1); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 2:
- if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
+ if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 2); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 3:
- if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
+ if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 3); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 4:
- if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
+ if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 4); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 5:
- if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
+ if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 5); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 6:
- if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
+ if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 6); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 7:
- if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
+ if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 7); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 8:
- if (likely((values[8] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
+ if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 8); __PYX_ERR(0, 332, __pyx_L3_error)
}
@@ -14280,10 +14864,10 @@ static PyObject *__pyx_fuse_1_1_2__pyx_pw_4silx_4math_16chistogramnd_lut_45_hist
values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
}
- __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float32_t(values[0]); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
- __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[1]); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
- __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2]); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
- __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[3]); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
+ __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float32_t(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
+ __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
+ __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
+ __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[3], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
__pyx_v_i_n_elems = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_i_n_elems == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 336, __pyx_L3_error)
__pyx_v_i_filt_min_weights = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_i_filt_min_weights == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 337, __pyx_L3_error)
__pyx_v_i_weight_min = __pyx_PyFloat_AsFloat(values[6]); if (unlikely((__pyx_v_i_weight_min == ((npy_float32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 338, __pyx_L3_error)
@@ -14311,16 +14895,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_44_histogramnd_from_lut
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
- Py_ssize_t __pyx_t_3;
- int __pyx_t_4;
+ int __pyx_t_3;
+ Py_ssize_t __pyx_t_4;
int __pyx_t_5;
- Py_ssize_t __pyx_t_6;
+ int __pyx_t_6;
Py_ssize_t __pyx_t_7;
Py_ssize_t __pyx_t_8;
Py_ssize_t __pyx_t_9;
Py_ssize_t __pyx_t_10;
Py_ssize_t __pyx_t_11;
Py_ssize_t __pyx_t_12;
+ Py_ssize_t __pyx_t_13;
__Pyx_RefNannySetupContext("__pyx_fuse_1_1_2_histogramnd_from_lut_fused", 0);
/* "silx/math/chistogramnd_lut.pyx":341
@@ -14334,6 +14919,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_44_histogramnd_from_lut
#ifdef WITH_THREAD
PyThreadState *_save;
Py_UNBLOCK_THREADS
+ __Pyx_FastGIL_Remember();
#endif
/*try:*/ {
@@ -14345,8 +14931,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_44_histogramnd_from_lut
* if i_filt_min_weights and i_weights[i] < i_weight_min:
*/
__pyx_t_1 = __pyx_v_i_n_elems;
- for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
- __pyx_v_i = __pyx_t_2;
+ __pyx_t_2 = __pyx_t_1;
+ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
+ __pyx_v_i = __pyx_t_3;
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -14355,9 +14942,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_44_histogramnd_from_lut
* if i_filt_min_weights and i_weights[i] < i_weight_min:
* continue
*/
- __pyx_t_3 = __pyx_v_i;
- __pyx_t_4 = (((*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_3 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
- if (__pyx_t_4) {
+ __pyx_t_4 = __pyx_v_i;
+ __pyx_t_5 = (((*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_4 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":344
* for i in range(i_n_elems):
@@ -14366,17 +14953,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_44_histogramnd_from_lut
* continue
* if i_filt_max_weights and i_weights[i] > i_weight_max:
*/
- __pyx_t_5 = (__pyx_v_i_filt_min_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_min_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L10_bool_binop_done;
}
- __pyx_t_6 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_6 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_7 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L10_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":345
* if (i_lut[i] >= 0):
@@ -14403,17 +14990,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_44_histogramnd_from_lut
* continue
* o_histo[i_lut[i]] += 1
*/
- __pyx_t_5 = (__pyx_v_i_filt_max_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_max_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L13_bool_binop_done;
}
- __pyx_t_7 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_8 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_8 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L13_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":347
* continue
@@ -14440,9 +15027,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_44_histogramnd_from_lut
* o_weighted_histo[i_lut[i]] += <cumul_t>i_weights[i] # noqa
*
*/
- __pyx_t_8 = __pyx_v_i;
- __pyx_t_9 = (*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_8 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_9 * __pyx_v_o_histo.strides[0]) )) += 1;
+ __pyx_t_9 = __pyx_v_i;
+ __pyx_t_10 = (*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_9 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_10 * __pyx_v_o_histo.strides[0]) )) += 1;
/* "silx/math/chistogramnd_lut.pyx":349
* continue
@@ -14451,10 +15038,10 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_44_histogramnd_from_lut
*
*
*/
- __pyx_t_10 = __pyx_v_i;
__pyx_t_11 = __pyx_v_i;
- __pyx_t_12 = (*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_11 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_12 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_int32_t)(*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_10 * __pyx_v_i_weights.strides[0]) ))));
+ __pyx_t_12 = __pyx_v_i;
+ __pyx_t_13 = (*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_12 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_13 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_int32_t)(*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_11 * __pyx_v_i_weights.strides[0]) ))));
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -14478,6 +15065,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_44_histogramnd_from_lut
/*finally:*/ {
/*normal exit:*/{
#ifdef WITH_THREAD
+ __Pyx_FastGIL_Forget();
Py_BLOCK_THREADS
#endif
goto __pyx_L5;
@@ -14491,7 +15079,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_44_histogramnd_from_lut
* @cython.cdivision(True)
* def _histogramnd_from_lut_fused(weights_t[:] i_weights, # <<<<<<<<<<<<<<
* lut_t[:] i_lut,
- * np.uint32_t[:] o_histo,
+ * cnumpy.uint32_t[:] o_histo,
*/
/* function exit code */
@@ -14529,59 +15117,76 @@ static PyObject *__pyx_fuse_1_1_3__pyx_pw_4silx_4math_16chistogramnd_lut_47_hist
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
switch (pos_args) {
case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
+ CYTHON_FALLTHROUGH;
case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
+ CYTHON_FALLTHROUGH;
case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
+ CYTHON_FALLTHROUGH;
case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ CYTHON_FALLTHROUGH;
case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
case 0: break;
default: goto __pyx_L5_argtuple_error;
}
kw_args = PyDict_Size(__pyx_kwds);
switch (pos_args) {
case 0:
- if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
case 1:
- if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 1); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 2:
- if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
+ if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 2); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 3:
- if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
+ if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 3); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 4:
- if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
+ if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 4); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 5:
- if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
+ if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 5); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 6:
- if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
+ if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 6); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 7:
- if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
+ if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 7); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 8:
- if (likely((values[8] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
+ if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 8); __PYX_ERR(0, 332, __pyx_L3_error)
}
@@ -14602,10 +15207,10 @@ static PyObject *__pyx_fuse_1_1_3__pyx_pw_4silx_4math_16chistogramnd_lut_47_hist
values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
}
- __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float32_t(values[0]); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
- __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[1]); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
- __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2]); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
- __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[3]); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
+ __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float32_t(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
+ __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
+ __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
+ __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[3], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
__pyx_v_i_n_elems = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_i_n_elems == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 336, __pyx_L3_error)
__pyx_v_i_filt_min_weights = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_i_filt_min_weights == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 337, __pyx_L3_error)
__pyx_v_i_weight_min = __pyx_PyFloat_AsFloat(values[6]); if (unlikely((__pyx_v_i_weight_min == ((npy_float32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 338, __pyx_L3_error)
@@ -14633,16 +15238,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_46_histogramnd_from_lut
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
- Py_ssize_t __pyx_t_3;
- int __pyx_t_4;
+ int __pyx_t_3;
+ Py_ssize_t __pyx_t_4;
int __pyx_t_5;
- Py_ssize_t __pyx_t_6;
+ int __pyx_t_6;
Py_ssize_t __pyx_t_7;
Py_ssize_t __pyx_t_8;
Py_ssize_t __pyx_t_9;
Py_ssize_t __pyx_t_10;
Py_ssize_t __pyx_t_11;
Py_ssize_t __pyx_t_12;
+ Py_ssize_t __pyx_t_13;
__Pyx_RefNannySetupContext("__pyx_fuse_1_1_3_histogramnd_from_lut_fused", 0);
/* "silx/math/chistogramnd_lut.pyx":341
@@ -14656,6 +15262,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_46_histogramnd_from_lut
#ifdef WITH_THREAD
PyThreadState *_save;
Py_UNBLOCK_THREADS
+ __Pyx_FastGIL_Remember();
#endif
/*try:*/ {
@@ -14667,8 +15274,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_46_histogramnd_from_lut
* if i_filt_min_weights and i_weights[i] < i_weight_min:
*/
__pyx_t_1 = __pyx_v_i_n_elems;
- for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
- __pyx_v_i = __pyx_t_2;
+ __pyx_t_2 = __pyx_t_1;
+ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
+ __pyx_v_i = __pyx_t_3;
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -14677,9 +15285,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_46_histogramnd_from_lut
* if i_filt_min_weights and i_weights[i] < i_weight_min:
* continue
*/
- __pyx_t_3 = __pyx_v_i;
- __pyx_t_4 = (((*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_3 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
- if (__pyx_t_4) {
+ __pyx_t_4 = __pyx_v_i;
+ __pyx_t_5 = (((*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_4 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":344
* for i in range(i_n_elems):
@@ -14688,17 +15296,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_46_histogramnd_from_lut
* continue
* if i_filt_max_weights and i_weights[i] > i_weight_max:
*/
- __pyx_t_5 = (__pyx_v_i_filt_min_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_min_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L10_bool_binop_done;
}
- __pyx_t_6 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_6 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_7 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L10_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":345
* if (i_lut[i] >= 0):
@@ -14725,17 +15333,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_46_histogramnd_from_lut
* continue
* o_histo[i_lut[i]] += 1
*/
- __pyx_t_5 = (__pyx_v_i_filt_max_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_max_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L13_bool_binop_done;
}
- __pyx_t_7 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_8 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_8 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L13_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":347
* continue
@@ -14762,9 +15370,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_46_histogramnd_from_lut
* o_weighted_histo[i_lut[i]] += <cumul_t>i_weights[i] # noqa
*
*/
- __pyx_t_8 = __pyx_v_i;
- __pyx_t_9 = (*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_8 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_9 * __pyx_v_o_histo.strides[0]) )) += 1;
+ __pyx_t_9 = __pyx_v_i;
+ __pyx_t_10 = (*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_9 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_10 * __pyx_v_o_histo.strides[0]) )) += 1;
/* "silx/math/chistogramnd_lut.pyx":349
* continue
@@ -14773,10 +15381,10 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_46_histogramnd_from_lut
*
*
*/
- __pyx_t_10 = __pyx_v_i;
__pyx_t_11 = __pyx_v_i;
- __pyx_t_12 = (*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_11 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_12 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_int64_t)(*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_10 * __pyx_v_i_weights.strides[0]) ))));
+ __pyx_t_12 = __pyx_v_i;
+ __pyx_t_13 = (*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_12 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_13 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_int64_t)(*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_11 * __pyx_v_i_weights.strides[0]) ))));
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -14800,6 +15408,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_46_histogramnd_from_lut
/*finally:*/ {
/*normal exit:*/{
#ifdef WITH_THREAD
+ __Pyx_FastGIL_Forget();
Py_BLOCK_THREADS
#endif
goto __pyx_L5;
@@ -14813,7 +15422,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_46_histogramnd_from_lut
* @cython.cdivision(True)
* def _histogramnd_from_lut_fused(weights_t[:] i_weights, # <<<<<<<<<<<<<<
* lut_t[:] i_lut,
- * np.uint32_t[:] o_histo,
+ * cnumpy.uint32_t[:] o_histo,
*/
/* function exit code */
@@ -14851,59 +15460,76 @@ static PyObject *__pyx_fuse_1_2_0__pyx_pw_4silx_4math_16chistogramnd_lut_49_hist
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
switch (pos_args) {
case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
+ CYTHON_FALLTHROUGH;
case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
+ CYTHON_FALLTHROUGH;
case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
+ CYTHON_FALLTHROUGH;
case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ CYTHON_FALLTHROUGH;
case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
case 0: break;
default: goto __pyx_L5_argtuple_error;
}
kw_args = PyDict_Size(__pyx_kwds);
switch (pos_args) {
case 0:
- if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
case 1:
- if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 1); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 2:
- if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
+ if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 2); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 3:
- if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
+ if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 3); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 4:
- if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
+ if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 4); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 5:
- if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
+ if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 5); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 6:
- if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
+ if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 6); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 7:
- if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
+ if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 7); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 8:
- if (likely((values[8] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
+ if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 8); __PYX_ERR(0, 332, __pyx_L3_error)
}
@@ -14924,10 +15550,10 @@ static PyObject *__pyx_fuse_1_2_0__pyx_pw_4silx_4math_16chistogramnd_lut_49_hist
values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
}
- __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float32_t(values[0]); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
- __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int16_t(values[1]); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
- __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2]); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
- __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float64_t(values[3]); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
+ __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float32_t(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
+ __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int16_t(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
+ __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
+ __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float64_t(values[3], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
__pyx_v_i_n_elems = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_i_n_elems == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 336, __pyx_L3_error)
__pyx_v_i_filt_min_weights = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_i_filt_min_weights == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 337, __pyx_L3_error)
__pyx_v_i_weight_min = __pyx_PyFloat_AsFloat(values[6]); if (unlikely((__pyx_v_i_weight_min == ((npy_float32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 338, __pyx_L3_error)
@@ -14955,16 +15581,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_48_histogramnd_from_lut
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
- Py_ssize_t __pyx_t_3;
- int __pyx_t_4;
+ int __pyx_t_3;
+ Py_ssize_t __pyx_t_4;
int __pyx_t_5;
- Py_ssize_t __pyx_t_6;
+ int __pyx_t_6;
Py_ssize_t __pyx_t_7;
Py_ssize_t __pyx_t_8;
Py_ssize_t __pyx_t_9;
Py_ssize_t __pyx_t_10;
Py_ssize_t __pyx_t_11;
Py_ssize_t __pyx_t_12;
+ Py_ssize_t __pyx_t_13;
__Pyx_RefNannySetupContext("__pyx_fuse_1_2_0_histogramnd_from_lut_fused", 0);
/* "silx/math/chistogramnd_lut.pyx":341
@@ -14978,6 +15605,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_48_histogramnd_from_lut
#ifdef WITH_THREAD
PyThreadState *_save;
Py_UNBLOCK_THREADS
+ __Pyx_FastGIL_Remember();
#endif
/*try:*/ {
@@ -14989,8 +15617,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_48_histogramnd_from_lut
* if i_filt_min_weights and i_weights[i] < i_weight_min:
*/
__pyx_t_1 = __pyx_v_i_n_elems;
- for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
- __pyx_v_i = __pyx_t_2;
+ __pyx_t_2 = __pyx_t_1;
+ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
+ __pyx_v_i = __pyx_t_3;
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -14999,9 +15628,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_48_histogramnd_from_lut
* if i_filt_min_weights and i_weights[i] < i_weight_min:
* continue
*/
- __pyx_t_3 = __pyx_v_i;
- __pyx_t_4 = (((*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_3 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
- if (__pyx_t_4) {
+ __pyx_t_4 = __pyx_v_i;
+ __pyx_t_5 = (((*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_4 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":344
* for i in range(i_n_elems):
@@ -15010,17 +15639,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_48_histogramnd_from_lut
* continue
* if i_filt_max_weights and i_weights[i] > i_weight_max:
*/
- __pyx_t_5 = (__pyx_v_i_filt_min_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_min_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L10_bool_binop_done;
}
- __pyx_t_6 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_6 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_7 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L10_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":345
* if (i_lut[i] >= 0):
@@ -15047,17 +15676,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_48_histogramnd_from_lut
* continue
* o_histo[i_lut[i]] += 1
*/
- __pyx_t_5 = (__pyx_v_i_filt_max_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_max_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L13_bool_binop_done;
}
- __pyx_t_7 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_8 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_8 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L13_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":347
* continue
@@ -15084,9 +15713,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_48_histogramnd_from_lut
* o_weighted_histo[i_lut[i]] += <cumul_t>i_weights[i] # noqa
*
*/
- __pyx_t_8 = __pyx_v_i;
- __pyx_t_9 = (*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_8 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_9 * __pyx_v_o_histo.strides[0]) )) += 1;
+ __pyx_t_9 = __pyx_v_i;
+ __pyx_t_10 = (*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_9 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_10 * __pyx_v_o_histo.strides[0]) )) += 1;
/* "silx/math/chistogramnd_lut.pyx":349
* continue
@@ -15095,10 +15724,10 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_48_histogramnd_from_lut
*
*
*/
- __pyx_t_10 = __pyx_v_i;
__pyx_t_11 = __pyx_v_i;
- __pyx_t_12 = (*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_11 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_12 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_float64_t)(*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_10 * __pyx_v_i_weights.strides[0]) ))));
+ __pyx_t_12 = __pyx_v_i;
+ __pyx_t_13 = (*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_12 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_13 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_float64_t)(*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_11 * __pyx_v_i_weights.strides[0]) ))));
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -15122,6 +15751,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_48_histogramnd_from_lut
/*finally:*/ {
/*normal exit:*/{
#ifdef WITH_THREAD
+ __Pyx_FastGIL_Forget();
Py_BLOCK_THREADS
#endif
goto __pyx_L5;
@@ -15135,7 +15765,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_48_histogramnd_from_lut
* @cython.cdivision(True)
* def _histogramnd_from_lut_fused(weights_t[:] i_weights, # <<<<<<<<<<<<<<
* lut_t[:] i_lut,
- * np.uint32_t[:] o_histo,
+ * cnumpy.uint32_t[:] o_histo,
*/
/* function exit code */
@@ -15173,59 +15803,76 @@ static PyObject *__pyx_fuse_1_2_1__pyx_pw_4silx_4math_16chistogramnd_lut_51_hist
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
switch (pos_args) {
case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
+ CYTHON_FALLTHROUGH;
case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
+ CYTHON_FALLTHROUGH;
case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
+ CYTHON_FALLTHROUGH;
case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ CYTHON_FALLTHROUGH;
case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
case 0: break;
default: goto __pyx_L5_argtuple_error;
}
kw_args = PyDict_Size(__pyx_kwds);
switch (pos_args) {
case 0:
- if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
case 1:
- if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 1); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 2:
- if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
+ if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 2); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 3:
- if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
+ if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 3); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 4:
- if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
+ if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 4); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 5:
- if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
+ if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 5); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 6:
- if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
+ if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 6); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 7:
- if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
+ if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 7); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 8:
- if (likely((values[8] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
+ if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 8); __PYX_ERR(0, 332, __pyx_L3_error)
}
@@ -15246,10 +15893,10 @@ static PyObject *__pyx_fuse_1_2_1__pyx_pw_4silx_4math_16chistogramnd_lut_51_hist
values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
}
- __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float32_t(values[0]); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
- __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int16_t(values[1]); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
- __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2]); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
- __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float32_t(values[3]); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
+ __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float32_t(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
+ __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int16_t(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
+ __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
+ __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float32_t(values[3], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
__pyx_v_i_n_elems = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_i_n_elems == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 336, __pyx_L3_error)
__pyx_v_i_filt_min_weights = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_i_filt_min_weights == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 337, __pyx_L3_error)
__pyx_v_i_weight_min = __pyx_PyFloat_AsFloat(values[6]); if (unlikely((__pyx_v_i_weight_min == ((npy_float32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 338, __pyx_L3_error)
@@ -15277,16 +15924,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_50_histogramnd_from_lut
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
- Py_ssize_t __pyx_t_3;
- int __pyx_t_4;
+ int __pyx_t_3;
+ Py_ssize_t __pyx_t_4;
int __pyx_t_5;
- Py_ssize_t __pyx_t_6;
+ int __pyx_t_6;
Py_ssize_t __pyx_t_7;
Py_ssize_t __pyx_t_8;
Py_ssize_t __pyx_t_9;
Py_ssize_t __pyx_t_10;
Py_ssize_t __pyx_t_11;
Py_ssize_t __pyx_t_12;
+ Py_ssize_t __pyx_t_13;
__Pyx_RefNannySetupContext("__pyx_fuse_1_2_1_histogramnd_from_lut_fused", 0);
/* "silx/math/chistogramnd_lut.pyx":341
@@ -15300,6 +15948,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_50_histogramnd_from_lut
#ifdef WITH_THREAD
PyThreadState *_save;
Py_UNBLOCK_THREADS
+ __Pyx_FastGIL_Remember();
#endif
/*try:*/ {
@@ -15311,8 +15960,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_50_histogramnd_from_lut
* if i_filt_min_weights and i_weights[i] < i_weight_min:
*/
__pyx_t_1 = __pyx_v_i_n_elems;
- for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
- __pyx_v_i = __pyx_t_2;
+ __pyx_t_2 = __pyx_t_1;
+ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
+ __pyx_v_i = __pyx_t_3;
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -15321,9 +15971,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_50_histogramnd_from_lut
* if i_filt_min_weights and i_weights[i] < i_weight_min:
* continue
*/
- __pyx_t_3 = __pyx_v_i;
- __pyx_t_4 = (((*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_3 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
- if (__pyx_t_4) {
+ __pyx_t_4 = __pyx_v_i;
+ __pyx_t_5 = (((*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_4 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":344
* for i in range(i_n_elems):
@@ -15332,17 +15982,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_50_histogramnd_from_lut
* continue
* if i_filt_max_weights and i_weights[i] > i_weight_max:
*/
- __pyx_t_5 = (__pyx_v_i_filt_min_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_min_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L10_bool_binop_done;
}
- __pyx_t_6 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_6 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_7 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L10_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":345
* if (i_lut[i] >= 0):
@@ -15369,17 +16019,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_50_histogramnd_from_lut
* continue
* o_histo[i_lut[i]] += 1
*/
- __pyx_t_5 = (__pyx_v_i_filt_max_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_max_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L13_bool_binop_done;
}
- __pyx_t_7 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_8 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_8 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L13_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":347
* continue
@@ -15406,9 +16056,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_50_histogramnd_from_lut
* o_weighted_histo[i_lut[i]] += <cumul_t>i_weights[i] # noqa
*
*/
- __pyx_t_8 = __pyx_v_i;
- __pyx_t_9 = (*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_8 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_9 * __pyx_v_o_histo.strides[0]) )) += 1;
+ __pyx_t_9 = __pyx_v_i;
+ __pyx_t_10 = (*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_9 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_10 * __pyx_v_o_histo.strides[0]) )) += 1;
/* "silx/math/chistogramnd_lut.pyx":349
* continue
@@ -15417,10 +16067,10 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_50_histogramnd_from_lut
*
*
*/
- __pyx_t_10 = __pyx_v_i;
__pyx_t_11 = __pyx_v_i;
- __pyx_t_12 = (*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_11 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_12 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_float32_t)(*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_10 * __pyx_v_i_weights.strides[0]) ))));
+ __pyx_t_12 = __pyx_v_i;
+ __pyx_t_13 = (*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_12 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_13 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_float32_t)(*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_11 * __pyx_v_i_weights.strides[0]) ))));
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -15444,6 +16094,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_50_histogramnd_from_lut
/*finally:*/ {
/*normal exit:*/{
#ifdef WITH_THREAD
+ __Pyx_FastGIL_Forget();
Py_BLOCK_THREADS
#endif
goto __pyx_L5;
@@ -15457,7 +16108,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_50_histogramnd_from_lut
* @cython.cdivision(True)
* def _histogramnd_from_lut_fused(weights_t[:] i_weights, # <<<<<<<<<<<<<<
* lut_t[:] i_lut,
- * np.uint32_t[:] o_histo,
+ * cnumpy.uint32_t[:] o_histo,
*/
/* function exit code */
@@ -15495,59 +16146,76 @@ static PyObject *__pyx_fuse_1_2_2__pyx_pw_4silx_4math_16chistogramnd_lut_53_hist
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
switch (pos_args) {
case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
+ CYTHON_FALLTHROUGH;
case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
+ CYTHON_FALLTHROUGH;
case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
+ CYTHON_FALLTHROUGH;
case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ CYTHON_FALLTHROUGH;
case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
case 0: break;
default: goto __pyx_L5_argtuple_error;
}
kw_args = PyDict_Size(__pyx_kwds);
switch (pos_args) {
case 0:
- if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
case 1:
- if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 1); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 2:
- if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
+ if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 2); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 3:
- if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
+ if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 3); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 4:
- if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
+ if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 4); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 5:
- if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
+ if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 5); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 6:
- if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
+ if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 6); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 7:
- if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
+ if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 7); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 8:
- if (likely((values[8] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
+ if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 8); __PYX_ERR(0, 332, __pyx_L3_error)
}
@@ -15568,10 +16236,10 @@ static PyObject *__pyx_fuse_1_2_2__pyx_pw_4silx_4math_16chistogramnd_lut_53_hist
values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
}
- __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float32_t(values[0]); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
- __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int16_t(values[1]); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
- __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2]); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
- __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[3]); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
+ __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float32_t(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
+ __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int16_t(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
+ __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
+ __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[3], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
__pyx_v_i_n_elems = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_i_n_elems == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 336, __pyx_L3_error)
__pyx_v_i_filt_min_weights = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_i_filt_min_weights == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 337, __pyx_L3_error)
__pyx_v_i_weight_min = __pyx_PyFloat_AsFloat(values[6]); if (unlikely((__pyx_v_i_weight_min == ((npy_float32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 338, __pyx_L3_error)
@@ -15599,16 +16267,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_52_histogramnd_from_lut
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
- Py_ssize_t __pyx_t_3;
- int __pyx_t_4;
+ int __pyx_t_3;
+ Py_ssize_t __pyx_t_4;
int __pyx_t_5;
- Py_ssize_t __pyx_t_6;
+ int __pyx_t_6;
Py_ssize_t __pyx_t_7;
Py_ssize_t __pyx_t_8;
Py_ssize_t __pyx_t_9;
Py_ssize_t __pyx_t_10;
Py_ssize_t __pyx_t_11;
Py_ssize_t __pyx_t_12;
+ Py_ssize_t __pyx_t_13;
__Pyx_RefNannySetupContext("__pyx_fuse_1_2_2_histogramnd_from_lut_fused", 0);
/* "silx/math/chistogramnd_lut.pyx":341
@@ -15622,6 +16291,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_52_histogramnd_from_lut
#ifdef WITH_THREAD
PyThreadState *_save;
Py_UNBLOCK_THREADS
+ __Pyx_FastGIL_Remember();
#endif
/*try:*/ {
@@ -15633,8 +16303,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_52_histogramnd_from_lut
* if i_filt_min_weights and i_weights[i] < i_weight_min:
*/
__pyx_t_1 = __pyx_v_i_n_elems;
- for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
- __pyx_v_i = __pyx_t_2;
+ __pyx_t_2 = __pyx_t_1;
+ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
+ __pyx_v_i = __pyx_t_3;
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -15643,9 +16314,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_52_histogramnd_from_lut
* if i_filt_min_weights and i_weights[i] < i_weight_min:
* continue
*/
- __pyx_t_3 = __pyx_v_i;
- __pyx_t_4 = (((*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_3 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
- if (__pyx_t_4) {
+ __pyx_t_4 = __pyx_v_i;
+ __pyx_t_5 = (((*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_4 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":344
* for i in range(i_n_elems):
@@ -15654,17 +16325,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_52_histogramnd_from_lut
* continue
* if i_filt_max_weights and i_weights[i] > i_weight_max:
*/
- __pyx_t_5 = (__pyx_v_i_filt_min_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_min_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L10_bool_binop_done;
}
- __pyx_t_6 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_6 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_7 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L10_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":345
* if (i_lut[i] >= 0):
@@ -15691,17 +16362,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_52_histogramnd_from_lut
* continue
* o_histo[i_lut[i]] += 1
*/
- __pyx_t_5 = (__pyx_v_i_filt_max_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_max_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L13_bool_binop_done;
}
- __pyx_t_7 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_8 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_8 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L13_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":347
* continue
@@ -15728,9 +16399,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_52_histogramnd_from_lut
* o_weighted_histo[i_lut[i]] += <cumul_t>i_weights[i] # noqa
*
*/
- __pyx_t_8 = __pyx_v_i;
- __pyx_t_9 = (*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_8 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_9 * __pyx_v_o_histo.strides[0]) )) += 1;
+ __pyx_t_9 = __pyx_v_i;
+ __pyx_t_10 = (*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_9 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_10 * __pyx_v_o_histo.strides[0]) )) += 1;
/* "silx/math/chistogramnd_lut.pyx":349
* continue
@@ -15739,10 +16410,10 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_52_histogramnd_from_lut
*
*
*/
- __pyx_t_10 = __pyx_v_i;
__pyx_t_11 = __pyx_v_i;
- __pyx_t_12 = (*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_11 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_12 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_int32_t)(*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_10 * __pyx_v_i_weights.strides[0]) ))));
+ __pyx_t_12 = __pyx_v_i;
+ __pyx_t_13 = (*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_12 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_13 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_int32_t)(*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_11 * __pyx_v_i_weights.strides[0]) ))));
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -15766,6 +16437,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_52_histogramnd_from_lut
/*finally:*/ {
/*normal exit:*/{
#ifdef WITH_THREAD
+ __Pyx_FastGIL_Forget();
Py_BLOCK_THREADS
#endif
goto __pyx_L5;
@@ -15779,7 +16451,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_52_histogramnd_from_lut
* @cython.cdivision(True)
* def _histogramnd_from_lut_fused(weights_t[:] i_weights, # <<<<<<<<<<<<<<
* lut_t[:] i_lut,
- * np.uint32_t[:] o_histo,
+ * cnumpy.uint32_t[:] o_histo,
*/
/* function exit code */
@@ -15817,59 +16489,76 @@ static PyObject *__pyx_fuse_1_2_3__pyx_pw_4silx_4math_16chistogramnd_lut_55_hist
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
switch (pos_args) {
case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
+ CYTHON_FALLTHROUGH;
case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
+ CYTHON_FALLTHROUGH;
case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
+ CYTHON_FALLTHROUGH;
case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ CYTHON_FALLTHROUGH;
case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
case 0: break;
default: goto __pyx_L5_argtuple_error;
}
kw_args = PyDict_Size(__pyx_kwds);
switch (pos_args) {
case 0:
- if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
case 1:
- if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 1); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 2:
- if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
+ if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 2); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 3:
- if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
+ if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 3); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 4:
- if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
+ if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 4); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 5:
- if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
+ if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 5); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 6:
- if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
+ if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 6); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 7:
- if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
+ if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 7); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 8:
- if (likely((values[8] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
+ if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 8); __PYX_ERR(0, 332, __pyx_L3_error)
}
@@ -15890,10 +16579,10 @@ static PyObject *__pyx_fuse_1_2_3__pyx_pw_4silx_4math_16chistogramnd_lut_55_hist
values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
}
- __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float32_t(values[0]); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
- __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int16_t(values[1]); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
- __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2]); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
- __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[3]); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
+ __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float32_t(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
+ __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int16_t(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
+ __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
+ __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[3], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
__pyx_v_i_n_elems = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_i_n_elems == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 336, __pyx_L3_error)
__pyx_v_i_filt_min_weights = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_i_filt_min_weights == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 337, __pyx_L3_error)
__pyx_v_i_weight_min = __pyx_PyFloat_AsFloat(values[6]); if (unlikely((__pyx_v_i_weight_min == ((npy_float32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 338, __pyx_L3_error)
@@ -15921,16 +16610,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_54_histogramnd_from_lut
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
- Py_ssize_t __pyx_t_3;
- int __pyx_t_4;
+ int __pyx_t_3;
+ Py_ssize_t __pyx_t_4;
int __pyx_t_5;
- Py_ssize_t __pyx_t_6;
+ int __pyx_t_6;
Py_ssize_t __pyx_t_7;
Py_ssize_t __pyx_t_8;
Py_ssize_t __pyx_t_9;
Py_ssize_t __pyx_t_10;
Py_ssize_t __pyx_t_11;
Py_ssize_t __pyx_t_12;
+ Py_ssize_t __pyx_t_13;
__Pyx_RefNannySetupContext("__pyx_fuse_1_2_3_histogramnd_from_lut_fused", 0);
/* "silx/math/chistogramnd_lut.pyx":341
@@ -15944,6 +16634,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_54_histogramnd_from_lut
#ifdef WITH_THREAD
PyThreadState *_save;
Py_UNBLOCK_THREADS
+ __Pyx_FastGIL_Remember();
#endif
/*try:*/ {
@@ -15955,8 +16646,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_54_histogramnd_from_lut
* if i_filt_min_weights and i_weights[i] < i_weight_min:
*/
__pyx_t_1 = __pyx_v_i_n_elems;
- for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
- __pyx_v_i = __pyx_t_2;
+ __pyx_t_2 = __pyx_t_1;
+ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
+ __pyx_v_i = __pyx_t_3;
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -15965,9 +16657,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_54_histogramnd_from_lut
* if i_filt_min_weights and i_weights[i] < i_weight_min:
* continue
*/
- __pyx_t_3 = __pyx_v_i;
- __pyx_t_4 = (((*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_3 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
- if (__pyx_t_4) {
+ __pyx_t_4 = __pyx_v_i;
+ __pyx_t_5 = (((*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_4 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":344
* for i in range(i_n_elems):
@@ -15976,17 +16668,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_54_histogramnd_from_lut
* continue
* if i_filt_max_weights and i_weights[i] > i_weight_max:
*/
- __pyx_t_5 = (__pyx_v_i_filt_min_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_min_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L10_bool_binop_done;
}
- __pyx_t_6 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_6 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_7 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L10_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":345
* if (i_lut[i] >= 0):
@@ -16013,17 +16705,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_54_histogramnd_from_lut
* continue
* o_histo[i_lut[i]] += 1
*/
- __pyx_t_5 = (__pyx_v_i_filt_max_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_max_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L13_bool_binop_done;
}
- __pyx_t_7 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_8 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_8 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L13_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":347
* continue
@@ -16050,9 +16742,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_54_histogramnd_from_lut
* o_weighted_histo[i_lut[i]] += <cumul_t>i_weights[i] # noqa
*
*/
- __pyx_t_8 = __pyx_v_i;
- __pyx_t_9 = (*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_8 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_9 * __pyx_v_o_histo.strides[0]) )) += 1;
+ __pyx_t_9 = __pyx_v_i;
+ __pyx_t_10 = (*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_9 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_10 * __pyx_v_o_histo.strides[0]) )) += 1;
/* "silx/math/chistogramnd_lut.pyx":349
* continue
@@ -16061,10 +16753,10 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_54_histogramnd_from_lut
*
*
*/
- __pyx_t_10 = __pyx_v_i;
__pyx_t_11 = __pyx_v_i;
- __pyx_t_12 = (*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_11 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_12 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_int64_t)(*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_10 * __pyx_v_i_weights.strides[0]) ))));
+ __pyx_t_12 = __pyx_v_i;
+ __pyx_t_13 = (*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_12 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_13 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_int64_t)(*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_11 * __pyx_v_i_weights.strides[0]) ))));
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -16088,6 +16780,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_54_histogramnd_from_lut
/*finally:*/ {
/*normal exit:*/{
#ifdef WITH_THREAD
+ __Pyx_FastGIL_Forget();
Py_BLOCK_THREADS
#endif
goto __pyx_L5;
@@ -16101,7 +16794,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_54_histogramnd_from_lut
* @cython.cdivision(True)
* def _histogramnd_from_lut_fused(weights_t[:] i_weights, # <<<<<<<<<<<<<<
* lut_t[:] i_lut,
- * np.uint32_t[:] o_histo,
+ * cnumpy.uint32_t[:] o_histo,
*/
/* function exit code */
@@ -16139,59 +16832,76 @@ static PyObject *__pyx_fuse_2_0_0__pyx_pw_4silx_4math_16chistogramnd_lut_57_hist
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
switch (pos_args) {
case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
+ CYTHON_FALLTHROUGH;
case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
+ CYTHON_FALLTHROUGH;
case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
+ CYTHON_FALLTHROUGH;
case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ CYTHON_FALLTHROUGH;
case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
case 0: break;
default: goto __pyx_L5_argtuple_error;
}
kw_args = PyDict_Size(__pyx_kwds);
switch (pos_args) {
case 0:
- if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
case 1:
- if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 1); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 2:
- if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
+ if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 2); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 3:
- if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
+ if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 3); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 4:
- if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
+ if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 4); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 5:
- if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
+ if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 5); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 6:
- if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
+ if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 6); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 7:
- if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
+ if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 7); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 8:
- if (likely((values[8] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
+ if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 8); __PYX_ERR(0, 332, __pyx_L3_error)
}
@@ -16212,10 +16922,10 @@ static PyObject *__pyx_fuse_2_0_0__pyx_pw_4silx_4math_16chistogramnd_lut_57_hist
values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
}
- __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[0]); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
- __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[1]); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
- __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2]); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
- __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float64_t(values[3]); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
+ __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
+ __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
+ __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
+ __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float64_t(values[3], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
__pyx_v_i_n_elems = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_i_n_elems == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 336, __pyx_L3_error)
__pyx_v_i_filt_min_weights = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_i_filt_min_weights == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 337, __pyx_L3_error)
__pyx_v_i_weight_min = __Pyx_PyInt_As_npy_int32(values[6]); if (unlikely((__pyx_v_i_weight_min == ((npy_int32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 338, __pyx_L3_error)
@@ -16243,16 +16953,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_56_histogramnd_from_lut
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
- Py_ssize_t __pyx_t_3;
- int __pyx_t_4;
+ int __pyx_t_3;
+ Py_ssize_t __pyx_t_4;
int __pyx_t_5;
- Py_ssize_t __pyx_t_6;
+ int __pyx_t_6;
Py_ssize_t __pyx_t_7;
Py_ssize_t __pyx_t_8;
- __pyx_t_5numpy_int64_t __pyx_t_9;
- Py_ssize_t __pyx_t_10;
+ Py_ssize_t __pyx_t_9;
+ __pyx_t_5numpy_int64_t __pyx_t_10;
Py_ssize_t __pyx_t_11;
- __pyx_t_5numpy_int64_t __pyx_t_12;
+ Py_ssize_t __pyx_t_12;
+ __pyx_t_5numpy_int64_t __pyx_t_13;
__Pyx_RefNannySetupContext("__pyx_fuse_2_0_0_histogramnd_from_lut_fused", 0);
/* "silx/math/chistogramnd_lut.pyx":341
@@ -16266,6 +16977,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_56_histogramnd_from_lut
#ifdef WITH_THREAD
PyThreadState *_save;
Py_UNBLOCK_THREADS
+ __Pyx_FastGIL_Remember();
#endif
/*try:*/ {
@@ -16277,8 +16989,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_56_histogramnd_from_lut
* if i_filt_min_weights and i_weights[i] < i_weight_min:
*/
__pyx_t_1 = __pyx_v_i_n_elems;
- for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
- __pyx_v_i = __pyx_t_2;
+ __pyx_t_2 = __pyx_t_1;
+ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
+ __pyx_v_i = __pyx_t_3;
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -16287,9 +17000,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_56_histogramnd_from_lut
* if i_filt_min_weights and i_weights[i] < i_weight_min:
* continue
*/
- __pyx_t_3 = __pyx_v_i;
- __pyx_t_4 = (((*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_3 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
- if (__pyx_t_4) {
+ __pyx_t_4 = __pyx_v_i;
+ __pyx_t_5 = (((*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_4 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":344
* for i in range(i_n_elems):
@@ -16298,17 +17011,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_56_histogramnd_from_lut
* continue
* if i_filt_max_weights and i_weights[i] > i_weight_max:
*/
- __pyx_t_5 = (__pyx_v_i_filt_min_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_min_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L10_bool_binop_done;
}
- __pyx_t_6 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_6 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_7 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L10_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":345
* if (i_lut[i] >= 0):
@@ -16335,17 +17048,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_56_histogramnd_from_lut
* continue
* o_histo[i_lut[i]] += 1
*/
- __pyx_t_5 = (__pyx_v_i_filt_max_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_max_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L13_bool_binop_done;
}
- __pyx_t_7 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_8 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_8 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L13_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":347
* continue
@@ -16372,9 +17085,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_56_histogramnd_from_lut
* o_weighted_histo[i_lut[i]] += <cumul_t>i_weights[i] # noqa
*
*/
- __pyx_t_8 = __pyx_v_i;
- __pyx_t_9 = (*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_8 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_9 * __pyx_v_o_histo.strides[0]) )) += 1;
+ __pyx_t_9 = __pyx_v_i;
+ __pyx_t_10 = (*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_9 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_10 * __pyx_v_o_histo.strides[0]) )) += 1;
/* "silx/math/chistogramnd_lut.pyx":349
* continue
@@ -16383,10 +17096,10 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_56_histogramnd_from_lut
*
*
*/
- __pyx_t_10 = __pyx_v_i;
__pyx_t_11 = __pyx_v_i;
- __pyx_t_12 = (*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_11 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_12 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_float64_t)(*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_10 * __pyx_v_i_weights.strides[0]) ))));
+ __pyx_t_12 = __pyx_v_i;
+ __pyx_t_13 = (*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_12 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_13 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_float64_t)(*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_11 * __pyx_v_i_weights.strides[0]) ))));
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -16410,6 +17123,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_56_histogramnd_from_lut
/*finally:*/ {
/*normal exit:*/{
#ifdef WITH_THREAD
+ __Pyx_FastGIL_Forget();
Py_BLOCK_THREADS
#endif
goto __pyx_L5;
@@ -16423,7 +17137,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_56_histogramnd_from_lut
* @cython.cdivision(True)
* def _histogramnd_from_lut_fused(weights_t[:] i_weights, # <<<<<<<<<<<<<<
* lut_t[:] i_lut,
- * np.uint32_t[:] o_histo,
+ * cnumpy.uint32_t[:] o_histo,
*/
/* function exit code */
@@ -16461,59 +17175,76 @@ static PyObject *__pyx_fuse_2_0_1__pyx_pw_4silx_4math_16chistogramnd_lut_59_hist
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
switch (pos_args) {
case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
+ CYTHON_FALLTHROUGH;
case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
+ CYTHON_FALLTHROUGH;
case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
+ CYTHON_FALLTHROUGH;
case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ CYTHON_FALLTHROUGH;
case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
case 0: break;
default: goto __pyx_L5_argtuple_error;
}
kw_args = PyDict_Size(__pyx_kwds);
switch (pos_args) {
case 0:
- if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
case 1:
- if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 1); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 2:
- if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
+ if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 2); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 3:
- if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
+ if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 3); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 4:
- if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
+ if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 4); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 5:
- if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
+ if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 5); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 6:
- if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
+ if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 6); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 7:
- if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
+ if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 7); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 8:
- if (likely((values[8] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
+ if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 8); __PYX_ERR(0, 332, __pyx_L3_error)
}
@@ -16534,10 +17265,10 @@ static PyObject *__pyx_fuse_2_0_1__pyx_pw_4silx_4math_16chistogramnd_lut_59_hist
values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
}
- __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[0]); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
- __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[1]); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
- __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2]); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
- __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float32_t(values[3]); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
+ __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
+ __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
+ __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
+ __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float32_t(values[3], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
__pyx_v_i_n_elems = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_i_n_elems == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 336, __pyx_L3_error)
__pyx_v_i_filt_min_weights = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_i_filt_min_weights == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 337, __pyx_L3_error)
__pyx_v_i_weight_min = __Pyx_PyInt_As_npy_int32(values[6]); if (unlikely((__pyx_v_i_weight_min == ((npy_int32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 338, __pyx_L3_error)
@@ -16565,16 +17296,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_58_histogramnd_from_lut
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
- Py_ssize_t __pyx_t_3;
- int __pyx_t_4;
+ int __pyx_t_3;
+ Py_ssize_t __pyx_t_4;
int __pyx_t_5;
- Py_ssize_t __pyx_t_6;
+ int __pyx_t_6;
Py_ssize_t __pyx_t_7;
Py_ssize_t __pyx_t_8;
- __pyx_t_5numpy_int64_t __pyx_t_9;
- Py_ssize_t __pyx_t_10;
+ Py_ssize_t __pyx_t_9;
+ __pyx_t_5numpy_int64_t __pyx_t_10;
Py_ssize_t __pyx_t_11;
- __pyx_t_5numpy_int64_t __pyx_t_12;
+ Py_ssize_t __pyx_t_12;
+ __pyx_t_5numpy_int64_t __pyx_t_13;
__Pyx_RefNannySetupContext("__pyx_fuse_2_0_1_histogramnd_from_lut_fused", 0);
/* "silx/math/chistogramnd_lut.pyx":341
@@ -16588,6 +17320,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_58_histogramnd_from_lut
#ifdef WITH_THREAD
PyThreadState *_save;
Py_UNBLOCK_THREADS
+ __Pyx_FastGIL_Remember();
#endif
/*try:*/ {
@@ -16599,8 +17332,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_58_histogramnd_from_lut
* if i_filt_min_weights and i_weights[i] < i_weight_min:
*/
__pyx_t_1 = __pyx_v_i_n_elems;
- for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
- __pyx_v_i = __pyx_t_2;
+ __pyx_t_2 = __pyx_t_1;
+ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
+ __pyx_v_i = __pyx_t_3;
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -16609,9 +17343,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_58_histogramnd_from_lut
* if i_filt_min_weights and i_weights[i] < i_weight_min:
* continue
*/
- __pyx_t_3 = __pyx_v_i;
- __pyx_t_4 = (((*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_3 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
- if (__pyx_t_4) {
+ __pyx_t_4 = __pyx_v_i;
+ __pyx_t_5 = (((*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_4 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":344
* for i in range(i_n_elems):
@@ -16620,17 +17354,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_58_histogramnd_from_lut
* continue
* if i_filt_max_weights and i_weights[i] > i_weight_max:
*/
- __pyx_t_5 = (__pyx_v_i_filt_min_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_min_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L10_bool_binop_done;
}
- __pyx_t_6 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_6 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_7 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L10_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":345
* if (i_lut[i] >= 0):
@@ -16657,17 +17391,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_58_histogramnd_from_lut
* continue
* o_histo[i_lut[i]] += 1
*/
- __pyx_t_5 = (__pyx_v_i_filt_max_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_max_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L13_bool_binop_done;
}
- __pyx_t_7 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_8 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_8 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L13_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":347
* continue
@@ -16694,9 +17428,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_58_histogramnd_from_lut
* o_weighted_histo[i_lut[i]] += <cumul_t>i_weights[i] # noqa
*
*/
- __pyx_t_8 = __pyx_v_i;
- __pyx_t_9 = (*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_8 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_9 * __pyx_v_o_histo.strides[0]) )) += 1;
+ __pyx_t_9 = __pyx_v_i;
+ __pyx_t_10 = (*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_9 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_10 * __pyx_v_o_histo.strides[0]) )) += 1;
/* "silx/math/chistogramnd_lut.pyx":349
* continue
@@ -16705,10 +17439,10 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_58_histogramnd_from_lut
*
*
*/
- __pyx_t_10 = __pyx_v_i;
__pyx_t_11 = __pyx_v_i;
- __pyx_t_12 = (*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_11 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_12 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_float32_t)(*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_10 * __pyx_v_i_weights.strides[0]) ))));
+ __pyx_t_12 = __pyx_v_i;
+ __pyx_t_13 = (*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_12 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_13 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_float32_t)(*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_11 * __pyx_v_i_weights.strides[0]) ))));
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -16732,6 +17466,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_58_histogramnd_from_lut
/*finally:*/ {
/*normal exit:*/{
#ifdef WITH_THREAD
+ __Pyx_FastGIL_Forget();
Py_BLOCK_THREADS
#endif
goto __pyx_L5;
@@ -16745,7 +17480,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_58_histogramnd_from_lut
* @cython.cdivision(True)
* def _histogramnd_from_lut_fused(weights_t[:] i_weights, # <<<<<<<<<<<<<<
* lut_t[:] i_lut,
- * np.uint32_t[:] o_histo,
+ * cnumpy.uint32_t[:] o_histo,
*/
/* function exit code */
@@ -16783,59 +17518,76 @@ static PyObject *__pyx_fuse_2_0_2__pyx_pw_4silx_4math_16chistogramnd_lut_61_hist
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
switch (pos_args) {
case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
+ CYTHON_FALLTHROUGH;
case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
+ CYTHON_FALLTHROUGH;
case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
+ CYTHON_FALLTHROUGH;
case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ CYTHON_FALLTHROUGH;
case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
case 0: break;
default: goto __pyx_L5_argtuple_error;
}
kw_args = PyDict_Size(__pyx_kwds);
switch (pos_args) {
case 0:
- if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
case 1:
- if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 1); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 2:
- if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
+ if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 2); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 3:
- if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
+ if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 3); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 4:
- if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
+ if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 4); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 5:
- if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
+ if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 5); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 6:
- if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
+ if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 6); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 7:
- if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
+ if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 7); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 8:
- if (likely((values[8] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
+ if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 8); __PYX_ERR(0, 332, __pyx_L3_error)
}
@@ -16856,10 +17608,10 @@ static PyObject *__pyx_fuse_2_0_2__pyx_pw_4silx_4math_16chistogramnd_lut_61_hist
values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
}
- __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[0]); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
- __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[1]); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
- __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2]); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
- __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[3]); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
+ __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
+ __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
+ __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
+ __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[3], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
__pyx_v_i_n_elems = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_i_n_elems == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 336, __pyx_L3_error)
__pyx_v_i_filt_min_weights = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_i_filt_min_weights == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 337, __pyx_L3_error)
__pyx_v_i_weight_min = __Pyx_PyInt_As_npy_int32(values[6]); if (unlikely((__pyx_v_i_weight_min == ((npy_int32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 338, __pyx_L3_error)
@@ -16887,16 +17639,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_60_histogramnd_from_lut
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
- Py_ssize_t __pyx_t_3;
- int __pyx_t_4;
+ int __pyx_t_3;
+ Py_ssize_t __pyx_t_4;
int __pyx_t_5;
- Py_ssize_t __pyx_t_6;
+ int __pyx_t_6;
Py_ssize_t __pyx_t_7;
Py_ssize_t __pyx_t_8;
- __pyx_t_5numpy_int64_t __pyx_t_9;
- Py_ssize_t __pyx_t_10;
+ Py_ssize_t __pyx_t_9;
+ __pyx_t_5numpy_int64_t __pyx_t_10;
Py_ssize_t __pyx_t_11;
- __pyx_t_5numpy_int64_t __pyx_t_12;
+ Py_ssize_t __pyx_t_12;
+ __pyx_t_5numpy_int64_t __pyx_t_13;
__Pyx_RefNannySetupContext("__pyx_fuse_2_0_2_histogramnd_from_lut_fused", 0);
/* "silx/math/chistogramnd_lut.pyx":341
@@ -16910,6 +17663,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_60_histogramnd_from_lut
#ifdef WITH_THREAD
PyThreadState *_save;
Py_UNBLOCK_THREADS
+ __Pyx_FastGIL_Remember();
#endif
/*try:*/ {
@@ -16921,8 +17675,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_60_histogramnd_from_lut
* if i_filt_min_weights and i_weights[i] < i_weight_min:
*/
__pyx_t_1 = __pyx_v_i_n_elems;
- for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
- __pyx_v_i = __pyx_t_2;
+ __pyx_t_2 = __pyx_t_1;
+ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
+ __pyx_v_i = __pyx_t_3;
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -16931,9 +17686,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_60_histogramnd_from_lut
* if i_filt_min_weights and i_weights[i] < i_weight_min:
* continue
*/
- __pyx_t_3 = __pyx_v_i;
- __pyx_t_4 = (((*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_3 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
- if (__pyx_t_4) {
+ __pyx_t_4 = __pyx_v_i;
+ __pyx_t_5 = (((*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_4 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":344
* for i in range(i_n_elems):
@@ -16942,17 +17697,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_60_histogramnd_from_lut
* continue
* if i_filt_max_weights and i_weights[i] > i_weight_max:
*/
- __pyx_t_5 = (__pyx_v_i_filt_min_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_min_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L10_bool_binop_done;
}
- __pyx_t_6 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_6 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_7 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L10_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":345
* if (i_lut[i] >= 0):
@@ -16979,17 +17734,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_60_histogramnd_from_lut
* continue
* o_histo[i_lut[i]] += 1
*/
- __pyx_t_5 = (__pyx_v_i_filt_max_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_max_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L13_bool_binop_done;
}
- __pyx_t_7 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_8 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_8 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L13_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":347
* continue
@@ -17016,9 +17771,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_60_histogramnd_from_lut
* o_weighted_histo[i_lut[i]] += <cumul_t>i_weights[i] # noqa
*
*/
- __pyx_t_8 = __pyx_v_i;
- __pyx_t_9 = (*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_8 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_9 * __pyx_v_o_histo.strides[0]) )) += 1;
+ __pyx_t_9 = __pyx_v_i;
+ __pyx_t_10 = (*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_9 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_10 * __pyx_v_o_histo.strides[0]) )) += 1;
/* "silx/math/chistogramnd_lut.pyx":349
* continue
@@ -17027,10 +17782,10 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_60_histogramnd_from_lut
*
*
*/
- __pyx_t_10 = __pyx_v_i;
__pyx_t_11 = __pyx_v_i;
- __pyx_t_12 = (*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_11 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_12 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_int32_t)(*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_10 * __pyx_v_i_weights.strides[0]) ))));
+ __pyx_t_12 = __pyx_v_i;
+ __pyx_t_13 = (*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_12 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_13 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_int32_t)(*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_11 * __pyx_v_i_weights.strides[0]) ))));
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -17054,6 +17809,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_60_histogramnd_from_lut
/*finally:*/ {
/*normal exit:*/{
#ifdef WITH_THREAD
+ __Pyx_FastGIL_Forget();
Py_BLOCK_THREADS
#endif
goto __pyx_L5;
@@ -17067,7 +17823,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_60_histogramnd_from_lut
* @cython.cdivision(True)
* def _histogramnd_from_lut_fused(weights_t[:] i_weights, # <<<<<<<<<<<<<<
* lut_t[:] i_lut,
- * np.uint32_t[:] o_histo,
+ * cnumpy.uint32_t[:] o_histo,
*/
/* function exit code */
@@ -17105,59 +17861,76 @@ static PyObject *__pyx_fuse_2_0_3__pyx_pw_4silx_4math_16chistogramnd_lut_63_hist
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
switch (pos_args) {
case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
+ CYTHON_FALLTHROUGH;
case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
+ CYTHON_FALLTHROUGH;
case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
+ CYTHON_FALLTHROUGH;
case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ CYTHON_FALLTHROUGH;
case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
case 0: break;
default: goto __pyx_L5_argtuple_error;
}
kw_args = PyDict_Size(__pyx_kwds);
switch (pos_args) {
case 0:
- if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
case 1:
- if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 1); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 2:
- if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
+ if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 2); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 3:
- if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
+ if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 3); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 4:
- if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
+ if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 4); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 5:
- if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
+ if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 5); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 6:
- if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
+ if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 6); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 7:
- if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
+ if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 7); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 8:
- if (likely((values[8] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
+ if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 8); __PYX_ERR(0, 332, __pyx_L3_error)
}
@@ -17178,10 +17951,10 @@ static PyObject *__pyx_fuse_2_0_3__pyx_pw_4silx_4math_16chistogramnd_lut_63_hist
values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
}
- __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[0]); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
- __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[1]); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
- __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2]); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
- __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[3]); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
+ __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
+ __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
+ __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
+ __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[3], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
__pyx_v_i_n_elems = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_i_n_elems == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 336, __pyx_L3_error)
__pyx_v_i_filt_min_weights = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_i_filt_min_weights == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 337, __pyx_L3_error)
__pyx_v_i_weight_min = __Pyx_PyInt_As_npy_int32(values[6]); if (unlikely((__pyx_v_i_weight_min == ((npy_int32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 338, __pyx_L3_error)
@@ -17209,16 +17982,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_62_histogramnd_from_lut
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
- Py_ssize_t __pyx_t_3;
- int __pyx_t_4;
+ int __pyx_t_3;
+ Py_ssize_t __pyx_t_4;
int __pyx_t_5;
- Py_ssize_t __pyx_t_6;
+ int __pyx_t_6;
Py_ssize_t __pyx_t_7;
Py_ssize_t __pyx_t_8;
- __pyx_t_5numpy_int64_t __pyx_t_9;
- Py_ssize_t __pyx_t_10;
+ Py_ssize_t __pyx_t_9;
+ __pyx_t_5numpy_int64_t __pyx_t_10;
Py_ssize_t __pyx_t_11;
- __pyx_t_5numpy_int64_t __pyx_t_12;
+ Py_ssize_t __pyx_t_12;
+ __pyx_t_5numpy_int64_t __pyx_t_13;
__Pyx_RefNannySetupContext("__pyx_fuse_2_0_3_histogramnd_from_lut_fused", 0);
/* "silx/math/chistogramnd_lut.pyx":341
@@ -17232,6 +18006,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_62_histogramnd_from_lut
#ifdef WITH_THREAD
PyThreadState *_save;
Py_UNBLOCK_THREADS
+ __Pyx_FastGIL_Remember();
#endif
/*try:*/ {
@@ -17243,8 +18018,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_62_histogramnd_from_lut
* if i_filt_min_weights and i_weights[i] < i_weight_min:
*/
__pyx_t_1 = __pyx_v_i_n_elems;
- for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
- __pyx_v_i = __pyx_t_2;
+ __pyx_t_2 = __pyx_t_1;
+ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
+ __pyx_v_i = __pyx_t_3;
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -17253,9 +18029,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_62_histogramnd_from_lut
* if i_filt_min_weights and i_weights[i] < i_weight_min:
* continue
*/
- __pyx_t_3 = __pyx_v_i;
- __pyx_t_4 = (((*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_3 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
- if (__pyx_t_4) {
+ __pyx_t_4 = __pyx_v_i;
+ __pyx_t_5 = (((*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_4 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":344
* for i in range(i_n_elems):
@@ -17264,17 +18040,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_62_histogramnd_from_lut
* continue
* if i_filt_max_weights and i_weights[i] > i_weight_max:
*/
- __pyx_t_5 = (__pyx_v_i_filt_min_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_min_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L10_bool_binop_done;
}
- __pyx_t_6 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_6 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_7 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L10_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":345
* if (i_lut[i] >= 0):
@@ -17301,17 +18077,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_62_histogramnd_from_lut
* continue
* o_histo[i_lut[i]] += 1
*/
- __pyx_t_5 = (__pyx_v_i_filt_max_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_max_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L13_bool_binop_done;
}
- __pyx_t_7 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_8 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_8 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L13_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":347
* continue
@@ -17338,9 +18114,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_62_histogramnd_from_lut
* o_weighted_histo[i_lut[i]] += <cumul_t>i_weights[i] # noqa
*
*/
- __pyx_t_8 = __pyx_v_i;
- __pyx_t_9 = (*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_8 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_9 * __pyx_v_o_histo.strides[0]) )) += 1;
+ __pyx_t_9 = __pyx_v_i;
+ __pyx_t_10 = (*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_9 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_10 * __pyx_v_o_histo.strides[0]) )) += 1;
/* "silx/math/chistogramnd_lut.pyx":349
* continue
@@ -17349,10 +18125,10 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_62_histogramnd_from_lut
*
*
*/
- __pyx_t_10 = __pyx_v_i;
__pyx_t_11 = __pyx_v_i;
- __pyx_t_12 = (*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_11 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_12 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_int64_t)(*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_10 * __pyx_v_i_weights.strides[0]) ))));
+ __pyx_t_12 = __pyx_v_i;
+ __pyx_t_13 = (*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_12 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_13 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_int64_t)(*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_11 * __pyx_v_i_weights.strides[0]) ))));
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -17376,6 +18152,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_62_histogramnd_from_lut
/*finally:*/ {
/*normal exit:*/{
#ifdef WITH_THREAD
+ __Pyx_FastGIL_Forget();
Py_BLOCK_THREADS
#endif
goto __pyx_L5;
@@ -17389,7 +18166,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_62_histogramnd_from_lut
* @cython.cdivision(True)
* def _histogramnd_from_lut_fused(weights_t[:] i_weights, # <<<<<<<<<<<<<<
* lut_t[:] i_lut,
- * np.uint32_t[:] o_histo,
+ * cnumpy.uint32_t[:] o_histo,
*/
/* function exit code */
@@ -17427,59 +18204,76 @@ static PyObject *__pyx_fuse_2_1_0__pyx_pw_4silx_4math_16chistogramnd_lut_65_hist
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
switch (pos_args) {
case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
+ CYTHON_FALLTHROUGH;
case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
+ CYTHON_FALLTHROUGH;
case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
+ CYTHON_FALLTHROUGH;
case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ CYTHON_FALLTHROUGH;
case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
case 0: break;
default: goto __pyx_L5_argtuple_error;
}
kw_args = PyDict_Size(__pyx_kwds);
switch (pos_args) {
case 0:
- if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
case 1:
- if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 1); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 2:
- if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
+ if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 2); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 3:
- if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
+ if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 3); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 4:
- if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
+ if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 4); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 5:
- if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
+ if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 5); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 6:
- if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
+ if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 6); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 7:
- if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
+ if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 7); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 8:
- if (likely((values[8] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
+ if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 8); __PYX_ERR(0, 332, __pyx_L3_error)
}
@@ -17500,10 +18294,10 @@ static PyObject *__pyx_fuse_2_1_0__pyx_pw_4silx_4math_16chistogramnd_lut_65_hist
values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
}
- __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[0]); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
- __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[1]); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
- __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2]); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
- __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float64_t(values[3]); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
+ __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
+ __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
+ __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
+ __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float64_t(values[3], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
__pyx_v_i_n_elems = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_i_n_elems == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 336, __pyx_L3_error)
__pyx_v_i_filt_min_weights = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_i_filt_min_weights == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 337, __pyx_L3_error)
__pyx_v_i_weight_min = __Pyx_PyInt_As_npy_int32(values[6]); if (unlikely((__pyx_v_i_weight_min == ((npy_int32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 338, __pyx_L3_error)
@@ -17531,16 +18325,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_64_histogramnd_from_lut
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
- Py_ssize_t __pyx_t_3;
- int __pyx_t_4;
+ int __pyx_t_3;
+ Py_ssize_t __pyx_t_4;
int __pyx_t_5;
- Py_ssize_t __pyx_t_6;
+ int __pyx_t_6;
Py_ssize_t __pyx_t_7;
Py_ssize_t __pyx_t_8;
Py_ssize_t __pyx_t_9;
Py_ssize_t __pyx_t_10;
Py_ssize_t __pyx_t_11;
Py_ssize_t __pyx_t_12;
+ Py_ssize_t __pyx_t_13;
__Pyx_RefNannySetupContext("__pyx_fuse_2_1_0_histogramnd_from_lut_fused", 0);
/* "silx/math/chistogramnd_lut.pyx":341
@@ -17554,6 +18349,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_64_histogramnd_from_lut
#ifdef WITH_THREAD
PyThreadState *_save;
Py_UNBLOCK_THREADS
+ __Pyx_FastGIL_Remember();
#endif
/*try:*/ {
@@ -17565,8 +18361,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_64_histogramnd_from_lut
* if i_filt_min_weights and i_weights[i] < i_weight_min:
*/
__pyx_t_1 = __pyx_v_i_n_elems;
- for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
- __pyx_v_i = __pyx_t_2;
+ __pyx_t_2 = __pyx_t_1;
+ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
+ __pyx_v_i = __pyx_t_3;
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -17575,9 +18372,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_64_histogramnd_from_lut
* if i_filt_min_weights and i_weights[i] < i_weight_min:
* continue
*/
- __pyx_t_3 = __pyx_v_i;
- __pyx_t_4 = (((*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_3 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
- if (__pyx_t_4) {
+ __pyx_t_4 = __pyx_v_i;
+ __pyx_t_5 = (((*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_4 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":344
* for i in range(i_n_elems):
@@ -17586,17 +18383,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_64_histogramnd_from_lut
* continue
* if i_filt_max_weights and i_weights[i] > i_weight_max:
*/
- __pyx_t_5 = (__pyx_v_i_filt_min_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_min_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L10_bool_binop_done;
}
- __pyx_t_6 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_6 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_7 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L10_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":345
* if (i_lut[i] >= 0):
@@ -17623,17 +18420,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_64_histogramnd_from_lut
* continue
* o_histo[i_lut[i]] += 1
*/
- __pyx_t_5 = (__pyx_v_i_filt_max_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_max_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L13_bool_binop_done;
}
- __pyx_t_7 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_8 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_8 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L13_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":347
* continue
@@ -17660,9 +18457,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_64_histogramnd_from_lut
* o_weighted_histo[i_lut[i]] += <cumul_t>i_weights[i] # noqa
*
*/
- __pyx_t_8 = __pyx_v_i;
- __pyx_t_9 = (*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_8 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_9 * __pyx_v_o_histo.strides[0]) )) += 1;
+ __pyx_t_9 = __pyx_v_i;
+ __pyx_t_10 = (*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_9 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_10 * __pyx_v_o_histo.strides[0]) )) += 1;
/* "silx/math/chistogramnd_lut.pyx":349
* continue
@@ -17671,10 +18468,10 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_64_histogramnd_from_lut
*
*
*/
- __pyx_t_10 = __pyx_v_i;
__pyx_t_11 = __pyx_v_i;
- __pyx_t_12 = (*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_11 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_12 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_float64_t)(*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_10 * __pyx_v_i_weights.strides[0]) ))));
+ __pyx_t_12 = __pyx_v_i;
+ __pyx_t_13 = (*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_12 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_13 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_float64_t)(*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_11 * __pyx_v_i_weights.strides[0]) ))));
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -17698,6 +18495,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_64_histogramnd_from_lut
/*finally:*/ {
/*normal exit:*/{
#ifdef WITH_THREAD
+ __Pyx_FastGIL_Forget();
Py_BLOCK_THREADS
#endif
goto __pyx_L5;
@@ -17711,7 +18509,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_64_histogramnd_from_lut
* @cython.cdivision(True)
* def _histogramnd_from_lut_fused(weights_t[:] i_weights, # <<<<<<<<<<<<<<
* lut_t[:] i_lut,
- * np.uint32_t[:] o_histo,
+ * cnumpy.uint32_t[:] o_histo,
*/
/* function exit code */
@@ -17749,59 +18547,76 @@ static PyObject *__pyx_fuse_2_1_1__pyx_pw_4silx_4math_16chistogramnd_lut_67_hist
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
switch (pos_args) {
case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
+ CYTHON_FALLTHROUGH;
case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
+ CYTHON_FALLTHROUGH;
case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
+ CYTHON_FALLTHROUGH;
case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ CYTHON_FALLTHROUGH;
case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
case 0: break;
default: goto __pyx_L5_argtuple_error;
}
kw_args = PyDict_Size(__pyx_kwds);
switch (pos_args) {
case 0:
- if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
case 1:
- if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 1); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 2:
- if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
+ if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 2); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 3:
- if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
+ if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 3); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 4:
- if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
+ if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 4); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 5:
- if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
+ if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 5); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 6:
- if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
+ if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 6); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 7:
- if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
+ if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 7); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 8:
- if (likely((values[8] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
+ if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 8); __PYX_ERR(0, 332, __pyx_L3_error)
}
@@ -17822,10 +18637,10 @@ static PyObject *__pyx_fuse_2_1_1__pyx_pw_4silx_4math_16chistogramnd_lut_67_hist
values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
}
- __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[0]); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
- __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[1]); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
- __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2]); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
- __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float32_t(values[3]); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
+ __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
+ __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
+ __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
+ __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float32_t(values[3], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
__pyx_v_i_n_elems = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_i_n_elems == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 336, __pyx_L3_error)
__pyx_v_i_filt_min_weights = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_i_filt_min_weights == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 337, __pyx_L3_error)
__pyx_v_i_weight_min = __Pyx_PyInt_As_npy_int32(values[6]); if (unlikely((__pyx_v_i_weight_min == ((npy_int32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 338, __pyx_L3_error)
@@ -17853,16 +18668,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_66_histogramnd_from_lut
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
- Py_ssize_t __pyx_t_3;
- int __pyx_t_4;
+ int __pyx_t_3;
+ Py_ssize_t __pyx_t_4;
int __pyx_t_5;
- Py_ssize_t __pyx_t_6;
+ int __pyx_t_6;
Py_ssize_t __pyx_t_7;
Py_ssize_t __pyx_t_8;
Py_ssize_t __pyx_t_9;
Py_ssize_t __pyx_t_10;
Py_ssize_t __pyx_t_11;
Py_ssize_t __pyx_t_12;
+ Py_ssize_t __pyx_t_13;
__Pyx_RefNannySetupContext("__pyx_fuse_2_1_1_histogramnd_from_lut_fused", 0);
/* "silx/math/chistogramnd_lut.pyx":341
@@ -17876,6 +18692,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_66_histogramnd_from_lut
#ifdef WITH_THREAD
PyThreadState *_save;
Py_UNBLOCK_THREADS
+ __Pyx_FastGIL_Remember();
#endif
/*try:*/ {
@@ -17887,8 +18704,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_66_histogramnd_from_lut
* if i_filt_min_weights and i_weights[i] < i_weight_min:
*/
__pyx_t_1 = __pyx_v_i_n_elems;
- for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
- __pyx_v_i = __pyx_t_2;
+ __pyx_t_2 = __pyx_t_1;
+ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
+ __pyx_v_i = __pyx_t_3;
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -17897,9 +18715,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_66_histogramnd_from_lut
* if i_filt_min_weights and i_weights[i] < i_weight_min:
* continue
*/
- __pyx_t_3 = __pyx_v_i;
- __pyx_t_4 = (((*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_3 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
- if (__pyx_t_4) {
+ __pyx_t_4 = __pyx_v_i;
+ __pyx_t_5 = (((*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_4 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":344
* for i in range(i_n_elems):
@@ -17908,17 +18726,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_66_histogramnd_from_lut
* continue
* if i_filt_max_weights and i_weights[i] > i_weight_max:
*/
- __pyx_t_5 = (__pyx_v_i_filt_min_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_min_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L10_bool_binop_done;
}
- __pyx_t_6 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_6 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_7 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L10_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":345
* if (i_lut[i] >= 0):
@@ -17945,17 +18763,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_66_histogramnd_from_lut
* continue
* o_histo[i_lut[i]] += 1
*/
- __pyx_t_5 = (__pyx_v_i_filt_max_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_max_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L13_bool_binop_done;
}
- __pyx_t_7 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_8 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_8 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L13_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":347
* continue
@@ -17982,9 +18800,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_66_histogramnd_from_lut
* o_weighted_histo[i_lut[i]] += <cumul_t>i_weights[i] # noqa
*
*/
- __pyx_t_8 = __pyx_v_i;
- __pyx_t_9 = (*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_8 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_9 * __pyx_v_o_histo.strides[0]) )) += 1;
+ __pyx_t_9 = __pyx_v_i;
+ __pyx_t_10 = (*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_9 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_10 * __pyx_v_o_histo.strides[0]) )) += 1;
/* "silx/math/chistogramnd_lut.pyx":349
* continue
@@ -17993,10 +18811,10 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_66_histogramnd_from_lut
*
*
*/
- __pyx_t_10 = __pyx_v_i;
__pyx_t_11 = __pyx_v_i;
- __pyx_t_12 = (*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_11 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_12 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_float32_t)(*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_10 * __pyx_v_i_weights.strides[0]) ))));
+ __pyx_t_12 = __pyx_v_i;
+ __pyx_t_13 = (*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_12 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_13 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_float32_t)(*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_11 * __pyx_v_i_weights.strides[0]) ))));
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -18020,6 +18838,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_66_histogramnd_from_lut
/*finally:*/ {
/*normal exit:*/{
#ifdef WITH_THREAD
+ __Pyx_FastGIL_Forget();
Py_BLOCK_THREADS
#endif
goto __pyx_L5;
@@ -18033,7 +18852,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_66_histogramnd_from_lut
* @cython.cdivision(True)
* def _histogramnd_from_lut_fused(weights_t[:] i_weights, # <<<<<<<<<<<<<<
* lut_t[:] i_lut,
- * np.uint32_t[:] o_histo,
+ * cnumpy.uint32_t[:] o_histo,
*/
/* function exit code */
@@ -18071,59 +18890,76 @@ static PyObject *__pyx_fuse_2_1_2__pyx_pw_4silx_4math_16chistogramnd_lut_69_hist
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
switch (pos_args) {
case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
+ CYTHON_FALLTHROUGH;
case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
+ CYTHON_FALLTHROUGH;
case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
+ CYTHON_FALLTHROUGH;
case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ CYTHON_FALLTHROUGH;
case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
case 0: break;
default: goto __pyx_L5_argtuple_error;
}
kw_args = PyDict_Size(__pyx_kwds);
switch (pos_args) {
case 0:
- if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
case 1:
- if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 1); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 2:
- if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
+ if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 2); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 3:
- if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
+ if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 3); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 4:
- if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
+ if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 4); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 5:
- if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
+ if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 5); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 6:
- if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
+ if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 6); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 7:
- if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
+ if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 7); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 8:
- if (likely((values[8] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
+ if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 8); __PYX_ERR(0, 332, __pyx_L3_error)
}
@@ -18144,10 +18980,10 @@ static PyObject *__pyx_fuse_2_1_2__pyx_pw_4silx_4math_16chistogramnd_lut_69_hist
values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
}
- __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[0]); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
- __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[1]); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
- __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2]); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
- __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[3]); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
+ __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
+ __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
+ __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
+ __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[3], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
__pyx_v_i_n_elems = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_i_n_elems == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 336, __pyx_L3_error)
__pyx_v_i_filt_min_weights = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_i_filt_min_weights == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 337, __pyx_L3_error)
__pyx_v_i_weight_min = __Pyx_PyInt_As_npy_int32(values[6]); if (unlikely((__pyx_v_i_weight_min == ((npy_int32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 338, __pyx_L3_error)
@@ -18175,16 +19011,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_68_histogramnd_from_lut
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
- Py_ssize_t __pyx_t_3;
- int __pyx_t_4;
+ int __pyx_t_3;
+ Py_ssize_t __pyx_t_4;
int __pyx_t_5;
- Py_ssize_t __pyx_t_6;
+ int __pyx_t_6;
Py_ssize_t __pyx_t_7;
Py_ssize_t __pyx_t_8;
Py_ssize_t __pyx_t_9;
Py_ssize_t __pyx_t_10;
Py_ssize_t __pyx_t_11;
Py_ssize_t __pyx_t_12;
+ Py_ssize_t __pyx_t_13;
__Pyx_RefNannySetupContext("__pyx_fuse_2_1_2_histogramnd_from_lut_fused", 0);
/* "silx/math/chistogramnd_lut.pyx":341
@@ -18198,6 +19035,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_68_histogramnd_from_lut
#ifdef WITH_THREAD
PyThreadState *_save;
Py_UNBLOCK_THREADS
+ __Pyx_FastGIL_Remember();
#endif
/*try:*/ {
@@ -18209,8 +19047,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_68_histogramnd_from_lut
* if i_filt_min_weights and i_weights[i] < i_weight_min:
*/
__pyx_t_1 = __pyx_v_i_n_elems;
- for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
- __pyx_v_i = __pyx_t_2;
+ __pyx_t_2 = __pyx_t_1;
+ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
+ __pyx_v_i = __pyx_t_3;
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -18219,9 +19058,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_68_histogramnd_from_lut
* if i_filt_min_weights and i_weights[i] < i_weight_min:
* continue
*/
- __pyx_t_3 = __pyx_v_i;
- __pyx_t_4 = (((*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_3 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
- if (__pyx_t_4) {
+ __pyx_t_4 = __pyx_v_i;
+ __pyx_t_5 = (((*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_4 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":344
* for i in range(i_n_elems):
@@ -18230,17 +19069,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_68_histogramnd_from_lut
* continue
* if i_filt_max_weights and i_weights[i] > i_weight_max:
*/
- __pyx_t_5 = (__pyx_v_i_filt_min_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_min_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L10_bool_binop_done;
}
- __pyx_t_6 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_6 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_7 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L10_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":345
* if (i_lut[i] >= 0):
@@ -18267,17 +19106,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_68_histogramnd_from_lut
* continue
* o_histo[i_lut[i]] += 1
*/
- __pyx_t_5 = (__pyx_v_i_filt_max_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_max_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L13_bool_binop_done;
}
- __pyx_t_7 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_8 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_8 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L13_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":347
* continue
@@ -18304,9 +19143,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_68_histogramnd_from_lut
* o_weighted_histo[i_lut[i]] += <cumul_t>i_weights[i] # noqa
*
*/
- __pyx_t_8 = __pyx_v_i;
- __pyx_t_9 = (*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_8 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_9 * __pyx_v_o_histo.strides[0]) )) += 1;
+ __pyx_t_9 = __pyx_v_i;
+ __pyx_t_10 = (*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_9 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_10 * __pyx_v_o_histo.strides[0]) )) += 1;
/* "silx/math/chistogramnd_lut.pyx":349
* continue
@@ -18315,10 +19154,10 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_68_histogramnd_from_lut
*
*
*/
- __pyx_t_10 = __pyx_v_i;
__pyx_t_11 = __pyx_v_i;
- __pyx_t_12 = (*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_11 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_12 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_int32_t)(*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_10 * __pyx_v_i_weights.strides[0]) ))));
+ __pyx_t_12 = __pyx_v_i;
+ __pyx_t_13 = (*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_12 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_13 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_int32_t)(*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_11 * __pyx_v_i_weights.strides[0]) ))));
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -18342,6 +19181,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_68_histogramnd_from_lut
/*finally:*/ {
/*normal exit:*/{
#ifdef WITH_THREAD
+ __Pyx_FastGIL_Forget();
Py_BLOCK_THREADS
#endif
goto __pyx_L5;
@@ -18355,7 +19195,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_68_histogramnd_from_lut
* @cython.cdivision(True)
* def _histogramnd_from_lut_fused(weights_t[:] i_weights, # <<<<<<<<<<<<<<
* lut_t[:] i_lut,
- * np.uint32_t[:] o_histo,
+ * cnumpy.uint32_t[:] o_histo,
*/
/* function exit code */
@@ -18393,59 +19233,76 @@ static PyObject *__pyx_fuse_2_1_3__pyx_pw_4silx_4math_16chistogramnd_lut_71_hist
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
switch (pos_args) {
case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
+ CYTHON_FALLTHROUGH;
case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
+ CYTHON_FALLTHROUGH;
case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
+ CYTHON_FALLTHROUGH;
case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ CYTHON_FALLTHROUGH;
case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
case 0: break;
default: goto __pyx_L5_argtuple_error;
}
kw_args = PyDict_Size(__pyx_kwds);
switch (pos_args) {
case 0:
- if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
case 1:
- if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 1); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 2:
- if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
+ if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 2); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 3:
- if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
+ if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 3); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 4:
- if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
+ if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 4); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 5:
- if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
+ if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 5); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 6:
- if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
+ if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 6); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 7:
- if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
+ if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 7); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 8:
- if (likely((values[8] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
+ if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 8); __PYX_ERR(0, 332, __pyx_L3_error)
}
@@ -18466,10 +19323,10 @@ static PyObject *__pyx_fuse_2_1_3__pyx_pw_4silx_4math_16chistogramnd_lut_71_hist
values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
}
- __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[0]); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
- __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[1]); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
- __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2]); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
- __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[3]); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
+ __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
+ __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
+ __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
+ __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[3], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
__pyx_v_i_n_elems = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_i_n_elems == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 336, __pyx_L3_error)
__pyx_v_i_filt_min_weights = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_i_filt_min_weights == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 337, __pyx_L3_error)
__pyx_v_i_weight_min = __Pyx_PyInt_As_npy_int32(values[6]); if (unlikely((__pyx_v_i_weight_min == ((npy_int32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 338, __pyx_L3_error)
@@ -18497,16 +19354,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_70_histogramnd_from_lut
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
- Py_ssize_t __pyx_t_3;
- int __pyx_t_4;
+ int __pyx_t_3;
+ Py_ssize_t __pyx_t_4;
int __pyx_t_5;
- Py_ssize_t __pyx_t_6;
+ int __pyx_t_6;
Py_ssize_t __pyx_t_7;
Py_ssize_t __pyx_t_8;
Py_ssize_t __pyx_t_9;
Py_ssize_t __pyx_t_10;
Py_ssize_t __pyx_t_11;
Py_ssize_t __pyx_t_12;
+ Py_ssize_t __pyx_t_13;
__Pyx_RefNannySetupContext("__pyx_fuse_2_1_3_histogramnd_from_lut_fused", 0);
/* "silx/math/chistogramnd_lut.pyx":341
@@ -18520,6 +19378,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_70_histogramnd_from_lut
#ifdef WITH_THREAD
PyThreadState *_save;
Py_UNBLOCK_THREADS
+ __Pyx_FastGIL_Remember();
#endif
/*try:*/ {
@@ -18531,8 +19390,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_70_histogramnd_from_lut
* if i_filt_min_weights and i_weights[i] < i_weight_min:
*/
__pyx_t_1 = __pyx_v_i_n_elems;
- for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
- __pyx_v_i = __pyx_t_2;
+ __pyx_t_2 = __pyx_t_1;
+ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
+ __pyx_v_i = __pyx_t_3;
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -18541,9 +19401,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_70_histogramnd_from_lut
* if i_filt_min_weights and i_weights[i] < i_weight_min:
* continue
*/
- __pyx_t_3 = __pyx_v_i;
- __pyx_t_4 = (((*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_3 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
- if (__pyx_t_4) {
+ __pyx_t_4 = __pyx_v_i;
+ __pyx_t_5 = (((*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_4 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":344
* for i in range(i_n_elems):
@@ -18552,17 +19412,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_70_histogramnd_from_lut
* continue
* if i_filt_max_weights and i_weights[i] > i_weight_max:
*/
- __pyx_t_5 = (__pyx_v_i_filt_min_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_min_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L10_bool_binop_done;
}
- __pyx_t_6 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_6 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_7 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L10_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":345
* if (i_lut[i] >= 0):
@@ -18589,17 +19449,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_70_histogramnd_from_lut
* continue
* o_histo[i_lut[i]] += 1
*/
- __pyx_t_5 = (__pyx_v_i_filt_max_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_max_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L13_bool_binop_done;
}
- __pyx_t_7 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_8 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_8 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L13_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":347
* continue
@@ -18626,9 +19486,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_70_histogramnd_from_lut
* o_weighted_histo[i_lut[i]] += <cumul_t>i_weights[i] # noqa
*
*/
- __pyx_t_8 = __pyx_v_i;
- __pyx_t_9 = (*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_8 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_9 * __pyx_v_o_histo.strides[0]) )) += 1;
+ __pyx_t_9 = __pyx_v_i;
+ __pyx_t_10 = (*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_9 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_10 * __pyx_v_o_histo.strides[0]) )) += 1;
/* "silx/math/chistogramnd_lut.pyx":349
* continue
@@ -18637,10 +19497,10 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_70_histogramnd_from_lut
*
*
*/
- __pyx_t_10 = __pyx_v_i;
__pyx_t_11 = __pyx_v_i;
- __pyx_t_12 = (*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_11 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_12 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_int64_t)(*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_10 * __pyx_v_i_weights.strides[0]) ))));
+ __pyx_t_12 = __pyx_v_i;
+ __pyx_t_13 = (*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_12 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_13 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_int64_t)(*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_11 * __pyx_v_i_weights.strides[0]) ))));
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -18664,6 +19524,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_70_histogramnd_from_lut
/*finally:*/ {
/*normal exit:*/{
#ifdef WITH_THREAD
+ __Pyx_FastGIL_Forget();
Py_BLOCK_THREADS
#endif
goto __pyx_L5;
@@ -18677,7 +19538,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_70_histogramnd_from_lut
* @cython.cdivision(True)
* def _histogramnd_from_lut_fused(weights_t[:] i_weights, # <<<<<<<<<<<<<<
* lut_t[:] i_lut,
- * np.uint32_t[:] o_histo,
+ * cnumpy.uint32_t[:] o_histo,
*/
/* function exit code */
@@ -18715,59 +19576,76 @@ static PyObject *__pyx_fuse_2_2_0__pyx_pw_4silx_4math_16chistogramnd_lut_73_hist
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
switch (pos_args) {
case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
+ CYTHON_FALLTHROUGH;
case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
+ CYTHON_FALLTHROUGH;
case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
+ CYTHON_FALLTHROUGH;
case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ CYTHON_FALLTHROUGH;
case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
case 0: break;
default: goto __pyx_L5_argtuple_error;
}
kw_args = PyDict_Size(__pyx_kwds);
switch (pos_args) {
case 0:
- if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
case 1:
- if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 1); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 2:
- if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
+ if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 2); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 3:
- if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
+ if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 3); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 4:
- if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
+ if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 4); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 5:
- if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
+ if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 5); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 6:
- if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
+ if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 6); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 7:
- if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
+ if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 7); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 8:
- if (likely((values[8] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
+ if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 8); __PYX_ERR(0, 332, __pyx_L3_error)
}
@@ -18788,10 +19666,10 @@ static PyObject *__pyx_fuse_2_2_0__pyx_pw_4silx_4math_16chistogramnd_lut_73_hist
values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
}
- __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[0]); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
- __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int16_t(values[1]); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
- __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2]); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
- __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float64_t(values[3]); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
+ __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
+ __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int16_t(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
+ __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
+ __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float64_t(values[3], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
__pyx_v_i_n_elems = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_i_n_elems == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 336, __pyx_L3_error)
__pyx_v_i_filt_min_weights = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_i_filt_min_weights == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 337, __pyx_L3_error)
__pyx_v_i_weight_min = __Pyx_PyInt_As_npy_int32(values[6]); if (unlikely((__pyx_v_i_weight_min == ((npy_int32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 338, __pyx_L3_error)
@@ -18819,16 +19697,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_72_histogramnd_from_lut
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
- Py_ssize_t __pyx_t_3;
- int __pyx_t_4;
+ int __pyx_t_3;
+ Py_ssize_t __pyx_t_4;
int __pyx_t_5;
- Py_ssize_t __pyx_t_6;
+ int __pyx_t_6;
Py_ssize_t __pyx_t_7;
Py_ssize_t __pyx_t_8;
Py_ssize_t __pyx_t_9;
Py_ssize_t __pyx_t_10;
Py_ssize_t __pyx_t_11;
Py_ssize_t __pyx_t_12;
+ Py_ssize_t __pyx_t_13;
__Pyx_RefNannySetupContext("__pyx_fuse_2_2_0_histogramnd_from_lut_fused", 0);
/* "silx/math/chistogramnd_lut.pyx":341
@@ -18842,6 +19721,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_72_histogramnd_from_lut
#ifdef WITH_THREAD
PyThreadState *_save;
Py_UNBLOCK_THREADS
+ __Pyx_FastGIL_Remember();
#endif
/*try:*/ {
@@ -18853,8 +19733,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_72_histogramnd_from_lut
* if i_filt_min_weights and i_weights[i] < i_weight_min:
*/
__pyx_t_1 = __pyx_v_i_n_elems;
- for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
- __pyx_v_i = __pyx_t_2;
+ __pyx_t_2 = __pyx_t_1;
+ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
+ __pyx_v_i = __pyx_t_3;
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -18863,9 +19744,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_72_histogramnd_from_lut
* if i_filt_min_weights and i_weights[i] < i_weight_min:
* continue
*/
- __pyx_t_3 = __pyx_v_i;
- __pyx_t_4 = (((*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_3 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
- if (__pyx_t_4) {
+ __pyx_t_4 = __pyx_v_i;
+ __pyx_t_5 = (((*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_4 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":344
* for i in range(i_n_elems):
@@ -18874,17 +19755,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_72_histogramnd_from_lut
* continue
* if i_filt_max_weights and i_weights[i] > i_weight_max:
*/
- __pyx_t_5 = (__pyx_v_i_filt_min_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_min_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L10_bool_binop_done;
}
- __pyx_t_6 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_6 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_7 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L10_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":345
* if (i_lut[i] >= 0):
@@ -18911,17 +19792,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_72_histogramnd_from_lut
* continue
* o_histo[i_lut[i]] += 1
*/
- __pyx_t_5 = (__pyx_v_i_filt_max_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_max_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L13_bool_binop_done;
}
- __pyx_t_7 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_8 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_8 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L13_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":347
* continue
@@ -18948,9 +19829,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_72_histogramnd_from_lut
* o_weighted_histo[i_lut[i]] += <cumul_t>i_weights[i] # noqa
*
*/
- __pyx_t_8 = __pyx_v_i;
- __pyx_t_9 = (*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_8 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_9 * __pyx_v_o_histo.strides[0]) )) += 1;
+ __pyx_t_9 = __pyx_v_i;
+ __pyx_t_10 = (*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_9 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_10 * __pyx_v_o_histo.strides[0]) )) += 1;
/* "silx/math/chistogramnd_lut.pyx":349
* continue
@@ -18959,10 +19840,10 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_72_histogramnd_from_lut
*
*
*/
- __pyx_t_10 = __pyx_v_i;
__pyx_t_11 = __pyx_v_i;
- __pyx_t_12 = (*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_11 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_12 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_float64_t)(*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_10 * __pyx_v_i_weights.strides[0]) ))));
+ __pyx_t_12 = __pyx_v_i;
+ __pyx_t_13 = (*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_12 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_13 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_float64_t)(*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_11 * __pyx_v_i_weights.strides[0]) ))));
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -18986,6 +19867,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_72_histogramnd_from_lut
/*finally:*/ {
/*normal exit:*/{
#ifdef WITH_THREAD
+ __Pyx_FastGIL_Forget();
Py_BLOCK_THREADS
#endif
goto __pyx_L5;
@@ -18999,7 +19881,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_72_histogramnd_from_lut
* @cython.cdivision(True)
* def _histogramnd_from_lut_fused(weights_t[:] i_weights, # <<<<<<<<<<<<<<
* lut_t[:] i_lut,
- * np.uint32_t[:] o_histo,
+ * cnumpy.uint32_t[:] o_histo,
*/
/* function exit code */
@@ -19037,59 +19919,76 @@ static PyObject *__pyx_fuse_2_2_1__pyx_pw_4silx_4math_16chistogramnd_lut_75_hist
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
switch (pos_args) {
case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
+ CYTHON_FALLTHROUGH;
case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
+ CYTHON_FALLTHROUGH;
case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
+ CYTHON_FALLTHROUGH;
case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ CYTHON_FALLTHROUGH;
case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
case 0: break;
default: goto __pyx_L5_argtuple_error;
}
kw_args = PyDict_Size(__pyx_kwds);
switch (pos_args) {
case 0:
- if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
case 1:
- if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 1); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 2:
- if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
+ if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 2); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 3:
- if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
+ if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 3); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 4:
- if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
+ if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 4); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 5:
- if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
+ if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 5); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 6:
- if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
+ if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 6); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 7:
- if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
+ if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 7); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 8:
- if (likely((values[8] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
+ if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 8); __PYX_ERR(0, 332, __pyx_L3_error)
}
@@ -19110,10 +20009,10 @@ static PyObject *__pyx_fuse_2_2_1__pyx_pw_4silx_4math_16chistogramnd_lut_75_hist
values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
}
- __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[0]); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
- __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int16_t(values[1]); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
- __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2]); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
- __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float32_t(values[3]); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
+ __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
+ __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int16_t(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
+ __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
+ __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float32_t(values[3], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
__pyx_v_i_n_elems = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_i_n_elems == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 336, __pyx_L3_error)
__pyx_v_i_filt_min_weights = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_i_filt_min_weights == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 337, __pyx_L3_error)
__pyx_v_i_weight_min = __Pyx_PyInt_As_npy_int32(values[6]); if (unlikely((__pyx_v_i_weight_min == ((npy_int32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 338, __pyx_L3_error)
@@ -19141,16 +20040,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_74_histogramnd_from_lut
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
- Py_ssize_t __pyx_t_3;
- int __pyx_t_4;
+ int __pyx_t_3;
+ Py_ssize_t __pyx_t_4;
int __pyx_t_5;
- Py_ssize_t __pyx_t_6;
+ int __pyx_t_6;
Py_ssize_t __pyx_t_7;
Py_ssize_t __pyx_t_8;
Py_ssize_t __pyx_t_9;
Py_ssize_t __pyx_t_10;
Py_ssize_t __pyx_t_11;
Py_ssize_t __pyx_t_12;
+ Py_ssize_t __pyx_t_13;
__Pyx_RefNannySetupContext("__pyx_fuse_2_2_1_histogramnd_from_lut_fused", 0);
/* "silx/math/chistogramnd_lut.pyx":341
@@ -19164,6 +20064,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_74_histogramnd_from_lut
#ifdef WITH_THREAD
PyThreadState *_save;
Py_UNBLOCK_THREADS
+ __Pyx_FastGIL_Remember();
#endif
/*try:*/ {
@@ -19175,8 +20076,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_74_histogramnd_from_lut
* if i_filt_min_weights and i_weights[i] < i_weight_min:
*/
__pyx_t_1 = __pyx_v_i_n_elems;
- for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
- __pyx_v_i = __pyx_t_2;
+ __pyx_t_2 = __pyx_t_1;
+ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
+ __pyx_v_i = __pyx_t_3;
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -19185,9 +20087,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_74_histogramnd_from_lut
* if i_filt_min_weights and i_weights[i] < i_weight_min:
* continue
*/
- __pyx_t_3 = __pyx_v_i;
- __pyx_t_4 = (((*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_3 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
- if (__pyx_t_4) {
+ __pyx_t_4 = __pyx_v_i;
+ __pyx_t_5 = (((*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_4 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":344
* for i in range(i_n_elems):
@@ -19196,17 +20098,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_74_histogramnd_from_lut
* continue
* if i_filt_max_weights and i_weights[i] > i_weight_max:
*/
- __pyx_t_5 = (__pyx_v_i_filt_min_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_min_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L10_bool_binop_done;
}
- __pyx_t_6 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_6 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_7 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L10_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":345
* if (i_lut[i] >= 0):
@@ -19233,17 +20135,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_74_histogramnd_from_lut
* continue
* o_histo[i_lut[i]] += 1
*/
- __pyx_t_5 = (__pyx_v_i_filt_max_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_max_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L13_bool_binop_done;
}
- __pyx_t_7 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_8 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_8 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L13_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":347
* continue
@@ -19270,9 +20172,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_74_histogramnd_from_lut
* o_weighted_histo[i_lut[i]] += <cumul_t>i_weights[i] # noqa
*
*/
- __pyx_t_8 = __pyx_v_i;
- __pyx_t_9 = (*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_8 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_9 * __pyx_v_o_histo.strides[0]) )) += 1;
+ __pyx_t_9 = __pyx_v_i;
+ __pyx_t_10 = (*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_9 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_10 * __pyx_v_o_histo.strides[0]) )) += 1;
/* "silx/math/chistogramnd_lut.pyx":349
* continue
@@ -19281,10 +20183,10 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_74_histogramnd_from_lut
*
*
*/
- __pyx_t_10 = __pyx_v_i;
__pyx_t_11 = __pyx_v_i;
- __pyx_t_12 = (*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_11 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_12 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_float32_t)(*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_10 * __pyx_v_i_weights.strides[0]) ))));
+ __pyx_t_12 = __pyx_v_i;
+ __pyx_t_13 = (*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_12 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_13 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_float32_t)(*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_11 * __pyx_v_i_weights.strides[0]) ))));
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -19308,6 +20210,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_74_histogramnd_from_lut
/*finally:*/ {
/*normal exit:*/{
#ifdef WITH_THREAD
+ __Pyx_FastGIL_Forget();
Py_BLOCK_THREADS
#endif
goto __pyx_L5;
@@ -19321,7 +20224,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_74_histogramnd_from_lut
* @cython.cdivision(True)
* def _histogramnd_from_lut_fused(weights_t[:] i_weights, # <<<<<<<<<<<<<<
* lut_t[:] i_lut,
- * np.uint32_t[:] o_histo,
+ * cnumpy.uint32_t[:] o_histo,
*/
/* function exit code */
@@ -19359,59 +20262,76 @@ static PyObject *__pyx_fuse_2_2_2__pyx_pw_4silx_4math_16chistogramnd_lut_77_hist
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
switch (pos_args) {
case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
+ CYTHON_FALLTHROUGH;
case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
+ CYTHON_FALLTHROUGH;
case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
+ CYTHON_FALLTHROUGH;
case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ CYTHON_FALLTHROUGH;
case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
case 0: break;
default: goto __pyx_L5_argtuple_error;
}
kw_args = PyDict_Size(__pyx_kwds);
switch (pos_args) {
case 0:
- if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
case 1:
- if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 1); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 2:
- if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
+ if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 2); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 3:
- if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
+ if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 3); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 4:
- if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
+ if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 4); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 5:
- if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
+ if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 5); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 6:
- if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
+ if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 6); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 7:
- if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
+ if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 7); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 8:
- if (likely((values[8] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
+ if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 8); __PYX_ERR(0, 332, __pyx_L3_error)
}
@@ -19432,10 +20352,10 @@ static PyObject *__pyx_fuse_2_2_2__pyx_pw_4silx_4math_16chistogramnd_lut_77_hist
values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
}
- __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[0]); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
- __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int16_t(values[1]); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
- __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2]); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
- __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[3]); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
+ __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
+ __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int16_t(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
+ __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
+ __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[3], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
__pyx_v_i_n_elems = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_i_n_elems == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 336, __pyx_L3_error)
__pyx_v_i_filt_min_weights = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_i_filt_min_weights == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 337, __pyx_L3_error)
__pyx_v_i_weight_min = __Pyx_PyInt_As_npy_int32(values[6]); if (unlikely((__pyx_v_i_weight_min == ((npy_int32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 338, __pyx_L3_error)
@@ -19463,16 +20383,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_76_histogramnd_from_lut
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
- Py_ssize_t __pyx_t_3;
- int __pyx_t_4;
+ int __pyx_t_3;
+ Py_ssize_t __pyx_t_4;
int __pyx_t_5;
- Py_ssize_t __pyx_t_6;
+ int __pyx_t_6;
Py_ssize_t __pyx_t_7;
Py_ssize_t __pyx_t_8;
Py_ssize_t __pyx_t_9;
Py_ssize_t __pyx_t_10;
Py_ssize_t __pyx_t_11;
Py_ssize_t __pyx_t_12;
+ Py_ssize_t __pyx_t_13;
__Pyx_RefNannySetupContext("__pyx_fuse_2_2_2_histogramnd_from_lut_fused", 0);
/* "silx/math/chistogramnd_lut.pyx":341
@@ -19486,6 +20407,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_76_histogramnd_from_lut
#ifdef WITH_THREAD
PyThreadState *_save;
Py_UNBLOCK_THREADS
+ __Pyx_FastGIL_Remember();
#endif
/*try:*/ {
@@ -19497,8 +20419,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_76_histogramnd_from_lut
* if i_filt_min_weights and i_weights[i] < i_weight_min:
*/
__pyx_t_1 = __pyx_v_i_n_elems;
- for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
- __pyx_v_i = __pyx_t_2;
+ __pyx_t_2 = __pyx_t_1;
+ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
+ __pyx_v_i = __pyx_t_3;
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -19507,9 +20430,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_76_histogramnd_from_lut
* if i_filt_min_weights and i_weights[i] < i_weight_min:
* continue
*/
- __pyx_t_3 = __pyx_v_i;
- __pyx_t_4 = (((*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_3 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
- if (__pyx_t_4) {
+ __pyx_t_4 = __pyx_v_i;
+ __pyx_t_5 = (((*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_4 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":344
* for i in range(i_n_elems):
@@ -19518,17 +20441,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_76_histogramnd_from_lut
* continue
* if i_filt_max_weights and i_weights[i] > i_weight_max:
*/
- __pyx_t_5 = (__pyx_v_i_filt_min_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_min_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L10_bool_binop_done;
}
- __pyx_t_6 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_6 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_7 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L10_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":345
* if (i_lut[i] >= 0):
@@ -19555,17 +20478,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_76_histogramnd_from_lut
* continue
* o_histo[i_lut[i]] += 1
*/
- __pyx_t_5 = (__pyx_v_i_filt_max_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_max_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L13_bool_binop_done;
}
- __pyx_t_7 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_8 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_8 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L13_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":347
* continue
@@ -19592,9 +20515,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_76_histogramnd_from_lut
* o_weighted_histo[i_lut[i]] += <cumul_t>i_weights[i] # noqa
*
*/
- __pyx_t_8 = __pyx_v_i;
- __pyx_t_9 = (*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_8 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_9 * __pyx_v_o_histo.strides[0]) )) += 1;
+ __pyx_t_9 = __pyx_v_i;
+ __pyx_t_10 = (*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_9 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_10 * __pyx_v_o_histo.strides[0]) )) += 1;
/* "silx/math/chistogramnd_lut.pyx":349
* continue
@@ -19603,10 +20526,10 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_76_histogramnd_from_lut
*
*
*/
- __pyx_t_10 = __pyx_v_i;
__pyx_t_11 = __pyx_v_i;
- __pyx_t_12 = (*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_11 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_12 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_int32_t)(*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_10 * __pyx_v_i_weights.strides[0]) ))));
+ __pyx_t_12 = __pyx_v_i;
+ __pyx_t_13 = (*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_12 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_13 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_int32_t)(*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_11 * __pyx_v_i_weights.strides[0]) ))));
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -19630,6 +20553,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_76_histogramnd_from_lut
/*finally:*/ {
/*normal exit:*/{
#ifdef WITH_THREAD
+ __Pyx_FastGIL_Forget();
Py_BLOCK_THREADS
#endif
goto __pyx_L5;
@@ -19643,7 +20567,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_76_histogramnd_from_lut
* @cython.cdivision(True)
* def _histogramnd_from_lut_fused(weights_t[:] i_weights, # <<<<<<<<<<<<<<
* lut_t[:] i_lut,
- * np.uint32_t[:] o_histo,
+ * cnumpy.uint32_t[:] o_histo,
*/
/* function exit code */
@@ -19681,59 +20605,76 @@ static PyObject *__pyx_fuse_2_2_3__pyx_pw_4silx_4math_16chistogramnd_lut_79_hist
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
switch (pos_args) {
case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
+ CYTHON_FALLTHROUGH;
case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
+ CYTHON_FALLTHROUGH;
case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
+ CYTHON_FALLTHROUGH;
case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ CYTHON_FALLTHROUGH;
case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
case 0: break;
default: goto __pyx_L5_argtuple_error;
}
kw_args = PyDict_Size(__pyx_kwds);
switch (pos_args) {
case 0:
- if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
case 1:
- if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 1); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 2:
- if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
+ if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 2); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 3:
- if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
+ if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 3); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 4:
- if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
+ if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 4); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 5:
- if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
+ if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 5); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 6:
- if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
+ if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 6); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 7:
- if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
+ if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 7); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 8:
- if (likely((values[8] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
+ if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 8); __PYX_ERR(0, 332, __pyx_L3_error)
}
@@ -19754,10 +20695,10 @@ static PyObject *__pyx_fuse_2_2_3__pyx_pw_4silx_4math_16chistogramnd_lut_79_hist
values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
}
- __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[0]); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
- __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int16_t(values[1]); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
- __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2]); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
- __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[3]); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
+ __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
+ __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int16_t(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
+ __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
+ __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[3], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
__pyx_v_i_n_elems = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_i_n_elems == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 336, __pyx_L3_error)
__pyx_v_i_filt_min_weights = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_i_filt_min_weights == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 337, __pyx_L3_error)
__pyx_v_i_weight_min = __Pyx_PyInt_As_npy_int32(values[6]); if (unlikely((__pyx_v_i_weight_min == ((npy_int32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 338, __pyx_L3_error)
@@ -19785,16 +20726,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_78_histogramnd_from_lut
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
- Py_ssize_t __pyx_t_3;
- int __pyx_t_4;
+ int __pyx_t_3;
+ Py_ssize_t __pyx_t_4;
int __pyx_t_5;
- Py_ssize_t __pyx_t_6;
+ int __pyx_t_6;
Py_ssize_t __pyx_t_7;
Py_ssize_t __pyx_t_8;
Py_ssize_t __pyx_t_9;
Py_ssize_t __pyx_t_10;
Py_ssize_t __pyx_t_11;
Py_ssize_t __pyx_t_12;
+ Py_ssize_t __pyx_t_13;
__Pyx_RefNannySetupContext("__pyx_fuse_2_2_3_histogramnd_from_lut_fused", 0);
/* "silx/math/chistogramnd_lut.pyx":341
@@ -19808,6 +20750,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_78_histogramnd_from_lut
#ifdef WITH_THREAD
PyThreadState *_save;
Py_UNBLOCK_THREADS
+ __Pyx_FastGIL_Remember();
#endif
/*try:*/ {
@@ -19819,8 +20762,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_78_histogramnd_from_lut
* if i_filt_min_weights and i_weights[i] < i_weight_min:
*/
__pyx_t_1 = __pyx_v_i_n_elems;
- for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
- __pyx_v_i = __pyx_t_2;
+ __pyx_t_2 = __pyx_t_1;
+ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
+ __pyx_v_i = __pyx_t_3;
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -19829,9 +20773,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_78_histogramnd_from_lut
* if i_filt_min_weights and i_weights[i] < i_weight_min:
* continue
*/
- __pyx_t_3 = __pyx_v_i;
- __pyx_t_4 = (((*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_3 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
- if (__pyx_t_4) {
+ __pyx_t_4 = __pyx_v_i;
+ __pyx_t_5 = (((*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_4 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":344
* for i in range(i_n_elems):
@@ -19840,17 +20784,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_78_histogramnd_from_lut
* continue
* if i_filt_max_weights and i_weights[i] > i_weight_max:
*/
- __pyx_t_5 = (__pyx_v_i_filt_min_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_min_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L10_bool_binop_done;
}
- __pyx_t_6 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_6 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_7 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L10_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":345
* if (i_lut[i] >= 0):
@@ -19877,17 +20821,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_78_histogramnd_from_lut
* continue
* o_histo[i_lut[i]] += 1
*/
- __pyx_t_5 = (__pyx_v_i_filt_max_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_max_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L13_bool_binop_done;
}
- __pyx_t_7 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_8 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_8 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L13_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":347
* continue
@@ -19914,9 +20858,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_78_histogramnd_from_lut
* o_weighted_histo[i_lut[i]] += <cumul_t>i_weights[i] # noqa
*
*/
- __pyx_t_8 = __pyx_v_i;
- __pyx_t_9 = (*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_8 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_9 * __pyx_v_o_histo.strides[0]) )) += 1;
+ __pyx_t_9 = __pyx_v_i;
+ __pyx_t_10 = (*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_9 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_10 * __pyx_v_o_histo.strides[0]) )) += 1;
/* "silx/math/chistogramnd_lut.pyx":349
* continue
@@ -19925,10 +20869,10 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_78_histogramnd_from_lut
*
*
*/
- __pyx_t_10 = __pyx_v_i;
__pyx_t_11 = __pyx_v_i;
- __pyx_t_12 = (*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_11 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_12 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_int64_t)(*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_10 * __pyx_v_i_weights.strides[0]) ))));
+ __pyx_t_12 = __pyx_v_i;
+ __pyx_t_13 = (*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_12 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_13 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_int64_t)(*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_11 * __pyx_v_i_weights.strides[0]) ))));
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -19952,6 +20896,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_78_histogramnd_from_lut
/*finally:*/ {
/*normal exit:*/{
#ifdef WITH_THREAD
+ __Pyx_FastGIL_Forget();
Py_BLOCK_THREADS
#endif
goto __pyx_L5;
@@ -19965,7 +20910,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_78_histogramnd_from_lut
* @cython.cdivision(True)
* def _histogramnd_from_lut_fused(weights_t[:] i_weights, # <<<<<<<<<<<<<<
* lut_t[:] i_lut,
- * np.uint32_t[:] o_histo,
+ * cnumpy.uint32_t[:] o_histo,
*/
/* function exit code */
@@ -20003,59 +20948,76 @@ static PyObject *__pyx_fuse_3_0_0__pyx_pw_4silx_4math_16chistogramnd_lut_81_hist
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
switch (pos_args) {
case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
+ CYTHON_FALLTHROUGH;
case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
+ CYTHON_FALLTHROUGH;
case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
+ CYTHON_FALLTHROUGH;
case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ CYTHON_FALLTHROUGH;
case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
case 0: break;
default: goto __pyx_L5_argtuple_error;
}
kw_args = PyDict_Size(__pyx_kwds);
switch (pos_args) {
case 0:
- if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
case 1:
- if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 1); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 2:
- if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
+ if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 2); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 3:
- if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
+ if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 3); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 4:
- if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
+ if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 4); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 5:
- if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
+ if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 5); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 6:
- if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
+ if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 6); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 7:
- if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
+ if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 7); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 8:
- if (likely((values[8] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
+ if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 8); __PYX_ERR(0, 332, __pyx_L3_error)
}
@@ -20076,10 +21038,10 @@ static PyObject *__pyx_fuse_3_0_0__pyx_pw_4silx_4math_16chistogramnd_lut_81_hist
values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
}
- __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[0]); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
- __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[1]); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
- __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2]); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
- __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float64_t(values[3]); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
+ __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
+ __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
+ __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
+ __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float64_t(values[3], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
__pyx_v_i_n_elems = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_i_n_elems == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 336, __pyx_L3_error)
__pyx_v_i_filt_min_weights = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_i_filt_min_weights == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 337, __pyx_L3_error)
__pyx_v_i_weight_min = __Pyx_PyInt_As_npy_int64(values[6]); if (unlikely((__pyx_v_i_weight_min == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 338, __pyx_L3_error)
@@ -20107,16 +21069,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_80_histogramnd_from_lut
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
- Py_ssize_t __pyx_t_3;
- int __pyx_t_4;
+ int __pyx_t_3;
+ Py_ssize_t __pyx_t_4;
int __pyx_t_5;
- Py_ssize_t __pyx_t_6;
+ int __pyx_t_6;
Py_ssize_t __pyx_t_7;
Py_ssize_t __pyx_t_8;
- __pyx_t_5numpy_int64_t __pyx_t_9;
- Py_ssize_t __pyx_t_10;
+ Py_ssize_t __pyx_t_9;
+ __pyx_t_5numpy_int64_t __pyx_t_10;
Py_ssize_t __pyx_t_11;
- __pyx_t_5numpy_int64_t __pyx_t_12;
+ Py_ssize_t __pyx_t_12;
+ __pyx_t_5numpy_int64_t __pyx_t_13;
__Pyx_RefNannySetupContext("__pyx_fuse_3_0_0_histogramnd_from_lut_fused", 0);
/* "silx/math/chistogramnd_lut.pyx":341
@@ -20130,6 +21093,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_80_histogramnd_from_lut
#ifdef WITH_THREAD
PyThreadState *_save;
Py_UNBLOCK_THREADS
+ __Pyx_FastGIL_Remember();
#endif
/*try:*/ {
@@ -20141,8 +21105,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_80_histogramnd_from_lut
* if i_filt_min_weights and i_weights[i] < i_weight_min:
*/
__pyx_t_1 = __pyx_v_i_n_elems;
- for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
- __pyx_v_i = __pyx_t_2;
+ __pyx_t_2 = __pyx_t_1;
+ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
+ __pyx_v_i = __pyx_t_3;
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -20151,9 +21116,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_80_histogramnd_from_lut
* if i_filt_min_weights and i_weights[i] < i_weight_min:
* continue
*/
- __pyx_t_3 = __pyx_v_i;
- __pyx_t_4 = (((*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_3 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
- if (__pyx_t_4) {
+ __pyx_t_4 = __pyx_v_i;
+ __pyx_t_5 = (((*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_4 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":344
* for i in range(i_n_elems):
@@ -20162,17 +21127,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_80_histogramnd_from_lut
* continue
* if i_filt_max_weights and i_weights[i] > i_weight_max:
*/
- __pyx_t_5 = (__pyx_v_i_filt_min_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_min_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L10_bool_binop_done;
}
- __pyx_t_6 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_6 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_7 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L10_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":345
* if (i_lut[i] >= 0):
@@ -20199,17 +21164,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_80_histogramnd_from_lut
* continue
* o_histo[i_lut[i]] += 1
*/
- __pyx_t_5 = (__pyx_v_i_filt_max_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_max_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L13_bool_binop_done;
}
- __pyx_t_7 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_8 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_8 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L13_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":347
* continue
@@ -20236,9 +21201,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_80_histogramnd_from_lut
* o_weighted_histo[i_lut[i]] += <cumul_t>i_weights[i] # noqa
*
*/
- __pyx_t_8 = __pyx_v_i;
- __pyx_t_9 = (*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_8 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_9 * __pyx_v_o_histo.strides[0]) )) += 1;
+ __pyx_t_9 = __pyx_v_i;
+ __pyx_t_10 = (*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_9 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_10 * __pyx_v_o_histo.strides[0]) )) += 1;
/* "silx/math/chistogramnd_lut.pyx":349
* continue
@@ -20247,10 +21212,10 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_80_histogramnd_from_lut
*
*
*/
- __pyx_t_10 = __pyx_v_i;
__pyx_t_11 = __pyx_v_i;
- __pyx_t_12 = (*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_11 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_12 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_float64_t)(*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_10 * __pyx_v_i_weights.strides[0]) ))));
+ __pyx_t_12 = __pyx_v_i;
+ __pyx_t_13 = (*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_12 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_13 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_float64_t)(*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_11 * __pyx_v_i_weights.strides[0]) ))));
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -20274,6 +21239,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_80_histogramnd_from_lut
/*finally:*/ {
/*normal exit:*/{
#ifdef WITH_THREAD
+ __Pyx_FastGIL_Forget();
Py_BLOCK_THREADS
#endif
goto __pyx_L5;
@@ -20287,7 +21253,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_80_histogramnd_from_lut
* @cython.cdivision(True)
* def _histogramnd_from_lut_fused(weights_t[:] i_weights, # <<<<<<<<<<<<<<
* lut_t[:] i_lut,
- * np.uint32_t[:] o_histo,
+ * cnumpy.uint32_t[:] o_histo,
*/
/* function exit code */
@@ -20325,59 +21291,76 @@ static PyObject *__pyx_fuse_3_0_1__pyx_pw_4silx_4math_16chistogramnd_lut_83_hist
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
switch (pos_args) {
case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
+ CYTHON_FALLTHROUGH;
case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
+ CYTHON_FALLTHROUGH;
case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
+ CYTHON_FALLTHROUGH;
case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ CYTHON_FALLTHROUGH;
case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
case 0: break;
default: goto __pyx_L5_argtuple_error;
}
kw_args = PyDict_Size(__pyx_kwds);
switch (pos_args) {
case 0:
- if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
case 1:
- if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 1); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 2:
- if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
+ if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 2); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 3:
- if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
+ if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 3); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 4:
- if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
+ if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 4); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 5:
- if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
+ if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 5); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 6:
- if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
+ if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 6); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 7:
- if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
+ if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 7); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 8:
- if (likely((values[8] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
+ if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 8); __PYX_ERR(0, 332, __pyx_L3_error)
}
@@ -20398,10 +21381,10 @@ static PyObject *__pyx_fuse_3_0_1__pyx_pw_4silx_4math_16chistogramnd_lut_83_hist
values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
}
- __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[0]); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
- __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[1]); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
- __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2]); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
- __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float32_t(values[3]); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
+ __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
+ __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
+ __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
+ __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float32_t(values[3], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
__pyx_v_i_n_elems = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_i_n_elems == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 336, __pyx_L3_error)
__pyx_v_i_filt_min_weights = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_i_filt_min_weights == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 337, __pyx_L3_error)
__pyx_v_i_weight_min = __Pyx_PyInt_As_npy_int64(values[6]); if (unlikely((__pyx_v_i_weight_min == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 338, __pyx_L3_error)
@@ -20429,16 +21412,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_82_histogramnd_from_lut
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
- Py_ssize_t __pyx_t_3;
- int __pyx_t_4;
+ int __pyx_t_3;
+ Py_ssize_t __pyx_t_4;
int __pyx_t_5;
- Py_ssize_t __pyx_t_6;
+ int __pyx_t_6;
Py_ssize_t __pyx_t_7;
Py_ssize_t __pyx_t_8;
- __pyx_t_5numpy_int64_t __pyx_t_9;
- Py_ssize_t __pyx_t_10;
+ Py_ssize_t __pyx_t_9;
+ __pyx_t_5numpy_int64_t __pyx_t_10;
Py_ssize_t __pyx_t_11;
- __pyx_t_5numpy_int64_t __pyx_t_12;
+ Py_ssize_t __pyx_t_12;
+ __pyx_t_5numpy_int64_t __pyx_t_13;
__Pyx_RefNannySetupContext("__pyx_fuse_3_0_1_histogramnd_from_lut_fused", 0);
/* "silx/math/chistogramnd_lut.pyx":341
@@ -20452,6 +21436,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_82_histogramnd_from_lut
#ifdef WITH_THREAD
PyThreadState *_save;
Py_UNBLOCK_THREADS
+ __Pyx_FastGIL_Remember();
#endif
/*try:*/ {
@@ -20463,8 +21448,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_82_histogramnd_from_lut
* if i_filt_min_weights and i_weights[i] < i_weight_min:
*/
__pyx_t_1 = __pyx_v_i_n_elems;
- for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
- __pyx_v_i = __pyx_t_2;
+ __pyx_t_2 = __pyx_t_1;
+ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
+ __pyx_v_i = __pyx_t_3;
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -20473,9 +21459,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_82_histogramnd_from_lut
* if i_filt_min_weights and i_weights[i] < i_weight_min:
* continue
*/
- __pyx_t_3 = __pyx_v_i;
- __pyx_t_4 = (((*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_3 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
- if (__pyx_t_4) {
+ __pyx_t_4 = __pyx_v_i;
+ __pyx_t_5 = (((*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_4 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":344
* for i in range(i_n_elems):
@@ -20484,17 +21470,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_82_histogramnd_from_lut
* continue
* if i_filt_max_weights and i_weights[i] > i_weight_max:
*/
- __pyx_t_5 = (__pyx_v_i_filt_min_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_min_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L10_bool_binop_done;
}
- __pyx_t_6 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_6 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_7 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L10_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":345
* if (i_lut[i] >= 0):
@@ -20521,17 +21507,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_82_histogramnd_from_lut
* continue
* o_histo[i_lut[i]] += 1
*/
- __pyx_t_5 = (__pyx_v_i_filt_max_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_max_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L13_bool_binop_done;
}
- __pyx_t_7 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_8 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_8 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L13_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":347
* continue
@@ -20558,9 +21544,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_82_histogramnd_from_lut
* o_weighted_histo[i_lut[i]] += <cumul_t>i_weights[i] # noqa
*
*/
- __pyx_t_8 = __pyx_v_i;
- __pyx_t_9 = (*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_8 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_9 * __pyx_v_o_histo.strides[0]) )) += 1;
+ __pyx_t_9 = __pyx_v_i;
+ __pyx_t_10 = (*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_9 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_10 * __pyx_v_o_histo.strides[0]) )) += 1;
/* "silx/math/chistogramnd_lut.pyx":349
* continue
@@ -20569,10 +21555,10 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_82_histogramnd_from_lut
*
*
*/
- __pyx_t_10 = __pyx_v_i;
__pyx_t_11 = __pyx_v_i;
- __pyx_t_12 = (*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_11 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_12 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_float32_t)(*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_10 * __pyx_v_i_weights.strides[0]) ))));
+ __pyx_t_12 = __pyx_v_i;
+ __pyx_t_13 = (*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_12 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_13 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_float32_t)(*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_11 * __pyx_v_i_weights.strides[0]) ))));
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -20596,6 +21582,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_82_histogramnd_from_lut
/*finally:*/ {
/*normal exit:*/{
#ifdef WITH_THREAD
+ __Pyx_FastGIL_Forget();
Py_BLOCK_THREADS
#endif
goto __pyx_L5;
@@ -20609,7 +21596,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_82_histogramnd_from_lut
* @cython.cdivision(True)
* def _histogramnd_from_lut_fused(weights_t[:] i_weights, # <<<<<<<<<<<<<<
* lut_t[:] i_lut,
- * np.uint32_t[:] o_histo,
+ * cnumpy.uint32_t[:] o_histo,
*/
/* function exit code */
@@ -20647,59 +21634,76 @@ static PyObject *__pyx_fuse_3_0_2__pyx_pw_4silx_4math_16chistogramnd_lut_85_hist
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
switch (pos_args) {
case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
+ CYTHON_FALLTHROUGH;
case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
+ CYTHON_FALLTHROUGH;
case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
+ CYTHON_FALLTHROUGH;
case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ CYTHON_FALLTHROUGH;
case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
case 0: break;
default: goto __pyx_L5_argtuple_error;
}
kw_args = PyDict_Size(__pyx_kwds);
switch (pos_args) {
case 0:
- if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
case 1:
- if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 1); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 2:
- if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
+ if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 2); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 3:
- if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
+ if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 3); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 4:
- if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
+ if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 4); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 5:
- if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
+ if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 5); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 6:
- if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
+ if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 6); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 7:
- if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
+ if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 7); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 8:
- if (likely((values[8] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
+ if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 8); __PYX_ERR(0, 332, __pyx_L3_error)
}
@@ -20720,10 +21724,10 @@ static PyObject *__pyx_fuse_3_0_2__pyx_pw_4silx_4math_16chistogramnd_lut_85_hist
values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
}
- __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[0]); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
- __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[1]); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
- __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2]); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
- __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[3]); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
+ __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
+ __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
+ __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
+ __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[3], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
__pyx_v_i_n_elems = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_i_n_elems == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 336, __pyx_L3_error)
__pyx_v_i_filt_min_weights = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_i_filt_min_weights == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 337, __pyx_L3_error)
__pyx_v_i_weight_min = __Pyx_PyInt_As_npy_int64(values[6]); if (unlikely((__pyx_v_i_weight_min == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 338, __pyx_L3_error)
@@ -20751,16 +21755,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_84_histogramnd_from_lut
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
- Py_ssize_t __pyx_t_3;
- int __pyx_t_4;
+ int __pyx_t_3;
+ Py_ssize_t __pyx_t_4;
int __pyx_t_5;
- Py_ssize_t __pyx_t_6;
+ int __pyx_t_6;
Py_ssize_t __pyx_t_7;
Py_ssize_t __pyx_t_8;
- __pyx_t_5numpy_int64_t __pyx_t_9;
- Py_ssize_t __pyx_t_10;
+ Py_ssize_t __pyx_t_9;
+ __pyx_t_5numpy_int64_t __pyx_t_10;
Py_ssize_t __pyx_t_11;
- __pyx_t_5numpy_int64_t __pyx_t_12;
+ Py_ssize_t __pyx_t_12;
+ __pyx_t_5numpy_int64_t __pyx_t_13;
__Pyx_RefNannySetupContext("__pyx_fuse_3_0_2_histogramnd_from_lut_fused", 0);
/* "silx/math/chistogramnd_lut.pyx":341
@@ -20774,6 +21779,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_84_histogramnd_from_lut
#ifdef WITH_THREAD
PyThreadState *_save;
Py_UNBLOCK_THREADS
+ __Pyx_FastGIL_Remember();
#endif
/*try:*/ {
@@ -20785,8 +21791,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_84_histogramnd_from_lut
* if i_filt_min_weights and i_weights[i] < i_weight_min:
*/
__pyx_t_1 = __pyx_v_i_n_elems;
- for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
- __pyx_v_i = __pyx_t_2;
+ __pyx_t_2 = __pyx_t_1;
+ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
+ __pyx_v_i = __pyx_t_3;
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -20795,9 +21802,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_84_histogramnd_from_lut
* if i_filt_min_weights and i_weights[i] < i_weight_min:
* continue
*/
- __pyx_t_3 = __pyx_v_i;
- __pyx_t_4 = (((*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_3 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
- if (__pyx_t_4) {
+ __pyx_t_4 = __pyx_v_i;
+ __pyx_t_5 = (((*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_4 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":344
* for i in range(i_n_elems):
@@ -20806,17 +21813,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_84_histogramnd_from_lut
* continue
* if i_filt_max_weights and i_weights[i] > i_weight_max:
*/
- __pyx_t_5 = (__pyx_v_i_filt_min_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_min_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L10_bool_binop_done;
}
- __pyx_t_6 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_6 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_7 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L10_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":345
* if (i_lut[i] >= 0):
@@ -20843,17 +21850,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_84_histogramnd_from_lut
* continue
* o_histo[i_lut[i]] += 1
*/
- __pyx_t_5 = (__pyx_v_i_filt_max_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_max_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L13_bool_binop_done;
}
- __pyx_t_7 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_8 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_8 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L13_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":347
* continue
@@ -20880,9 +21887,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_84_histogramnd_from_lut
* o_weighted_histo[i_lut[i]] += <cumul_t>i_weights[i] # noqa
*
*/
- __pyx_t_8 = __pyx_v_i;
- __pyx_t_9 = (*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_8 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_9 * __pyx_v_o_histo.strides[0]) )) += 1;
+ __pyx_t_9 = __pyx_v_i;
+ __pyx_t_10 = (*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_9 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_10 * __pyx_v_o_histo.strides[0]) )) += 1;
/* "silx/math/chistogramnd_lut.pyx":349
* continue
@@ -20891,10 +21898,10 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_84_histogramnd_from_lut
*
*
*/
- __pyx_t_10 = __pyx_v_i;
__pyx_t_11 = __pyx_v_i;
- __pyx_t_12 = (*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_11 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_12 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_int32_t)(*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_10 * __pyx_v_i_weights.strides[0]) ))));
+ __pyx_t_12 = __pyx_v_i;
+ __pyx_t_13 = (*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_12 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_13 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_int32_t)(*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_11 * __pyx_v_i_weights.strides[0]) ))));
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -20918,6 +21925,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_84_histogramnd_from_lut
/*finally:*/ {
/*normal exit:*/{
#ifdef WITH_THREAD
+ __Pyx_FastGIL_Forget();
Py_BLOCK_THREADS
#endif
goto __pyx_L5;
@@ -20931,7 +21939,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_84_histogramnd_from_lut
* @cython.cdivision(True)
* def _histogramnd_from_lut_fused(weights_t[:] i_weights, # <<<<<<<<<<<<<<
* lut_t[:] i_lut,
- * np.uint32_t[:] o_histo,
+ * cnumpy.uint32_t[:] o_histo,
*/
/* function exit code */
@@ -20969,59 +21977,76 @@ static PyObject *__pyx_fuse_3_0_3__pyx_pw_4silx_4math_16chistogramnd_lut_87_hist
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
switch (pos_args) {
case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
+ CYTHON_FALLTHROUGH;
case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
+ CYTHON_FALLTHROUGH;
case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
+ CYTHON_FALLTHROUGH;
case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ CYTHON_FALLTHROUGH;
case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
case 0: break;
default: goto __pyx_L5_argtuple_error;
}
kw_args = PyDict_Size(__pyx_kwds);
switch (pos_args) {
case 0:
- if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
case 1:
- if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 1); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 2:
- if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
+ if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 2); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 3:
- if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
+ if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 3); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 4:
- if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
+ if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 4); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 5:
- if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
+ if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 5); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 6:
- if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
+ if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 6); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 7:
- if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
+ if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 7); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 8:
- if (likely((values[8] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
+ if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 8); __PYX_ERR(0, 332, __pyx_L3_error)
}
@@ -21042,10 +22067,10 @@ static PyObject *__pyx_fuse_3_0_3__pyx_pw_4silx_4math_16chistogramnd_lut_87_hist
values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
}
- __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[0]); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
- __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[1]); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
- __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2]); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
- __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[3]); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
+ __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
+ __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
+ __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
+ __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[3], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
__pyx_v_i_n_elems = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_i_n_elems == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 336, __pyx_L3_error)
__pyx_v_i_filt_min_weights = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_i_filt_min_weights == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 337, __pyx_L3_error)
__pyx_v_i_weight_min = __Pyx_PyInt_As_npy_int64(values[6]); if (unlikely((__pyx_v_i_weight_min == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 338, __pyx_L3_error)
@@ -21073,16 +22098,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_86_histogramnd_from_lut
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
- Py_ssize_t __pyx_t_3;
- int __pyx_t_4;
+ int __pyx_t_3;
+ Py_ssize_t __pyx_t_4;
int __pyx_t_5;
- Py_ssize_t __pyx_t_6;
+ int __pyx_t_6;
Py_ssize_t __pyx_t_7;
Py_ssize_t __pyx_t_8;
- __pyx_t_5numpy_int64_t __pyx_t_9;
- Py_ssize_t __pyx_t_10;
+ Py_ssize_t __pyx_t_9;
+ __pyx_t_5numpy_int64_t __pyx_t_10;
Py_ssize_t __pyx_t_11;
- __pyx_t_5numpy_int64_t __pyx_t_12;
+ Py_ssize_t __pyx_t_12;
+ __pyx_t_5numpy_int64_t __pyx_t_13;
__Pyx_RefNannySetupContext("__pyx_fuse_3_0_3_histogramnd_from_lut_fused", 0);
/* "silx/math/chistogramnd_lut.pyx":341
@@ -21096,6 +22122,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_86_histogramnd_from_lut
#ifdef WITH_THREAD
PyThreadState *_save;
Py_UNBLOCK_THREADS
+ __Pyx_FastGIL_Remember();
#endif
/*try:*/ {
@@ -21107,8 +22134,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_86_histogramnd_from_lut
* if i_filt_min_weights and i_weights[i] < i_weight_min:
*/
__pyx_t_1 = __pyx_v_i_n_elems;
- for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
- __pyx_v_i = __pyx_t_2;
+ __pyx_t_2 = __pyx_t_1;
+ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
+ __pyx_v_i = __pyx_t_3;
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -21117,9 +22145,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_86_histogramnd_from_lut
* if i_filt_min_weights and i_weights[i] < i_weight_min:
* continue
*/
- __pyx_t_3 = __pyx_v_i;
- __pyx_t_4 = (((*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_3 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
- if (__pyx_t_4) {
+ __pyx_t_4 = __pyx_v_i;
+ __pyx_t_5 = (((*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_4 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":344
* for i in range(i_n_elems):
@@ -21128,17 +22156,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_86_histogramnd_from_lut
* continue
* if i_filt_max_weights and i_weights[i] > i_weight_max:
*/
- __pyx_t_5 = (__pyx_v_i_filt_min_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_min_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L10_bool_binop_done;
}
- __pyx_t_6 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_6 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_7 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L10_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":345
* if (i_lut[i] >= 0):
@@ -21165,17 +22193,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_86_histogramnd_from_lut
* continue
* o_histo[i_lut[i]] += 1
*/
- __pyx_t_5 = (__pyx_v_i_filt_max_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_max_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L13_bool_binop_done;
}
- __pyx_t_7 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_8 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_8 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L13_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":347
* continue
@@ -21202,9 +22230,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_86_histogramnd_from_lut
* o_weighted_histo[i_lut[i]] += <cumul_t>i_weights[i] # noqa
*
*/
- __pyx_t_8 = __pyx_v_i;
- __pyx_t_9 = (*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_8 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_9 * __pyx_v_o_histo.strides[0]) )) += 1;
+ __pyx_t_9 = __pyx_v_i;
+ __pyx_t_10 = (*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_9 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_10 * __pyx_v_o_histo.strides[0]) )) += 1;
/* "silx/math/chistogramnd_lut.pyx":349
* continue
@@ -21213,10 +22241,10 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_86_histogramnd_from_lut
*
*
*/
- __pyx_t_10 = __pyx_v_i;
__pyx_t_11 = __pyx_v_i;
- __pyx_t_12 = (*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_11 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_12 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_int64_t)(*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_10 * __pyx_v_i_weights.strides[0]) ))));
+ __pyx_t_12 = __pyx_v_i;
+ __pyx_t_13 = (*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_12 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_13 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_int64_t)(*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_11 * __pyx_v_i_weights.strides[0]) ))));
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -21240,6 +22268,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_86_histogramnd_from_lut
/*finally:*/ {
/*normal exit:*/{
#ifdef WITH_THREAD
+ __Pyx_FastGIL_Forget();
Py_BLOCK_THREADS
#endif
goto __pyx_L5;
@@ -21253,7 +22282,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_86_histogramnd_from_lut
* @cython.cdivision(True)
* def _histogramnd_from_lut_fused(weights_t[:] i_weights, # <<<<<<<<<<<<<<
* lut_t[:] i_lut,
- * np.uint32_t[:] o_histo,
+ * cnumpy.uint32_t[:] o_histo,
*/
/* function exit code */
@@ -21291,59 +22320,76 @@ static PyObject *__pyx_fuse_3_1_0__pyx_pw_4silx_4math_16chistogramnd_lut_89_hist
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
switch (pos_args) {
case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
+ CYTHON_FALLTHROUGH;
case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
+ CYTHON_FALLTHROUGH;
case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
+ CYTHON_FALLTHROUGH;
case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ CYTHON_FALLTHROUGH;
case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
case 0: break;
default: goto __pyx_L5_argtuple_error;
}
kw_args = PyDict_Size(__pyx_kwds);
switch (pos_args) {
case 0:
- if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
case 1:
- if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 1); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 2:
- if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
+ if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 2); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 3:
- if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
+ if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 3); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 4:
- if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
+ if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 4); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 5:
- if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
+ if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 5); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 6:
- if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
+ if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 6); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 7:
- if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
+ if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 7); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 8:
- if (likely((values[8] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
+ if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 8); __PYX_ERR(0, 332, __pyx_L3_error)
}
@@ -21364,10 +22410,10 @@ static PyObject *__pyx_fuse_3_1_0__pyx_pw_4silx_4math_16chistogramnd_lut_89_hist
values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
}
- __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[0]); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
- __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[1]); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
- __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2]); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
- __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float64_t(values[3]); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
+ __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
+ __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
+ __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
+ __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float64_t(values[3], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
__pyx_v_i_n_elems = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_i_n_elems == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 336, __pyx_L3_error)
__pyx_v_i_filt_min_weights = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_i_filt_min_weights == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 337, __pyx_L3_error)
__pyx_v_i_weight_min = __Pyx_PyInt_As_npy_int64(values[6]); if (unlikely((__pyx_v_i_weight_min == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 338, __pyx_L3_error)
@@ -21395,16 +22441,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_88_histogramnd_from_lut
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
- Py_ssize_t __pyx_t_3;
- int __pyx_t_4;
+ int __pyx_t_3;
+ Py_ssize_t __pyx_t_4;
int __pyx_t_5;
- Py_ssize_t __pyx_t_6;
+ int __pyx_t_6;
Py_ssize_t __pyx_t_7;
Py_ssize_t __pyx_t_8;
Py_ssize_t __pyx_t_9;
Py_ssize_t __pyx_t_10;
Py_ssize_t __pyx_t_11;
Py_ssize_t __pyx_t_12;
+ Py_ssize_t __pyx_t_13;
__Pyx_RefNannySetupContext("__pyx_fuse_3_1_0_histogramnd_from_lut_fused", 0);
/* "silx/math/chistogramnd_lut.pyx":341
@@ -21418,6 +22465,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_88_histogramnd_from_lut
#ifdef WITH_THREAD
PyThreadState *_save;
Py_UNBLOCK_THREADS
+ __Pyx_FastGIL_Remember();
#endif
/*try:*/ {
@@ -21429,8 +22477,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_88_histogramnd_from_lut
* if i_filt_min_weights and i_weights[i] < i_weight_min:
*/
__pyx_t_1 = __pyx_v_i_n_elems;
- for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
- __pyx_v_i = __pyx_t_2;
+ __pyx_t_2 = __pyx_t_1;
+ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
+ __pyx_v_i = __pyx_t_3;
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -21439,9 +22488,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_88_histogramnd_from_lut
* if i_filt_min_weights and i_weights[i] < i_weight_min:
* continue
*/
- __pyx_t_3 = __pyx_v_i;
- __pyx_t_4 = (((*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_3 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
- if (__pyx_t_4) {
+ __pyx_t_4 = __pyx_v_i;
+ __pyx_t_5 = (((*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_4 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":344
* for i in range(i_n_elems):
@@ -21450,17 +22499,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_88_histogramnd_from_lut
* continue
* if i_filt_max_weights and i_weights[i] > i_weight_max:
*/
- __pyx_t_5 = (__pyx_v_i_filt_min_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_min_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L10_bool_binop_done;
}
- __pyx_t_6 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_6 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_7 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L10_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":345
* if (i_lut[i] >= 0):
@@ -21487,17 +22536,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_88_histogramnd_from_lut
* continue
* o_histo[i_lut[i]] += 1
*/
- __pyx_t_5 = (__pyx_v_i_filt_max_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_max_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L13_bool_binop_done;
}
- __pyx_t_7 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_8 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_8 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L13_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":347
* continue
@@ -21524,9 +22573,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_88_histogramnd_from_lut
* o_weighted_histo[i_lut[i]] += <cumul_t>i_weights[i] # noqa
*
*/
- __pyx_t_8 = __pyx_v_i;
- __pyx_t_9 = (*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_8 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_9 * __pyx_v_o_histo.strides[0]) )) += 1;
+ __pyx_t_9 = __pyx_v_i;
+ __pyx_t_10 = (*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_9 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_10 * __pyx_v_o_histo.strides[0]) )) += 1;
/* "silx/math/chistogramnd_lut.pyx":349
* continue
@@ -21535,10 +22584,10 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_88_histogramnd_from_lut
*
*
*/
- __pyx_t_10 = __pyx_v_i;
__pyx_t_11 = __pyx_v_i;
- __pyx_t_12 = (*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_11 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_12 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_float64_t)(*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_10 * __pyx_v_i_weights.strides[0]) ))));
+ __pyx_t_12 = __pyx_v_i;
+ __pyx_t_13 = (*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_12 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_13 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_float64_t)(*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_11 * __pyx_v_i_weights.strides[0]) ))));
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -21562,6 +22611,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_88_histogramnd_from_lut
/*finally:*/ {
/*normal exit:*/{
#ifdef WITH_THREAD
+ __Pyx_FastGIL_Forget();
Py_BLOCK_THREADS
#endif
goto __pyx_L5;
@@ -21575,7 +22625,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_88_histogramnd_from_lut
* @cython.cdivision(True)
* def _histogramnd_from_lut_fused(weights_t[:] i_weights, # <<<<<<<<<<<<<<
* lut_t[:] i_lut,
- * np.uint32_t[:] o_histo,
+ * cnumpy.uint32_t[:] o_histo,
*/
/* function exit code */
@@ -21613,59 +22663,76 @@ static PyObject *__pyx_fuse_3_1_1__pyx_pw_4silx_4math_16chistogramnd_lut_91_hist
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
switch (pos_args) {
case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
+ CYTHON_FALLTHROUGH;
case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
+ CYTHON_FALLTHROUGH;
case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
+ CYTHON_FALLTHROUGH;
case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ CYTHON_FALLTHROUGH;
case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
case 0: break;
default: goto __pyx_L5_argtuple_error;
}
kw_args = PyDict_Size(__pyx_kwds);
switch (pos_args) {
case 0:
- if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
case 1:
- if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 1); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 2:
- if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
+ if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 2); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 3:
- if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
+ if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 3); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 4:
- if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
+ if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 4); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 5:
- if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
+ if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 5); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 6:
- if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
+ if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 6); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 7:
- if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
+ if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 7); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 8:
- if (likely((values[8] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
+ if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 8); __PYX_ERR(0, 332, __pyx_L3_error)
}
@@ -21686,10 +22753,10 @@ static PyObject *__pyx_fuse_3_1_1__pyx_pw_4silx_4math_16chistogramnd_lut_91_hist
values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
}
- __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[0]); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
- __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[1]); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
- __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2]); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
- __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float32_t(values[3]); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
+ __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
+ __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
+ __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
+ __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float32_t(values[3], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
__pyx_v_i_n_elems = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_i_n_elems == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 336, __pyx_L3_error)
__pyx_v_i_filt_min_weights = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_i_filt_min_weights == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 337, __pyx_L3_error)
__pyx_v_i_weight_min = __Pyx_PyInt_As_npy_int64(values[6]); if (unlikely((__pyx_v_i_weight_min == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 338, __pyx_L3_error)
@@ -21717,16 +22784,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_90_histogramnd_from_lut
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
- Py_ssize_t __pyx_t_3;
- int __pyx_t_4;
+ int __pyx_t_3;
+ Py_ssize_t __pyx_t_4;
int __pyx_t_5;
- Py_ssize_t __pyx_t_6;
+ int __pyx_t_6;
Py_ssize_t __pyx_t_7;
Py_ssize_t __pyx_t_8;
Py_ssize_t __pyx_t_9;
Py_ssize_t __pyx_t_10;
Py_ssize_t __pyx_t_11;
Py_ssize_t __pyx_t_12;
+ Py_ssize_t __pyx_t_13;
__Pyx_RefNannySetupContext("__pyx_fuse_3_1_1_histogramnd_from_lut_fused", 0);
/* "silx/math/chistogramnd_lut.pyx":341
@@ -21740,6 +22808,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_90_histogramnd_from_lut
#ifdef WITH_THREAD
PyThreadState *_save;
Py_UNBLOCK_THREADS
+ __Pyx_FastGIL_Remember();
#endif
/*try:*/ {
@@ -21751,8 +22820,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_90_histogramnd_from_lut
* if i_filt_min_weights and i_weights[i] < i_weight_min:
*/
__pyx_t_1 = __pyx_v_i_n_elems;
- for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
- __pyx_v_i = __pyx_t_2;
+ __pyx_t_2 = __pyx_t_1;
+ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
+ __pyx_v_i = __pyx_t_3;
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -21761,9 +22831,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_90_histogramnd_from_lut
* if i_filt_min_weights and i_weights[i] < i_weight_min:
* continue
*/
- __pyx_t_3 = __pyx_v_i;
- __pyx_t_4 = (((*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_3 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
- if (__pyx_t_4) {
+ __pyx_t_4 = __pyx_v_i;
+ __pyx_t_5 = (((*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_4 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":344
* for i in range(i_n_elems):
@@ -21772,17 +22842,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_90_histogramnd_from_lut
* continue
* if i_filt_max_weights and i_weights[i] > i_weight_max:
*/
- __pyx_t_5 = (__pyx_v_i_filt_min_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_min_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L10_bool_binop_done;
}
- __pyx_t_6 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_6 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_7 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L10_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":345
* if (i_lut[i] >= 0):
@@ -21809,17 +22879,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_90_histogramnd_from_lut
* continue
* o_histo[i_lut[i]] += 1
*/
- __pyx_t_5 = (__pyx_v_i_filt_max_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_max_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L13_bool_binop_done;
}
- __pyx_t_7 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_8 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_8 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L13_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":347
* continue
@@ -21846,9 +22916,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_90_histogramnd_from_lut
* o_weighted_histo[i_lut[i]] += <cumul_t>i_weights[i] # noqa
*
*/
- __pyx_t_8 = __pyx_v_i;
- __pyx_t_9 = (*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_8 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_9 * __pyx_v_o_histo.strides[0]) )) += 1;
+ __pyx_t_9 = __pyx_v_i;
+ __pyx_t_10 = (*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_9 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_10 * __pyx_v_o_histo.strides[0]) )) += 1;
/* "silx/math/chistogramnd_lut.pyx":349
* continue
@@ -21857,10 +22927,10 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_90_histogramnd_from_lut
*
*
*/
- __pyx_t_10 = __pyx_v_i;
__pyx_t_11 = __pyx_v_i;
- __pyx_t_12 = (*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_11 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_12 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_float32_t)(*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_10 * __pyx_v_i_weights.strides[0]) ))));
+ __pyx_t_12 = __pyx_v_i;
+ __pyx_t_13 = (*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_12 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_13 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_float32_t)(*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_11 * __pyx_v_i_weights.strides[0]) ))));
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -21884,6 +22954,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_90_histogramnd_from_lut
/*finally:*/ {
/*normal exit:*/{
#ifdef WITH_THREAD
+ __Pyx_FastGIL_Forget();
Py_BLOCK_THREADS
#endif
goto __pyx_L5;
@@ -21897,7 +22968,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_90_histogramnd_from_lut
* @cython.cdivision(True)
* def _histogramnd_from_lut_fused(weights_t[:] i_weights, # <<<<<<<<<<<<<<
* lut_t[:] i_lut,
- * np.uint32_t[:] o_histo,
+ * cnumpy.uint32_t[:] o_histo,
*/
/* function exit code */
@@ -21935,59 +23006,76 @@ static PyObject *__pyx_fuse_3_1_2__pyx_pw_4silx_4math_16chistogramnd_lut_93_hist
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
switch (pos_args) {
case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
+ CYTHON_FALLTHROUGH;
case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
+ CYTHON_FALLTHROUGH;
case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
+ CYTHON_FALLTHROUGH;
case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ CYTHON_FALLTHROUGH;
case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
case 0: break;
default: goto __pyx_L5_argtuple_error;
}
kw_args = PyDict_Size(__pyx_kwds);
switch (pos_args) {
case 0:
- if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
case 1:
- if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 1); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 2:
- if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
+ if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 2); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 3:
- if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
+ if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 3); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 4:
- if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
+ if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 4); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 5:
- if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
+ if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 5); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 6:
- if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
+ if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 6); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 7:
- if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
+ if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 7); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 8:
- if (likely((values[8] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
+ if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 8); __PYX_ERR(0, 332, __pyx_L3_error)
}
@@ -22008,10 +23096,10 @@ static PyObject *__pyx_fuse_3_1_2__pyx_pw_4silx_4math_16chistogramnd_lut_93_hist
values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
}
- __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[0]); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
- __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[1]); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
- __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2]); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
- __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[3]); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
+ __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
+ __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
+ __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
+ __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[3], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
__pyx_v_i_n_elems = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_i_n_elems == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 336, __pyx_L3_error)
__pyx_v_i_filt_min_weights = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_i_filt_min_weights == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 337, __pyx_L3_error)
__pyx_v_i_weight_min = __Pyx_PyInt_As_npy_int64(values[6]); if (unlikely((__pyx_v_i_weight_min == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 338, __pyx_L3_error)
@@ -22039,16 +23127,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_92_histogramnd_from_lut
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
- Py_ssize_t __pyx_t_3;
- int __pyx_t_4;
+ int __pyx_t_3;
+ Py_ssize_t __pyx_t_4;
int __pyx_t_5;
- Py_ssize_t __pyx_t_6;
+ int __pyx_t_6;
Py_ssize_t __pyx_t_7;
Py_ssize_t __pyx_t_8;
Py_ssize_t __pyx_t_9;
Py_ssize_t __pyx_t_10;
Py_ssize_t __pyx_t_11;
Py_ssize_t __pyx_t_12;
+ Py_ssize_t __pyx_t_13;
__Pyx_RefNannySetupContext("__pyx_fuse_3_1_2_histogramnd_from_lut_fused", 0);
/* "silx/math/chistogramnd_lut.pyx":341
@@ -22062,6 +23151,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_92_histogramnd_from_lut
#ifdef WITH_THREAD
PyThreadState *_save;
Py_UNBLOCK_THREADS
+ __Pyx_FastGIL_Remember();
#endif
/*try:*/ {
@@ -22073,8 +23163,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_92_histogramnd_from_lut
* if i_filt_min_weights and i_weights[i] < i_weight_min:
*/
__pyx_t_1 = __pyx_v_i_n_elems;
- for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
- __pyx_v_i = __pyx_t_2;
+ __pyx_t_2 = __pyx_t_1;
+ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
+ __pyx_v_i = __pyx_t_3;
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -22083,9 +23174,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_92_histogramnd_from_lut
* if i_filt_min_weights and i_weights[i] < i_weight_min:
* continue
*/
- __pyx_t_3 = __pyx_v_i;
- __pyx_t_4 = (((*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_3 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
- if (__pyx_t_4) {
+ __pyx_t_4 = __pyx_v_i;
+ __pyx_t_5 = (((*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_4 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":344
* for i in range(i_n_elems):
@@ -22094,17 +23185,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_92_histogramnd_from_lut
* continue
* if i_filt_max_weights and i_weights[i] > i_weight_max:
*/
- __pyx_t_5 = (__pyx_v_i_filt_min_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_min_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L10_bool_binop_done;
}
- __pyx_t_6 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_6 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_7 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L10_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":345
* if (i_lut[i] >= 0):
@@ -22131,17 +23222,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_92_histogramnd_from_lut
* continue
* o_histo[i_lut[i]] += 1
*/
- __pyx_t_5 = (__pyx_v_i_filt_max_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_max_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L13_bool_binop_done;
}
- __pyx_t_7 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_8 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_8 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L13_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":347
* continue
@@ -22168,9 +23259,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_92_histogramnd_from_lut
* o_weighted_histo[i_lut[i]] += <cumul_t>i_weights[i] # noqa
*
*/
- __pyx_t_8 = __pyx_v_i;
- __pyx_t_9 = (*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_8 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_9 * __pyx_v_o_histo.strides[0]) )) += 1;
+ __pyx_t_9 = __pyx_v_i;
+ __pyx_t_10 = (*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_9 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_10 * __pyx_v_o_histo.strides[0]) )) += 1;
/* "silx/math/chistogramnd_lut.pyx":349
* continue
@@ -22179,10 +23270,10 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_92_histogramnd_from_lut
*
*
*/
- __pyx_t_10 = __pyx_v_i;
__pyx_t_11 = __pyx_v_i;
- __pyx_t_12 = (*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_11 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_12 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_int32_t)(*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_10 * __pyx_v_i_weights.strides[0]) ))));
+ __pyx_t_12 = __pyx_v_i;
+ __pyx_t_13 = (*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_12 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_13 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_int32_t)(*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_11 * __pyx_v_i_weights.strides[0]) ))));
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -22206,6 +23297,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_92_histogramnd_from_lut
/*finally:*/ {
/*normal exit:*/{
#ifdef WITH_THREAD
+ __Pyx_FastGIL_Forget();
Py_BLOCK_THREADS
#endif
goto __pyx_L5;
@@ -22219,7 +23311,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_92_histogramnd_from_lut
* @cython.cdivision(True)
* def _histogramnd_from_lut_fused(weights_t[:] i_weights, # <<<<<<<<<<<<<<
* lut_t[:] i_lut,
- * np.uint32_t[:] o_histo,
+ * cnumpy.uint32_t[:] o_histo,
*/
/* function exit code */
@@ -22257,59 +23349,76 @@ static PyObject *__pyx_fuse_3_1_3__pyx_pw_4silx_4math_16chistogramnd_lut_95_hist
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
switch (pos_args) {
case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
+ CYTHON_FALLTHROUGH;
case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
+ CYTHON_FALLTHROUGH;
case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
+ CYTHON_FALLTHROUGH;
case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ CYTHON_FALLTHROUGH;
case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
case 0: break;
default: goto __pyx_L5_argtuple_error;
}
kw_args = PyDict_Size(__pyx_kwds);
switch (pos_args) {
case 0:
- if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
case 1:
- if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 1); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 2:
- if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
+ if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 2); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 3:
- if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
+ if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 3); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 4:
- if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
+ if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 4); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 5:
- if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
+ if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 5); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 6:
- if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
+ if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 6); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 7:
- if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
+ if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 7); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 8:
- if (likely((values[8] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
+ if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 8); __PYX_ERR(0, 332, __pyx_L3_error)
}
@@ -22330,10 +23439,10 @@ static PyObject *__pyx_fuse_3_1_3__pyx_pw_4silx_4math_16chistogramnd_lut_95_hist
values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
}
- __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[0]); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
- __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[1]); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
- __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2]); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
- __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[3]); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
+ __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
+ __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
+ __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
+ __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[3], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
__pyx_v_i_n_elems = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_i_n_elems == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 336, __pyx_L3_error)
__pyx_v_i_filt_min_weights = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_i_filt_min_weights == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 337, __pyx_L3_error)
__pyx_v_i_weight_min = __Pyx_PyInt_As_npy_int64(values[6]); if (unlikely((__pyx_v_i_weight_min == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 338, __pyx_L3_error)
@@ -22361,16 +23470,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_94_histogramnd_from_lut
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
- Py_ssize_t __pyx_t_3;
- int __pyx_t_4;
+ int __pyx_t_3;
+ Py_ssize_t __pyx_t_4;
int __pyx_t_5;
- Py_ssize_t __pyx_t_6;
+ int __pyx_t_6;
Py_ssize_t __pyx_t_7;
Py_ssize_t __pyx_t_8;
Py_ssize_t __pyx_t_9;
Py_ssize_t __pyx_t_10;
Py_ssize_t __pyx_t_11;
Py_ssize_t __pyx_t_12;
+ Py_ssize_t __pyx_t_13;
__Pyx_RefNannySetupContext("__pyx_fuse_3_1_3_histogramnd_from_lut_fused", 0);
/* "silx/math/chistogramnd_lut.pyx":341
@@ -22384,6 +23494,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_94_histogramnd_from_lut
#ifdef WITH_THREAD
PyThreadState *_save;
Py_UNBLOCK_THREADS
+ __Pyx_FastGIL_Remember();
#endif
/*try:*/ {
@@ -22395,8 +23506,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_94_histogramnd_from_lut
* if i_filt_min_weights and i_weights[i] < i_weight_min:
*/
__pyx_t_1 = __pyx_v_i_n_elems;
- for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
- __pyx_v_i = __pyx_t_2;
+ __pyx_t_2 = __pyx_t_1;
+ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
+ __pyx_v_i = __pyx_t_3;
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -22405,9 +23517,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_94_histogramnd_from_lut
* if i_filt_min_weights and i_weights[i] < i_weight_min:
* continue
*/
- __pyx_t_3 = __pyx_v_i;
- __pyx_t_4 = (((*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_3 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
- if (__pyx_t_4) {
+ __pyx_t_4 = __pyx_v_i;
+ __pyx_t_5 = (((*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_4 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":344
* for i in range(i_n_elems):
@@ -22416,17 +23528,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_94_histogramnd_from_lut
* continue
* if i_filt_max_weights and i_weights[i] > i_weight_max:
*/
- __pyx_t_5 = (__pyx_v_i_filt_min_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_min_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L10_bool_binop_done;
}
- __pyx_t_6 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_6 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_7 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L10_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":345
* if (i_lut[i] >= 0):
@@ -22453,17 +23565,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_94_histogramnd_from_lut
* continue
* o_histo[i_lut[i]] += 1
*/
- __pyx_t_5 = (__pyx_v_i_filt_max_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_max_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L13_bool_binop_done;
}
- __pyx_t_7 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_8 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_8 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L13_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":347
* continue
@@ -22490,9 +23602,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_94_histogramnd_from_lut
* o_weighted_histo[i_lut[i]] += <cumul_t>i_weights[i] # noqa
*
*/
- __pyx_t_8 = __pyx_v_i;
- __pyx_t_9 = (*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_8 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_9 * __pyx_v_o_histo.strides[0]) )) += 1;
+ __pyx_t_9 = __pyx_v_i;
+ __pyx_t_10 = (*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_9 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_10 * __pyx_v_o_histo.strides[0]) )) += 1;
/* "silx/math/chistogramnd_lut.pyx":349
* continue
@@ -22501,10 +23613,10 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_94_histogramnd_from_lut
*
*
*/
- __pyx_t_10 = __pyx_v_i;
__pyx_t_11 = __pyx_v_i;
- __pyx_t_12 = (*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_11 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_12 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_int64_t)(*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_10 * __pyx_v_i_weights.strides[0]) ))));
+ __pyx_t_12 = __pyx_v_i;
+ __pyx_t_13 = (*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_12 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_13 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_int64_t)(*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_11 * __pyx_v_i_weights.strides[0]) ))));
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -22528,6 +23640,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_94_histogramnd_from_lut
/*finally:*/ {
/*normal exit:*/{
#ifdef WITH_THREAD
+ __Pyx_FastGIL_Forget();
Py_BLOCK_THREADS
#endif
goto __pyx_L5;
@@ -22541,7 +23654,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_94_histogramnd_from_lut
* @cython.cdivision(True)
* def _histogramnd_from_lut_fused(weights_t[:] i_weights, # <<<<<<<<<<<<<<
* lut_t[:] i_lut,
- * np.uint32_t[:] o_histo,
+ * cnumpy.uint32_t[:] o_histo,
*/
/* function exit code */
@@ -22579,59 +23692,76 @@ static PyObject *__pyx_fuse_3_2_0__pyx_pw_4silx_4math_16chistogramnd_lut_97_hist
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
switch (pos_args) {
case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
+ CYTHON_FALLTHROUGH;
case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
+ CYTHON_FALLTHROUGH;
case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
+ CYTHON_FALLTHROUGH;
case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ CYTHON_FALLTHROUGH;
case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
case 0: break;
default: goto __pyx_L5_argtuple_error;
}
kw_args = PyDict_Size(__pyx_kwds);
switch (pos_args) {
case 0:
- if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
case 1:
- if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 1); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 2:
- if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
+ if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 2); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 3:
- if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
+ if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 3); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 4:
- if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
+ if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 4); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 5:
- if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
+ if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 5); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 6:
- if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
+ if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 6); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 7:
- if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
+ if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 7); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 8:
- if (likely((values[8] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
+ if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 8); __PYX_ERR(0, 332, __pyx_L3_error)
}
@@ -22652,10 +23782,10 @@ static PyObject *__pyx_fuse_3_2_0__pyx_pw_4silx_4math_16chistogramnd_lut_97_hist
values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
}
- __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[0]); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
- __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int16_t(values[1]); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
- __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2]); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
- __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float64_t(values[3]); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
+ __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
+ __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int16_t(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
+ __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
+ __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float64_t(values[3], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
__pyx_v_i_n_elems = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_i_n_elems == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 336, __pyx_L3_error)
__pyx_v_i_filt_min_weights = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_i_filt_min_weights == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 337, __pyx_L3_error)
__pyx_v_i_weight_min = __Pyx_PyInt_As_npy_int64(values[6]); if (unlikely((__pyx_v_i_weight_min == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 338, __pyx_L3_error)
@@ -22683,16 +23813,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_96_histogramnd_from_lut
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
- Py_ssize_t __pyx_t_3;
- int __pyx_t_4;
+ int __pyx_t_3;
+ Py_ssize_t __pyx_t_4;
int __pyx_t_5;
- Py_ssize_t __pyx_t_6;
+ int __pyx_t_6;
Py_ssize_t __pyx_t_7;
Py_ssize_t __pyx_t_8;
Py_ssize_t __pyx_t_9;
Py_ssize_t __pyx_t_10;
Py_ssize_t __pyx_t_11;
Py_ssize_t __pyx_t_12;
+ Py_ssize_t __pyx_t_13;
__Pyx_RefNannySetupContext("__pyx_fuse_3_2_0_histogramnd_from_lut_fused", 0);
/* "silx/math/chistogramnd_lut.pyx":341
@@ -22706,6 +23837,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_96_histogramnd_from_lut
#ifdef WITH_THREAD
PyThreadState *_save;
Py_UNBLOCK_THREADS
+ __Pyx_FastGIL_Remember();
#endif
/*try:*/ {
@@ -22717,8 +23849,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_96_histogramnd_from_lut
* if i_filt_min_weights and i_weights[i] < i_weight_min:
*/
__pyx_t_1 = __pyx_v_i_n_elems;
- for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
- __pyx_v_i = __pyx_t_2;
+ __pyx_t_2 = __pyx_t_1;
+ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
+ __pyx_v_i = __pyx_t_3;
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -22727,9 +23860,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_96_histogramnd_from_lut
* if i_filt_min_weights and i_weights[i] < i_weight_min:
* continue
*/
- __pyx_t_3 = __pyx_v_i;
- __pyx_t_4 = (((*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_3 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
- if (__pyx_t_4) {
+ __pyx_t_4 = __pyx_v_i;
+ __pyx_t_5 = (((*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_4 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":344
* for i in range(i_n_elems):
@@ -22738,17 +23871,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_96_histogramnd_from_lut
* continue
* if i_filt_max_weights and i_weights[i] > i_weight_max:
*/
- __pyx_t_5 = (__pyx_v_i_filt_min_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_min_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L10_bool_binop_done;
}
- __pyx_t_6 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_6 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_7 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L10_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":345
* if (i_lut[i] >= 0):
@@ -22775,17 +23908,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_96_histogramnd_from_lut
* continue
* o_histo[i_lut[i]] += 1
*/
- __pyx_t_5 = (__pyx_v_i_filt_max_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_max_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L13_bool_binop_done;
}
- __pyx_t_7 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_8 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_8 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L13_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":347
* continue
@@ -22812,9 +23945,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_96_histogramnd_from_lut
* o_weighted_histo[i_lut[i]] += <cumul_t>i_weights[i] # noqa
*
*/
- __pyx_t_8 = __pyx_v_i;
- __pyx_t_9 = (*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_8 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_9 * __pyx_v_o_histo.strides[0]) )) += 1;
+ __pyx_t_9 = __pyx_v_i;
+ __pyx_t_10 = (*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_9 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_10 * __pyx_v_o_histo.strides[0]) )) += 1;
/* "silx/math/chistogramnd_lut.pyx":349
* continue
@@ -22823,10 +23956,10 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_96_histogramnd_from_lut
*
*
*/
- __pyx_t_10 = __pyx_v_i;
__pyx_t_11 = __pyx_v_i;
- __pyx_t_12 = (*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_11 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_12 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_float64_t)(*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_10 * __pyx_v_i_weights.strides[0]) ))));
+ __pyx_t_12 = __pyx_v_i;
+ __pyx_t_13 = (*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_12 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_13 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_float64_t)(*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_11 * __pyx_v_i_weights.strides[0]) ))));
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -22850,6 +23983,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_96_histogramnd_from_lut
/*finally:*/ {
/*normal exit:*/{
#ifdef WITH_THREAD
+ __Pyx_FastGIL_Forget();
Py_BLOCK_THREADS
#endif
goto __pyx_L5;
@@ -22863,7 +23997,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_96_histogramnd_from_lut
* @cython.cdivision(True)
* def _histogramnd_from_lut_fused(weights_t[:] i_weights, # <<<<<<<<<<<<<<
* lut_t[:] i_lut,
- * np.uint32_t[:] o_histo,
+ * cnumpy.uint32_t[:] o_histo,
*/
/* function exit code */
@@ -22901,59 +24035,76 @@ static PyObject *__pyx_fuse_3_2_1__pyx_pw_4silx_4math_16chistogramnd_lut_99_hist
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
switch (pos_args) {
case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
+ CYTHON_FALLTHROUGH;
case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
+ CYTHON_FALLTHROUGH;
case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
+ CYTHON_FALLTHROUGH;
case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ CYTHON_FALLTHROUGH;
case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
case 0: break;
default: goto __pyx_L5_argtuple_error;
}
kw_args = PyDict_Size(__pyx_kwds);
switch (pos_args) {
case 0:
- if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
case 1:
- if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 1); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 2:
- if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
+ if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 2); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 3:
- if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
+ if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 3); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 4:
- if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
+ if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 4); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 5:
- if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
+ if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 5); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 6:
- if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
+ if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 6); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 7:
- if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
+ if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 7); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 8:
- if (likely((values[8] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
+ if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 8); __PYX_ERR(0, 332, __pyx_L3_error)
}
@@ -22974,10 +24125,10 @@ static PyObject *__pyx_fuse_3_2_1__pyx_pw_4silx_4math_16chistogramnd_lut_99_hist
values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
}
- __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[0]); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
- __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int16_t(values[1]); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
- __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2]); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
- __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float32_t(values[3]); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
+ __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
+ __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int16_t(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
+ __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
+ __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float32_t(values[3], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
__pyx_v_i_n_elems = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_i_n_elems == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 336, __pyx_L3_error)
__pyx_v_i_filt_min_weights = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_i_filt_min_weights == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 337, __pyx_L3_error)
__pyx_v_i_weight_min = __Pyx_PyInt_As_npy_int64(values[6]); if (unlikely((__pyx_v_i_weight_min == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 338, __pyx_L3_error)
@@ -23005,16 +24156,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_98_histogramnd_from_lut
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
- Py_ssize_t __pyx_t_3;
- int __pyx_t_4;
+ int __pyx_t_3;
+ Py_ssize_t __pyx_t_4;
int __pyx_t_5;
- Py_ssize_t __pyx_t_6;
+ int __pyx_t_6;
Py_ssize_t __pyx_t_7;
Py_ssize_t __pyx_t_8;
Py_ssize_t __pyx_t_9;
Py_ssize_t __pyx_t_10;
Py_ssize_t __pyx_t_11;
Py_ssize_t __pyx_t_12;
+ Py_ssize_t __pyx_t_13;
__Pyx_RefNannySetupContext("__pyx_fuse_3_2_1_histogramnd_from_lut_fused", 0);
/* "silx/math/chistogramnd_lut.pyx":341
@@ -23028,6 +24180,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_98_histogramnd_from_lut
#ifdef WITH_THREAD
PyThreadState *_save;
Py_UNBLOCK_THREADS
+ __Pyx_FastGIL_Remember();
#endif
/*try:*/ {
@@ -23039,8 +24192,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_98_histogramnd_from_lut
* if i_filt_min_weights and i_weights[i] < i_weight_min:
*/
__pyx_t_1 = __pyx_v_i_n_elems;
- for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
- __pyx_v_i = __pyx_t_2;
+ __pyx_t_2 = __pyx_t_1;
+ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
+ __pyx_v_i = __pyx_t_3;
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -23049,9 +24203,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_98_histogramnd_from_lut
* if i_filt_min_weights and i_weights[i] < i_weight_min:
* continue
*/
- __pyx_t_3 = __pyx_v_i;
- __pyx_t_4 = (((*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_3 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
- if (__pyx_t_4) {
+ __pyx_t_4 = __pyx_v_i;
+ __pyx_t_5 = (((*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_4 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":344
* for i in range(i_n_elems):
@@ -23060,17 +24214,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_98_histogramnd_from_lut
* continue
* if i_filt_max_weights and i_weights[i] > i_weight_max:
*/
- __pyx_t_5 = (__pyx_v_i_filt_min_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_min_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L10_bool_binop_done;
}
- __pyx_t_6 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_6 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_7 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L10_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":345
* if (i_lut[i] >= 0):
@@ -23097,17 +24251,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_98_histogramnd_from_lut
* continue
* o_histo[i_lut[i]] += 1
*/
- __pyx_t_5 = (__pyx_v_i_filt_max_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_max_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L13_bool_binop_done;
}
- __pyx_t_7 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_8 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_8 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L13_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":347
* continue
@@ -23134,9 +24288,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_98_histogramnd_from_lut
* o_weighted_histo[i_lut[i]] += <cumul_t>i_weights[i] # noqa
*
*/
- __pyx_t_8 = __pyx_v_i;
- __pyx_t_9 = (*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_8 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_9 * __pyx_v_o_histo.strides[0]) )) += 1;
+ __pyx_t_9 = __pyx_v_i;
+ __pyx_t_10 = (*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_9 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_10 * __pyx_v_o_histo.strides[0]) )) += 1;
/* "silx/math/chistogramnd_lut.pyx":349
* continue
@@ -23145,10 +24299,10 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_98_histogramnd_from_lut
*
*
*/
- __pyx_t_10 = __pyx_v_i;
__pyx_t_11 = __pyx_v_i;
- __pyx_t_12 = (*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_11 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_12 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_float32_t)(*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_10 * __pyx_v_i_weights.strides[0]) ))));
+ __pyx_t_12 = __pyx_v_i;
+ __pyx_t_13 = (*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_12 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_13 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_float32_t)(*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_11 * __pyx_v_i_weights.strides[0]) ))));
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -23172,6 +24326,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_98_histogramnd_from_lut
/*finally:*/ {
/*normal exit:*/{
#ifdef WITH_THREAD
+ __Pyx_FastGIL_Forget();
Py_BLOCK_THREADS
#endif
goto __pyx_L5;
@@ -23185,7 +24340,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_98_histogramnd_from_lut
* @cython.cdivision(True)
* def _histogramnd_from_lut_fused(weights_t[:] i_weights, # <<<<<<<<<<<<<<
* lut_t[:] i_lut,
- * np.uint32_t[:] o_histo,
+ * cnumpy.uint32_t[:] o_histo,
*/
/* function exit code */
@@ -23223,59 +24378,76 @@ static PyObject *__pyx_fuse_3_2_2__pyx_pw_4silx_4math_16chistogramnd_lut_101_his
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
switch (pos_args) {
case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
+ CYTHON_FALLTHROUGH;
case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
+ CYTHON_FALLTHROUGH;
case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
+ CYTHON_FALLTHROUGH;
case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ CYTHON_FALLTHROUGH;
case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
case 0: break;
default: goto __pyx_L5_argtuple_error;
}
kw_args = PyDict_Size(__pyx_kwds);
switch (pos_args) {
case 0:
- if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
case 1:
- if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 1); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 2:
- if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
+ if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 2); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 3:
- if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
+ if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 3); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 4:
- if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
+ if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 4); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 5:
- if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
+ if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 5); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 6:
- if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
+ if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 6); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 7:
- if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
+ if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 7); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 8:
- if (likely((values[8] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
+ if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 8); __PYX_ERR(0, 332, __pyx_L3_error)
}
@@ -23296,10 +24468,10 @@ static PyObject *__pyx_fuse_3_2_2__pyx_pw_4silx_4math_16chistogramnd_lut_101_his
values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
}
- __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[0]); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
- __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int16_t(values[1]); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
- __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2]); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
- __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[3]); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
+ __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
+ __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int16_t(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
+ __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
+ __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[3], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
__pyx_v_i_n_elems = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_i_n_elems == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 336, __pyx_L3_error)
__pyx_v_i_filt_min_weights = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_i_filt_min_weights == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 337, __pyx_L3_error)
__pyx_v_i_weight_min = __Pyx_PyInt_As_npy_int64(values[6]); if (unlikely((__pyx_v_i_weight_min == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 338, __pyx_L3_error)
@@ -23327,16 +24499,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_100_histogramnd_from_lu
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
- Py_ssize_t __pyx_t_3;
- int __pyx_t_4;
+ int __pyx_t_3;
+ Py_ssize_t __pyx_t_4;
int __pyx_t_5;
- Py_ssize_t __pyx_t_6;
+ int __pyx_t_6;
Py_ssize_t __pyx_t_7;
Py_ssize_t __pyx_t_8;
Py_ssize_t __pyx_t_9;
Py_ssize_t __pyx_t_10;
Py_ssize_t __pyx_t_11;
Py_ssize_t __pyx_t_12;
+ Py_ssize_t __pyx_t_13;
__Pyx_RefNannySetupContext("__pyx_fuse_3_2_2_histogramnd_from_lut_fused", 0);
/* "silx/math/chistogramnd_lut.pyx":341
@@ -23350,6 +24523,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_100_histogramnd_from_lu
#ifdef WITH_THREAD
PyThreadState *_save;
Py_UNBLOCK_THREADS
+ __Pyx_FastGIL_Remember();
#endif
/*try:*/ {
@@ -23361,8 +24535,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_100_histogramnd_from_lu
* if i_filt_min_weights and i_weights[i] < i_weight_min:
*/
__pyx_t_1 = __pyx_v_i_n_elems;
- for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
- __pyx_v_i = __pyx_t_2;
+ __pyx_t_2 = __pyx_t_1;
+ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
+ __pyx_v_i = __pyx_t_3;
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -23371,9 +24546,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_100_histogramnd_from_lu
* if i_filt_min_weights and i_weights[i] < i_weight_min:
* continue
*/
- __pyx_t_3 = __pyx_v_i;
- __pyx_t_4 = (((*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_3 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
- if (__pyx_t_4) {
+ __pyx_t_4 = __pyx_v_i;
+ __pyx_t_5 = (((*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_4 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":344
* for i in range(i_n_elems):
@@ -23382,17 +24557,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_100_histogramnd_from_lu
* continue
* if i_filt_max_weights and i_weights[i] > i_weight_max:
*/
- __pyx_t_5 = (__pyx_v_i_filt_min_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_min_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L10_bool_binop_done;
}
- __pyx_t_6 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_6 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_7 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L10_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":345
* if (i_lut[i] >= 0):
@@ -23419,17 +24594,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_100_histogramnd_from_lu
* continue
* o_histo[i_lut[i]] += 1
*/
- __pyx_t_5 = (__pyx_v_i_filt_max_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_max_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L13_bool_binop_done;
}
- __pyx_t_7 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_8 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_8 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L13_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":347
* continue
@@ -23456,9 +24631,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_100_histogramnd_from_lu
* o_weighted_histo[i_lut[i]] += <cumul_t>i_weights[i] # noqa
*
*/
- __pyx_t_8 = __pyx_v_i;
- __pyx_t_9 = (*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_8 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_9 * __pyx_v_o_histo.strides[0]) )) += 1;
+ __pyx_t_9 = __pyx_v_i;
+ __pyx_t_10 = (*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_9 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_10 * __pyx_v_o_histo.strides[0]) )) += 1;
/* "silx/math/chistogramnd_lut.pyx":349
* continue
@@ -23467,10 +24642,10 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_100_histogramnd_from_lu
*
*
*/
- __pyx_t_10 = __pyx_v_i;
__pyx_t_11 = __pyx_v_i;
- __pyx_t_12 = (*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_11 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_12 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_int32_t)(*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_10 * __pyx_v_i_weights.strides[0]) ))));
+ __pyx_t_12 = __pyx_v_i;
+ __pyx_t_13 = (*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_12 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_13 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_int32_t)(*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_11 * __pyx_v_i_weights.strides[0]) ))));
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -23494,6 +24669,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_100_histogramnd_from_lu
/*finally:*/ {
/*normal exit:*/{
#ifdef WITH_THREAD
+ __Pyx_FastGIL_Forget();
Py_BLOCK_THREADS
#endif
goto __pyx_L5;
@@ -23507,7 +24683,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_100_histogramnd_from_lu
* @cython.cdivision(True)
* def _histogramnd_from_lut_fused(weights_t[:] i_weights, # <<<<<<<<<<<<<<
* lut_t[:] i_lut,
- * np.uint32_t[:] o_histo,
+ * cnumpy.uint32_t[:] o_histo,
*/
/* function exit code */
@@ -23545,59 +24721,76 @@ static PyObject *__pyx_fuse_3_2_3__pyx_pw_4silx_4math_16chistogramnd_lut_103_his
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
switch (pos_args) {
case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
+ CYTHON_FALLTHROUGH;
case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
+ CYTHON_FALLTHROUGH;
case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
+ CYTHON_FALLTHROUGH;
case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ CYTHON_FALLTHROUGH;
case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
case 0: break;
default: goto __pyx_L5_argtuple_error;
}
kw_args = PyDict_Size(__pyx_kwds);
switch (pos_args) {
case 0:
- if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weights)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
case 1:
- if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_lut)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 1); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 2:
- if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
+ if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 2); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 3:
- if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
+ if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_weighted_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 3); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 4:
- if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
+ if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 4); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 5:
- if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
+ if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_min_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 5); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 6:
- if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
+ if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_min)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 6); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 7:
- if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
+ if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_filt_max_weights)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 7); __PYX_ERR(0, 332, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 8:
- if (likely((values[8] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
+ if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_weight_max)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_from_lut_fused", 1, 9, 9, 8); __PYX_ERR(0, 332, __pyx_L3_error)
}
@@ -23618,10 +24811,10 @@ static PyObject *__pyx_fuse_3_2_3__pyx_pw_4silx_4math_16chistogramnd_lut_103_his
values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
}
- __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[0]); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
- __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int16_t(values[1]); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
- __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2]); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
- __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[3]); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
+ __pyx_v_i_weights = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_weights.memview)) __PYX_ERR(0, 332, __pyx_L3_error)
+ __pyx_v_i_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int16_t(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_lut.memview)) __PYX_ERR(0, 333, __pyx_L3_error)
+ __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[2], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 334, __pyx_L3_error)
+ __pyx_v_o_weighted_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[3], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_weighted_histo.memview)) __PYX_ERR(0, 335, __pyx_L3_error)
__pyx_v_i_n_elems = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_i_n_elems == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 336, __pyx_L3_error)
__pyx_v_i_filt_min_weights = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_i_filt_min_weights == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 337, __pyx_L3_error)
__pyx_v_i_weight_min = __Pyx_PyInt_As_npy_int64(values[6]); if (unlikely((__pyx_v_i_weight_min == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 338, __pyx_L3_error)
@@ -23649,16 +24842,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_102_histogramnd_from_lu
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
- Py_ssize_t __pyx_t_3;
- int __pyx_t_4;
+ int __pyx_t_3;
+ Py_ssize_t __pyx_t_4;
int __pyx_t_5;
- Py_ssize_t __pyx_t_6;
+ int __pyx_t_6;
Py_ssize_t __pyx_t_7;
Py_ssize_t __pyx_t_8;
Py_ssize_t __pyx_t_9;
Py_ssize_t __pyx_t_10;
Py_ssize_t __pyx_t_11;
Py_ssize_t __pyx_t_12;
+ Py_ssize_t __pyx_t_13;
__Pyx_RefNannySetupContext("__pyx_fuse_3_2_3_histogramnd_from_lut_fused", 0);
/* "silx/math/chistogramnd_lut.pyx":341
@@ -23672,6 +24866,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_102_histogramnd_from_lu
#ifdef WITH_THREAD
PyThreadState *_save;
Py_UNBLOCK_THREADS
+ __Pyx_FastGIL_Remember();
#endif
/*try:*/ {
@@ -23683,8 +24878,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_102_histogramnd_from_lu
* if i_filt_min_weights and i_weights[i] < i_weight_min:
*/
__pyx_t_1 = __pyx_v_i_n_elems;
- for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
- __pyx_v_i = __pyx_t_2;
+ __pyx_t_2 = __pyx_t_1;
+ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
+ __pyx_v_i = __pyx_t_3;
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -23693,9 +24889,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_102_histogramnd_from_lu
* if i_filt_min_weights and i_weights[i] < i_weight_min:
* continue
*/
- __pyx_t_3 = __pyx_v_i;
- __pyx_t_4 = (((*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_3 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
- if (__pyx_t_4) {
+ __pyx_t_4 = __pyx_v_i;
+ __pyx_t_5 = (((*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_4 * __pyx_v_i_lut.strides[0]) ))) >= 0) != 0);
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":344
* for i in range(i_n_elems):
@@ -23704,17 +24900,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_102_histogramnd_from_lu
* continue
* if i_filt_max_weights and i_weights[i] > i_weight_max:
*/
- __pyx_t_5 = (__pyx_v_i_filt_min_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_min_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L10_bool_binop_done;
}
- __pyx_t_6 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_6 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_7 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) < __pyx_v_i_weight_min) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L10_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":345
* if (i_lut[i] >= 0):
@@ -23741,17 +24937,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_102_histogramnd_from_lu
* continue
* o_histo[i_lut[i]] += 1
*/
- __pyx_t_5 = (__pyx_v_i_filt_max_weights != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_i_filt_max_weights != 0);
+ if (__pyx_t_6) {
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
goto __pyx_L13_bool_binop_done;
}
- __pyx_t_7 = __pyx_v_i;
- __pyx_t_5 = (((*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_7 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_8 = __pyx_v_i;
+ __pyx_t_6 = (((*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_8 * __pyx_v_i_weights.strides[0]) ))) > __pyx_v_i_weight_max) != 0);
+ __pyx_t_5 = __pyx_t_6;
__pyx_L13_bool_binop_done:;
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
/* "silx/math/chistogramnd_lut.pyx":347
* continue
@@ -23778,9 +24974,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_102_histogramnd_from_lu
* o_weighted_histo[i_lut[i]] += <cumul_t>i_weights[i] # noqa
*
*/
- __pyx_t_8 = __pyx_v_i;
- __pyx_t_9 = (*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_8 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_9 * __pyx_v_o_histo.strides[0]) )) += 1;
+ __pyx_t_9 = __pyx_v_i;
+ __pyx_t_10 = (*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_9 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_10 * __pyx_v_o_histo.strides[0]) )) += 1;
/* "silx/math/chistogramnd_lut.pyx":349
* continue
@@ -23789,10 +24985,10 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_102_histogramnd_from_lu
*
*
*/
- __pyx_t_10 = __pyx_v_i;
__pyx_t_11 = __pyx_v_i;
- __pyx_t_12 = (*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_11 * __pyx_v_i_lut.strides[0]) )));
- *((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_12 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_int64_t)(*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_10 * __pyx_v_i_weights.strides[0]) ))));
+ __pyx_t_12 = __pyx_v_i;
+ __pyx_t_13 = (*((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_i_lut.data + __pyx_t_12 * __pyx_v_i_lut.strides[0]) )));
+ *((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_o_weighted_histo.data + __pyx_t_13 * __pyx_v_o_weighted_histo.strides[0]) )) += ((__pyx_t_5numpy_int64_t)(*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_weights.data + __pyx_t_11 * __pyx_v_i_weights.strides[0]) ))));
/* "silx/math/chistogramnd_lut.pyx":343
* with nogil:
@@ -23816,6 +25012,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_102_histogramnd_from_lu
/*finally:*/ {
/*normal exit:*/{
#ifdef WITH_THREAD
+ __Pyx_FastGIL_Forget();
Py_BLOCK_THREADS
#endif
goto __pyx_L5;
@@ -23829,7 +25026,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_102_histogramnd_from_lu
* @cython.cdivision(True)
* def _histogramnd_from_lut_fused(weights_t[:] i_weights, # <<<<<<<<<<<<<<
* lut_t[:] i_lut,
- * np.uint32_t[:] o_histo,
+ * cnumpy.uint32_t[:] o_histo,
*/
/* function exit code */
@@ -23871,29 +25068,36 @@ static PyObject *__pyx_pw_4silx_4math_16chistogramnd_lut_7_histogramnd_get_lut_f
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
switch (pos_args) {
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
case 0: break;
default: goto __pyx_L5_argtuple_error;
}
kw_args = PyDict_Size(__pyx_kwds);
switch (pos_args) {
case 0:
- if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_signatures)) != 0)) kw_args--;
+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_signatures)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
case 1:
- if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_args)) != 0)) kw_args--;
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_args)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 1, 4, 4, 1); __PYX_ERR(0, 361, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 2:
- if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_kwargs)) != 0)) kw_args--;
+ if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_kwargs)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 1, 4, 4, 2); __PYX_ERR(0, 361, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 3:
- if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_defaults)) != 0)) kw_args--;
+ if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_defaults)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 1, 4, 4, 3); __PYX_ERR(0, 361, __pyx_L3_error)
}
@@ -23931,46 +25135,41 @@ static PyObject *__pyx_pw_4silx_4math_16chistogramnd_lut_7_histogramnd_get_lut_f
static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_6_histogramnd_get_lut_fused(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_signatures, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs, CYTHON_UNUSED PyObject *__pyx_v_defaults) {
PyObject *__pyx_v_dest_sig = NULL;
+ Py_ssize_t __pyx_v_i;
PyTypeObject *__pyx_v_ndarray = 0;
- PyObject *__pyx_v_numpy = NULL;
__Pyx_memviewslice __pyx_v_memslice;
Py_ssize_t __pyx_v_itemsize;
int __pyx_v_dtype_signed;
char __pyx_v_kind;
- int __pyx_v____pyx_int16_t_is_signed;
- int __pyx_v____pyx_int64_t_is_signed;
int __pyx_v____pyx_int32_t_is_signed;
+ int __pyx_v____pyx_int64_t_is_signed;
+ int __pyx_v____pyx_int16_t_is_signed;
PyObject *__pyx_v_arg = NULL;
PyObject *__pyx_v_dtype = NULL;
PyObject *__pyx_v_arg_base = NULL;
PyObject *__pyx_v_candidates = NULL;
PyObject *__pyx_v_sig = NULL;
int __pyx_v_match_found;
- PyObject *__pyx_v_src_type = NULL;
+ PyObject *__pyx_v_src_sig = NULL;
PyObject *__pyx_v_dst_type = NULL;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
int __pyx_t_2;
int __pyx_t_3;
- PyObject *__pyx_t_4 = NULL;
- PyObject *__pyx_t_5 = NULL;
+ int __pyx_t_4;
+ Py_ssize_t __pyx_t_5;
PyObject *__pyx_t_6 = NULL;
- int __pyx_t_7;
- PyObject *__pyx_t_8 = NULL;
- PyObject *__pyx_t_9 = NULL;
- Py_ssize_t __pyx_t_10;
- long __pyx_t_11;
- __Pyx_memviewslice __pyx_t_12;
+ long __pyx_t_7;
+ __Pyx_memviewslice __pyx_t_8;
+ Py_ssize_t __pyx_t_9;
+ int __pyx_t_10;
+ int __pyx_t_11;
+ PyObject *__pyx_t_12 = NULL;
Py_ssize_t __pyx_t_13;
- int __pyx_t_14;
+ Py_ssize_t __pyx_t_14;
Py_ssize_t __pyx_t_15;
- PyObject *(*__pyx_t_16)(PyObject *);
- PyObject *__pyx_t_17 = NULL;
- PyObject *__pyx_t_18 = NULL;
- PyObject *__pyx_t_19 = NULL;
- PyObject *(*__pyx_t_20)(PyObject *);
- int __pyx_t_21;
+ int __pyx_t_16;
__Pyx_RefNannySetupContext("_histogramnd_get_lut_fused", 0);
__Pyx_INCREF(__pyx_v_kwargs);
__pyx_t_1 = PyList_New(1 * 2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 361, __pyx_L1_error)
@@ -23984,131 +25183,102 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_6_histogramnd_get_lut_f
}
__pyx_v_dest_sig = ((PyObject*)__pyx_t_1);
__pyx_t_1 = 0;
- __pyx_t_2 = (__pyx_v_kwargs == Py_None);
- __pyx_t_3 = (__pyx_t_2 != 0);
- if (__pyx_t_3) {
- __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 361, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF_SET(__pyx_v_kwargs, __pyx_t_1);
- __pyx_t_1 = 0;
+ __pyx_t_3 = (__pyx_v_kwargs != Py_None);
+ __pyx_t_4 = (__pyx_t_3 != 0);
+ if (__pyx_t_4) {
+ } else {
+ __pyx_t_2 = __pyx_t_4;
+ goto __pyx_L4_bool_binop_done;
}
- {
- __Pyx_PyThreadState_declare
- __Pyx_PyThreadState_assign
- __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
- __Pyx_XGOTREF(__pyx_t_4);
- __Pyx_XGOTREF(__pyx_t_5);
- __Pyx_XGOTREF(__pyx_t_6);
- /*try:*/ {
- __pyx_t_1 = __Pyx_Import(__pyx_n_s_numpy, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 361, __pyx_L4_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_v_numpy = __pyx_t_1;
- __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_numpy, __pyx_n_s_ndarray); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 361, __pyx_L4_error)
- __Pyx_GOTREF(__pyx_t_1);
- if (!(likely(PyType_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "type", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 361, __pyx_L4_error)
- __pyx_v_ndarray = ((PyTypeObject*)__pyx_t_1);
- __pyx_t_1 = 0;
- }
- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
- __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
- goto __pyx_L11_try_end;
- __pyx_L4_error:;
- __Pyx_PyThreadState_assign
- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ImportError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError);
- if (__pyx_t_7) {
- __Pyx_AddTraceback("silx.math.chistogramnd_lut.__pyx_fused_cpdef", __pyx_clineno, __pyx_lineno, __pyx_filename);
- if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_8, &__pyx_t_9) < 0) __PYX_ERR(0, 361, __pyx_L6_except_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_GOTREF(__pyx_t_8);
- __Pyx_GOTREF(__pyx_t_9);
- __Pyx_INCREF(Py_None);
- __Pyx_XDECREF_SET(__pyx_v_ndarray, ((PyTypeObject*)Py_None));
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- goto __pyx_L5_exception_handled;
- }
- goto __pyx_L6_except_error;
- __pyx_L6_except_error:;
- __Pyx_PyThreadState_assign
- __Pyx_XGIVEREF(__pyx_t_4);
- __Pyx_XGIVEREF(__pyx_t_5);
- __Pyx_XGIVEREF(__pyx_t_6);
- __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
- goto __pyx_L1_error;
- __pyx_L5_exception_handled:;
- __Pyx_PyThreadState_assign
- __Pyx_XGIVEREF(__pyx_t_4);
- __Pyx_XGIVEREF(__pyx_t_5);
- __Pyx_XGIVEREF(__pyx_t_6);
- __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
- __pyx_L11_try_end:;
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_kwargs); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 361, __pyx_L1_error)
+ __pyx_t_3 = ((!__pyx_t_4) != 0);
+ __pyx_t_2 = __pyx_t_3;
+ __pyx_L4_bool_binop_done:;
+ if (__pyx_t_2) {
+ __Pyx_INCREF(Py_None);
+ __Pyx_DECREF_SET(__pyx_v_kwargs, Py_None);
}
+ __pyx_t_1 = ((PyObject *)__Pyx_ImportNumPyArrayTypeIfAvailable()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 361, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_v_ndarray = ((PyTypeObject*)__pyx_t_1);
+ __pyx_t_1 = 0;
__pyx_v_itemsize = -1L;
- __pyx_v____pyx_int16_t_is_signed = (((__pyx_t_5numpy_int16_t)-1L) < 0);
- __pyx_v____pyx_int64_t_is_signed = (((__pyx_t_5numpy_int64_t)-1L) < 0);
- __pyx_v____pyx_int32_t_is_signed = (((__pyx_t_5numpy_int32_t)-1L) < 0);
+ __pyx_v____pyx_int32_t_is_signed = (!((((__pyx_t_5numpy_int32_t)-1L) > 0) != 0));
+ __pyx_v____pyx_int64_t_is_signed = (!((((__pyx_t_5numpy_int64_t)-1L) > 0) != 0));
+ __pyx_v____pyx_int16_t_is_signed = (!((((__pyx_t_5numpy_int16_t)-1L) > 0) != 0));
if (unlikely(__pyx_v_args == Py_None)) {
PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
__PYX_ERR(0, 361, __pyx_L1_error)
}
- __pyx_t_10 = PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(0, 361, __pyx_L1_error)
- __pyx_t_3 = ((0 < __pyx_t_10) != 0);
- if (__pyx_t_3) {
+ __pyx_t_5 = PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 361, __pyx_L1_error)
+ __pyx_t_2 = ((0 < __pyx_t_5) != 0);
+ if (__pyx_t_2) {
if (unlikely(__pyx_v_args == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
__PYX_ERR(0, 361, __pyx_L1_error)
}
- __pyx_t_9 = PyTuple_GET_ITEM(((PyObject*)__pyx_v_args), 0);
- __Pyx_INCREF(__pyx_t_9);
- __pyx_v_arg = __pyx_t_9;
- __pyx_t_9 = 0;
- goto __pyx_L14;
+ __pyx_t_1 = PyTuple_GET_ITEM(((PyObject*)__pyx_v_args), 0);
+ __Pyx_INCREF(__pyx_t_1);
+ __pyx_v_arg = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L6;
+ }
+ __pyx_t_3 = (__pyx_v_kwargs != Py_None);
+ __pyx_t_4 = (__pyx_t_3 != 0);
+ if (__pyx_t_4) {
+ } else {
+ __pyx_t_2 = __pyx_t_4;
+ goto __pyx_L7_bool_binop_done;
}
if (unlikely(__pyx_v_kwargs == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
__PYX_ERR(0, 361, __pyx_L1_error)
}
- __pyx_t_3 = (__Pyx_PyDict_ContainsTF(__pyx_n_s_i_sample, ((PyObject*)__pyx_v_kwargs), Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 361, __pyx_L1_error)
- __pyx_t_2 = (__pyx_t_3 != 0);
+ __pyx_t_4 = (__Pyx_PyDict_ContainsTF(__pyx_n_s_i_sample, ((PyObject*)__pyx_v_kwargs), Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 361, __pyx_L1_error)
+ __pyx_t_3 = (__pyx_t_4 != 0);
+ __pyx_t_2 = __pyx_t_3;
+ __pyx_L7_bool_binop_done:;
if (__pyx_t_2) {
if (unlikely(__pyx_v_kwargs == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
__PYX_ERR(0, 361, __pyx_L1_error)
}
- __pyx_t_9 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_kwargs), __pyx_n_s_i_sample); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 361, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- __pyx_v_arg = __pyx_t_9;
- __pyx_t_9 = 0;
- goto __pyx_L14;
+ __pyx_t_1 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_kwargs), __pyx_n_s_i_sample); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 361, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_v_arg = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L6;
}
/*else*/ {
if (unlikely(__pyx_v_args == Py_None)) {
PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
__PYX_ERR(0, 361, __pyx_L1_error)
}
- __pyx_t_10 = PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(0, 361, __pyx_L1_error)
- __pyx_t_9 = PyInt_FromSsize_t(__pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 361, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- __pyx_t_8 = __Pyx_PyString_Format(__pyx_kp_s_Expected_at_least_d_arguments, __pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 361, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_8);
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 361, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- __Pyx_GIVEREF(__pyx_t_8);
- PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8);
- __pyx_t_8 = 0;
- __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_9, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 361, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_8);
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- __Pyx_Raise(__pyx_t_8, 0, 0, 0);
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_5 = PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 361, __pyx_L1_error)
+ __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 361, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 361, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_INCREF(__pyx_int_8);
+ __Pyx_GIVEREF(__pyx_int_8);
+ PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_int_8);
+ __Pyx_INCREF(__pyx_n_s_s);
+ __Pyx_GIVEREF(__pyx_n_s_s);
+ PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_n_s_s);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Expected_at_least_d_argument_s_g, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 361, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 361, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_Raise(__pyx_t_6, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__PYX_ERR(0, 361, __pyx_L1_error)
}
- __pyx_L14:;
+ __pyx_L6:;
while (1) {
__pyx_t_2 = (__pyx_v_ndarray != ((PyTypeObject*)Py_None));
__pyx_t_3 = (__pyx_t_2 != 0);
@@ -24116,54 +25286,54 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_6_histogramnd_get_lut_f
__pyx_t_3 = __Pyx_TypeCheck(__pyx_v_arg, __pyx_v_ndarray);
__pyx_t_2 = (__pyx_t_3 != 0);
if (__pyx_t_2) {
- __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_dtype); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 361, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_8);
- __pyx_v_dtype = __pyx_t_8;
- __pyx_t_8 = 0;
- goto __pyx_L18;
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_dtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 361, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_v_dtype = __pyx_t_6;
+ __pyx_t_6 = 0;
+ goto __pyx_L12;
}
__pyx_t_2 = __pyx_memoryview_check(__pyx_v_arg);
__pyx_t_3 = (__pyx_t_2 != 0);
if (__pyx_t_3) {
- __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_base); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 361, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_8);
- __pyx_v_arg_base = __pyx_t_8;
- __pyx_t_8 = 0;
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_base); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 361, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_v_arg_base = __pyx_t_6;
+ __pyx_t_6 = 0;
__pyx_t_3 = __Pyx_TypeCheck(__pyx_v_arg_base, __pyx_v_ndarray);
__pyx_t_2 = (__pyx_t_3 != 0);
if (__pyx_t_2) {
- __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg_base, __pyx_n_s_dtype); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 361, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_8);
- __pyx_v_dtype = __pyx_t_8;
- __pyx_t_8 = 0;
- goto __pyx_L19;
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg_base, __pyx_n_s_dtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 361, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_v_dtype = __pyx_t_6;
+ __pyx_t_6 = 0;
+ goto __pyx_L13;
}
/*else*/ {
__Pyx_INCREF(Py_None);
__pyx_v_dtype = Py_None;
}
- __pyx_L19:;
- goto __pyx_L18;
+ __pyx_L13:;
+ goto __pyx_L12;
}
/*else*/ {
__Pyx_INCREF(Py_None);
__pyx_v_dtype = Py_None;
}
- __pyx_L18:;
+ __pyx_L12:;
__pyx_v_itemsize = -1L;
__pyx_t_2 = (__pyx_v_dtype != Py_None);
__pyx_t_3 = (__pyx_t_2 != 0);
if (__pyx_t_3) {
- __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_itemsize); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 361, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_8);
- __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 361, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_v_itemsize = __pyx_t_10;
- __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_kind); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 361, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_8);
- __pyx_t_11 = __Pyx_PyObject_Ord(__pyx_t_8); if (unlikely(__pyx_t_11 == (long)(Py_UCS4)-1)) __PYX_ERR(0, 361, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_v_kind = __pyx_t_11;
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_itemsize); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 361, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 361, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_v_itemsize = __pyx_t_5;
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_kind); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 361, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_7 = __Pyx_PyObject_Ord(__pyx_t_6); if (unlikely(__pyx_t_7 == ((long)(long)(Py_UCS4)-1))) __PYX_ERR(0, 361, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_v_kind = __pyx_t_7;
__pyx_v_dtype_signed = (__pyx_v_kind == 'i');
switch (__pyx_v_kind) {
case 'i':
@@ -24172,47 +25342,47 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_6_histogramnd_get_lut_f
if (__pyx_t_2) {
} else {
__pyx_t_3 = __pyx_t_2;
- goto __pyx_L22_bool_binop_done;
+ goto __pyx_L16_bool_binop_done;
}
- __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 361, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_8);
- __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 361, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_t_2 = ((((Py_ssize_t)__pyx_t_10) == 1) != 0);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 361, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 361, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_2 = ((((Py_ssize_t)__pyx_t_5) == 1) != 0);
if (__pyx_t_2) {
} else {
__pyx_t_3 = __pyx_t_2;
- goto __pyx_L22_bool_binop_done;
+ goto __pyx_L16_bool_binop_done;
}
__pyx_t_2 = ((!((__pyx_v____pyx_int32_t_is_signed ^ __pyx_v_dtype_signed) != 0)) != 0);
__pyx_t_3 = __pyx_t_2;
- __pyx_L22_bool_binop_done:;
+ __pyx_L16_bool_binop_done:;
if (__pyx_t_3) {
if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_int32_t, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 361, __pyx_L1_error)
- goto __pyx_L16_break;
+ goto __pyx_L10_break;
}
__pyx_t_2 = (((sizeof(__pyx_t_5numpy_int64_t)) == __pyx_v_itemsize) != 0);
if (__pyx_t_2) {
} else {
__pyx_t_3 = __pyx_t_2;
- goto __pyx_L26_bool_binop_done;
+ goto __pyx_L20_bool_binop_done;
}
- __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 361, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_8);
- __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 361, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_t_2 = ((((Py_ssize_t)__pyx_t_10) == 1) != 0);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 361, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 361, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_2 = ((((Py_ssize_t)__pyx_t_5) == 1) != 0);
if (__pyx_t_2) {
} else {
__pyx_t_3 = __pyx_t_2;
- goto __pyx_L26_bool_binop_done;
+ goto __pyx_L20_bool_binop_done;
}
__pyx_t_2 = ((!((__pyx_v____pyx_int64_t_is_signed ^ __pyx_v_dtype_signed) != 0)) != 0);
__pyx_t_3 = __pyx_t_2;
- __pyx_L26_bool_binop_done:;
+ __pyx_L20_bool_binop_done:;
if (__pyx_t_3) {
if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_int64_t, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 361, __pyx_L1_error)
- goto __pyx_L16_break;
+ goto __pyx_L10_break;
}
break;
case 'f':
@@ -24220,35 +25390,35 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_6_histogramnd_get_lut_f
if (__pyx_t_2) {
} else {
__pyx_t_3 = __pyx_t_2;
- goto __pyx_L30_bool_binop_done;
+ goto __pyx_L24_bool_binop_done;
}
- __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 361, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_8);
- __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 361, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_t_2 = ((((Py_ssize_t)__pyx_t_10) == 1) != 0);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 361, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 361, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_2 = ((((Py_ssize_t)__pyx_t_5) == 1) != 0);
__pyx_t_3 = __pyx_t_2;
- __pyx_L30_bool_binop_done:;
+ __pyx_L24_bool_binop_done:;
if (__pyx_t_3) {
if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_float64_t, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 361, __pyx_L1_error)
- goto __pyx_L16_break;
+ goto __pyx_L10_break;
}
__pyx_t_2 = (((sizeof(__pyx_t_5numpy_float32_t)) == __pyx_v_itemsize) != 0);
if (__pyx_t_2) {
} else {
__pyx_t_3 = __pyx_t_2;
- goto __pyx_L33_bool_binop_done;
+ goto __pyx_L27_bool_binop_done;
}
- __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 361, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_8);
- __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 361, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_t_2 = ((((Py_ssize_t)__pyx_t_10) == 1) != 0);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 361, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 361, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_2 = ((((Py_ssize_t)__pyx_t_5) == 1) != 0);
__pyx_t_3 = __pyx_t_2;
- __pyx_L33_bool_binop_done:;
+ __pyx_L27_bool_binop_done:;
if (__pyx_t_3) {
if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_float32_t, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 361, __pyx_L1_error)
- goto __pyx_L16_break;
+ goto __pyx_L10_break;
}
break;
case 'c':
@@ -24263,19 +25433,19 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_6_histogramnd_get_lut_f
if (!__pyx_t_2) {
} else {
__pyx_t_3 = __pyx_t_2;
- goto __pyx_L36_bool_binop_done;
+ goto __pyx_L30_bool_binop_done;
}
__pyx_t_2 = ((__pyx_v_itemsize == (sizeof(__pyx_t_5numpy_float64_t))) != 0);
__pyx_t_3 = __pyx_t_2;
- __pyx_L36_bool_binop_done:;
+ __pyx_L30_bool_binop_done:;
if (__pyx_t_3) {
- __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float64_t(__pyx_v_arg);
- __pyx_v_memslice = __pyx_t_12;
+ __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float64_t(__pyx_v_arg, 0);
+ __pyx_v_memslice = __pyx_t_8;
__pyx_t_3 = (__pyx_v_memslice.memview != 0);
if (__pyx_t_3) {
__PYX_XDEC_MEMVIEW((&__pyx_v_memslice), 1);
if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_float64_t, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 361, __pyx_L1_error)
- goto __pyx_L16_break;
+ goto __pyx_L10_break;
}
/*else*/ {
PyErr_Clear();
@@ -24285,19 +25455,19 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_6_histogramnd_get_lut_f
if (!__pyx_t_2) {
} else {
__pyx_t_3 = __pyx_t_2;
- goto __pyx_L40_bool_binop_done;
+ goto __pyx_L34_bool_binop_done;
}
__pyx_t_2 = ((__pyx_v_itemsize == (sizeof(__pyx_t_5numpy_float32_t))) != 0);
__pyx_t_3 = __pyx_t_2;
- __pyx_L40_bool_binop_done:;
+ __pyx_L34_bool_binop_done:;
if (__pyx_t_3) {
- __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float32_t(__pyx_v_arg);
- __pyx_v_memslice = __pyx_t_12;
+ __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float32_t(__pyx_v_arg, 0);
+ __pyx_v_memslice = __pyx_t_8;
__pyx_t_3 = (__pyx_v_memslice.memview != 0);
if (__pyx_t_3) {
__PYX_XDEC_MEMVIEW((&__pyx_v_memslice), 1);
if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_float32_t, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 361, __pyx_L1_error)
- goto __pyx_L16_break;
+ goto __pyx_L10_break;
}
/*else*/ {
PyErr_Clear();
@@ -24307,19 +25477,19 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_6_histogramnd_get_lut_f
if (!__pyx_t_2) {
} else {
__pyx_t_3 = __pyx_t_2;
- goto __pyx_L44_bool_binop_done;
+ goto __pyx_L38_bool_binop_done;
}
__pyx_t_2 = ((__pyx_v_itemsize == (sizeof(__pyx_t_5numpy_int32_t))) != 0);
__pyx_t_3 = __pyx_t_2;
- __pyx_L44_bool_binop_done:;
+ __pyx_L38_bool_binop_done:;
if (__pyx_t_3) {
- __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(__pyx_v_arg);
- __pyx_v_memslice = __pyx_t_12;
+ __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(__pyx_v_arg, 0);
+ __pyx_v_memslice = __pyx_t_8;
__pyx_t_3 = (__pyx_v_memslice.memview != 0);
if (__pyx_t_3) {
__PYX_XDEC_MEMVIEW((&__pyx_v_memslice), 1);
if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_int32_t, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 361, __pyx_L1_error)
- goto __pyx_L16_break;
+ goto __pyx_L10_break;
}
/*else*/ {
PyErr_Clear();
@@ -24329,213 +25499,228 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_6_histogramnd_get_lut_f
if (!__pyx_t_2) {
} else {
__pyx_t_3 = __pyx_t_2;
- goto __pyx_L48_bool_binop_done;
+ goto __pyx_L42_bool_binop_done;
}
__pyx_t_2 = ((__pyx_v_itemsize == (sizeof(__pyx_t_5numpy_int64_t))) != 0);
__pyx_t_3 = __pyx_t_2;
- __pyx_L48_bool_binop_done:;
+ __pyx_L42_bool_binop_done:;
if (__pyx_t_3) {
- __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(__pyx_v_arg);
- __pyx_v_memslice = __pyx_t_12;
+ __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(__pyx_v_arg, 0);
+ __pyx_v_memslice = __pyx_t_8;
__pyx_t_3 = (__pyx_v_memslice.memview != 0);
if (__pyx_t_3) {
__PYX_XDEC_MEMVIEW((&__pyx_v_memslice), 1);
if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_int64_t, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 361, __pyx_L1_error)
- goto __pyx_L16_break;
+ goto __pyx_L10_break;
}
/*else*/ {
PyErr_Clear();
}
}
if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, Py_None, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 361, __pyx_L1_error)
- goto __pyx_L16_break;
+ goto __pyx_L10_break;
}
- __pyx_L16_break:;
+ __pyx_L10_break:;
if (unlikely(__pyx_v_args == Py_None)) {
PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
__PYX_ERR(0, 361, __pyx_L1_error)
}
- __pyx_t_10 = PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(0, 361, __pyx_L1_error)
- __pyx_t_3 = ((5 < __pyx_t_10) != 0);
+ __pyx_t_5 = PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 361, __pyx_L1_error)
+ __pyx_t_3 = ((5 < __pyx_t_5) != 0);
if (__pyx_t_3) {
if (unlikely(__pyx_v_args == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
__PYX_ERR(0, 361, __pyx_L1_error)
}
- __pyx_t_8 = PyTuple_GET_ITEM(((PyObject*)__pyx_v_args), 5);
- __Pyx_INCREF(__pyx_t_8);
- __Pyx_DECREF_SET(__pyx_v_arg, __pyx_t_8);
- __pyx_t_8 = 0;
- goto __pyx_L51;
+ __pyx_t_6 = PyTuple_GET_ITEM(((PyObject*)__pyx_v_args), 5);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_DECREF_SET(__pyx_v_arg, __pyx_t_6);
+ __pyx_t_6 = 0;
+ goto __pyx_L45;
+ }
+ __pyx_t_2 = (__pyx_v_kwargs != Py_None);
+ __pyx_t_4 = (__pyx_t_2 != 0);
+ if (__pyx_t_4) {
+ } else {
+ __pyx_t_3 = __pyx_t_4;
+ goto __pyx_L46_bool_binop_done;
}
if (unlikely(__pyx_v_kwargs == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
__PYX_ERR(0, 361, __pyx_L1_error)
}
- __pyx_t_3 = (__Pyx_PyDict_ContainsTF(__pyx_n_s_o_lut, ((PyObject*)__pyx_v_kwargs), Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 361, __pyx_L1_error)
- __pyx_t_2 = (__pyx_t_3 != 0);
- if (__pyx_t_2) {
+ __pyx_t_4 = (__Pyx_PyDict_ContainsTF(__pyx_n_s_o_lut, ((PyObject*)__pyx_v_kwargs), Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 361, __pyx_L1_error)
+ __pyx_t_2 = (__pyx_t_4 != 0);
+ __pyx_t_3 = __pyx_t_2;
+ __pyx_L46_bool_binop_done:;
+ if (__pyx_t_3) {
if (unlikely(__pyx_v_kwargs == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
__PYX_ERR(0, 361, __pyx_L1_error)
}
- __pyx_t_8 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_kwargs), __pyx_n_s_o_lut); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 361, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_8);
- __Pyx_DECREF_SET(__pyx_v_arg, __pyx_t_8);
- __pyx_t_8 = 0;
- goto __pyx_L51;
+ __pyx_t_6 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_kwargs), __pyx_n_s_o_lut); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 361, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF_SET(__pyx_v_arg, __pyx_t_6);
+ __pyx_t_6 = 0;
+ goto __pyx_L45;
}
/*else*/ {
if (unlikely(__pyx_v_args == Py_None)) {
PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
__PYX_ERR(0, 361, __pyx_L1_error)
}
- __pyx_t_10 = PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(0, 361, __pyx_L1_error)
- __pyx_t_8 = PyInt_FromSsize_t(__pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 361, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_8);
- __pyx_t_9 = __Pyx_PyString_Format(__pyx_kp_s_Expected_at_least_d_arguments, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 361, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 361, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_8);
- __Pyx_GIVEREF(__pyx_t_9);
- PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_9);
- __pyx_t_9 = 0;
- __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_8, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 361, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __Pyx_Raise(__pyx_t_9, 0, 0, 0);
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __pyx_t_5 = PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 361, __pyx_L1_error)
+ __pyx_t_6 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 361, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 361, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_int_8);
+ __Pyx_GIVEREF(__pyx_int_8);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_int_8);
+ __Pyx_INCREF(__pyx_n_s_s);
+ __Pyx_GIVEREF(__pyx_n_s_s);
+ PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_s);
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_6);
+ __pyx_t_6 = 0;
+ __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_Expected_at_least_d_argument_s_g, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 361, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 361, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__PYX_ERR(0, 361, __pyx_L1_error)
}
- __pyx_L51:;
+ __pyx_L45:;
while (1) {
- __pyx_t_2 = (__pyx_v_ndarray != ((PyTypeObject*)Py_None));
- __pyx_t_3 = (__pyx_t_2 != 0);
- if (__pyx_t_3) {
- __pyx_t_3 = __Pyx_TypeCheck(__pyx_v_arg, __pyx_v_ndarray);
- __pyx_t_2 = (__pyx_t_3 != 0);
- if (__pyx_t_2) {
- __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_dtype); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 361, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- __Pyx_XDECREF_SET(__pyx_v_dtype, __pyx_t_9);
- __pyx_t_9 = 0;
- goto __pyx_L55;
- }
- __pyx_t_2 = __pyx_memoryview_check(__pyx_v_arg);
+ __pyx_t_3 = (__pyx_v_ndarray != ((PyTypeObject*)Py_None));
+ __pyx_t_2 = (__pyx_t_3 != 0);
+ if (__pyx_t_2) {
+ __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_arg, __pyx_v_ndarray);
__pyx_t_3 = (__pyx_t_2 != 0);
if (__pyx_t_3) {
- __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_base); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 361, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- __Pyx_XDECREF_SET(__pyx_v_arg_base, __pyx_t_9);
- __pyx_t_9 = 0;
- __pyx_t_3 = __Pyx_TypeCheck(__pyx_v_arg_base, __pyx_v_ndarray);
- __pyx_t_2 = (__pyx_t_3 != 0);
- if (__pyx_t_2) {
- __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg_base, __pyx_n_s_dtype); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 361, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- __Pyx_XDECREF_SET(__pyx_v_dtype, __pyx_t_9);
- __pyx_t_9 = 0;
- goto __pyx_L56;
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 361, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_XDECREF_SET(__pyx_v_dtype, __pyx_t_1);
+ __pyx_t_1 = 0;
+ goto __pyx_L51;
+ }
+ __pyx_t_3 = __pyx_memoryview_check(__pyx_v_arg);
+ __pyx_t_2 = (__pyx_t_3 != 0);
+ if (__pyx_t_2) {
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_base); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 361, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_XDECREF_SET(__pyx_v_arg_base, __pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_arg_base, __pyx_v_ndarray);
+ __pyx_t_3 = (__pyx_t_2 != 0);
+ if (__pyx_t_3) {
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg_base, __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 361, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_XDECREF_SET(__pyx_v_dtype, __pyx_t_1);
+ __pyx_t_1 = 0;
+ goto __pyx_L52;
}
/*else*/ {
__Pyx_INCREF(Py_None);
__Pyx_XDECREF_SET(__pyx_v_dtype, Py_None);
}
- __pyx_L56:;
- goto __pyx_L55;
+ __pyx_L52:;
+ goto __pyx_L51;
}
/*else*/ {
__Pyx_INCREF(Py_None);
__Pyx_XDECREF_SET(__pyx_v_dtype, Py_None);
}
- __pyx_L55:;
+ __pyx_L51:;
__pyx_v_itemsize = -1L;
- __pyx_t_2 = (__pyx_v_dtype != Py_None);
- __pyx_t_3 = (__pyx_t_2 != 0);
- if (__pyx_t_3) {
- __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_itemsize); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 361, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_9); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 361, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- __pyx_v_itemsize = __pyx_t_10;
- __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_kind); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 361, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- __pyx_t_11 = __Pyx_PyObject_Ord(__pyx_t_9); if (unlikely(__pyx_t_11 == (long)(Py_UCS4)-1)) __PYX_ERR(0, 361, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- __pyx_v_kind = __pyx_t_11;
+ __pyx_t_3 = (__pyx_v_dtype != Py_None);
+ __pyx_t_2 = (__pyx_t_3 != 0);
+ if (__pyx_t_2) {
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_itemsize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 361, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 361, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_v_itemsize = __pyx_t_5;
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_kind); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 361, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_7 = __Pyx_PyObject_Ord(__pyx_t_1); if (unlikely(__pyx_t_7 == ((long)(long)(Py_UCS4)-1))) __PYX_ERR(0, 361, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_v_kind = __pyx_t_7;
__pyx_v_dtype_signed = (__pyx_v_kind == 'i');
switch (__pyx_v_kind) {
case 'i':
case 'u':
- __pyx_t_2 = (((sizeof(__pyx_t_5numpy_int64_t)) == __pyx_v_itemsize) != 0);
- if (__pyx_t_2) {
+ __pyx_t_3 = (((sizeof(__pyx_t_5numpy_int64_t)) == __pyx_v_itemsize) != 0);
+ if (__pyx_t_3) {
} else {
- __pyx_t_3 = __pyx_t_2;
- goto __pyx_L59_bool_binop_done;
+ __pyx_t_2 = __pyx_t_3;
+ goto __pyx_L55_bool_binop_done;
+ }
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 361, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 361, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_3 = ((((Py_ssize_t)__pyx_t_5) == 1) != 0);
+ if (__pyx_t_3) {
+ } else {
+ __pyx_t_2 = __pyx_t_3;
+ goto __pyx_L55_bool_binop_done;
}
- __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 361, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_9); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 361, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- __pyx_t_2 = ((((Py_ssize_t)__pyx_t_10) == 1) != 0);
+ __pyx_t_3 = ((!((__pyx_v____pyx_int64_t_is_signed ^ __pyx_v_dtype_signed) != 0)) != 0);
+ __pyx_t_2 = __pyx_t_3;
+ __pyx_L55_bool_binop_done:;
if (__pyx_t_2) {
+ if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 1, __pyx_n_s_int64_t, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 361, __pyx_L1_error)
+ goto __pyx_L49_break;
+ }
+ __pyx_t_3 = (((sizeof(__pyx_t_5numpy_int32_t)) == __pyx_v_itemsize) != 0);
+ if (__pyx_t_3) {
} else {
- __pyx_t_3 = __pyx_t_2;
+ __pyx_t_2 = __pyx_t_3;
goto __pyx_L59_bool_binop_done;
}
- __pyx_t_2 = ((!((__pyx_v____pyx_int64_t_is_signed ^ __pyx_v_dtype_signed) != 0)) != 0);
- __pyx_t_3 = __pyx_t_2;
- __pyx_L59_bool_binop_done:;
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 361, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 361, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_3 = ((((Py_ssize_t)__pyx_t_5) == 1) != 0);
if (__pyx_t_3) {
- if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 1, __pyx_n_s_int64_t, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 361, __pyx_L1_error)
- goto __pyx_L53_break;
- }
- __pyx_t_2 = (((sizeof(__pyx_t_5numpy_int32_t)) == __pyx_v_itemsize) != 0);
- if (__pyx_t_2) {
} else {
- __pyx_t_3 = __pyx_t_2;
- goto __pyx_L63_bool_binop_done;
+ __pyx_t_2 = __pyx_t_3;
+ goto __pyx_L59_bool_binop_done;
}
- __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 361, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_9); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 361, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- __pyx_t_2 = ((((Py_ssize_t)__pyx_t_10) == 1) != 0);
+ __pyx_t_3 = ((!((__pyx_v____pyx_int32_t_is_signed ^ __pyx_v_dtype_signed) != 0)) != 0);
+ __pyx_t_2 = __pyx_t_3;
+ __pyx_L59_bool_binop_done:;
if (__pyx_t_2) {
+ if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 1, __pyx_n_s_int32_t, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 361, __pyx_L1_error)
+ goto __pyx_L49_break;
+ }
+ __pyx_t_3 = (((sizeof(__pyx_t_5numpy_int16_t)) == __pyx_v_itemsize) != 0);
+ if (__pyx_t_3) {
} else {
- __pyx_t_3 = __pyx_t_2;
+ __pyx_t_2 = __pyx_t_3;
goto __pyx_L63_bool_binop_done;
}
- __pyx_t_2 = ((!((__pyx_v____pyx_int32_t_is_signed ^ __pyx_v_dtype_signed) != 0)) != 0);
- __pyx_t_3 = __pyx_t_2;
- __pyx_L63_bool_binop_done:;
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 361, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 361, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_3 = ((((Py_ssize_t)__pyx_t_5) == 1) != 0);
if (__pyx_t_3) {
- if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 1, __pyx_n_s_int32_t, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 361, __pyx_L1_error)
- goto __pyx_L53_break;
- }
- __pyx_t_2 = (((sizeof(__pyx_t_5numpy_int16_t)) == __pyx_v_itemsize) != 0);
- if (__pyx_t_2) {
} else {
- __pyx_t_3 = __pyx_t_2;
- goto __pyx_L67_bool_binop_done;
+ __pyx_t_2 = __pyx_t_3;
+ goto __pyx_L63_bool_binop_done;
}
- __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 361, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_9); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 361, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- __pyx_t_2 = ((((Py_ssize_t)__pyx_t_10) == 1) != 0);
+ __pyx_t_3 = ((!((__pyx_v____pyx_int16_t_is_signed ^ __pyx_v_dtype_signed) != 0)) != 0);
+ __pyx_t_2 = __pyx_t_3;
+ __pyx_L63_bool_binop_done:;
if (__pyx_t_2) {
- } else {
- __pyx_t_3 = __pyx_t_2;
- goto __pyx_L67_bool_binop_done;
- }
- __pyx_t_2 = ((!((__pyx_v____pyx_int16_t_is_signed ^ __pyx_v_dtype_signed) != 0)) != 0);
- __pyx_t_3 = __pyx_t_2;
- __pyx_L67_bool_binop_done:;
- if (__pyx_t_3) {
if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 1, __pyx_n_s_int16_t, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 361, __pyx_L1_error)
- goto __pyx_L53_break;
+ goto __pyx_L49_break;
}
break;
case 'f':
@@ -24548,255 +25733,162 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_6_histogramnd_get_lut_f
}
}
}
- __pyx_t_2 = ((__pyx_v_itemsize == -1L) != 0);
- if (!__pyx_t_2) {
+ __pyx_t_3 = ((__pyx_v_itemsize == -1L) != 0);
+ if (!__pyx_t_3) {
} else {
- __pyx_t_3 = __pyx_t_2;
- goto __pyx_L71_bool_binop_done;
+ __pyx_t_2 = __pyx_t_3;
+ goto __pyx_L67_bool_binop_done;
}
- __pyx_t_2 = ((__pyx_v_itemsize == (sizeof(__pyx_t_5numpy_int64_t))) != 0);
- __pyx_t_3 = __pyx_t_2;
- __pyx_L71_bool_binop_done:;
- if (__pyx_t_3) {
- __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(__pyx_v_arg);
- __pyx_v_memslice = __pyx_t_12;
- __pyx_t_3 = (__pyx_v_memslice.memview != 0);
- if (__pyx_t_3) {
+ __pyx_t_3 = ((__pyx_v_itemsize == (sizeof(__pyx_t_5numpy_int64_t))) != 0);
+ __pyx_t_2 = __pyx_t_3;
+ __pyx_L67_bool_binop_done:;
+ if (__pyx_t_2) {
+ __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(__pyx_v_arg, 0);
+ __pyx_v_memslice = __pyx_t_8;
+ __pyx_t_2 = (__pyx_v_memslice.memview != 0);
+ if (__pyx_t_2) {
__PYX_XDEC_MEMVIEW((&__pyx_v_memslice), 1);
if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 1, __pyx_n_s_int64_t, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 361, __pyx_L1_error)
- goto __pyx_L53_break;
+ goto __pyx_L49_break;
}
/*else*/ {
PyErr_Clear();
}
}
- __pyx_t_2 = ((__pyx_v_itemsize == -1L) != 0);
- if (!__pyx_t_2) {
+ __pyx_t_3 = ((__pyx_v_itemsize == -1L) != 0);
+ if (!__pyx_t_3) {
} else {
- __pyx_t_3 = __pyx_t_2;
- goto __pyx_L75_bool_binop_done;
+ __pyx_t_2 = __pyx_t_3;
+ goto __pyx_L71_bool_binop_done;
}
- __pyx_t_2 = ((__pyx_v_itemsize == (sizeof(__pyx_t_5numpy_int32_t))) != 0);
- __pyx_t_3 = __pyx_t_2;
- __pyx_L75_bool_binop_done:;
- if (__pyx_t_3) {
- __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(__pyx_v_arg);
- __pyx_v_memslice = __pyx_t_12;
- __pyx_t_3 = (__pyx_v_memslice.memview != 0);
- if (__pyx_t_3) {
+ __pyx_t_3 = ((__pyx_v_itemsize == (sizeof(__pyx_t_5numpy_int32_t))) != 0);
+ __pyx_t_2 = __pyx_t_3;
+ __pyx_L71_bool_binop_done:;
+ if (__pyx_t_2) {
+ __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(__pyx_v_arg, 0);
+ __pyx_v_memslice = __pyx_t_8;
+ __pyx_t_2 = (__pyx_v_memslice.memview != 0);
+ if (__pyx_t_2) {
__PYX_XDEC_MEMVIEW((&__pyx_v_memslice), 1);
if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 1, __pyx_n_s_int32_t, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 361, __pyx_L1_error)
- goto __pyx_L53_break;
+ goto __pyx_L49_break;
}
/*else*/ {
PyErr_Clear();
}
}
- __pyx_t_2 = ((__pyx_v_itemsize == -1L) != 0);
- if (!__pyx_t_2) {
+ __pyx_t_3 = ((__pyx_v_itemsize == -1L) != 0);
+ if (!__pyx_t_3) {
} else {
- __pyx_t_3 = __pyx_t_2;
- goto __pyx_L79_bool_binop_done;
+ __pyx_t_2 = __pyx_t_3;
+ goto __pyx_L75_bool_binop_done;
}
- __pyx_t_2 = ((__pyx_v_itemsize == (sizeof(__pyx_t_5numpy_int16_t))) != 0);
- __pyx_t_3 = __pyx_t_2;
- __pyx_L79_bool_binop_done:;
- if (__pyx_t_3) {
- __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int16_t(__pyx_v_arg);
- __pyx_v_memslice = __pyx_t_12;
- __pyx_t_3 = (__pyx_v_memslice.memview != 0);
- if (__pyx_t_3) {
+ __pyx_t_3 = ((__pyx_v_itemsize == (sizeof(__pyx_t_5numpy_int16_t))) != 0);
+ __pyx_t_2 = __pyx_t_3;
+ __pyx_L75_bool_binop_done:;
+ if (__pyx_t_2) {
+ __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int16_t(__pyx_v_arg, 0);
+ __pyx_v_memslice = __pyx_t_8;
+ __pyx_t_2 = (__pyx_v_memslice.memview != 0);
+ if (__pyx_t_2) {
__PYX_XDEC_MEMVIEW((&__pyx_v_memslice), 1);
if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 1, __pyx_n_s_int16_t, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 361, __pyx_L1_error)
- goto __pyx_L53_break;
+ goto __pyx_L49_break;
}
/*else*/ {
PyErr_Clear();
}
}
if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 1, Py_None, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 361, __pyx_L1_error)
- goto __pyx_L53_break;
+ goto __pyx_L49_break;
}
- __pyx_L53_break:;
- __pyx_t_9 = PyList_New(0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 361, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- __pyx_v_candidates = ((PyObject*)__pyx_t_9);
- __pyx_t_9 = 0;
- __pyx_t_10 = 0;
+ __pyx_L49_break:;
+ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 361, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_v_candidates = ((PyObject*)__pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_5 = 0;
if (unlikely(__pyx_v_signatures == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
__PYX_ERR(0, 361, __pyx_L1_error)
}
- __pyx_t_8 = __Pyx_dict_iterator(((PyObject*)__pyx_v_signatures), 1, ((PyObject *)NULL), (&__pyx_t_13), (&__pyx_t_7)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 361, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_8);
- __Pyx_XDECREF(__pyx_t_9);
- __pyx_t_9 = __pyx_t_8;
- __pyx_t_8 = 0;
+ __pyx_t_6 = __Pyx_dict_iterator(((PyObject*)__pyx_v_signatures), 1, ((PyObject *)NULL), (&__pyx_t_9), (&__pyx_t_10)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 361, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_1);
+ __pyx_t_1 = __pyx_t_6;
+ __pyx_t_6 = 0;
while (1) {
- __pyx_t_14 = __Pyx_dict_iter_next(__pyx_t_9, __pyx_t_13, &__pyx_t_10, &__pyx_t_8, NULL, NULL, __pyx_t_7);
- if (unlikely(__pyx_t_14 == 0)) break;
- if (unlikely(__pyx_t_14 == -1)) __PYX_ERR(0, 361, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_8);
- __Pyx_XDECREF_SET(__pyx_v_sig, __pyx_t_8);
- __pyx_t_8 = 0;
+ __pyx_t_11 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_9, &__pyx_t_5, &__pyx_t_6, NULL, NULL, __pyx_t_10);
+ if (unlikely(__pyx_t_11 == 0)) break;
+ if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 361, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_XDECREF_SET(__pyx_v_sig, __pyx_t_6);
+ __pyx_t_6 = 0;
__pyx_v_match_found = 0;
- __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_sig, __pyx_n_s_strip); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 361, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_8);
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_tuple__27, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 361, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_split); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 361, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_8);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_tuple__28, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 361, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 361, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_8);
- __Pyx_GIVEREF(__pyx_t_1);
- PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_1);
- __Pyx_INCREF(__pyx_v_dest_sig);
- __Pyx_GIVEREF(__pyx_v_dest_sig);
- PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_dest_sig);
- __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 361, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
- __pyx_t_8 = __pyx_t_1; __Pyx_INCREF(__pyx_t_8); __pyx_t_15 = 0;
- __pyx_t_16 = NULL;
- } else {
- __pyx_t_15 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 361, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_8);
- __pyx_t_16 = Py_TYPE(__pyx_t_8)->tp_iternext; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 361, __pyx_L1_error)
- }
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- for (;;) {
- if (likely(!__pyx_t_16)) {
- if (likely(PyList_CheckExact(__pyx_t_8))) {
- if (__pyx_t_15 >= PyList_GET_SIZE(__pyx_t_8)) break;
- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
- __pyx_t_1 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_15); __Pyx_INCREF(__pyx_t_1); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 361, __pyx_L1_error)
- #else
- __pyx_t_1 = PySequence_ITEM(__pyx_t_8, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 361, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- #endif
- } else {
- if (__pyx_t_15 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
- __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_15); __Pyx_INCREF(__pyx_t_1); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 361, __pyx_L1_error)
- #else
- __pyx_t_1 = PySequence_ITEM(__pyx_t_8, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 361, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- #endif
- }
- } else {
- __pyx_t_1 = __pyx_t_16(__pyx_t_8);
- if (unlikely(!__pyx_t_1)) {
- PyObject* exc_type = PyErr_Occurred();
- if (exc_type) {
- if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
- else __PYX_ERR(0, 361, __pyx_L1_error)
- }
- break;
- }
- __Pyx_GOTREF(__pyx_t_1);
- }
- if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
- PyObject* sequence = __pyx_t_1;
- #if !CYTHON_COMPILING_IN_PYPY
- Py_ssize_t size = Py_SIZE(sequence);
- #else
- Py_ssize_t size = PySequence_Size(sequence);
- #endif
- if (unlikely(size != 2)) {
- if (size > 2) __Pyx_RaiseTooManyValuesError(2);
- else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
- __PYX_ERR(0, 361, __pyx_L1_error)
- }
- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
- if (likely(PyTuple_CheckExact(sequence))) {
- __pyx_t_17 = PyTuple_GET_ITEM(sequence, 0);
- __pyx_t_18 = PyTuple_GET_ITEM(sequence, 1);
- } else {
- __pyx_t_17 = PyList_GET_ITEM(sequence, 0);
- __pyx_t_18 = PyList_GET_ITEM(sequence, 1);
- }
- __Pyx_INCREF(__pyx_t_17);
- __Pyx_INCREF(__pyx_t_18);
- #else
- __pyx_t_17 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 361, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_17);
- __pyx_t_18 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 361, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_18);
- #endif
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- } else {
- Py_ssize_t index = -1;
- __pyx_t_19 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 361, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_19);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_20 = Py_TYPE(__pyx_t_19)->tp_iternext;
- index = 0; __pyx_t_17 = __pyx_t_20(__pyx_t_19); if (unlikely(!__pyx_t_17)) goto __pyx_L86_unpacking_failed;
- __Pyx_GOTREF(__pyx_t_17);
- index = 1; __pyx_t_18 = __pyx_t_20(__pyx_t_19); if (unlikely(!__pyx_t_18)) goto __pyx_L86_unpacking_failed;
- __Pyx_GOTREF(__pyx_t_18);
- if (__Pyx_IternextUnpackEndCheck(__pyx_t_20(__pyx_t_19), 2) < 0) __PYX_ERR(0, 361, __pyx_L1_error)
- __pyx_t_20 = NULL;
- __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
- goto __pyx_L87_unpacking_done;
- __pyx_L86_unpacking_failed:;
- __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
- __pyx_t_20 = NULL;
- if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
- __PYX_ERR(0, 361, __pyx_L1_error)
- __pyx_L87_unpacking_done:;
- }
- __Pyx_XDECREF_SET(__pyx_v_src_type, __pyx_t_17);
- __pyx_t_17 = 0;
- __Pyx_XDECREF_SET(__pyx_v_dst_type, __pyx_t_18);
- __pyx_t_18 = 0;
- __pyx_t_3 = (__pyx_v_dst_type != Py_None);
- __pyx_t_2 = (__pyx_t_3 != 0);
- if (__pyx_t_2) {
- __pyx_t_1 = PyObject_RichCompare(__pyx_v_src_type, __pyx_v_dst_type, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 361, __pyx_L1_error)
- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 361, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- if (__pyx_t_2) {
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_sig, __pyx_n_s_strip); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 361, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__27, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 361, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_split); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 361, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__28, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 361, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_XDECREF_SET(__pyx_v_src_sig, __pyx_t_12);
+ __pyx_t_12 = 0;
+ __pyx_t_13 = PyList_GET_SIZE(__pyx_v_dest_sig); if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(0, 361, __pyx_L1_error)
+ __pyx_t_14 = __pyx_t_13;
+ for (__pyx_t_15 = 0; __pyx_t_15 < __pyx_t_14; __pyx_t_15+=1) {
+ __pyx_v_i = __pyx_t_15;
+ __pyx_t_12 = PyList_GET_ITEM(__pyx_v_dest_sig, __pyx_v_i);
+ __Pyx_INCREF(__pyx_t_12);
+ __Pyx_XDECREF_SET(__pyx_v_dst_type, __pyx_t_12);
+ __pyx_t_12 = 0;
+ __pyx_t_2 = (__pyx_v_dst_type != Py_None);
+ __pyx_t_3 = (__pyx_t_2 != 0);
+ if (__pyx_t_3) {
+ __pyx_t_12 = __Pyx_GetItemInt(__pyx_v_src_sig, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 0, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 361, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __pyx_t_6 = PyObject_RichCompare(__pyx_t_12, __pyx_v_dst_type, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 361, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 361, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ if (__pyx_t_3) {
__pyx_v_match_found = 1;
- goto __pyx_L89;
+ goto __pyx_L83;
}
/*else*/ {
__pyx_v_match_found = 0;
- goto __pyx_L85_break;
+ goto __pyx_L81_break;
}
- __pyx_L89:;
+ __pyx_L83:;
}
}
- __pyx_L85_break:;
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_t_2 = (__pyx_v_match_found != 0);
- if (__pyx_t_2) {
- __pyx_t_21 = __Pyx_PyList_Append(__pyx_v_candidates, __pyx_v_sig); if (unlikely(__pyx_t_21 == -1)) __PYX_ERR(0, 361, __pyx_L1_error)
+ __pyx_L81_break:;
+ __pyx_t_3 = (__pyx_v_match_found != 0);
+ if (__pyx_t_3) {
+ __pyx_t_16 = __Pyx_PyList_Append(__pyx_v_candidates, __pyx_v_sig); if (unlikely(__pyx_t_16 == ((int)-1))) __PYX_ERR(0, 361, __pyx_L1_error)
}
}
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- __pyx_t_2 = (__pyx_v_candidates != Py_None) && (PyList_GET_SIZE(__pyx_v_candidates) != 0);
- __pyx_t_3 = ((!__pyx_t_2) != 0);
- if (__pyx_t_3) {
- __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__29, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 361, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- __Pyx_Raise(__pyx_t_9, 0, 0, 0);
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_3 = (PyList_GET_SIZE(__pyx_v_candidates) != 0);
+ __pyx_t_2 = ((!__pyx_t_3) != 0);
+ if (__pyx_t_2) {
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__29, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 361, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__PYX_ERR(0, 361, __pyx_L1_error)
}
- __pyx_t_13 = PyList_GET_SIZE(__pyx_v_candidates); if (unlikely(__pyx_t_13 == -1)) __PYX_ERR(0, 361, __pyx_L1_error)
- __pyx_t_3 = ((__pyx_t_13 > 1) != 0);
- if (__pyx_t_3) {
- __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__30, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 361, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- __Pyx_Raise(__pyx_t_9, 0, 0, 0);
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __pyx_t_9 = PyList_GET_SIZE(__pyx_v_candidates); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 361, __pyx_L1_error)
+ __pyx_t_2 = ((__pyx_t_9 > 1) != 0);
+ if (__pyx_t_2) {
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__30, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 361, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__PYX_ERR(0, 361, __pyx_L1_error)
}
/*else*/ {
@@ -24805,33 +25897,29 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_6_histogramnd_get_lut_f
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
__PYX_ERR(0, 361, __pyx_L1_error)
}
- __pyx_t_9 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_signatures), PyList_GET_ITEM(__pyx_v_candidates, 0)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 361, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- __pyx_r = __pyx_t_9;
- __pyx_t_9 = 0;
+ __pyx_t_1 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_signatures), PyList_GET_ITEM(__pyx_v_candidates, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 361, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
goto __pyx_L0;
}
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
- __Pyx_XDECREF(__pyx_t_8);
- __Pyx_XDECREF(__pyx_t_9);
- __Pyx_XDECREF(__pyx_t_17);
- __Pyx_XDECREF(__pyx_t_18);
- __Pyx_XDECREF(__pyx_t_19);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_12);
__Pyx_AddTraceback("silx.math.chistogramnd_lut.__pyx_fused_cpdef", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_dest_sig);
__Pyx_XDECREF(__pyx_v_ndarray);
- __Pyx_XDECREF(__pyx_v_numpy);
__Pyx_XDECREF(__pyx_v_arg);
__Pyx_XDECREF(__pyx_v_dtype);
__Pyx_XDECREF(__pyx_v_arg_base);
__Pyx_XDECREF(__pyx_v_candidates);
__Pyx_XDECREF(__pyx_v_sig);
- __Pyx_XDECREF(__pyx_v_src_type);
+ __Pyx_XDECREF(__pyx_v_src_sig);
__Pyx_XDECREF(__pyx_v_dst_type);
__Pyx_XDECREF(__pyx_v_kwargs);
__Pyx_XGIVEREF(__pyx_r);
@@ -24862,53 +25950,68 @@ static PyObject *__pyx_fuse_0_0__pyx_pw_4silx_4math_16chistogramnd_lut_107_histo
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
switch (pos_args) {
case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
+ CYTHON_FALLTHROUGH;
case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
+ CYTHON_FALLTHROUGH;
case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ CYTHON_FALLTHROUGH;
case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
case 0: break;
default: goto __pyx_L5_argtuple_error;
}
kw_args = PyDict_Size(__pyx_kwds);
switch (pos_args) {
case 0:
- if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_sample)) != 0)) kw_args--;
+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_sample)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
case 1:
- if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_n_dims)) != 0)) kw_args--;
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_n_dims)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_get_lut_fused", 1, 8, 8, 1); __PYX_ERR(0, 361, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 2:
- if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
+ if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_get_lut_fused", 1, 8, 8, 2); __PYX_ERR(0, 361, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 3:
- if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_histo_range)) != 0)) kw_args--;
+ if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_histo_range)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_get_lut_fused", 1, 8, 8, 3); __PYX_ERR(0, 361, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 4:
- if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_n_bins)) != 0)) kw_args--;
+ if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_n_bins)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_get_lut_fused", 1, 8, 8, 4); __PYX_ERR(0, 361, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 5:
- if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_lut)) != 0)) kw_args--;
+ if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_lut)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_get_lut_fused", 1, 8, 8, 5); __PYX_ERR(0, 361, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 6:
- if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
+ if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_get_lut_fused", 1, 8, 8, 6); __PYX_ERR(0, 361, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 7:
- if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_last_bin_closed)) != 0)) kw_args--;
+ if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_last_bin_closed)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_get_lut_fused", 1, 8, 8, 7); __PYX_ERR(0, 361, __pyx_L3_error)
}
@@ -24928,13 +26031,13 @@ static PyObject *__pyx_fuse_0_0__pyx_pw_4silx_4math_16chistogramnd_lut_107_histo
values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
}
- __pyx_v_i_sample = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float64_t(values[0]); if (unlikely(!__pyx_v_i_sample.memview)) __PYX_ERR(0, 361, __pyx_L3_error)
+ __pyx_v_i_sample = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float64_t(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_sample.memview)) __PYX_ERR(0, 361, __pyx_L3_error)
__pyx_v_i_n_dims = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_i_n_dims == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 362, __pyx_L3_error)
__pyx_v_i_n_elems = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_i_n_elems == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 363, __pyx_L3_error)
- __pyx_v_i_histo_range = __Pyx_PyObject_to_MemoryviewSlice_ds_double(values[3]); if (unlikely(!__pyx_v_i_histo_range.memview)) __PYX_ERR(0, 364, __pyx_L3_error)
- __pyx_v_i_n_bins = __Pyx_PyObject_to_MemoryviewSlice_ds_int(values[4]); if (unlikely(!__pyx_v_i_n_bins.memview)) __PYX_ERR(0, 365, __pyx_L3_error)
- __pyx_v_o_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[5]); if (unlikely(!__pyx_v_o_lut.memview)) __PYX_ERR(0, 366, __pyx_L3_error)
- __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[6]); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 367, __pyx_L3_error)
+ __pyx_v_i_histo_range = __Pyx_PyObject_to_MemoryviewSlice_ds_double(values[3], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_histo_range.memview)) __PYX_ERR(0, 364, __pyx_L3_error)
+ __pyx_v_i_n_bins = __Pyx_PyObject_to_MemoryviewSlice_ds_int(values[4], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_n_bins.memview)) __PYX_ERR(0, 365, __pyx_L3_error)
+ __pyx_v_o_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[5], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_lut.memview)) __PYX_ERR(0, 366, __pyx_L3_error)
+ __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[6], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 367, __pyx_L3_error)
__pyx_v_last_bin_closed = __Pyx_PyObject_IsTrue(values[7]); if (unlikely((__pyx_v_last_bin_closed == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 368, __pyx_L3_error)
}
goto __pyx_L4_argument_unpacking_done;
@@ -24966,16 +26069,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_106_histogramnd_get_lut
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
- Py_ssize_t __pyx_t_3;
+ int __pyx_t_3;
Py_ssize_t __pyx_t_4;
- int __pyx_t_5;
- Py_ssize_t __pyx_t_6;
+ Py_ssize_t __pyx_t_5;
+ int __pyx_t_6;
Py_ssize_t __pyx_t_7;
Py_ssize_t __pyx_t_8;
- int __pyx_t_9;
- Py_ssize_t __pyx_t_10;
+ Py_ssize_t __pyx_t_9;
+ int __pyx_t_10;
Py_ssize_t __pyx_t_11;
Py_ssize_t __pyx_t_12;
+ Py_ssize_t __pyx_t_13;
__Pyx_RefNannySetupContext("__pyx_fuse_0_0_histogramnd_get_lut_fused", 0);
/* "silx/math/chistogramnd_lut.pyx":371
@@ -25040,8 +26144,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_106_histogramnd_get_lut
* g_max[i] = i_histo_range[2*i+1]
*/
__pyx_t_1 = __pyx_v_i_n_dims;
- for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
- __pyx_v_i = __pyx_t_2;
+ __pyx_t_2 = __pyx_t_1;
+ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
+ __pyx_v_i = __pyx_t_3;
/* "silx/math/chistogramnd_lut.pyx":386
*
@@ -25050,8 +26155,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_106_histogramnd_get_lut
* g_max[i] = i_histo_range[2*i+1]
* bins_range[i] = g_max[i] - g_min[i]
*/
- __pyx_t_3 = (2 * __pyx_v_i);
- (__pyx_v_g_min[__pyx_v_i]) = (*((double *) ( /* dim=0 */ (__pyx_v_i_histo_range.data + __pyx_t_3 * __pyx_v_i_histo_range.strides[0]) )));
+ __pyx_t_4 = (2 * __pyx_v_i);
+ (__pyx_v_g_min[__pyx_v_i]) = (*((double *) ( /* dim=0 */ (__pyx_v_i_histo_range.data + __pyx_t_4 * __pyx_v_i_histo_range.strides[0]) )));
/* "silx/math/chistogramnd_lut.pyx":387
* for i in range(i_n_dims):
@@ -25060,8 +26165,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_106_histogramnd_get_lut
* bins_range[i] = g_max[i] - g_min[i]
*
*/
- __pyx_t_4 = ((2 * __pyx_v_i) + 1);
- (__pyx_v_g_max[__pyx_v_i]) = (*((double *) ( /* dim=0 */ (__pyx_v_i_histo_range.data + __pyx_t_4 * __pyx_v_i_histo_range.strides[0]) )));
+ __pyx_t_5 = ((2 * __pyx_v_i) + 1);
+ (__pyx_v_g_max[__pyx_v_i]) = (*((double *) ( /* dim=0 */ (__pyx_v_i_histo_range.data + __pyx_t_5 * __pyx_v_i_histo_range.strides[0]) )));
/* "silx/math/chistogramnd_lut.pyx":388
* g_min[i] = i_histo_range[2*i]
@@ -25102,6 +26207,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_106_histogramnd_get_lut
#ifdef WITH_THREAD
PyThreadState *_save;
Py_UNBLOCK_THREADS
+ __Pyx_FastGIL_Remember();
#endif
/*try:*/ {
@@ -25113,8 +26219,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_106_histogramnd_get_lut
* lut_idx += 1
*/
while (1) {
- __pyx_t_5 = ((__pyx_v_elem_idx < __pyx_v_max_idx) != 0);
- if (!__pyx_t_5) break;
+ __pyx_t_6 = ((__pyx_v_elem_idx < __pyx_v_max_idx) != 0);
+ if (!__pyx_t_6) break;
/* "silx/math/chistogramnd_lut.pyx":395
* with nogil:
@@ -25151,8 +26257,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_106_histogramnd_get_lut
* # =====================
*/
__pyx_t_1 = __pyx_v_i_n_dims;
- for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
- __pyx_v_i = __pyx_t_2;
+ __pyx_t_2 = __pyx_t_1;
+ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
+ __pyx_v_i = __pyx_t_3;
/* "silx/math/chistogramnd_lut.pyx":401
*
@@ -25161,8 +26268,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_106_histogramnd_get_lut
* # =====================
* # Element is rejected if any of the following is NOT true :
*/
- __pyx_t_6 = (__pyx_v_elem_idx + __pyx_v_i);
- __pyx_v_elem_coord = (*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_i_sample.data + __pyx_t_6 * __pyx_v_i_sample.strides[0]) )));
+ __pyx_t_7 = (__pyx_v_elem_idx + __pyx_v_i);
+ __pyx_v_elem_coord = (*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_i_sample.data + __pyx_t_7 * __pyx_v_i_sample.strides[0]) )));
/* "silx/math/chistogramnd_lut.pyx":408
* # 3. coordinate==maximum value and last_bin_closed is True
@@ -25171,8 +26278,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_106_histogramnd_get_lut
* bin_idx = -1
* break
*/
- __pyx_t_5 = ((__pyx_v_elem_coord < (__pyx_v_g_min[__pyx_v_i])) != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = ((__pyx_v_elem_coord < (__pyx_v_g_min[__pyx_v_i])) != 0);
+ if (__pyx_t_6) {
/* "silx/math/chistogramnd_lut.pyx":409
* # =====================
@@ -25208,8 +26315,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_106_histogramnd_get_lut
* bin_idx = <long>(bin_idx * i_n_bins[i] + # noqa
* (((elem_coord - g_min[i]) * i_n_bins[i]) /
*/
- __pyx_t_5 = ((__pyx_v_elem_coord < (__pyx_v_g_max[__pyx_v_i])) != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = ((__pyx_v_elem_coord < (__pyx_v_g_max[__pyx_v_i])) != 0);
+ if (__pyx_t_6) {
/* "silx/math/chistogramnd_lut.pyx":418
* # (two tests)
@@ -25218,7 +26325,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_106_histogramnd_get_lut
* (((elem_coord - g_min[i]) * i_n_bins[i]) /
* bins_range[i]))
*/
- __pyx_t_7 = __pyx_v_i;
+ __pyx_t_8 = __pyx_v_i;
/* "silx/math/chistogramnd_lut.pyx":419
* if elem_coord < g_max[i]:
@@ -25227,7 +26334,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_106_histogramnd_get_lut
* bins_range[i]))
* else:
*/
- __pyx_t_8 = __pyx_v_i;
+ __pyx_t_9 = __pyx_v_i;
/* "silx/math/chistogramnd_lut.pyx":418
* # (two tests)
@@ -25236,7 +26343,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_106_histogramnd_get_lut
* (((elem_coord - g_min[i]) * i_n_bins[i]) /
* bins_range[i]))
*/
- __pyx_v_bin_idx = ((long)((__pyx_v_bin_idx * (*((int *) ( /* dim=0 */ (__pyx_v_i_n_bins.data + __pyx_t_7 * __pyx_v_i_n_bins.strides[0]) )))) + (((__pyx_v_elem_coord - (__pyx_v_g_min[__pyx_v_i])) * (*((int *) ( /* dim=0 */ (__pyx_v_i_n_bins.data + __pyx_t_8 * __pyx_v_i_n_bins.strides[0]) )))) / (__pyx_v_bins_range[__pyx_v_i]))));
+ __pyx_v_bin_idx = ((long)((__pyx_v_bin_idx * (*((int *) ( /* dim=0 */ (__pyx_v_i_n_bins.data + __pyx_t_8 * __pyx_v_i_n_bins.strides[0]) )))) + (((__pyx_v_elem_coord - (__pyx_v_g_min[__pyx_v_i])) * (*((int *) ( /* dim=0 */ (__pyx_v_i_n_bins.data + __pyx_t_9 * __pyx_v_i_n_bins.strides[0]) )))) / (__pyx_v_bins_range[__pyx_v_i]))));
/* "silx/math/chistogramnd_lut.pyx":417
* # than coordinates higher or equal to the max
@@ -25256,16 +26363,16 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_106_histogramnd_get_lut
* else:
*/
/*else*/ {
- __pyx_t_9 = (__pyx_v_last_bin_closed != 0);
- if (__pyx_t_9) {
+ __pyx_t_10 = (__pyx_v_last_bin_closed != 0);
+ if (__pyx_t_10) {
} else {
- __pyx_t_5 = __pyx_t_9;
+ __pyx_t_6 = __pyx_t_10;
goto __pyx_L15_bool_binop_done;
}
- __pyx_t_9 = ((__pyx_v_elem_coord == (__pyx_v_g_max[__pyx_v_i])) != 0);
- __pyx_t_5 = __pyx_t_9;
+ __pyx_t_10 = ((__pyx_v_elem_coord == (__pyx_v_g_max[__pyx_v_i])) != 0);
+ __pyx_t_6 = __pyx_t_10;
__pyx_L15_bool_binop_done:;
- if (__pyx_t_5) {
+ if (__pyx_t_6) {
/* "silx/math/chistogramnd_lut.pyx":426
* # else : discard
@@ -25274,8 +26381,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_106_histogramnd_get_lut
* else:
* bin_idx = -1
*/
- __pyx_t_10 = __pyx_v_i;
- __pyx_v_bin_idx = (((__pyx_v_bin_idx + 1) * (*((int *) ( /* dim=0 */ (__pyx_v_i_n_bins.data + __pyx_t_10 * __pyx_v_i_n_bins.strides[0]) )))) - 1);
+ __pyx_t_11 = __pyx_v_i;
+ __pyx_v_bin_idx = (((__pyx_v_bin_idx + 1) * (*((int *) ( /* dim=0 */ (__pyx_v_i_n_bins.data + __pyx_t_11 * __pyx_v_i_n_bins.strides[0]) )))) - 1);
/* "silx/math/chistogramnd_lut.pyx":425
* # put it in the last bin
@@ -25319,8 +26426,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_106_histogramnd_get_lut
* if bin_idx >= 0:
* o_histo[bin_idx] += 1
*/
- __pyx_t_11 = __pyx_v_lut_idx;
- *((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_o_lut.data + __pyx_t_11 * __pyx_v_o_lut.strides[0]) )) = __pyx_v_bin_idx;
+ __pyx_t_12 = __pyx_v_lut_idx;
+ *((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_o_lut.data + __pyx_t_12 * __pyx_v_o_lut.strides[0]) )) = __pyx_v_bin_idx;
/* "silx/math/chistogramnd_lut.pyx":432
*
@@ -25329,8 +26436,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_106_histogramnd_get_lut
* o_histo[bin_idx] += 1
*
*/
- __pyx_t_5 = ((__pyx_v_bin_idx >= 0) != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = ((__pyx_v_bin_idx >= 0) != 0);
+ if (__pyx_t_6) {
/* "silx/math/chistogramnd_lut.pyx":433
* o_lut[lut_idx] = bin_idx
@@ -25339,8 +26446,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_106_histogramnd_get_lut
*
* return 0
*/
- __pyx_t_12 = __pyx_v_bin_idx;
- *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_12 * __pyx_v_o_histo.strides[0]) )) += 1;
+ __pyx_t_13 = __pyx_v_bin_idx;
+ *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_13 * __pyx_v_o_histo.strides[0]) )) += 1;
/* "silx/math/chistogramnd_lut.pyx":432
*
@@ -25363,6 +26470,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_106_histogramnd_get_lut
/*finally:*/ {
/*normal exit:*/{
#ifdef WITH_THREAD
+ __Pyx_FastGIL_Forget();
Py_BLOCK_THREADS
#endif
goto __pyx_L7;
@@ -25424,53 +26532,68 @@ static PyObject *__pyx_fuse_0_1__pyx_pw_4silx_4math_16chistogramnd_lut_109_histo
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
switch (pos_args) {
case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
+ CYTHON_FALLTHROUGH;
case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
+ CYTHON_FALLTHROUGH;
case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ CYTHON_FALLTHROUGH;
case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
case 0: break;
default: goto __pyx_L5_argtuple_error;
}
kw_args = PyDict_Size(__pyx_kwds);
switch (pos_args) {
case 0:
- if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_sample)) != 0)) kw_args--;
+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_sample)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
case 1:
- if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_n_dims)) != 0)) kw_args--;
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_n_dims)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_get_lut_fused", 1, 8, 8, 1); __PYX_ERR(0, 361, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 2:
- if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
+ if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_get_lut_fused", 1, 8, 8, 2); __PYX_ERR(0, 361, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 3:
- if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_histo_range)) != 0)) kw_args--;
+ if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_histo_range)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_get_lut_fused", 1, 8, 8, 3); __PYX_ERR(0, 361, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 4:
- if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_n_bins)) != 0)) kw_args--;
+ if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_n_bins)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_get_lut_fused", 1, 8, 8, 4); __PYX_ERR(0, 361, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 5:
- if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_lut)) != 0)) kw_args--;
+ if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_lut)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_get_lut_fused", 1, 8, 8, 5); __PYX_ERR(0, 361, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 6:
- if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
+ if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_get_lut_fused", 1, 8, 8, 6); __PYX_ERR(0, 361, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 7:
- if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_last_bin_closed)) != 0)) kw_args--;
+ if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_last_bin_closed)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_get_lut_fused", 1, 8, 8, 7); __PYX_ERR(0, 361, __pyx_L3_error)
}
@@ -25490,13 +26613,13 @@ static PyObject *__pyx_fuse_0_1__pyx_pw_4silx_4math_16chistogramnd_lut_109_histo
values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
}
- __pyx_v_i_sample = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float64_t(values[0]); if (unlikely(!__pyx_v_i_sample.memview)) __PYX_ERR(0, 361, __pyx_L3_error)
+ __pyx_v_i_sample = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float64_t(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_sample.memview)) __PYX_ERR(0, 361, __pyx_L3_error)
__pyx_v_i_n_dims = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_i_n_dims == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 362, __pyx_L3_error)
__pyx_v_i_n_elems = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_i_n_elems == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 363, __pyx_L3_error)
- __pyx_v_i_histo_range = __Pyx_PyObject_to_MemoryviewSlice_ds_double(values[3]); if (unlikely(!__pyx_v_i_histo_range.memview)) __PYX_ERR(0, 364, __pyx_L3_error)
- __pyx_v_i_n_bins = __Pyx_PyObject_to_MemoryviewSlice_ds_int(values[4]); if (unlikely(!__pyx_v_i_n_bins.memview)) __PYX_ERR(0, 365, __pyx_L3_error)
- __pyx_v_o_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[5]); if (unlikely(!__pyx_v_o_lut.memview)) __PYX_ERR(0, 366, __pyx_L3_error)
- __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[6]); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 367, __pyx_L3_error)
+ __pyx_v_i_histo_range = __Pyx_PyObject_to_MemoryviewSlice_ds_double(values[3], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_histo_range.memview)) __PYX_ERR(0, 364, __pyx_L3_error)
+ __pyx_v_i_n_bins = __Pyx_PyObject_to_MemoryviewSlice_ds_int(values[4], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_n_bins.memview)) __PYX_ERR(0, 365, __pyx_L3_error)
+ __pyx_v_o_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[5], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_lut.memview)) __PYX_ERR(0, 366, __pyx_L3_error)
+ __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[6], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 367, __pyx_L3_error)
__pyx_v_last_bin_closed = __Pyx_PyObject_IsTrue(values[7]); if (unlikely((__pyx_v_last_bin_closed == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 368, __pyx_L3_error)
}
goto __pyx_L4_argument_unpacking_done;
@@ -25528,16 +26651,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_108_histogramnd_get_lut
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
- Py_ssize_t __pyx_t_3;
+ int __pyx_t_3;
Py_ssize_t __pyx_t_4;
- int __pyx_t_5;
- Py_ssize_t __pyx_t_6;
+ Py_ssize_t __pyx_t_5;
+ int __pyx_t_6;
Py_ssize_t __pyx_t_7;
Py_ssize_t __pyx_t_8;
- int __pyx_t_9;
- Py_ssize_t __pyx_t_10;
+ Py_ssize_t __pyx_t_9;
+ int __pyx_t_10;
Py_ssize_t __pyx_t_11;
Py_ssize_t __pyx_t_12;
+ Py_ssize_t __pyx_t_13;
__Pyx_RefNannySetupContext("__pyx_fuse_0_1_histogramnd_get_lut_fused", 0);
/* "silx/math/chistogramnd_lut.pyx":371
@@ -25602,8 +26726,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_108_histogramnd_get_lut
* g_max[i] = i_histo_range[2*i+1]
*/
__pyx_t_1 = __pyx_v_i_n_dims;
- for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
- __pyx_v_i = __pyx_t_2;
+ __pyx_t_2 = __pyx_t_1;
+ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
+ __pyx_v_i = __pyx_t_3;
/* "silx/math/chistogramnd_lut.pyx":386
*
@@ -25612,8 +26737,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_108_histogramnd_get_lut
* g_max[i] = i_histo_range[2*i+1]
* bins_range[i] = g_max[i] - g_min[i]
*/
- __pyx_t_3 = (2 * __pyx_v_i);
- (__pyx_v_g_min[__pyx_v_i]) = (*((double *) ( /* dim=0 */ (__pyx_v_i_histo_range.data + __pyx_t_3 * __pyx_v_i_histo_range.strides[0]) )));
+ __pyx_t_4 = (2 * __pyx_v_i);
+ (__pyx_v_g_min[__pyx_v_i]) = (*((double *) ( /* dim=0 */ (__pyx_v_i_histo_range.data + __pyx_t_4 * __pyx_v_i_histo_range.strides[0]) )));
/* "silx/math/chistogramnd_lut.pyx":387
* for i in range(i_n_dims):
@@ -25622,8 +26747,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_108_histogramnd_get_lut
* bins_range[i] = g_max[i] - g_min[i]
*
*/
- __pyx_t_4 = ((2 * __pyx_v_i) + 1);
- (__pyx_v_g_max[__pyx_v_i]) = (*((double *) ( /* dim=0 */ (__pyx_v_i_histo_range.data + __pyx_t_4 * __pyx_v_i_histo_range.strides[0]) )));
+ __pyx_t_5 = ((2 * __pyx_v_i) + 1);
+ (__pyx_v_g_max[__pyx_v_i]) = (*((double *) ( /* dim=0 */ (__pyx_v_i_histo_range.data + __pyx_t_5 * __pyx_v_i_histo_range.strides[0]) )));
/* "silx/math/chistogramnd_lut.pyx":388
* g_min[i] = i_histo_range[2*i]
@@ -25664,6 +26789,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_108_histogramnd_get_lut
#ifdef WITH_THREAD
PyThreadState *_save;
Py_UNBLOCK_THREADS
+ __Pyx_FastGIL_Remember();
#endif
/*try:*/ {
@@ -25675,8 +26801,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_108_histogramnd_get_lut
* lut_idx += 1
*/
while (1) {
- __pyx_t_5 = ((__pyx_v_elem_idx < __pyx_v_max_idx) != 0);
- if (!__pyx_t_5) break;
+ __pyx_t_6 = ((__pyx_v_elem_idx < __pyx_v_max_idx) != 0);
+ if (!__pyx_t_6) break;
/* "silx/math/chistogramnd_lut.pyx":395
* with nogil:
@@ -25713,8 +26839,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_108_histogramnd_get_lut
* # =====================
*/
__pyx_t_1 = __pyx_v_i_n_dims;
- for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
- __pyx_v_i = __pyx_t_2;
+ __pyx_t_2 = __pyx_t_1;
+ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
+ __pyx_v_i = __pyx_t_3;
/* "silx/math/chistogramnd_lut.pyx":401
*
@@ -25723,8 +26850,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_108_histogramnd_get_lut
* # =====================
* # Element is rejected if any of the following is NOT true :
*/
- __pyx_t_6 = (__pyx_v_elem_idx + __pyx_v_i);
- __pyx_v_elem_coord = (*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_i_sample.data + __pyx_t_6 * __pyx_v_i_sample.strides[0]) )));
+ __pyx_t_7 = (__pyx_v_elem_idx + __pyx_v_i);
+ __pyx_v_elem_coord = (*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_i_sample.data + __pyx_t_7 * __pyx_v_i_sample.strides[0]) )));
/* "silx/math/chistogramnd_lut.pyx":408
* # 3. coordinate==maximum value and last_bin_closed is True
@@ -25733,8 +26860,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_108_histogramnd_get_lut
* bin_idx = -1
* break
*/
- __pyx_t_5 = ((__pyx_v_elem_coord < (__pyx_v_g_min[__pyx_v_i])) != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = ((__pyx_v_elem_coord < (__pyx_v_g_min[__pyx_v_i])) != 0);
+ if (__pyx_t_6) {
/* "silx/math/chistogramnd_lut.pyx":409
* # =====================
@@ -25770,8 +26897,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_108_histogramnd_get_lut
* bin_idx = <long>(bin_idx * i_n_bins[i] + # noqa
* (((elem_coord - g_min[i]) * i_n_bins[i]) /
*/
- __pyx_t_5 = ((__pyx_v_elem_coord < (__pyx_v_g_max[__pyx_v_i])) != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = ((__pyx_v_elem_coord < (__pyx_v_g_max[__pyx_v_i])) != 0);
+ if (__pyx_t_6) {
/* "silx/math/chistogramnd_lut.pyx":418
* # (two tests)
@@ -25780,7 +26907,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_108_histogramnd_get_lut
* (((elem_coord - g_min[i]) * i_n_bins[i]) /
* bins_range[i]))
*/
- __pyx_t_7 = __pyx_v_i;
+ __pyx_t_8 = __pyx_v_i;
/* "silx/math/chistogramnd_lut.pyx":419
* if elem_coord < g_max[i]:
@@ -25789,7 +26916,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_108_histogramnd_get_lut
* bins_range[i]))
* else:
*/
- __pyx_t_8 = __pyx_v_i;
+ __pyx_t_9 = __pyx_v_i;
/* "silx/math/chistogramnd_lut.pyx":418
* # (two tests)
@@ -25798,7 +26925,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_108_histogramnd_get_lut
* (((elem_coord - g_min[i]) * i_n_bins[i]) /
* bins_range[i]))
*/
- __pyx_v_bin_idx = ((long)((__pyx_v_bin_idx * (*((int *) ( /* dim=0 */ (__pyx_v_i_n_bins.data + __pyx_t_7 * __pyx_v_i_n_bins.strides[0]) )))) + (((__pyx_v_elem_coord - (__pyx_v_g_min[__pyx_v_i])) * (*((int *) ( /* dim=0 */ (__pyx_v_i_n_bins.data + __pyx_t_8 * __pyx_v_i_n_bins.strides[0]) )))) / (__pyx_v_bins_range[__pyx_v_i]))));
+ __pyx_v_bin_idx = ((long)((__pyx_v_bin_idx * (*((int *) ( /* dim=0 */ (__pyx_v_i_n_bins.data + __pyx_t_8 * __pyx_v_i_n_bins.strides[0]) )))) + (((__pyx_v_elem_coord - (__pyx_v_g_min[__pyx_v_i])) * (*((int *) ( /* dim=0 */ (__pyx_v_i_n_bins.data + __pyx_t_9 * __pyx_v_i_n_bins.strides[0]) )))) / (__pyx_v_bins_range[__pyx_v_i]))));
/* "silx/math/chistogramnd_lut.pyx":417
* # than coordinates higher or equal to the max
@@ -25818,16 +26945,16 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_108_histogramnd_get_lut
* else:
*/
/*else*/ {
- __pyx_t_9 = (__pyx_v_last_bin_closed != 0);
- if (__pyx_t_9) {
+ __pyx_t_10 = (__pyx_v_last_bin_closed != 0);
+ if (__pyx_t_10) {
} else {
- __pyx_t_5 = __pyx_t_9;
+ __pyx_t_6 = __pyx_t_10;
goto __pyx_L15_bool_binop_done;
}
- __pyx_t_9 = ((__pyx_v_elem_coord == (__pyx_v_g_max[__pyx_v_i])) != 0);
- __pyx_t_5 = __pyx_t_9;
+ __pyx_t_10 = ((__pyx_v_elem_coord == (__pyx_v_g_max[__pyx_v_i])) != 0);
+ __pyx_t_6 = __pyx_t_10;
__pyx_L15_bool_binop_done:;
- if (__pyx_t_5) {
+ if (__pyx_t_6) {
/* "silx/math/chistogramnd_lut.pyx":426
* # else : discard
@@ -25836,8 +26963,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_108_histogramnd_get_lut
* else:
* bin_idx = -1
*/
- __pyx_t_10 = __pyx_v_i;
- __pyx_v_bin_idx = (((__pyx_v_bin_idx + 1) * (*((int *) ( /* dim=0 */ (__pyx_v_i_n_bins.data + __pyx_t_10 * __pyx_v_i_n_bins.strides[0]) )))) - 1);
+ __pyx_t_11 = __pyx_v_i;
+ __pyx_v_bin_idx = (((__pyx_v_bin_idx + 1) * (*((int *) ( /* dim=0 */ (__pyx_v_i_n_bins.data + __pyx_t_11 * __pyx_v_i_n_bins.strides[0]) )))) - 1);
/* "silx/math/chistogramnd_lut.pyx":425
* # put it in the last bin
@@ -25881,8 +27008,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_108_histogramnd_get_lut
* if bin_idx >= 0:
* o_histo[bin_idx] += 1
*/
- __pyx_t_11 = __pyx_v_lut_idx;
- *((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_o_lut.data + __pyx_t_11 * __pyx_v_o_lut.strides[0]) )) = __pyx_v_bin_idx;
+ __pyx_t_12 = __pyx_v_lut_idx;
+ *((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_o_lut.data + __pyx_t_12 * __pyx_v_o_lut.strides[0]) )) = __pyx_v_bin_idx;
/* "silx/math/chistogramnd_lut.pyx":432
*
@@ -25891,8 +27018,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_108_histogramnd_get_lut
* o_histo[bin_idx] += 1
*
*/
- __pyx_t_5 = ((__pyx_v_bin_idx >= 0) != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = ((__pyx_v_bin_idx >= 0) != 0);
+ if (__pyx_t_6) {
/* "silx/math/chistogramnd_lut.pyx":433
* o_lut[lut_idx] = bin_idx
@@ -25901,8 +27028,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_108_histogramnd_get_lut
*
* return 0
*/
- __pyx_t_12 = __pyx_v_bin_idx;
- *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_12 * __pyx_v_o_histo.strides[0]) )) += 1;
+ __pyx_t_13 = __pyx_v_bin_idx;
+ *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_13 * __pyx_v_o_histo.strides[0]) )) += 1;
/* "silx/math/chistogramnd_lut.pyx":432
*
@@ -25925,6 +27052,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_108_histogramnd_get_lut
/*finally:*/ {
/*normal exit:*/{
#ifdef WITH_THREAD
+ __Pyx_FastGIL_Forget();
Py_BLOCK_THREADS
#endif
goto __pyx_L7;
@@ -25986,53 +27114,68 @@ static PyObject *__pyx_fuse_0_2__pyx_pw_4silx_4math_16chistogramnd_lut_111_histo
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
switch (pos_args) {
case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
+ CYTHON_FALLTHROUGH;
case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
+ CYTHON_FALLTHROUGH;
case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ CYTHON_FALLTHROUGH;
case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
case 0: break;
default: goto __pyx_L5_argtuple_error;
}
kw_args = PyDict_Size(__pyx_kwds);
switch (pos_args) {
case 0:
- if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_sample)) != 0)) kw_args--;
+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_sample)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
case 1:
- if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_n_dims)) != 0)) kw_args--;
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_n_dims)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_get_lut_fused", 1, 8, 8, 1); __PYX_ERR(0, 361, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 2:
- if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
+ if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_get_lut_fused", 1, 8, 8, 2); __PYX_ERR(0, 361, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 3:
- if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_histo_range)) != 0)) kw_args--;
+ if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_histo_range)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_get_lut_fused", 1, 8, 8, 3); __PYX_ERR(0, 361, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 4:
- if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_n_bins)) != 0)) kw_args--;
+ if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_n_bins)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_get_lut_fused", 1, 8, 8, 4); __PYX_ERR(0, 361, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 5:
- if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_lut)) != 0)) kw_args--;
+ if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_lut)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_get_lut_fused", 1, 8, 8, 5); __PYX_ERR(0, 361, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 6:
- if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
+ if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_get_lut_fused", 1, 8, 8, 6); __PYX_ERR(0, 361, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 7:
- if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_last_bin_closed)) != 0)) kw_args--;
+ if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_last_bin_closed)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_get_lut_fused", 1, 8, 8, 7); __PYX_ERR(0, 361, __pyx_L3_error)
}
@@ -26052,13 +27195,13 @@ static PyObject *__pyx_fuse_0_2__pyx_pw_4silx_4math_16chistogramnd_lut_111_histo
values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
}
- __pyx_v_i_sample = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float64_t(values[0]); if (unlikely(!__pyx_v_i_sample.memview)) __PYX_ERR(0, 361, __pyx_L3_error)
+ __pyx_v_i_sample = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float64_t(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_sample.memview)) __PYX_ERR(0, 361, __pyx_L3_error)
__pyx_v_i_n_dims = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_i_n_dims == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 362, __pyx_L3_error)
__pyx_v_i_n_elems = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_i_n_elems == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 363, __pyx_L3_error)
- __pyx_v_i_histo_range = __Pyx_PyObject_to_MemoryviewSlice_ds_double(values[3]); if (unlikely(!__pyx_v_i_histo_range.memview)) __PYX_ERR(0, 364, __pyx_L3_error)
- __pyx_v_i_n_bins = __Pyx_PyObject_to_MemoryviewSlice_ds_int(values[4]); if (unlikely(!__pyx_v_i_n_bins.memview)) __PYX_ERR(0, 365, __pyx_L3_error)
- __pyx_v_o_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int16_t(values[5]); if (unlikely(!__pyx_v_o_lut.memview)) __PYX_ERR(0, 366, __pyx_L3_error)
- __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[6]); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 367, __pyx_L3_error)
+ __pyx_v_i_histo_range = __Pyx_PyObject_to_MemoryviewSlice_ds_double(values[3], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_histo_range.memview)) __PYX_ERR(0, 364, __pyx_L3_error)
+ __pyx_v_i_n_bins = __Pyx_PyObject_to_MemoryviewSlice_ds_int(values[4], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_n_bins.memview)) __PYX_ERR(0, 365, __pyx_L3_error)
+ __pyx_v_o_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int16_t(values[5], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_lut.memview)) __PYX_ERR(0, 366, __pyx_L3_error)
+ __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[6], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 367, __pyx_L3_error)
__pyx_v_last_bin_closed = __Pyx_PyObject_IsTrue(values[7]); if (unlikely((__pyx_v_last_bin_closed == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 368, __pyx_L3_error)
}
goto __pyx_L4_argument_unpacking_done;
@@ -26090,16 +27233,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_110_histogramnd_get_lut
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
- Py_ssize_t __pyx_t_3;
+ int __pyx_t_3;
Py_ssize_t __pyx_t_4;
- int __pyx_t_5;
- Py_ssize_t __pyx_t_6;
+ Py_ssize_t __pyx_t_5;
+ int __pyx_t_6;
Py_ssize_t __pyx_t_7;
Py_ssize_t __pyx_t_8;
- int __pyx_t_9;
- Py_ssize_t __pyx_t_10;
+ Py_ssize_t __pyx_t_9;
+ int __pyx_t_10;
Py_ssize_t __pyx_t_11;
Py_ssize_t __pyx_t_12;
+ Py_ssize_t __pyx_t_13;
__Pyx_RefNannySetupContext("__pyx_fuse_0_2_histogramnd_get_lut_fused", 0);
/* "silx/math/chistogramnd_lut.pyx":371
@@ -26164,8 +27308,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_110_histogramnd_get_lut
* g_max[i] = i_histo_range[2*i+1]
*/
__pyx_t_1 = __pyx_v_i_n_dims;
- for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
- __pyx_v_i = __pyx_t_2;
+ __pyx_t_2 = __pyx_t_1;
+ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
+ __pyx_v_i = __pyx_t_3;
/* "silx/math/chistogramnd_lut.pyx":386
*
@@ -26174,8 +27319,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_110_histogramnd_get_lut
* g_max[i] = i_histo_range[2*i+1]
* bins_range[i] = g_max[i] - g_min[i]
*/
- __pyx_t_3 = (2 * __pyx_v_i);
- (__pyx_v_g_min[__pyx_v_i]) = (*((double *) ( /* dim=0 */ (__pyx_v_i_histo_range.data + __pyx_t_3 * __pyx_v_i_histo_range.strides[0]) )));
+ __pyx_t_4 = (2 * __pyx_v_i);
+ (__pyx_v_g_min[__pyx_v_i]) = (*((double *) ( /* dim=0 */ (__pyx_v_i_histo_range.data + __pyx_t_4 * __pyx_v_i_histo_range.strides[0]) )));
/* "silx/math/chistogramnd_lut.pyx":387
* for i in range(i_n_dims):
@@ -26184,8 +27329,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_110_histogramnd_get_lut
* bins_range[i] = g_max[i] - g_min[i]
*
*/
- __pyx_t_4 = ((2 * __pyx_v_i) + 1);
- (__pyx_v_g_max[__pyx_v_i]) = (*((double *) ( /* dim=0 */ (__pyx_v_i_histo_range.data + __pyx_t_4 * __pyx_v_i_histo_range.strides[0]) )));
+ __pyx_t_5 = ((2 * __pyx_v_i) + 1);
+ (__pyx_v_g_max[__pyx_v_i]) = (*((double *) ( /* dim=0 */ (__pyx_v_i_histo_range.data + __pyx_t_5 * __pyx_v_i_histo_range.strides[0]) )));
/* "silx/math/chistogramnd_lut.pyx":388
* g_min[i] = i_histo_range[2*i]
@@ -26226,6 +27371,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_110_histogramnd_get_lut
#ifdef WITH_THREAD
PyThreadState *_save;
Py_UNBLOCK_THREADS
+ __Pyx_FastGIL_Remember();
#endif
/*try:*/ {
@@ -26237,8 +27383,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_110_histogramnd_get_lut
* lut_idx += 1
*/
while (1) {
- __pyx_t_5 = ((__pyx_v_elem_idx < __pyx_v_max_idx) != 0);
- if (!__pyx_t_5) break;
+ __pyx_t_6 = ((__pyx_v_elem_idx < __pyx_v_max_idx) != 0);
+ if (!__pyx_t_6) break;
/* "silx/math/chistogramnd_lut.pyx":395
* with nogil:
@@ -26275,8 +27421,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_110_histogramnd_get_lut
* # =====================
*/
__pyx_t_1 = __pyx_v_i_n_dims;
- for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
- __pyx_v_i = __pyx_t_2;
+ __pyx_t_2 = __pyx_t_1;
+ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
+ __pyx_v_i = __pyx_t_3;
/* "silx/math/chistogramnd_lut.pyx":401
*
@@ -26285,8 +27432,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_110_histogramnd_get_lut
* # =====================
* # Element is rejected if any of the following is NOT true :
*/
- __pyx_t_6 = (__pyx_v_elem_idx + __pyx_v_i);
- __pyx_v_elem_coord = (*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_i_sample.data + __pyx_t_6 * __pyx_v_i_sample.strides[0]) )));
+ __pyx_t_7 = (__pyx_v_elem_idx + __pyx_v_i);
+ __pyx_v_elem_coord = (*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_i_sample.data + __pyx_t_7 * __pyx_v_i_sample.strides[0]) )));
/* "silx/math/chistogramnd_lut.pyx":408
* # 3. coordinate==maximum value and last_bin_closed is True
@@ -26295,8 +27442,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_110_histogramnd_get_lut
* bin_idx = -1
* break
*/
- __pyx_t_5 = ((__pyx_v_elem_coord < (__pyx_v_g_min[__pyx_v_i])) != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = ((__pyx_v_elem_coord < (__pyx_v_g_min[__pyx_v_i])) != 0);
+ if (__pyx_t_6) {
/* "silx/math/chistogramnd_lut.pyx":409
* # =====================
@@ -26332,8 +27479,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_110_histogramnd_get_lut
* bin_idx = <long>(bin_idx * i_n_bins[i] + # noqa
* (((elem_coord - g_min[i]) * i_n_bins[i]) /
*/
- __pyx_t_5 = ((__pyx_v_elem_coord < (__pyx_v_g_max[__pyx_v_i])) != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = ((__pyx_v_elem_coord < (__pyx_v_g_max[__pyx_v_i])) != 0);
+ if (__pyx_t_6) {
/* "silx/math/chistogramnd_lut.pyx":418
* # (two tests)
@@ -26342,7 +27489,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_110_histogramnd_get_lut
* (((elem_coord - g_min[i]) * i_n_bins[i]) /
* bins_range[i]))
*/
- __pyx_t_7 = __pyx_v_i;
+ __pyx_t_8 = __pyx_v_i;
/* "silx/math/chistogramnd_lut.pyx":419
* if elem_coord < g_max[i]:
@@ -26351,7 +27498,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_110_histogramnd_get_lut
* bins_range[i]))
* else:
*/
- __pyx_t_8 = __pyx_v_i;
+ __pyx_t_9 = __pyx_v_i;
/* "silx/math/chistogramnd_lut.pyx":418
* # (two tests)
@@ -26360,7 +27507,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_110_histogramnd_get_lut
* (((elem_coord - g_min[i]) * i_n_bins[i]) /
* bins_range[i]))
*/
- __pyx_v_bin_idx = ((long)((__pyx_v_bin_idx * (*((int *) ( /* dim=0 */ (__pyx_v_i_n_bins.data + __pyx_t_7 * __pyx_v_i_n_bins.strides[0]) )))) + (((__pyx_v_elem_coord - (__pyx_v_g_min[__pyx_v_i])) * (*((int *) ( /* dim=0 */ (__pyx_v_i_n_bins.data + __pyx_t_8 * __pyx_v_i_n_bins.strides[0]) )))) / (__pyx_v_bins_range[__pyx_v_i]))));
+ __pyx_v_bin_idx = ((long)((__pyx_v_bin_idx * (*((int *) ( /* dim=0 */ (__pyx_v_i_n_bins.data + __pyx_t_8 * __pyx_v_i_n_bins.strides[0]) )))) + (((__pyx_v_elem_coord - (__pyx_v_g_min[__pyx_v_i])) * (*((int *) ( /* dim=0 */ (__pyx_v_i_n_bins.data + __pyx_t_9 * __pyx_v_i_n_bins.strides[0]) )))) / (__pyx_v_bins_range[__pyx_v_i]))));
/* "silx/math/chistogramnd_lut.pyx":417
* # than coordinates higher or equal to the max
@@ -26380,16 +27527,16 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_110_histogramnd_get_lut
* else:
*/
/*else*/ {
- __pyx_t_9 = (__pyx_v_last_bin_closed != 0);
- if (__pyx_t_9) {
+ __pyx_t_10 = (__pyx_v_last_bin_closed != 0);
+ if (__pyx_t_10) {
} else {
- __pyx_t_5 = __pyx_t_9;
+ __pyx_t_6 = __pyx_t_10;
goto __pyx_L15_bool_binop_done;
}
- __pyx_t_9 = ((__pyx_v_elem_coord == (__pyx_v_g_max[__pyx_v_i])) != 0);
- __pyx_t_5 = __pyx_t_9;
+ __pyx_t_10 = ((__pyx_v_elem_coord == (__pyx_v_g_max[__pyx_v_i])) != 0);
+ __pyx_t_6 = __pyx_t_10;
__pyx_L15_bool_binop_done:;
- if (__pyx_t_5) {
+ if (__pyx_t_6) {
/* "silx/math/chistogramnd_lut.pyx":426
* # else : discard
@@ -26398,8 +27545,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_110_histogramnd_get_lut
* else:
* bin_idx = -1
*/
- __pyx_t_10 = __pyx_v_i;
- __pyx_v_bin_idx = (((__pyx_v_bin_idx + 1) * (*((int *) ( /* dim=0 */ (__pyx_v_i_n_bins.data + __pyx_t_10 * __pyx_v_i_n_bins.strides[0]) )))) - 1);
+ __pyx_t_11 = __pyx_v_i;
+ __pyx_v_bin_idx = (((__pyx_v_bin_idx + 1) * (*((int *) ( /* dim=0 */ (__pyx_v_i_n_bins.data + __pyx_t_11 * __pyx_v_i_n_bins.strides[0]) )))) - 1);
/* "silx/math/chistogramnd_lut.pyx":425
* # put it in the last bin
@@ -26443,8 +27590,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_110_histogramnd_get_lut
* if bin_idx >= 0:
* o_histo[bin_idx] += 1
*/
- __pyx_t_11 = __pyx_v_lut_idx;
- *((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_o_lut.data + __pyx_t_11 * __pyx_v_o_lut.strides[0]) )) = __pyx_v_bin_idx;
+ __pyx_t_12 = __pyx_v_lut_idx;
+ *((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_o_lut.data + __pyx_t_12 * __pyx_v_o_lut.strides[0]) )) = __pyx_v_bin_idx;
/* "silx/math/chistogramnd_lut.pyx":432
*
@@ -26453,8 +27600,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_110_histogramnd_get_lut
* o_histo[bin_idx] += 1
*
*/
- __pyx_t_5 = ((__pyx_v_bin_idx >= 0) != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = ((__pyx_v_bin_idx >= 0) != 0);
+ if (__pyx_t_6) {
/* "silx/math/chistogramnd_lut.pyx":433
* o_lut[lut_idx] = bin_idx
@@ -26463,8 +27610,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_110_histogramnd_get_lut
*
* return 0
*/
- __pyx_t_12 = __pyx_v_bin_idx;
- *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_12 * __pyx_v_o_histo.strides[0]) )) += 1;
+ __pyx_t_13 = __pyx_v_bin_idx;
+ *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_13 * __pyx_v_o_histo.strides[0]) )) += 1;
/* "silx/math/chistogramnd_lut.pyx":432
*
@@ -26487,6 +27634,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_110_histogramnd_get_lut
/*finally:*/ {
/*normal exit:*/{
#ifdef WITH_THREAD
+ __Pyx_FastGIL_Forget();
Py_BLOCK_THREADS
#endif
goto __pyx_L7;
@@ -26548,53 +27696,68 @@ static PyObject *__pyx_fuse_1_0__pyx_pw_4silx_4math_16chistogramnd_lut_113_histo
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
switch (pos_args) {
case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
+ CYTHON_FALLTHROUGH;
case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
+ CYTHON_FALLTHROUGH;
case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ CYTHON_FALLTHROUGH;
case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
case 0: break;
default: goto __pyx_L5_argtuple_error;
}
kw_args = PyDict_Size(__pyx_kwds);
switch (pos_args) {
case 0:
- if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_sample)) != 0)) kw_args--;
+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_sample)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
case 1:
- if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_n_dims)) != 0)) kw_args--;
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_n_dims)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_get_lut_fused", 1, 8, 8, 1); __PYX_ERR(0, 361, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 2:
- if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
+ if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_get_lut_fused", 1, 8, 8, 2); __PYX_ERR(0, 361, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 3:
- if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_histo_range)) != 0)) kw_args--;
+ if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_histo_range)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_get_lut_fused", 1, 8, 8, 3); __PYX_ERR(0, 361, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 4:
- if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_n_bins)) != 0)) kw_args--;
+ if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_n_bins)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_get_lut_fused", 1, 8, 8, 4); __PYX_ERR(0, 361, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 5:
- if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_lut)) != 0)) kw_args--;
+ if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_lut)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_get_lut_fused", 1, 8, 8, 5); __PYX_ERR(0, 361, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 6:
- if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
+ if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_get_lut_fused", 1, 8, 8, 6); __PYX_ERR(0, 361, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 7:
- if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_last_bin_closed)) != 0)) kw_args--;
+ if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_last_bin_closed)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_get_lut_fused", 1, 8, 8, 7); __PYX_ERR(0, 361, __pyx_L3_error)
}
@@ -26614,13 +27777,13 @@ static PyObject *__pyx_fuse_1_0__pyx_pw_4silx_4math_16chistogramnd_lut_113_histo
values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
}
- __pyx_v_i_sample = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float32_t(values[0]); if (unlikely(!__pyx_v_i_sample.memview)) __PYX_ERR(0, 361, __pyx_L3_error)
+ __pyx_v_i_sample = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float32_t(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_sample.memview)) __PYX_ERR(0, 361, __pyx_L3_error)
__pyx_v_i_n_dims = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_i_n_dims == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 362, __pyx_L3_error)
__pyx_v_i_n_elems = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_i_n_elems == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 363, __pyx_L3_error)
- __pyx_v_i_histo_range = __Pyx_PyObject_to_MemoryviewSlice_ds_double(values[3]); if (unlikely(!__pyx_v_i_histo_range.memview)) __PYX_ERR(0, 364, __pyx_L3_error)
- __pyx_v_i_n_bins = __Pyx_PyObject_to_MemoryviewSlice_ds_int(values[4]); if (unlikely(!__pyx_v_i_n_bins.memview)) __PYX_ERR(0, 365, __pyx_L3_error)
- __pyx_v_o_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[5]); if (unlikely(!__pyx_v_o_lut.memview)) __PYX_ERR(0, 366, __pyx_L3_error)
- __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[6]); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 367, __pyx_L3_error)
+ __pyx_v_i_histo_range = __Pyx_PyObject_to_MemoryviewSlice_ds_double(values[3], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_histo_range.memview)) __PYX_ERR(0, 364, __pyx_L3_error)
+ __pyx_v_i_n_bins = __Pyx_PyObject_to_MemoryviewSlice_ds_int(values[4], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_n_bins.memview)) __PYX_ERR(0, 365, __pyx_L3_error)
+ __pyx_v_o_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[5], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_lut.memview)) __PYX_ERR(0, 366, __pyx_L3_error)
+ __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[6], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 367, __pyx_L3_error)
__pyx_v_last_bin_closed = __Pyx_PyObject_IsTrue(values[7]); if (unlikely((__pyx_v_last_bin_closed == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 368, __pyx_L3_error)
}
goto __pyx_L4_argument_unpacking_done;
@@ -26652,16 +27815,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_112_histogramnd_get_lut
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
- Py_ssize_t __pyx_t_3;
+ int __pyx_t_3;
Py_ssize_t __pyx_t_4;
- int __pyx_t_5;
- Py_ssize_t __pyx_t_6;
+ Py_ssize_t __pyx_t_5;
+ int __pyx_t_6;
Py_ssize_t __pyx_t_7;
Py_ssize_t __pyx_t_8;
- int __pyx_t_9;
- Py_ssize_t __pyx_t_10;
+ Py_ssize_t __pyx_t_9;
+ int __pyx_t_10;
Py_ssize_t __pyx_t_11;
Py_ssize_t __pyx_t_12;
+ Py_ssize_t __pyx_t_13;
__Pyx_RefNannySetupContext("__pyx_fuse_1_0_histogramnd_get_lut_fused", 0);
/* "silx/math/chistogramnd_lut.pyx":371
@@ -26726,8 +27890,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_112_histogramnd_get_lut
* g_max[i] = i_histo_range[2*i+1]
*/
__pyx_t_1 = __pyx_v_i_n_dims;
- for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
- __pyx_v_i = __pyx_t_2;
+ __pyx_t_2 = __pyx_t_1;
+ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
+ __pyx_v_i = __pyx_t_3;
/* "silx/math/chistogramnd_lut.pyx":386
*
@@ -26736,8 +27901,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_112_histogramnd_get_lut
* g_max[i] = i_histo_range[2*i+1]
* bins_range[i] = g_max[i] - g_min[i]
*/
- __pyx_t_3 = (2 * __pyx_v_i);
- (__pyx_v_g_min[__pyx_v_i]) = (*((double *) ( /* dim=0 */ (__pyx_v_i_histo_range.data + __pyx_t_3 * __pyx_v_i_histo_range.strides[0]) )));
+ __pyx_t_4 = (2 * __pyx_v_i);
+ (__pyx_v_g_min[__pyx_v_i]) = (*((double *) ( /* dim=0 */ (__pyx_v_i_histo_range.data + __pyx_t_4 * __pyx_v_i_histo_range.strides[0]) )));
/* "silx/math/chistogramnd_lut.pyx":387
* for i in range(i_n_dims):
@@ -26746,8 +27911,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_112_histogramnd_get_lut
* bins_range[i] = g_max[i] - g_min[i]
*
*/
- __pyx_t_4 = ((2 * __pyx_v_i) + 1);
- (__pyx_v_g_max[__pyx_v_i]) = (*((double *) ( /* dim=0 */ (__pyx_v_i_histo_range.data + __pyx_t_4 * __pyx_v_i_histo_range.strides[0]) )));
+ __pyx_t_5 = ((2 * __pyx_v_i) + 1);
+ (__pyx_v_g_max[__pyx_v_i]) = (*((double *) ( /* dim=0 */ (__pyx_v_i_histo_range.data + __pyx_t_5 * __pyx_v_i_histo_range.strides[0]) )));
/* "silx/math/chistogramnd_lut.pyx":388
* g_min[i] = i_histo_range[2*i]
@@ -26788,6 +27953,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_112_histogramnd_get_lut
#ifdef WITH_THREAD
PyThreadState *_save;
Py_UNBLOCK_THREADS
+ __Pyx_FastGIL_Remember();
#endif
/*try:*/ {
@@ -26799,8 +27965,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_112_histogramnd_get_lut
* lut_idx += 1
*/
while (1) {
- __pyx_t_5 = ((__pyx_v_elem_idx < __pyx_v_max_idx) != 0);
- if (!__pyx_t_5) break;
+ __pyx_t_6 = ((__pyx_v_elem_idx < __pyx_v_max_idx) != 0);
+ if (!__pyx_t_6) break;
/* "silx/math/chistogramnd_lut.pyx":395
* with nogil:
@@ -26837,8 +28003,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_112_histogramnd_get_lut
* # =====================
*/
__pyx_t_1 = __pyx_v_i_n_dims;
- for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
- __pyx_v_i = __pyx_t_2;
+ __pyx_t_2 = __pyx_t_1;
+ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
+ __pyx_v_i = __pyx_t_3;
/* "silx/math/chistogramnd_lut.pyx":401
*
@@ -26847,8 +28014,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_112_histogramnd_get_lut
* # =====================
* # Element is rejected if any of the following is NOT true :
*/
- __pyx_t_6 = (__pyx_v_elem_idx + __pyx_v_i);
- __pyx_v_elem_coord = (*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_i_sample.data + __pyx_t_6 * __pyx_v_i_sample.strides[0]) )));
+ __pyx_t_7 = (__pyx_v_elem_idx + __pyx_v_i);
+ __pyx_v_elem_coord = (*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_i_sample.data + __pyx_t_7 * __pyx_v_i_sample.strides[0]) )));
/* "silx/math/chistogramnd_lut.pyx":408
* # 3. coordinate==maximum value and last_bin_closed is True
@@ -26857,8 +28024,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_112_histogramnd_get_lut
* bin_idx = -1
* break
*/
- __pyx_t_5 = ((__pyx_v_elem_coord < (__pyx_v_g_min[__pyx_v_i])) != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = ((__pyx_v_elem_coord < (__pyx_v_g_min[__pyx_v_i])) != 0);
+ if (__pyx_t_6) {
/* "silx/math/chistogramnd_lut.pyx":409
* # =====================
@@ -26894,8 +28061,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_112_histogramnd_get_lut
* bin_idx = <long>(bin_idx * i_n_bins[i] + # noqa
* (((elem_coord - g_min[i]) * i_n_bins[i]) /
*/
- __pyx_t_5 = ((__pyx_v_elem_coord < (__pyx_v_g_max[__pyx_v_i])) != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = ((__pyx_v_elem_coord < (__pyx_v_g_max[__pyx_v_i])) != 0);
+ if (__pyx_t_6) {
/* "silx/math/chistogramnd_lut.pyx":418
* # (two tests)
@@ -26904,7 +28071,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_112_histogramnd_get_lut
* (((elem_coord - g_min[i]) * i_n_bins[i]) /
* bins_range[i]))
*/
- __pyx_t_7 = __pyx_v_i;
+ __pyx_t_8 = __pyx_v_i;
/* "silx/math/chistogramnd_lut.pyx":419
* if elem_coord < g_max[i]:
@@ -26913,7 +28080,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_112_histogramnd_get_lut
* bins_range[i]))
* else:
*/
- __pyx_t_8 = __pyx_v_i;
+ __pyx_t_9 = __pyx_v_i;
/* "silx/math/chistogramnd_lut.pyx":418
* # (two tests)
@@ -26922,7 +28089,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_112_histogramnd_get_lut
* (((elem_coord - g_min[i]) * i_n_bins[i]) /
* bins_range[i]))
*/
- __pyx_v_bin_idx = ((long)((__pyx_v_bin_idx * (*((int *) ( /* dim=0 */ (__pyx_v_i_n_bins.data + __pyx_t_7 * __pyx_v_i_n_bins.strides[0]) )))) + (((__pyx_v_elem_coord - (__pyx_v_g_min[__pyx_v_i])) * (*((int *) ( /* dim=0 */ (__pyx_v_i_n_bins.data + __pyx_t_8 * __pyx_v_i_n_bins.strides[0]) )))) / (__pyx_v_bins_range[__pyx_v_i]))));
+ __pyx_v_bin_idx = ((long)((__pyx_v_bin_idx * (*((int *) ( /* dim=0 */ (__pyx_v_i_n_bins.data + __pyx_t_8 * __pyx_v_i_n_bins.strides[0]) )))) + (((__pyx_v_elem_coord - (__pyx_v_g_min[__pyx_v_i])) * (*((int *) ( /* dim=0 */ (__pyx_v_i_n_bins.data + __pyx_t_9 * __pyx_v_i_n_bins.strides[0]) )))) / (__pyx_v_bins_range[__pyx_v_i]))));
/* "silx/math/chistogramnd_lut.pyx":417
* # than coordinates higher or equal to the max
@@ -26942,16 +28109,16 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_112_histogramnd_get_lut
* else:
*/
/*else*/ {
- __pyx_t_9 = (__pyx_v_last_bin_closed != 0);
- if (__pyx_t_9) {
+ __pyx_t_10 = (__pyx_v_last_bin_closed != 0);
+ if (__pyx_t_10) {
} else {
- __pyx_t_5 = __pyx_t_9;
+ __pyx_t_6 = __pyx_t_10;
goto __pyx_L15_bool_binop_done;
}
- __pyx_t_9 = ((__pyx_v_elem_coord == (__pyx_v_g_max[__pyx_v_i])) != 0);
- __pyx_t_5 = __pyx_t_9;
+ __pyx_t_10 = ((__pyx_v_elem_coord == (__pyx_v_g_max[__pyx_v_i])) != 0);
+ __pyx_t_6 = __pyx_t_10;
__pyx_L15_bool_binop_done:;
- if (__pyx_t_5) {
+ if (__pyx_t_6) {
/* "silx/math/chistogramnd_lut.pyx":426
* # else : discard
@@ -26960,8 +28127,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_112_histogramnd_get_lut
* else:
* bin_idx = -1
*/
- __pyx_t_10 = __pyx_v_i;
- __pyx_v_bin_idx = (((__pyx_v_bin_idx + 1) * (*((int *) ( /* dim=0 */ (__pyx_v_i_n_bins.data + __pyx_t_10 * __pyx_v_i_n_bins.strides[0]) )))) - 1);
+ __pyx_t_11 = __pyx_v_i;
+ __pyx_v_bin_idx = (((__pyx_v_bin_idx + 1) * (*((int *) ( /* dim=0 */ (__pyx_v_i_n_bins.data + __pyx_t_11 * __pyx_v_i_n_bins.strides[0]) )))) - 1);
/* "silx/math/chistogramnd_lut.pyx":425
* # put it in the last bin
@@ -27005,8 +28172,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_112_histogramnd_get_lut
* if bin_idx >= 0:
* o_histo[bin_idx] += 1
*/
- __pyx_t_11 = __pyx_v_lut_idx;
- *((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_o_lut.data + __pyx_t_11 * __pyx_v_o_lut.strides[0]) )) = __pyx_v_bin_idx;
+ __pyx_t_12 = __pyx_v_lut_idx;
+ *((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_o_lut.data + __pyx_t_12 * __pyx_v_o_lut.strides[0]) )) = __pyx_v_bin_idx;
/* "silx/math/chistogramnd_lut.pyx":432
*
@@ -27015,8 +28182,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_112_histogramnd_get_lut
* o_histo[bin_idx] += 1
*
*/
- __pyx_t_5 = ((__pyx_v_bin_idx >= 0) != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = ((__pyx_v_bin_idx >= 0) != 0);
+ if (__pyx_t_6) {
/* "silx/math/chistogramnd_lut.pyx":433
* o_lut[lut_idx] = bin_idx
@@ -27025,8 +28192,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_112_histogramnd_get_lut
*
* return 0
*/
- __pyx_t_12 = __pyx_v_bin_idx;
- *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_12 * __pyx_v_o_histo.strides[0]) )) += 1;
+ __pyx_t_13 = __pyx_v_bin_idx;
+ *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_13 * __pyx_v_o_histo.strides[0]) )) += 1;
/* "silx/math/chistogramnd_lut.pyx":432
*
@@ -27049,6 +28216,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_112_histogramnd_get_lut
/*finally:*/ {
/*normal exit:*/{
#ifdef WITH_THREAD
+ __Pyx_FastGIL_Forget();
Py_BLOCK_THREADS
#endif
goto __pyx_L7;
@@ -27110,53 +28278,68 @@ static PyObject *__pyx_fuse_1_1__pyx_pw_4silx_4math_16chistogramnd_lut_115_histo
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
switch (pos_args) {
case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
+ CYTHON_FALLTHROUGH;
case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
+ CYTHON_FALLTHROUGH;
case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ CYTHON_FALLTHROUGH;
case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
case 0: break;
default: goto __pyx_L5_argtuple_error;
}
kw_args = PyDict_Size(__pyx_kwds);
switch (pos_args) {
case 0:
- if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_sample)) != 0)) kw_args--;
+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_sample)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
case 1:
- if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_n_dims)) != 0)) kw_args--;
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_n_dims)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_get_lut_fused", 1, 8, 8, 1); __PYX_ERR(0, 361, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 2:
- if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
+ if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_get_lut_fused", 1, 8, 8, 2); __PYX_ERR(0, 361, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 3:
- if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_histo_range)) != 0)) kw_args--;
+ if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_histo_range)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_get_lut_fused", 1, 8, 8, 3); __PYX_ERR(0, 361, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 4:
- if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_n_bins)) != 0)) kw_args--;
+ if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_n_bins)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_get_lut_fused", 1, 8, 8, 4); __PYX_ERR(0, 361, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 5:
- if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_lut)) != 0)) kw_args--;
+ if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_lut)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_get_lut_fused", 1, 8, 8, 5); __PYX_ERR(0, 361, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 6:
- if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
+ if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_get_lut_fused", 1, 8, 8, 6); __PYX_ERR(0, 361, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 7:
- if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_last_bin_closed)) != 0)) kw_args--;
+ if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_last_bin_closed)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_get_lut_fused", 1, 8, 8, 7); __PYX_ERR(0, 361, __pyx_L3_error)
}
@@ -27176,13 +28359,13 @@ static PyObject *__pyx_fuse_1_1__pyx_pw_4silx_4math_16chistogramnd_lut_115_histo
values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
}
- __pyx_v_i_sample = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float32_t(values[0]); if (unlikely(!__pyx_v_i_sample.memview)) __PYX_ERR(0, 361, __pyx_L3_error)
+ __pyx_v_i_sample = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float32_t(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_sample.memview)) __PYX_ERR(0, 361, __pyx_L3_error)
__pyx_v_i_n_dims = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_i_n_dims == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 362, __pyx_L3_error)
__pyx_v_i_n_elems = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_i_n_elems == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 363, __pyx_L3_error)
- __pyx_v_i_histo_range = __Pyx_PyObject_to_MemoryviewSlice_ds_double(values[3]); if (unlikely(!__pyx_v_i_histo_range.memview)) __PYX_ERR(0, 364, __pyx_L3_error)
- __pyx_v_i_n_bins = __Pyx_PyObject_to_MemoryviewSlice_ds_int(values[4]); if (unlikely(!__pyx_v_i_n_bins.memview)) __PYX_ERR(0, 365, __pyx_L3_error)
- __pyx_v_o_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[5]); if (unlikely(!__pyx_v_o_lut.memview)) __PYX_ERR(0, 366, __pyx_L3_error)
- __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[6]); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 367, __pyx_L3_error)
+ __pyx_v_i_histo_range = __Pyx_PyObject_to_MemoryviewSlice_ds_double(values[3], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_histo_range.memview)) __PYX_ERR(0, 364, __pyx_L3_error)
+ __pyx_v_i_n_bins = __Pyx_PyObject_to_MemoryviewSlice_ds_int(values[4], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_n_bins.memview)) __PYX_ERR(0, 365, __pyx_L3_error)
+ __pyx_v_o_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[5], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_lut.memview)) __PYX_ERR(0, 366, __pyx_L3_error)
+ __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[6], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 367, __pyx_L3_error)
__pyx_v_last_bin_closed = __Pyx_PyObject_IsTrue(values[7]); if (unlikely((__pyx_v_last_bin_closed == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 368, __pyx_L3_error)
}
goto __pyx_L4_argument_unpacking_done;
@@ -27214,16 +28397,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_114_histogramnd_get_lut
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
- Py_ssize_t __pyx_t_3;
+ int __pyx_t_3;
Py_ssize_t __pyx_t_4;
- int __pyx_t_5;
- Py_ssize_t __pyx_t_6;
+ Py_ssize_t __pyx_t_5;
+ int __pyx_t_6;
Py_ssize_t __pyx_t_7;
Py_ssize_t __pyx_t_8;
- int __pyx_t_9;
- Py_ssize_t __pyx_t_10;
+ Py_ssize_t __pyx_t_9;
+ int __pyx_t_10;
Py_ssize_t __pyx_t_11;
Py_ssize_t __pyx_t_12;
+ Py_ssize_t __pyx_t_13;
__Pyx_RefNannySetupContext("__pyx_fuse_1_1_histogramnd_get_lut_fused", 0);
/* "silx/math/chistogramnd_lut.pyx":371
@@ -27288,8 +28472,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_114_histogramnd_get_lut
* g_max[i] = i_histo_range[2*i+1]
*/
__pyx_t_1 = __pyx_v_i_n_dims;
- for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
- __pyx_v_i = __pyx_t_2;
+ __pyx_t_2 = __pyx_t_1;
+ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
+ __pyx_v_i = __pyx_t_3;
/* "silx/math/chistogramnd_lut.pyx":386
*
@@ -27298,8 +28483,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_114_histogramnd_get_lut
* g_max[i] = i_histo_range[2*i+1]
* bins_range[i] = g_max[i] - g_min[i]
*/
- __pyx_t_3 = (2 * __pyx_v_i);
- (__pyx_v_g_min[__pyx_v_i]) = (*((double *) ( /* dim=0 */ (__pyx_v_i_histo_range.data + __pyx_t_3 * __pyx_v_i_histo_range.strides[0]) )));
+ __pyx_t_4 = (2 * __pyx_v_i);
+ (__pyx_v_g_min[__pyx_v_i]) = (*((double *) ( /* dim=0 */ (__pyx_v_i_histo_range.data + __pyx_t_4 * __pyx_v_i_histo_range.strides[0]) )));
/* "silx/math/chistogramnd_lut.pyx":387
* for i in range(i_n_dims):
@@ -27308,8 +28493,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_114_histogramnd_get_lut
* bins_range[i] = g_max[i] - g_min[i]
*
*/
- __pyx_t_4 = ((2 * __pyx_v_i) + 1);
- (__pyx_v_g_max[__pyx_v_i]) = (*((double *) ( /* dim=0 */ (__pyx_v_i_histo_range.data + __pyx_t_4 * __pyx_v_i_histo_range.strides[0]) )));
+ __pyx_t_5 = ((2 * __pyx_v_i) + 1);
+ (__pyx_v_g_max[__pyx_v_i]) = (*((double *) ( /* dim=0 */ (__pyx_v_i_histo_range.data + __pyx_t_5 * __pyx_v_i_histo_range.strides[0]) )));
/* "silx/math/chistogramnd_lut.pyx":388
* g_min[i] = i_histo_range[2*i]
@@ -27350,6 +28535,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_114_histogramnd_get_lut
#ifdef WITH_THREAD
PyThreadState *_save;
Py_UNBLOCK_THREADS
+ __Pyx_FastGIL_Remember();
#endif
/*try:*/ {
@@ -27361,8 +28547,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_114_histogramnd_get_lut
* lut_idx += 1
*/
while (1) {
- __pyx_t_5 = ((__pyx_v_elem_idx < __pyx_v_max_idx) != 0);
- if (!__pyx_t_5) break;
+ __pyx_t_6 = ((__pyx_v_elem_idx < __pyx_v_max_idx) != 0);
+ if (!__pyx_t_6) break;
/* "silx/math/chistogramnd_lut.pyx":395
* with nogil:
@@ -27399,8 +28585,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_114_histogramnd_get_lut
* # =====================
*/
__pyx_t_1 = __pyx_v_i_n_dims;
- for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
- __pyx_v_i = __pyx_t_2;
+ __pyx_t_2 = __pyx_t_1;
+ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
+ __pyx_v_i = __pyx_t_3;
/* "silx/math/chistogramnd_lut.pyx":401
*
@@ -27409,8 +28596,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_114_histogramnd_get_lut
* # =====================
* # Element is rejected if any of the following is NOT true :
*/
- __pyx_t_6 = (__pyx_v_elem_idx + __pyx_v_i);
- __pyx_v_elem_coord = (*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_i_sample.data + __pyx_t_6 * __pyx_v_i_sample.strides[0]) )));
+ __pyx_t_7 = (__pyx_v_elem_idx + __pyx_v_i);
+ __pyx_v_elem_coord = (*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_i_sample.data + __pyx_t_7 * __pyx_v_i_sample.strides[0]) )));
/* "silx/math/chistogramnd_lut.pyx":408
* # 3. coordinate==maximum value and last_bin_closed is True
@@ -27419,8 +28606,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_114_histogramnd_get_lut
* bin_idx = -1
* break
*/
- __pyx_t_5 = ((__pyx_v_elem_coord < (__pyx_v_g_min[__pyx_v_i])) != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = ((__pyx_v_elem_coord < (__pyx_v_g_min[__pyx_v_i])) != 0);
+ if (__pyx_t_6) {
/* "silx/math/chistogramnd_lut.pyx":409
* # =====================
@@ -27456,8 +28643,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_114_histogramnd_get_lut
* bin_idx = <long>(bin_idx * i_n_bins[i] + # noqa
* (((elem_coord - g_min[i]) * i_n_bins[i]) /
*/
- __pyx_t_5 = ((__pyx_v_elem_coord < (__pyx_v_g_max[__pyx_v_i])) != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = ((__pyx_v_elem_coord < (__pyx_v_g_max[__pyx_v_i])) != 0);
+ if (__pyx_t_6) {
/* "silx/math/chistogramnd_lut.pyx":418
* # (two tests)
@@ -27466,7 +28653,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_114_histogramnd_get_lut
* (((elem_coord - g_min[i]) * i_n_bins[i]) /
* bins_range[i]))
*/
- __pyx_t_7 = __pyx_v_i;
+ __pyx_t_8 = __pyx_v_i;
/* "silx/math/chistogramnd_lut.pyx":419
* if elem_coord < g_max[i]:
@@ -27475,7 +28662,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_114_histogramnd_get_lut
* bins_range[i]))
* else:
*/
- __pyx_t_8 = __pyx_v_i;
+ __pyx_t_9 = __pyx_v_i;
/* "silx/math/chistogramnd_lut.pyx":418
* # (two tests)
@@ -27484,7 +28671,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_114_histogramnd_get_lut
* (((elem_coord - g_min[i]) * i_n_bins[i]) /
* bins_range[i]))
*/
- __pyx_v_bin_idx = ((long)((__pyx_v_bin_idx * (*((int *) ( /* dim=0 */ (__pyx_v_i_n_bins.data + __pyx_t_7 * __pyx_v_i_n_bins.strides[0]) )))) + (((__pyx_v_elem_coord - (__pyx_v_g_min[__pyx_v_i])) * (*((int *) ( /* dim=0 */ (__pyx_v_i_n_bins.data + __pyx_t_8 * __pyx_v_i_n_bins.strides[0]) )))) / (__pyx_v_bins_range[__pyx_v_i]))));
+ __pyx_v_bin_idx = ((long)((__pyx_v_bin_idx * (*((int *) ( /* dim=0 */ (__pyx_v_i_n_bins.data + __pyx_t_8 * __pyx_v_i_n_bins.strides[0]) )))) + (((__pyx_v_elem_coord - (__pyx_v_g_min[__pyx_v_i])) * (*((int *) ( /* dim=0 */ (__pyx_v_i_n_bins.data + __pyx_t_9 * __pyx_v_i_n_bins.strides[0]) )))) / (__pyx_v_bins_range[__pyx_v_i]))));
/* "silx/math/chistogramnd_lut.pyx":417
* # than coordinates higher or equal to the max
@@ -27504,16 +28691,16 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_114_histogramnd_get_lut
* else:
*/
/*else*/ {
- __pyx_t_9 = (__pyx_v_last_bin_closed != 0);
- if (__pyx_t_9) {
+ __pyx_t_10 = (__pyx_v_last_bin_closed != 0);
+ if (__pyx_t_10) {
} else {
- __pyx_t_5 = __pyx_t_9;
+ __pyx_t_6 = __pyx_t_10;
goto __pyx_L15_bool_binop_done;
}
- __pyx_t_9 = ((__pyx_v_elem_coord == (__pyx_v_g_max[__pyx_v_i])) != 0);
- __pyx_t_5 = __pyx_t_9;
+ __pyx_t_10 = ((__pyx_v_elem_coord == (__pyx_v_g_max[__pyx_v_i])) != 0);
+ __pyx_t_6 = __pyx_t_10;
__pyx_L15_bool_binop_done:;
- if (__pyx_t_5) {
+ if (__pyx_t_6) {
/* "silx/math/chistogramnd_lut.pyx":426
* # else : discard
@@ -27522,8 +28709,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_114_histogramnd_get_lut
* else:
* bin_idx = -1
*/
- __pyx_t_10 = __pyx_v_i;
- __pyx_v_bin_idx = (((__pyx_v_bin_idx + 1) * (*((int *) ( /* dim=0 */ (__pyx_v_i_n_bins.data + __pyx_t_10 * __pyx_v_i_n_bins.strides[0]) )))) - 1);
+ __pyx_t_11 = __pyx_v_i;
+ __pyx_v_bin_idx = (((__pyx_v_bin_idx + 1) * (*((int *) ( /* dim=0 */ (__pyx_v_i_n_bins.data + __pyx_t_11 * __pyx_v_i_n_bins.strides[0]) )))) - 1);
/* "silx/math/chistogramnd_lut.pyx":425
* # put it in the last bin
@@ -27567,8 +28754,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_114_histogramnd_get_lut
* if bin_idx >= 0:
* o_histo[bin_idx] += 1
*/
- __pyx_t_11 = __pyx_v_lut_idx;
- *((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_o_lut.data + __pyx_t_11 * __pyx_v_o_lut.strides[0]) )) = __pyx_v_bin_idx;
+ __pyx_t_12 = __pyx_v_lut_idx;
+ *((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_o_lut.data + __pyx_t_12 * __pyx_v_o_lut.strides[0]) )) = __pyx_v_bin_idx;
/* "silx/math/chistogramnd_lut.pyx":432
*
@@ -27577,8 +28764,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_114_histogramnd_get_lut
* o_histo[bin_idx] += 1
*
*/
- __pyx_t_5 = ((__pyx_v_bin_idx >= 0) != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = ((__pyx_v_bin_idx >= 0) != 0);
+ if (__pyx_t_6) {
/* "silx/math/chistogramnd_lut.pyx":433
* o_lut[lut_idx] = bin_idx
@@ -27587,8 +28774,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_114_histogramnd_get_lut
*
* return 0
*/
- __pyx_t_12 = __pyx_v_bin_idx;
- *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_12 * __pyx_v_o_histo.strides[0]) )) += 1;
+ __pyx_t_13 = __pyx_v_bin_idx;
+ *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_13 * __pyx_v_o_histo.strides[0]) )) += 1;
/* "silx/math/chistogramnd_lut.pyx":432
*
@@ -27611,6 +28798,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_114_histogramnd_get_lut
/*finally:*/ {
/*normal exit:*/{
#ifdef WITH_THREAD
+ __Pyx_FastGIL_Forget();
Py_BLOCK_THREADS
#endif
goto __pyx_L7;
@@ -27672,53 +28860,68 @@ static PyObject *__pyx_fuse_1_2__pyx_pw_4silx_4math_16chistogramnd_lut_117_histo
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
switch (pos_args) {
case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
+ CYTHON_FALLTHROUGH;
case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
+ CYTHON_FALLTHROUGH;
case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ CYTHON_FALLTHROUGH;
case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
case 0: break;
default: goto __pyx_L5_argtuple_error;
}
kw_args = PyDict_Size(__pyx_kwds);
switch (pos_args) {
case 0:
- if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_sample)) != 0)) kw_args--;
+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_sample)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
case 1:
- if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_n_dims)) != 0)) kw_args--;
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_n_dims)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_get_lut_fused", 1, 8, 8, 1); __PYX_ERR(0, 361, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 2:
- if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
+ if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_get_lut_fused", 1, 8, 8, 2); __PYX_ERR(0, 361, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 3:
- if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_histo_range)) != 0)) kw_args--;
+ if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_histo_range)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_get_lut_fused", 1, 8, 8, 3); __PYX_ERR(0, 361, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 4:
- if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_n_bins)) != 0)) kw_args--;
+ if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_n_bins)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_get_lut_fused", 1, 8, 8, 4); __PYX_ERR(0, 361, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 5:
- if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_lut)) != 0)) kw_args--;
+ if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_lut)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_get_lut_fused", 1, 8, 8, 5); __PYX_ERR(0, 361, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 6:
- if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
+ if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_get_lut_fused", 1, 8, 8, 6); __PYX_ERR(0, 361, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 7:
- if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_last_bin_closed)) != 0)) kw_args--;
+ if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_last_bin_closed)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_get_lut_fused", 1, 8, 8, 7); __PYX_ERR(0, 361, __pyx_L3_error)
}
@@ -27738,13 +28941,13 @@ static PyObject *__pyx_fuse_1_2__pyx_pw_4silx_4math_16chistogramnd_lut_117_histo
values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
}
- __pyx_v_i_sample = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float32_t(values[0]); if (unlikely(!__pyx_v_i_sample.memview)) __PYX_ERR(0, 361, __pyx_L3_error)
+ __pyx_v_i_sample = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float32_t(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_sample.memview)) __PYX_ERR(0, 361, __pyx_L3_error)
__pyx_v_i_n_dims = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_i_n_dims == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 362, __pyx_L3_error)
__pyx_v_i_n_elems = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_i_n_elems == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 363, __pyx_L3_error)
- __pyx_v_i_histo_range = __Pyx_PyObject_to_MemoryviewSlice_ds_double(values[3]); if (unlikely(!__pyx_v_i_histo_range.memview)) __PYX_ERR(0, 364, __pyx_L3_error)
- __pyx_v_i_n_bins = __Pyx_PyObject_to_MemoryviewSlice_ds_int(values[4]); if (unlikely(!__pyx_v_i_n_bins.memview)) __PYX_ERR(0, 365, __pyx_L3_error)
- __pyx_v_o_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int16_t(values[5]); if (unlikely(!__pyx_v_o_lut.memview)) __PYX_ERR(0, 366, __pyx_L3_error)
- __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[6]); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 367, __pyx_L3_error)
+ __pyx_v_i_histo_range = __Pyx_PyObject_to_MemoryviewSlice_ds_double(values[3], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_histo_range.memview)) __PYX_ERR(0, 364, __pyx_L3_error)
+ __pyx_v_i_n_bins = __Pyx_PyObject_to_MemoryviewSlice_ds_int(values[4], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_n_bins.memview)) __PYX_ERR(0, 365, __pyx_L3_error)
+ __pyx_v_o_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int16_t(values[5], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_lut.memview)) __PYX_ERR(0, 366, __pyx_L3_error)
+ __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[6], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 367, __pyx_L3_error)
__pyx_v_last_bin_closed = __Pyx_PyObject_IsTrue(values[7]); if (unlikely((__pyx_v_last_bin_closed == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 368, __pyx_L3_error)
}
goto __pyx_L4_argument_unpacking_done;
@@ -27776,16 +28979,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_116_histogramnd_get_lut
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
- Py_ssize_t __pyx_t_3;
+ int __pyx_t_3;
Py_ssize_t __pyx_t_4;
- int __pyx_t_5;
- Py_ssize_t __pyx_t_6;
+ Py_ssize_t __pyx_t_5;
+ int __pyx_t_6;
Py_ssize_t __pyx_t_7;
Py_ssize_t __pyx_t_8;
- int __pyx_t_9;
- Py_ssize_t __pyx_t_10;
+ Py_ssize_t __pyx_t_9;
+ int __pyx_t_10;
Py_ssize_t __pyx_t_11;
Py_ssize_t __pyx_t_12;
+ Py_ssize_t __pyx_t_13;
__Pyx_RefNannySetupContext("__pyx_fuse_1_2_histogramnd_get_lut_fused", 0);
/* "silx/math/chistogramnd_lut.pyx":371
@@ -27850,8 +29054,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_116_histogramnd_get_lut
* g_max[i] = i_histo_range[2*i+1]
*/
__pyx_t_1 = __pyx_v_i_n_dims;
- for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
- __pyx_v_i = __pyx_t_2;
+ __pyx_t_2 = __pyx_t_1;
+ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
+ __pyx_v_i = __pyx_t_3;
/* "silx/math/chistogramnd_lut.pyx":386
*
@@ -27860,8 +29065,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_116_histogramnd_get_lut
* g_max[i] = i_histo_range[2*i+1]
* bins_range[i] = g_max[i] - g_min[i]
*/
- __pyx_t_3 = (2 * __pyx_v_i);
- (__pyx_v_g_min[__pyx_v_i]) = (*((double *) ( /* dim=0 */ (__pyx_v_i_histo_range.data + __pyx_t_3 * __pyx_v_i_histo_range.strides[0]) )));
+ __pyx_t_4 = (2 * __pyx_v_i);
+ (__pyx_v_g_min[__pyx_v_i]) = (*((double *) ( /* dim=0 */ (__pyx_v_i_histo_range.data + __pyx_t_4 * __pyx_v_i_histo_range.strides[0]) )));
/* "silx/math/chistogramnd_lut.pyx":387
* for i in range(i_n_dims):
@@ -27870,8 +29075,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_116_histogramnd_get_lut
* bins_range[i] = g_max[i] - g_min[i]
*
*/
- __pyx_t_4 = ((2 * __pyx_v_i) + 1);
- (__pyx_v_g_max[__pyx_v_i]) = (*((double *) ( /* dim=0 */ (__pyx_v_i_histo_range.data + __pyx_t_4 * __pyx_v_i_histo_range.strides[0]) )));
+ __pyx_t_5 = ((2 * __pyx_v_i) + 1);
+ (__pyx_v_g_max[__pyx_v_i]) = (*((double *) ( /* dim=0 */ (__pyx_v_i_histo_range.data + __pyx_t_5 * __pyx_v_i_histo_range.strides[0]) )));
/* "silx/math/chistogramnd_lut.pyx":388
* g_min[i] = i_histo_range[2*i]
@@ -27912,6 +29117,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_116_histogramnd_get_lut
#ifdef WITH_THREAD
PyThreadState *_save;
Py_UNBLOCK_THREADS
+ __Pyx_FastGIL_Remember();
#endif
/*try:*/ {
@@ -27923,8 +29129,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_116_histogramnd_get_lut
* lut_idx += 1
*/
while (1) {
- __pyx_t_5 = ((__pyx_v_elem_idx < __pyx_v_max_idx) != 0);
- if (!__pyx_t_5) break;
+ __pyx_t_6 = ((__pyx_v_elem_idx < __pyx_v_max_idx) != 0);
+ if (!__pyx_t_6) break;
/* "silx/math/chistogramnd_lut.pyx":395
* with nogil:
@@ -27961,8 +29167,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_116_histogramnd_get_lut
* # =====================
*/
__pyx_t_1 = __pyx_v_i_n_dims;
- for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
- __pyx_v_i = __pyx_t_2;
+ __pyx_t_2 = __pyx_t_1;
+ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
+ __pyx_v_i = __pyx_t_3;
/* "silx/math/chistogramnd_lut.pyx":401
*
@@ -27971,8 +29178,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_116_histogramnd_get_lut
* # =====================
* # Element is rejected if any of the following is NOT true :
*/
- __pyx_t_6 = (__pyx_v_elem_idx + __pyx_v_i);
- __pyx_v_elem_coord = (*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_i_sample.data + __pyx_t_6 * __pyx_v_i_sample.strides[0]) )));
+ __pyx_t_7 = (__pyx_v_elem_idx + __pyx_v_i);
+ __pyx_v_elem_coord = (*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_i_sample.data + __pyx_t_7 * __pyx_v_i_sample.strides[0]) )));
/* "silx/math/chistogramnd_lut.pyx":408
* # 3. coordinate==maximum value and last_bin_closed is True
@@ -27981,8 +29188,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_116_histogramnd_get_lut
* bin_idx = -1
* break
*/
- __pyx_t_5 = ((__pyx_v_elem_coord < (__pyx_v_g_min[__pyx_v_i])) != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = ((__pyx_v_elem_coord < (__pyx_v_g_min[__pyx_v_i])) != 0);
+ if (__pyx_t_6) {
/* "silx/math/chistogramnd_lut.pyx":409
* # =====================
@@ -28018,8 +29225,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_116_histogramnd_get_lut
* bin_idx = <long>(bin_idx * i_n_bins[i] + # noqa
* (((elem_coord - g_min[i]) * i_n_bins[i]) /
*/
- __pyx_t_5 = ((__pyx_v_elem_coord < (__pyx_v_g_max[__pyx_v_i])) != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = ((__pyx_v_elem_coord < (__pyx_v_g_max[__pyx_v_i])) != 0);
+ if (__pyx_t_6) {
/* "silx/math/chistogramnd_lut.pyx":418
* # (two tests)
@@ -28028,7 +29235,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_116_histogramnd_get_lut
* (((elem_coord - g_min[i]) * i_n_bins[i]) /
* bins_range[i]))
*/
- __pyx_t_7 = __pyx_v_i;
+ __pyx_t_8 = __pyx_v_i;
/* "silx/math/chistogramnd_lut.pyx":419
* if elem_coord < g_max[i]:
@@ -28037,7 +29244,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_116_histogramnd_get_lut
* bins_range[i]))
* else:
*/
- __pyx_t_8 = __pyx_v_i;
+ __pyx_t_9 = __pyx_v_i;
/* "silx/math/chistogramnd_lut.pyx":418
* # (two tests)
@@ -28046,7 +29253,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_116_histogramnd_get_lut
* (((elem_coord - g_min[i]) * i_n_bins[i]) /
* bins_range[i]))
*/
- __pyx_v_bin_idx = ((long)((__pyx_v_bin_idx * (*((int *) ( /* dim=0 */ (__pyx_v_i_n_bins.data + __pyx_t_7 * __pyx_v_i_n_bins.strides[0]) )))) + (((__pyx_v_elem_coord - (__pyx_v_g_min[__pyx_v_i])) * (*((int *) ( /* dim=0 */ (__pyx_v_i_n_bins.data + __pyx_t_8 * __pyx_v_i_n_bins.strides[0]) )))) / (__pyx_v_bins_range[__pyx_v_i]))));
+ __pyx_v_bin_idx = ((long)((__pyx_v_bin_idx * (*((int *) ( /* dim=0 */ (__pyx_v_i_n_bins.data + __pyx_t_8 * __pyx_v_i_n_bins.strides[0]) )))) + (((__pyx_v_elem_coord - (__pyx_v_g_min[__pyx_v_i])) * (*((int *) ( /* dim=0 */ (__pyx_v_i_n_bins.data + __pyx_t_9 * __pyx_v_i_n_bins.strides[0]) )))) / (__pyx_v_bins_range[__pyx_v_i]))));
/* "silx/math/chistogramnd_lut.pyx":417
* # than coordinates higher or equal to the max
@@ -28066,16 +29273,16 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_116_histogramnd_get_lut
* else:
*/
/*else*/ {
- __pyx_t_9 = (__pyx_v_last_bin_closed != 0);
- if (__pyx_t_9) {
+ __pyx_t_10 = (__pyx_v_last_bin_closed != 0);
+ if (__pyx_t_10) {
} else {
- __pyx_t_5 = __pyx_t_9;
+ __pyx_t_6 = __pyx_t_10;
goto __pyx_L15_bool_binop_done;
}
- __pyx_t_9 = ((__pyx_v_elem_coord == (__pyx_v_g_max[__pyx_v_i])) != 0);
- __pyx_t_5 = __pyx_t_9;
+ __pyx_t_10 = ((__pyx_v_elem_coord == (__pyx_v_g_max[__pyx_v_i])) != 0);
+ __pyx_t_6 = __pyx_t_10;
__pyx_L15_bool_binop_done:;
- if (__pyx_t_5) {
+ if (__pyx_t_6) {
/* "silx/math/chistogramnd_lut.pyx":426
* # else : discard
@@ -28084,8 +29291,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_116_histogramnd_get_lut
* else:
* bin_idx = -1
*/
- __pyx_t_10 = __pyx_v_i;
- __pyx_v_bin_idx = (((__pyx_v_bin_idx + 1) * (*((int *) ( /* dim=0 */ (__pyx_v_i_n_bins.data + __pyx_t_10 * __pyx_v_i_n_bins.strides[0]) )))) - 1);
+ __pyx_t_11 = __pyx_v_i;
+ __pyx_v_bin_idx = (((__pyx_v_bin_idx + 1) * (*((int *) ( /* dim=0 */ (__pyx_v_i_n_bins.data + __pyx_t_11 * __pyx_v_i_n_bins.strides[0]) )))) - 1);
/* "silx/math/chistogramnd_lut.pyx":425
* # put it in the last bin
@@ -28129,8 +29336,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_116_histogramnd_get_lut
* if bin_idx >= 0:
* o_histo[bin_idx] += 1
*/
- __pyx_t_11 = __pyx_v_lut_idx;
- *((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_o_lut.data + __pyx_t_11 * __pyx_v_o_lut.strides[0]) )) = __pyx_v_bin_idx;
+ __pyx_t_12 = __pyx_v_lut_idx;
+ *((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_o_lut.data + __pyx_t_12 * __pyx_v_o_lut.strides[0]) )) = __pyx_v_bin_idx;
/* "silx/math/chistogramnd_lut.pyx":432
*
@@ -28139,8 +29346,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_116_histogramnd_get_lut
* o_histo[bin_idx] += 1
*
*/
- __pyx_t_5 = ((__pyx_v_bin_idx >= 0) != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = ((__pyx_v_bin_idx >= 0) != 0);
+ if (__pyx_t_6) {
/* "silx/math/chistogramnd_lut.pyx":433
* o_lut[lut_idx] = bin_idx
@@ -28149,8 +29356,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_116_histogramnd_get_lut
*
* return 0
*/
- __pyx_t_12 = __pyx_v_bin_idx;
- *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_12 * __pyx_v_o_histo.strides[0]) )) += 1;
+ __pyx_t_13 = __pyx_v_bin_idx;
+ *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_13 * __pyx_v_o_histo.strides[0]) )) += 1;
/* "silx/math/chistogramnd_lut.pyx":432
*
@@ -28173,6 +29380,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_116_histogramnd_get_lut
/*finally:*/ {
/*normal exit:*/{
#ifdef WITH_THREAD
+ __Pyx_FastGIL_Forget();
Py_BLOCK_THREADS
#endif
goto __pyx_L7;
@@ -28234,53 +29442,68 @@ static PyObject *__pyx_fuse_2_0__pyx_pw_4silx_4math_16chistogramnd_lut_119_histo
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
switch (pos_args) {
case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
+ CYTHON_FALLTHROUGH;
case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
+ CYTHON_FALLTHROUGH;
case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ CYTHON_FALLTHROUGH;
case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
case 0: break;
default: goto __pyx_L5_argtuple_error;
}
kw_args = PyDict_Size(__pyx_kwds);
switch (pos_args) {
case 0:
- if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_sample)) != 0)) kw_args--;
+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_sample)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
case 1:
- if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_n_dims)) != 0)) kw_args--;
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_n_dims)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_get_lut_fused", 1, 8, 8, 1); __PYX_ERR(0, 361, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 2:
- if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
+ if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_get_lut_fused", 1, 8, 8, 2); __PYX_ERR(0, 361, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 3:
- if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_histo_range)) != 0)) kw_args--;
+ if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_histo_range)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_get_lut_fused", 1, 8, 8, 3); __PYX_ERR(0, 361, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 4:
- if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_n_bins)) != 0)) kw_args--;
+ if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_n_bins)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_get_lut_fused", 1, 8, 8, 4); __PYX_ERR(0, 361, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 5:
- if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_lut)) != 0)) kw_args--;
+ if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_lut)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_get_lut_fused", 1, 8, 8, 5); __PYX_ERR(0, 361, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 6:
- if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
+ if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_get_lut_fused", 1, 8, 8, 6); __PYX_ERR(0, 361, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 7:
- if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_last_bin_closed)) != 0)) kw_args--;
+ if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_last_bin_closed)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_get_lut_fused", 1, 8, 8, 7); __PYX_ERR(0, 361, __pyx_L3_error)
}
@@ -28300,13 +29523,13 @@ static PyObject *__pyx_fuse_2_0__pyx_pw_4silx_4math_16chistogramnd_lut_119_histo
values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
}
- __pyx_v_i_sample = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[0]); if (unlikely(!__pyx_v_i_sample.memview)) __PYX_ERR(0, 361, __pyx_L3_error)
+ __pyx_v_i_sample = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_sample.memview)) __PYX_ERR(0, 361, __pyx_L3_error)
__pyx_v_i_n_dims = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_i_n_dims == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 362, __pyx_L3_error)
__pyx_v_i_n_elems = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_i_n_elems == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 363, __pyx_L3_error)
- __pyx_v_i_histo_range = __Pyx_PyObject_to_MemoryviewSlice_ds_double(values[3]); if (unlikely(!__pyx_v_i_histo_range.memview)) __PYX_ERR(0, 364, __pyx_L3_error)
- __pyx_v_i_n_bins = __Pyx_PyObject_to_MemoryviewSlice_ds_int(values[4]); if (unlikely(!__pyx_v_i_n_bins.memview)) __PYX_ERR(0, 365, __pyx_L3_error)
- __pyx_v_o_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[5]); if (unlikely(!__pyx_v_o_lut.memview)) __PYX_ERR(0, 366, __pyx_L3_error)
- __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[6]); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 367, __pyx_L3_error)
+ __pyx_v_i_histo_range = __Pyx_PyObject_to_MemoryviewSlice_ds_double(values[3], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_histo_range.memview)) __PYX_ERR(0, 364, __pyx_L3_error)
+ __pyx_v_i_n_bins = __Pyx_PyObject_to_MemoryviewSlice_ds_int(values[4], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_n_bins.memview)) __PYX_ERR(0, 365, __pyx_L3_error)
+ __pyx_v_o_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[5], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_lut.memview)) __PYX_ERR(0, 366, __pyx_L3_error)
+ __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[6], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 367, __pyx_L3_error)
__pyx_v_last_bin_closed = __Pyx_PyObject_IsTrue(values[7]); if (unlikely((__pyx_v_last_bin_closed == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 368, __pyx_L3_error)
}
goto __pyx_L4_argument_unpacking_done;
@@ -28338,16 +29561,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_118_histogramnd_get_lut
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
- Py_ssize_t __pyx_t_3;
+ int __pyx_t_3;
Py_ssize_t __pyx_t_4;
- int __pyx_t_5;
- Py_ssize_t __pyx_t_6;
+ Py_ssize_t __pyx_t_5;
+ int __pyx_t_6;
Py_ssize_t __pyx_t_7;
Py_ssize_t __pyx_t_8;
- int __pyx_t_9;
- Py_ssize_t __pyx_t_10;
+ Py_ssize_t __pyx_t_9;
+ int __pyx_t_10;
Py_ssize_t __pyx_t_11;
Py_ssize_t __pyx_t_12;
+ Py_ssize_t __pyx_t_13;
__Pyx_RefNannySetupContext("__pyx_fuse_2_0_histogramnd_get_lut_fused", 0);
/* "silx/math/chistogramnd_lut.pyx":371
@@ -28412,8 +29636,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_118_histogramnd_get_lut
* g_max[i] = i_histo_range[2*i+1]
*/
__pyx_t_1 = __pyx_v_i_n_dims;
- for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
- __pyx_v_i = __pyx_t_2;
+ __pyx_t_2 = __pyx_t_1;
+ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
+ __pyx_v_i = __pyx_t_3;
/* "silx/math/chistogramnd_lut.pyx":386
*
@@ -28422,8 +29647,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_118_histogramnd_get_lut
* g_max[i] = i_histo_range[2*i+1]
* bins_range[i] = g_max[i] - g_min[i]
*/
- __pyx_t_3 = (2 * __pyx_v_i);
- (__pyx_v_g_min[__pyx_v_i]) = (*((double *) ( /* dim=0 */ (__pyx_v_i_histo_range.data + __pyx_t_3 * __pyx_v_i_histo_range.strides[0]) )));
+ __pyx_t_4 = (2 * __pyx_v_i);
+ (__pyx_v_g_min[__pyx_v_i]) = (*((double *) ( /* dim=0 */ (__pyx_v_i_histo_range.data + __pyx_t_4 * __pyx_v_i_histo_range.strides[0]) )));
/* "silx/math/chistogramnd_lut.pyx":387
* for i in range(i_n_dims):
@@ -28432,8 +29657,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_118_histogramnd_get_lut
* bins_range[i] = g_max[i] - g_min[i]
*
*/
- __pyx_t_4 = ((2 * __pyx_v_i) + 1);
- (__pyx_v_g_max[__pyx_v_i]) = (*((double *) ( /* dim=0 */ (__pyx_v_i_histo_range.data + __pyx_t_4 * __pyx_v_i_histo_range.strides[0]) )));
+ __pyx_t_5 = ((2 * __pyx_v_i) + 1);
+ (__pyx_v_g_max[__pyx_v_i]) = (*((double *) ( /* dim=0 */ (__pyx_v_i_histo_range.data + __pyx_t_5 * __pyx_v_i_histo_range.strides[0]) )));
/* "silx/math/chistogramnd_lut.pyx":388
* g_min[i] = i_histo_range[2*i]
@@ -28474,6 +29699,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_118_histogramnd_get_lut
#ifdef WITH_THREAD
PyThreadState *_save;
Py_UNBLOCK_THREADS
+ __Pyx_FastGIL_Remember();
#endif
/*try:*/ {
@@ -28485,8 +29711,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_118_histogramnd_get_lut
* lut_idx += 1
*/
while (1) {
- __pyx_t_5 = ((__pyx_v_elem_idx < __pyx_v_max_idx) != 0);
- if (!__pyx_t_5) break;
+ __pyx_t_6 = ((__pyx_v_elem_idx < __pyx_v_max_idx) != 0);
+ if (!__pyx_t_6) break;
/* "silx/math/chistogramnd_lut.pyx":395
* with nogil:
@@ -28523,8 +29749,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_118_histogramnd_get_lut
* # =====================
*/
__pyx_t_1 = __pyx_v_i_n_dims;
- for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
- __pyx_v_i = __pyx_t_2;
+ __pyx_t_2 = __pyx_t_1;
+ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
+ __pyx_v_i = __pyx_t_3;
/* "silx/math/chistogramnd_lut.pyx":401
*
@@ -28533,8 +29760,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_118_histogramnd_get_lut
* # =====================
* # Element is rejected if any of the following is NOT true :
*/
- __pyx_t_6 = (__pyx_v_elem_idx + __pyx_v_i);
- __pyx_v_elem_coord = (*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_sample.data + __pyx_t_6 * __pyx_v_i_sample.strides[0]) )));
+ __pyx_t_7 = (__pyx_v_elem_idx + __pyx_v_i);
+ __pyx_v_elem_coord = (*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_sample.data + __pyx_t_7 * __pyx_v_i_sample.strides[0]) )));
/* "silx/math/chistogramnd_lut.pyx":408
* # 3. coordinate==maximum value and last_bin_closed is True
@@ -28543,8 +29770,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_118_histogramnd_get_lut
* bin_idx = -1
* break
*/
- __pyx_t_5 = ((__pyx_v_elem_coord < (__pyx_v_g_min[__pyx_v_i])) != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = ((__pyx_v_elem_coord < (__pyx_v_g_min[__pyx_v_i])) != 0);
+ if (__pyx_t_6) {
/* "silx/math/chistogramnd_lut.pyx":409
* # =====================
@@ -28580,8 +29807,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_118_histogramnd_get_lut
* bin_idx = <long>(bin_idx * i_n_bins[i] + # noqa
* (((elem_coord - g_min[i]) * i_n_bins[i]) /
*/
- __pyx_t_5 = ((__pyx_v_elem_coord < (__pyx_v_g_max[__pyx_v_i])) != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = ((__pyx_v_elem_coord < (__pyx_v_g_max[__pyx_v_i])) != 0);
+ if (__pyx_t_6) {
/* "silx/math/chistogramnd_lut.pyx":418
* # (two tests)
@@ -28590,7 +29817,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_118_histogramnd_get_lut
* (((elem_coord - g_min[i]) * i_n_bins[i]) /
* bins_range[i]))
*/
- __pyx_t_7 = __pyx_v_i;
+ __pyx_t_8 = __pyx_v_i;
/* "silx/math/chistogramnd_lut.pyx":419
* if elem_coord < g_max[i]:
@@ -28599,7 +29826,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_118_histogramnd_get_lut
* bins_range[i]))
* else:
*/
- __pyx_t_8 = __pyx_v_i;
+ __pyx_t_9 = __pyx_v_i;
/* "silx/math/chistogramnd_lut.pyx":418
* # (two tests)
@@ -28608,7 +29835,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_118_histogramnd_get_lut
* (((elem_coord - g_min[i]) * i_n_bins[i]) /
* bins_range[i]))
*/
- __pyx_v_bin_idx = ((long)((__pyx_v_bin_idx * (*((int *) ( /* dim=0 */ (__pyx_v_i_n_bins.data + __pyx_t_7 * __pyx_v_i_n_bins.strides[0]) )))) + (((__pyx_v_elem_coord - (__pyx_v_g_min[__pyx_v_i])) * (*((int *) ( /* dim=0 */ (__pyx_v_i_n_bins.data + __pyx_t_8 * __pyx_v_i_n_bins.strides[0]) )))) / (__pyx_v_bins_range[__pyx_v_i]))));
+ __pyx_v_bin_idx = ((long)((__pyx_v_bin_idx * (*((int *) ( /* dim=0 */ (__pyx_v_i_n_bins.data + __pyx_t_8 * __pyx_v_i_n_bins.strides[0]) )))) + (((__pyx_v_elem_coord - (__pyx_v_g_min[__pyx_v_i])) * (*((int *) ( /* dim=0 */ (__pyx_v_i_n_bins.data + __pyx_t_9 * __pyx_v_i_n_bins.strides[0]) )))) / (__pyx_v_bins_range[__pyx_v_i]))));
/* "silx/math/chistogramnd_lut.pyx":417
* # than coordinates higher or equal to the max
@@ -28628,16 +29855,16 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_118_histogramnd_get_lut
* else:
*/
/*else*/ {
- __pyx_t_9 = (__pyx_v_last_bin_closed != 0);
- if (__pyx_t_9) {
+ __pyx_t_10 = (__pyx_v_last_bin_closed != 0);
+ if (__pyx_t_10) {
} else {
- __pyx_t_5 = __pyx_t_9;
+ __pyx_t_6 = __pyx_t_10;
goto __pyx_L15_bool_binop_done;
}
- __pyx_t_9 = ((__pyx_v_elem_coord == (__pyx_v_g_max[__pyx_v_i])) != 0);
- __pyx_t_5 = __pyx_t_9;
+ __pyx_t_10 = ((__pyx_v_elem_coord == (__pyx_v_g_max[__pyx_v_i])) != 0);
+ __pyx_t_6 = __pyx_t_10;
__pyx_L15_bool_binop_done:;
- if (__pyx_t_5) {
+ if (__pyx_t_6) {
/* "silx/math/chistogramnd_lut.pyx":426
* # else : discard
@@ -28646,8 +29873,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_118_histogramnd_get_lut
* else:
* bin_idx = -1
*/
- __pyx_t_10 = __pyx_v_i;
- __pyx_v_bin_idx = (((__pyx_v_bin_idx + 1) * (*((int *) ( /* dim=0 */ (__pyx_v_i_n_bins.data + __pyx_t_10 * __pyx_v_i_n_bins.strides[0]) )))) - 1);
+ __pyx_t_11 = __pyx_v_i;
+ __pyx_v_bin_idx = (((__pyx_v_bin_idx + 1) * (*((int *) ( /* dim=0 */ (__pyx_v_i_n_bins.data + __pyx_t_11 * __pyx_v_i_n_bins.strides[0]) )))) - 1);
/* "silx/math/chistogramnd_lut.pyx":425
* # put it in the last bin
@@ -28691,8 +29918,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_118_histogramnd_get_lut
* if bin_idx >= 0:
* o_histo[bin_idx] += 1
*/
- __pyx_t_11 = __pyx_v_lut_idx;
- *((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_o_lut.data + __pyx_t_11 * __pyx_v_o_lut.strides[0]) )) = __pyx_v_bin_idx;
+ __pyx_t_12 = __pyx_v_lut_idx;
+ *((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_o_lut.data + __pyx_t_12 * __pyx_v_o_lut.strides[0]) )) = __pyx_v_bin_idx;
/* "silx/math/chistogramnd_lut.pyx":432
*
@@ -28701,8 +29928,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_118_histogramnd_get_lut
* o_histo[bin_idx] += 1
*
*/
- __pyx_t_5 = ((__pyx_v_bin_idx >= 0) != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = ((__pyx_v_bin_idx >= 0) != 0);
+ if (__pyx_t_6) {
/* "silx/math/chistogramnd_lut.pyx":433
* o_lut[lut_idx] = bin_idx
@@ -28711,8 +29938,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_118_histogramnd_get_lut
*
* return 0
*/
- __pyx_t_12 = __pyx_v_bin_idx;
- *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_12 * __pyx_v_o_histo.strides[0]) )) += 1;
+ __pyx_t_13 = __pyx_v_bin_idx;
+ *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_13 * __pyx_v_o_histo.strides[0]) )) += 1;
/* "silx/math/chistogramnd_lut.pyx":432
*
@@ -28735,6 +29962,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_118_histogramnd_get_lut
/*finally:*/ {
/*normal exit:*/{
#ifdef WITH_THREAD
+ __Pyx_FastGIL_Forget();
Py_BLOCK_THREADS
#endif
goto __pyx_L7;
@@ -28796,53 +30024,68 @@ static PyObject *__pyx_fuse_2_1__pyx_pw_4silx_4math_16chistogramnd_lut_121_histo
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
switch (pos_args) {
case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
+ CYTHON_FALLTHROUGH;
case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
+ CYTHON_FALLTHROUGH;
case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ CYTHON_FALLTHROUGH;
case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
case 0: break;
default: goto __pyx_L5_argtuple_error;
}
kw_args = PyDict_Size(__pyx_kwds);
switch (pos_args) {
case 0:
- if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_sample)) != 0)) kw_args--;
+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_sample)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
case 1:
- if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_n_dims)) != 0)) kw_args--;
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_n_dims)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_get_lut_fused", 1, 8, 8, 1); __PYX_ERR(0, 361, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 2:
- if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
+ if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_get_lut_fused", 1, 8, 8, 2); __PYX_ERR(0, 361, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 3:
- if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_histo_range)) != 0)) kw_args--;
+ if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_histo_range)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_get_lut_fused", 1, 8, 8, 3); __PYX_ERR(0, 361, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 4:
- if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_n_bins)) != 0)) kw_args--;
+ if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_n_bins)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_get_lut_fused", 1, 8, 8, 4); __PYX_ERR(0, 361, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 5:
- if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_lut)) != 0)) kw_args--;
+ if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_lut)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_get_lut_fused", 1, 8, 8, 5); __PYX_ERR(0, 361, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 6:
- if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
+ if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_get_lut_fused", 1, 8, 8, 6); __PYX_ERR(0, 361, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 7:
- if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_last_bin_closed)) != 0)) kw_args--;
+ if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_last_bin_closed)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_get_lut_fused", 1, 8, 8, 7); __PYX_ERR(0, 361, __pyx_L3_error)
}
@@ -28862,13 +30105,13 @@ static PyObject *__pyx_fuse_2_1__pyx_pw_4silx_4math_16chistogramnd_lut_121_histo
values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
}
- __pyx_v_i_sample = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[0]); if (unlikely(!__pyx_v_i_sample.memview)) __PYX_ERR(0, 361, __pyx_L3_error)
+ __pyx_v_i_sample = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_sample.memview)) __PYX_ERR(0, 361, __pyx_L3_error)
__pyx_v_i_n_dims = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_i_n_dims == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 362, __pyx_L3_error)
__pyx_v_i_n_elems = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_i_n_elems == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 363, __pyx_L3_error)
- __pyx_v_i_histo_range = __Pyx_PyObject_to_MemoryviewSlice_ds_double(values[3]); if (unlikely(!__pyx_v_i_histo_range.memview)) __PYX_ERR(0, 364, __pyx_L3_error)
- __pyx_v_i_n_bins = __Pyx_PyObject_to_MemoryviewSlice_ds_int(values[4]); if (unlikely(!__pyx_v_i_n_bins.memview)) __PYX_ERR(0, 365, __pyx_L3_error)
- __pyx_v_o_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[5]); if (unlikely(!__pyx_v_o_lut.memview)) __PYX_ERR(0, 366, __pyx_L3_error)
- __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[6]); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 367, __pyx_L3_error)
+ __pyx_v_i_histo_range = __Pyx_PyObject_to_MemoryviewSlice_ds_double(values[3], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_histo_range.memview)) __PYX_ERR(0, 364, __pyx_L3_error)
+ __pyx_v_i_n_bins = __Pyx_PyObject_to_MemoryviewSlice_ds_int(values[4], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_n_bins.memview)) __PYX_ERR(0, 365, __pyx_L3_error)
+ __pyx_v_o_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[5], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_lut.memview)) __PYX_ERR(0, 366, __pyx_L3_error)
+ __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[6], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 367, __pyx_L3_error)
__pyx_v_last_bin_closed = __Pyx_PyObject_IsTrue(values[7]); if (unlikely((__pyx_v_last_bin_closed == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 368, __pyx_L3_error)
}
goto __pyx_L4_argument_unpacking_done;
@@ -28900,16 +30143,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_120_histogramnd_get_lut
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
- Py_ssize_t __pyx_t_3;
+ int __pyx_t_3;
Py_ssize_t __pyx_t_4;
- int __pyx_t_5;
- Py_ssize_t __pyx_t_6;
+ Py_ssize_t __pyx_t_5;
+ int __pyx_t_6;
Py_ssize_t __pyx_t_7;
Py_ssize_t __pyx_t_8;
- int __pyx_t_9;
- Py_ssize_t __pyx_t_10;
+ Py_ssize_t __pyx_t_9;
+ int __pyx_t_10;
Py_ssize_t __pyx_t_11;
Py_ssize_t __pyx_t_12;
+ Py_ssize_t __pyx_t_13;
__Pyx_RefNannySetupContext("__pyx_fuse_2_1_histogramnd_get_lut_fused", 0);
/* "silx/math/chistogramnd_lut.pyx":371
@@ -28974,8 +30218,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_120_histogramnd_get_lut
* g_max[i] = i_histo_range[2*i+1]
*/
__pyx_t_1 = __pyx_v_i_n_dims;
- for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
- __pyx_v_i = __pyx_t_2;
+ __pyx_t_2 = __pyx_t_1;
+ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
+ __pyx_v_i = __pyx_t_3;
/* "silx/math/chistogramnd_lut.pyx":386
*
@@ -28984,8 +30229,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_120_histogramnd_get_lut
* g_max[i] = i_histo_range[2*i+1]
* bins_range[i] = g_max[i] - g_min[i]
*/
- __pyx_t_3 = (2 * __pyx_v_i);
- (__pyx_v_g_min[__pyx_v_i]) = (*((double *) ( /* dim=0 */ (__pyx_v_i_histo_range.data + __pyx_t_3 * __pyx_v_i_histo_range.strides[0]) )));
+ __pyx_t_4 = (2 * __pyx_v_i);
+ (__pyx_v_g_min[__pyx_v_i]) = (*((double *) ( /* dim=0 */ (__pyx_v_i_histo_range.data + __pyx_t_4 * __pyx_v_i_histo_range.strides[0]) )));
/* "silx/math/chistogramnd_lut.pyx":387
* for i in range(i_n_dims):
@@ -28994,8 +30239,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_120_histogramnd_get_lut
* bins_range[i] = g_max[i] - g_min[i]
*
*/
- __pyx_t_4 = ((2 * __pyx_v_i) + 1);
- (__pyx_v_g_max[__pyx_v_i]) = (*((double *) ( /* dim=0 */ (__pyx_v_i_histo_range.data + __pyx_t_4 * __pyx_v_i_histo_range.strides[0]) )));
+ __pyx_t_5 = ((2 * __pyx_v_i) + 1);
+ (__pyx_v_g_max[__pyx_v_i]) = (*((double *) ( /* dim=0 */ (__pyx_v_i_histo_range.data + __pyx_t_5 * __pyx_v_i_histo_range.strides[0]) )));
/* "silx/math/chistogramnd_lut.pyx":388
* g_min[i] = i_histo_range[2*i]
@@ -29036,6 +30281,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_120_histogramnd_get_lut
#ifdef WITH_THREAD
PyThreadState *_save;
Py_UNBLOCK_THREADS
+ __Pyx_FastGIL_Remember();
#endif
/*try:*/ {
@@ -29047,8 +30293,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_120_histogramnd_get_lut
* lut_idx += 1
*/
while (1) {
- __pyx_t_5 = ((__pyx_v_elem_idx < __pyx_v_max_idx) != 0);
- if (!__pyx_t_5) break;
+ __pyx_t_6 = ((__pyx_v_elem_idx < __pyx_v_max_idx) != 0);
+ if (!__pyx_t_6) break;
/* "silx/math/chistogramnd_lut.pyx":395
* with nogil:
@@ -29085,8 +30331,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_120_histogramnd_get_lut
* # =====================
*/
__pyx_t_1 = __pyx_v_i_n_dims;
- for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
- __pyx_v_i = __pyx_t_2;
+ __pyx_t_2 = __pyx_t_1;
+ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
+ __pyx_v_i = __pyx_t_3;
/* "silx/math/chistogramnd_lut.pyx":401
*
@@ -29095,8 +30342,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_120_histogramnd_get_lut
* # =====================
* # Element is rejected if any of the following is NOT true :
*/
- __pyx_t_6 = (__pyx_v_elem_idx + __pyx_v_i);
- __pyx_v_elem_coord = (*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_sample.data + __pyx_t_6 * __pyx_v_i_sample.strides[0]) )));
+ __pyx_t_7 = (__pyx_v_elem_idx + __pyx_v_i);
+ __pyx_v_elem_coord = (*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_sample.data + __pyx_t_7 * __pyx_v_i_sample.strides[0]) )));
/* "silx/math/chistogramnd_lut.pyx":408
* # 3. coordinate==maximum value and last_bin_closed is True
@@ -29105,8 +30352,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_120_histogramnd_get_lut
* bin_idx = -1
* break
*/
- __pyx_t_5 = ((__pyx_v_elem_coord < (__pyx_v_g_min[__pyx_v_i])) != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = ((__pyx_v_elem_coord < (__pyx_v_g_min[__pyx_v_i])) != 0);
+ if (__pyx_t_6) {
/* "silx/math/chistogramnd_lut.pyx":409
* # =====================
@@ -29142,8 +30389,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_120_histogramnd_get_lut
* bin_idx = <long>(bin_idx * i_n_bins[i] + # noqa
* (((elem_coord - g_min[i]) * i_n_bins[i]) /
*/
- __pyx_t_5 = ((__pyx_v_elem_coord < (__pyx_v_g_max[__pyx_v_i])) != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = ((__pyx_v_elem_coord < (__pyx_v_g_max[__pyx_v_i])) != 0);
+ if (__pyx_t_6) {
/* "silx/math/chistogramnd_lut.pyx":418
* # (two tests)
@@ -29152,7 +30399,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_120_histogramnd_get_lut
* (((elem_coord - g_min[i]) * i_n_bins[i]) /
* bins_range[i]))
*/
- __pyx_t_7 = __pyx_v_i;
+ __pyx_t_8 = __pyx_v_i;
/* "silx/math/chistogramnd_lut.pyx":419
* if elem_coord < g_max[i]:
@@ -29161,7 +30408,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_120_histogramnd_get_lut
* bins_range[i]))
* else:
*/
- __pyx_t_8 = __pyx_v_i;
+ __pyx_t_9 = __pyx_v_i;
/* "silx/math/chistogramnd_lut.pyx":418
* # (two tests)
@@ -29170,7 +30417,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_120_histogramnd_get_lut
* (((elem_coord - g_min[i]) * i_n_bins[i]) /
* bins_range[i]))
*/
- __pyx_v_bin_idx = ((long)((__pyx_v_bin_idx * (*((int *) ( /* dim=0 */ (__pyx_v_i_n_bins.data + __pyx_t_7 * __pyx_v_i_n_bins.strides[0]) )))) + (((__pyx_v_elem_coord - (__pyx_v_g_min[__pyx_v_i])) * (*((int *) ( /* dim=0 */ (__pyx_v_i_n_bins.data + __pyx_t_8 * __pyx_v_i_n_bins.strides[0]) )))) / (__pyx_v_bins_range[__pyx_v_i]))));
+ __pyx_v_bin_idx = ((long)((__pyx_v_bin_idx * (*((int *) ( /* dim=0 */ (__pyx_v_i_n_bins.data + __pyx_t_8 * __pyx_v_i_n_bins.strides[0]) )))) + (((__pyx_v_elem_coord - (__pyx_v_g_min[__pyx_v_i])) * (*((int *) ( /* dim=0 */ (__pyx_v_i_n_bins.data + __pyx_t_9 * __pyx_v_i_n_bins.strides[0]) )))) / (__pyx_v_bins_range[__pyx_v_i]))));
/* "silx/math/chistogramnd_lut.pyx":417
* # than coordinates higher or equal to the max
@@ -29190,16 +30437,16 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_120_histogramnd_get_lut
* else:
*/
/*else*/ {
- __pyx_t_9 = (__pyx_v_last_bin_closed != 0);
- if (__pyx_t_9) {
+ __pyx_t_10 = (__pyx_v_last_bin_closed != 0);
+ if (__pyx_t_10) {
} else {
- __pyx_t_5 = __pyx_t_9;
+ __pyx_t_6 = __pyx_t_10;
goto __pyx_L15_bool_binop_done;
}
- __pyx_t_9 = ((__pyx_v_elem_coord == (__pyx_v_g_max[__pyx_v_i])) != 0);
- __pyx_t_5 = __pyx_t_9;
+ __pyx_t_10 = ((__pyx_v_elem_coord == (__pyx_v_g_max[__pyx_v_i])) != 0);
+ __pyx_t_6 = __pyx_t_10;
__pyx_L15_bool_binop_done:;
- if (__pyx_t_5) {
+ if (__pyx_t_6) {
/* "silx/math/chistogramnd_lut.pyx":426
* # else : discard
@@ -29208,8 +30455,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_120_histogramnd_get_lut
* else:
* bin_idx = -1
*/
- __pyx_t_10 = __pyx_v_i;
- __pyx_v_bin_idx = (((__pyx_v_bin_idx + 1) * (*((int *) ( /* dim=0 */ (__pyx_v_i_n_bins.data + __pyx_t_10 * __pyx_v_i_n_bins.strides[0]) )))) - 1);
+ __pyx_t_11 = __pyx_v_i;
+ __pyx_v_bin_idx = (((__pyx_v_bin_idx + 1) * (*((int *) ( /* dim=0 */ (__pyx_v_i_n_bins.data + __pyx_t_11 * __pyx_v_i_n_bins.strides[0]) )))) - 1);
/* "silx/math/chistogramnd_lut.pyx":425
* # put it in the last bin
@@ -29253,8 +30500,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_120_histogramnd_get_lut
* if bin_idx >= 0:
* o_histo[bin_idx] += 1
*/
- __pyx_t_11 = __pyx_v_lut_idx;
- *((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_o_lut.data + __pyx_t_11 * __pyx_v_o_lut.strides[0]) )) = __pyx_v_bin_idx;
+ __pyx_t_12 = __pyx_v_lut_idx;
+ *((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_o_lut.data + __pyx_t_12 * __pyx_v_o_lut.strides[0]) )) = __pyx_v_bin_idx;
/* "silx/math/chistogramnd_lut.pyx":432
*
@@ -29263,8 +30510,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_120_histogramnd_get_lut
* o_histo[bin_idx] += 1
*
*/
- __pyx_t_5 = ((__pyx_v_bin_idx >= 0) != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = ((__pyx_v_bin_idx >= 0) != 0);
+ if (__pyx_t_6) {
/* "silx/math/chistogramnd_lut.pyx":433
* o_lut[lut_idx] = bin_idx
@@ -29273,8 +30520,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_120_histogramnd_get_lut
*
* return 0
*/
- __pyx_t_12 = __pyx_v_bin_idx;
- *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_12 * __pyx_v_o_histo.strides[0]) )) += 1;
+ __pyx_t_13 = __pyx_v_bin_idx;
+ *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_13 * __pyx_v_o_histo.strides[0]) )) += 1;
/* "silx/math/chistogramnd_lut.pyx":432
*
@@ -29297,6 +30544,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_120_histogramnd_get_lut
/*finally:*/ {
/*normal exit:*/{
#ifdef WITH_THREAD
+ __Pyx_FastGIL_Forget();
Py_BLOCK_THREADS
#endif
goto __pyx_L7;
@@ -29358,53 +30606,68 @@ static PyObject *__pyx_fuse_2_2__pyx_pw_4silx_4math_16chistogramnd_lut_123_histo
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
switch (pos_args) {
case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
+ CYTHON_FALLTHROUGH;
case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
+ CYTHON_FALLTHROUGH;
case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ CYTHON_FALLTHROUGH;
case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
case 0: break;
default: goto __pyx_L5_argtuple_error;
}
kw_args = PyDict_Size(__pyx_kwds);
switch (pos_args) {
case 0:
- if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_sample)) != 0)) kw_args--;
+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_sample)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
case 1:
- if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_n_dims)) != 0)) kw_args--;
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_n_dims)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_get_lut_fused", 1, 8, 8, 1); __PYX_ERR(0, 361, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 2:
- if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
+ if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_get_lut_fused", 1, 8, 8, 2); __PYX_ERR(0, 361, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 3:
- if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_histo_range)) != 0)) kw_args--;
+ if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_histo_range)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_get_lut_fused", 1, 8, 8, 3); __PYX_ERR(0, 361, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 4:
- if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_n_bins)) != 0)) kw_args--;
+ if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_n_bins)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_get_lut_fused", 1, 8, 8, 4); __PYX_ERR(0, 361, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 5:
- if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_lut)) != 0)) kw_args--;
+ if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_lut)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_get_lut_fused", 1, 8, 8, 5); __PYX_ERR(0, 361, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 6:
- if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
+ if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_get_lut_fused", 1, 8, 8, 6); __PYX_ERR(0, 361, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 7:
- if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_last_bin_closed)) != 0)) kw_args--;
+ if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_last_bin_closed)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_get_lut_fused", 1, 8, 8, 7); __PYX_ERR(0, 361, __pyx_L3_error)
}
@@ -29424,13 +30687,13 @@ static PyObject *__pyx_fuse_2_2__pyx_pw_4silx_4math_16chistogramnd_lut_123_histo
values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
}
- __pyx_v_i_sample = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[0]); if (unlikely(!__pyx_v_i_sample.memview)) __PYX_ERR(0, 361, __pyx_L3_error)
+ __pyx_v_i_sample = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_sample.memview)) __PYX_ERR(0, 361, __pyx_L3_error)
__pyx_v_i_n_dims = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_i_n_dims == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 362, __pyx_L3_error)
__pyx_v_i_n_elems = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_i_n_elems == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 363, __pyx_L3_error)
- __pyx_v_i_histo_range = __Pyx_PyObject_to_MemoryviewSlice_ds_double(values[3]); if (unlikely(!__pyx_v_i_histo_range.memview)) __PYX_ERR(0, 364, __pyx_L3_error)
- __pyx_v_i_n_bins = __Pyx_PyObject_to_MemoryviewSlice_ds_int(values[4]); if (unlikely(!__pyx_v_i_n_bins.memview)) __PYX_ERR(0, 365, __pyx_L3_error)
- __pyx_v_o_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int16_t(values[5]); if (unlikely(!__pyx_v_o_lut.memview)) __PYX_ERR(0, 366, __pyx_L3_error)
- __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[6]); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 367, __pyx_L3_error)
+ __pyx_v_i_histo_range = __Pyx_PyObject_to_MemoryviewSlice_ds_double(values[3], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_histo_range.memview)) __PYX_ERR(0, 364, __pyx_L3_error)
+ __pyx_v_i_n_bins = __Pyx_PyObject_to_MemoryviewSlice_ds_int(values[4], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_n_bins.memview)) __PYX_ERR(0, 365, __pyx_L3_error)
+ __pyx_v_o_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int16_t(values[5], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_lut.memview)) __PYX_ERR(0, 366, __pyx_L3_error)
+ __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[6], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 367, __pyx_L3_error)
__pyx_v_last_bin_closed = __Pyx_PyObject_IsTrue(values[7]); if (unlikely((__pyx_v_last_bin_closed == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 368, __pyx_L3_error)
}
goto __pyx_L4_argument_unpacking_done;
@@ -29462,16 +30725,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_122_histogramnd_get_lut
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
- Py_ssize_t __pyx_t_3;
+ int __pyx_t_3;
Py_ssize_t __pyx_t_4;
- int __pyx_t_5;
- Py_ssize_t __pyx_t_6;
+ Py_ssize_t __pyx_t_5;
+ int __pyx_t_6;
Py_ssize_t __pyx_t_7;
Py_ssize_t __pyx_t_8;
- int __pyx_t_9;
- Py_ssize_t __pyx_t_10;
+ Py_ssize_t __pyx_t_9;
+ int __pyx_t_10;
Py_ssize_t __pyx_t_11;
Py_ssize_t __pyx_t_12;
+ Py_ssize_t __pyx_t_13;
__Pyx_RefNannySetupContext("__pyx_fuse_2_2_histogramnd_get_lut_fused", 0);
/* "silx/math/chistogramnd_lut.pyx":371
@@ -29536,8 +30800,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_122_histogramnd_get_lut
* g_max[i] = i_histo_range[2*i+1]
*/
__pyx_t_1 = __pyx_v_i_n_dims;
- for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
- __pyx_v_i = __pyx_t_2;
+ __pyx_t_2 = __pyx_t_1;
+ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
+ __pyx_v_i = __pyx_t_3;
/* "silx/math/chistogramnd_lut.pyx":386
*
@@ -29546,8 +30811,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_122_histogramnd_get_lut
* g_max[i] = i_histo_range[2*i+1]
* bins_range[i] = g_max[i] - g_min[i]
*/
- __pyx_t_3 = (2 * __pyx_v_i);
- (__pyx_v_g_min[__pyx_v_i]) = (*((double *) ( /* dim=0 */ (__pyx_v_i_histo_range.data + __pyx_t_3 * __pyx_v_i_histo_range.strides[0]) )));
+ __pyx_t_4 = (2 * __pyx_v_i);
+ (__pyx_v_g_min[__pyx_v_i]) = (*((double *) ( /* dim=0 */ (__pyx_v_i_histo_range.data + __pyx_t_4 * __pyx_v_i_histo_range.strides[0]) )));
/* "silx/math/chistogramnd_lut.pyx":387
* for i in range(i_n_dims):
@@ -29556,8 +30821,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_122_histogramnd_get_lut
* bins_range[i] = g_max[i] - g_min[i]
*
*/
- __pyx_t_4 = ((2 * __pyx_v_i) + 1);
- (__pyx_v_g_max[__pyx_v_i]) = (*((double *) ( /* dim=0 */ (__pyx_v_i_histo_range.data + __pyx_t_4 * __pyx_v_i_histo_range.strides[0]) )));
+ __pyx_t_5 = ((2 * __pyx_v_i) + 1);
+ (__pyx_v_g_max[__pyx_v_i]) = (*((double *) ( /* dim=0 */ (__pyx_v_i_histo_range.data + __pyx_t_5 * __pyx_v_i_histo_range.strides[0]) )));
/* "silx/math/chistogramnd_lut.pyx":388
* g_min[i] = i_histo_range[2*i]
@@ -29598,6 +30863,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_122_histogramnd_get_lut
#ifdef WITH_THREAD
PyThreadState *_save;
Py_UNBLOCK_THREADS
+ __Pyx_FastGIL_Remember();
#endif
/*try:*/ {
@@ -29609,8 +30875,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_122_histogramnd_get_lut
* lut_idx += 1
*/
while (1) {
- __pyx_t_5 = ((__pyx_v_elem_idx < __pyx_v_max_idx) != 0);
- if (!__pyx_t_5) break;
+ __pyx_t_6 = ((__pyx_v_elem_idx < __pyx_v_max_idx) != 0);
+ if (!__pyx_t_6) break;
/* "silx/math/chistogramnd_lut.pyx":395
* with nogil:
@@ -29647,8 +30913,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_122_histogramnd_get_lut
* # =====================
*/
__pyx_t_1 = __pyx_v_i_n_dims;
- for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
- __pyx_v_i = __pyx_t_2;
+ __pyx_t_2 = __pyx_t_1;
+ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
+ __pyx_v_i = __pyx_t_3;
/* "silx/math/chistogramnd_lut.pyx":401
*
@@ -29657,8 +30924,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_122_histogramnd_get_lut
* # =====================
* # Element is rejected if any of the following is NOT true :
*/
- __pyx_t_6 = (__pyx_v_elem_idx + __pyx_v_i);
- __pyx_v_elem_coord = (*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_sample.data + __pyx_t_6 * __pyx_v_i_sample.strides[0]) )));
+ __pyx_t_7 = (__pyx_v_elem_idx + __pyx_v_i);
+ __pyx_v_elem_coord = (*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_i_sample.data + __pyx_t_7 * __pyx_v_i_sample.strides[0]) )));
/* "silx/math/chistogramnd_lut.pyx":408
* # 3. coordinate==maximum value and last_bin_closed is True
@@ -29667,8 +30934,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_122_histogramnd_get_lut
* bin_idx = -1
* break
*/
- __pyx_t_5 = ((__pyx_v_elem_coord < (__pyx_v_g_min[__pyx_v_i])) != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = ((__pyx_v_elem_coord < (__pyx_v_g_min[__pyx_v_i])) != 0);
+ if (__pyx_t_6) {
/* "silx/math/chistogramnd_lut.pyx":409
* # =====================
@@ -29704,8 +30971,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_122_histogramnd_get_lut
* bin_idx = <long>(bin_idx * i_n_bins[i] + # noqa
* (((elem_coord - g_min[i]) * i_n_bins[i]) /
*/
- __pyx_t_5 = ((__pyx_v_elem_coord < (__pyx_v_g_max[__pyx_v_i])) != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = ((__pyx_v_elem_coord < (__pyx_v_g_max[__pyx_v_i])) != 0);
+ if (__pyx_t_6) {
/* "silx/math/chistogramnd_lut.pyx":418
* # (two tests)
@@ -29714,7 +30981,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_122_histogramnd_get_lut
* (((elem_coord - g_min[i]) * i_n_bins[i]) /
* bins_range[i]))
*/
- __pyx_t_7 = __pyx_v_i;
+ __pyx_t_8 = __pyx_v_i;
/* "silx/math/chistogramnd_lut.pyx":419
* if elem_coord < g_max[i]:
@@ -29723,7 +30990,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_122_histogramnd_get_lut
* bins_range[i]))
* else:
*/
- __pyx_t_8 = __pyx_v_i;
+ __pyx_t_9 = __pyx_v_i;
/* "silx/math/chistogramnd_lut.pyx":418
* # (two tests)
@@ -29732,7 +30999,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_122_histogramnd_get_lut
* (((elem_coord - g_min[i]) * i_n_bins[i]) /
* bins_range[i]))
*/
- __pyx_v_bin_idx = ((long)((__pyx_v_bin_idx * (*((int *) ( /* dim=0 */ (__pyx_v_i_n_bins.data + __pyx_t_7 * __pyx_v_i_n_bins.strides[0]) )))) + (((__pyx_v_elem_coord - (__pyx_v_g_min[__pyx_v_i])) * (*((int *) ( /* dim=0 */ (__pyx_v_i_n_bins.data + __pyx_t_8 * __pyx_v_i_n_bins.strides[0]) )))) / (__pyx_v_bins_range[__pyx_v_i]))));
+ __pyx_v_bin_idx = ((long)((__pyx_v_bin_idx * (*((int *) ( /* dim=0 */ (__pyx_v_i_n_bins.data + __pyx_t_8 * __pyx_v_i_n_bins.strides[0]) )))) + (((__pyx_v_elem_coord - (__pyx_v_g_min[__pyx_v_i])) * (*((int *) ( /* dim=0 */ (__pyx_v_i_n_bins.data + __pyx_t_9 * __pyx_v_i_n_bins.strides[0]) )))) / (__pyx_v_bins_range[__pyx_v_i]))));
/* "silx/math/chistogramnd_lut.pyx":417
* # than coordinates higher or equal to the max
@@ -29752,16 +31019,16 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_122_histogramnd_get_lut
* else:
*/
/*else*/ {
- __pyx_t_9 = (__pyx_v_last_bin_closed != 0);
- if (__pyx_t_9) {
+ __pyx_t_10 = (__pyx_v_last_bin_closed != 0);
+ if (__pyx_t_10) {
} else {
- __pyx_t_5 = __pyx_t_9;
+ __pyx_t_6 = __pyx_t_10;
goto __pyx_L15_bool_binop_done;
}
- __pyx_t_9 = ((__pyx_v_elem_coord == (__pyx_v_g_max[__pyx_v_i])) != 0);
- __pyx_t_5 = __pyx_t_9;
+ __pyx_t_10 = ((__pyx_v_elem_coord == (__pyx_v_g_max[__pyx_v_i])) != 0);
+ __pyx_t_6 = __pyx_t_10;
__pyx_L15_bool_binop_done:;
- if (__pyx_t_5) {
+ if (__pyx_t_6) {
/* "silx/math/chistogramnd_lut.pyx":426
* # else : discard
@@ -29770,8 +31037,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_122_histogramnd_get_lut
* else:
* bin_idx = -1
*/
- __pyx_t_10 = __pyx_v_i;
- __pyx_v_bin_idx = (((__pyx_v_bin_idx + 1) * (*((int *) ( /* dim=0 */ (__pyx_v_i_n_bins.data + __pyx_t_10 * __pyx_v_i_n_bins.strides[0]) )))) - 1);
+ __pyx_t_11 = __pyx_v_i;
+ __pyx_v_bin_idx = (((__pyx_v_bin_idx + 1) * (*((int *) ( /* dim=0 */ (__pyx_v_i_n_bins.data + __pyx_t_11 * __pyx_v_i_n_bins.strides[0]) )))) - 1);
/* "silx/math/chistogramnd_lut.pyx":425
* # put it in the last bin
@@ -29815,8 +31082,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_122_histogramnd_get_lut
* if bin_idx >= 0:
* o_histo[bin_idx] += 1
*/
- __pyx_t_11 = __pyx_v_lut_idx;
- *((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_o_lut.data + __pyx_t_11 * __pyx_v_o_lut.strides[0]) )) = __pyx_v_bin_idx;
+ __pyx_t_12 = __pyx_v_lut_idx;
+ *((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_o_lut.data + __pyx_t_12 * __pyx_v_o_lut.strides[0]) )) = __pyx_v_bin_idx;
/* "silx/math/chistogramnd_lut.pyx":432
*
@@ -29825,8 +31092,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_122_histogramnd_get_lut
* o_histo[bin_idx] += 1
*
*/
- __pyx_t_5 = ((__pyx_v_bin_idx >= 0) != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = ((__pyx_v_bin_idx >= 0) != 0);
+ if (__pyx_t_6) {
/* "silx/math/chistogramnd_lut.pyx":433
* o_lut[lut_idx] = bin_idx
@@ -29835,8 +31102,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_122_histogramnd_get_lut
*
* return 0
*/
- __pyx_t_12 = __pyx_v_bin_idx;
- *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_12 * __pyx_v_o_histo.strides[0]) )) += 1;
+ __pyx_t_13 = __pyx_v_bin_idx;
+ *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_13 * __pyx_v_o_histo.strides[0]) )) += 1;
/* "silx/math/chistogramnd_lut.pyx":432
*
@@ -29859,6 +31126,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_122_histogramnd_get_lut
/*finally:*/ {
/*normal exit:*/{
#ifdef WITH_THREAD
+ __Pyx_FastGIL_Forget();
Py_BLOCK_THREADS
#endif
goto __pyx_L7;
@@ -29920,53 +31188,68 @@ static PyObject *__pyx_fuse_3_0__pyx_pw_4silx_4math_16chistogramnd_lut_125_histo
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
switch (pos_args) {
case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
+ CYTHON_FALLTHROUGH;
case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
+ CYTHON_FALLTHROUGH;
case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ CYTHON_FALLTHROUGH;
case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
case 0: break;
default: goto __pyx_L5_argtuple_error;
}
kw_args = PyDict_Size(__pyx_kwds);
switch (pos_args) {
case 0:
- if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_sample)) != 0)) kw_args--;
+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_sample)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
case 1:
- if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_n_dims)) != 0)) kw_args--;
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_n_dims)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_get_lut_fused", 1, 8, 8, 1); __PYX_ERR(0, 361, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 2:
- if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
+ if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_get_lut_fused", 1, 8, 8, 2); __PYX_ERR(0, 361, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 3:
- if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_histo_range)) != 0)) kw_args--;
+ if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_histo_range)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_get_lut_fused", 1, 8, 8, 3); __PYX_ERR(0, 361, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 4:
- if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_n_bins)) != 0)) kw_args--;
+ if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_n_bins)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_get_lut_fused", 1, 8, 8, 4); __PYX_ERR(0, 361, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 5:
- if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_lut)) != 0)) kw_args--;
+ if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_lut)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_get_lut_fused", 1, 8, 8, 5); __PYX_ERR(0, 361, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 6:
- if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
+ if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_get_lut_fused", 1, 8, 8, 6); __PYX_ERR(0, 361, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 7:
- if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_last_bin_closed)) != 0)) kw_args--;
+ if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_last_bin_closed)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_get_lut_fused", 1, 8, 8, 7); __PYX_ERR(0, 361, __pyx_L3_error)
}
@@ -29986,13 +31269,13 @@ static PyObject *__pyx_fuse_3_0__pyx_pw_4silx_4math_16chistogramnd_lut_125_histo
values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
}
- __pyx_v_i_sample = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[0]); if (unlikely(!__pyx_v_i_sample.memview)) __PYX_ERR(0, 361, __pyx_L3_error)
+ __pyx_v_i_sample = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_sample.memview)) __PYX_ERR(0, 361, __pyx_L3_error)
__pyx_v_i_n_dims = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_i_n_dims == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 362, __pyx_L3_error)
__pyx_v_i_n_elems = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_i_n_elems == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 363, __pyx_L3_error)
- __pyx_v_i_histo_range = __Pyx_PyObject_to_MemoryviewSlice_ds_double(values[3]); if (unlikely(!__pyx_v_i_histo_range.memview)) __PYX_ERR(0, 364, __pyx_L3_error)
- __pyx_v_i_n_bins = __Pyx_PyObject_to_MemoryviewSlice_ds_int(values[4]); if (unlikely(!__pyx_v_i_n_bins.memview)) __PYX_ERR(0, 365, __pyx_L3_error)
- __pyx_v_o_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[5]); if (unlikely(!__pyx_v_o_lut.memview)) __PYX_ERR(0, 366, __pyx_L3_error)
- __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[6]); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 367, __pyx_L3_error)
+ __pyx_v_i_histo_range = __Pyx_PyObject_to_MemoryviewSlice_ds_double(values[3], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_histo_range.memview)) __PYX_ERR(0, 364, __pyx_L3_error)
+ __pyx_v_i_n_bins = __Pyx_PyObject_to_MemoryviewSlice_ds_int(values[4], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_n_bins.memview)) __PYX_ERR(0, 365, __pyx_L3_error)
+ __pyx_v_o_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[5], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_lut.memview)) __PYX_ERR(0, 366, __pyx_L3_error)
+ __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[6], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 367, __pyx_L3_error)
__pyx_v_last_bin_closed = __Pyx_PyObject_IsTrue(values[7]); if (unlikely((__pyx_v_last_bin_closed == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 368, __pyx_L3_error)
}
goto __pyx_L4_argument_unpacking_done;
@@ -30024,16 +31307,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_124_histogramnd_get_lut
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
- Py_ssize_t __pyx_t_3;
+ int __pyx_t_3;
Py_ssize_t __pyx_t_4;
- int __pyx_t_5;
- Py_ssize_t __pyx_t_6;
+ Py_ssize_t __pyx_t_5;
+ int __pyx_t_6;
Py_ssize_t __pyx_t_7;
Py_ssize_t __pyx_t_8;
- int __pyx_t_9;
- Py_ssize_t __pyx_t_10;
+ Py_ssize_t __pyx_t_9;
+ int __pyx_t_10;
Py_ssize_t __pyx_t_11;
Py_ssize_t __pyx_t_12;
+ Py_ssize_t __pyx_t_13;
__Pyx_RefNannySetupContext("__pyx_fuse_3_0_histogramnd_get_lut_fused", 0);
/* "silx/math/chistogramnd_lut.pyx":371
@@ -30098,8 +31382,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_124_histogramnd_get_lut
* g_max[i] = i_histo_range[2*i+1]
*/
__pyx_t_1 = __pyx_v_i_n_dims;
- for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
- __pyx_v_i = __pyx_t_2;
+ __pyx_t_2 = __pyx_t_1;
+ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
+ __pyx_v_i = __pyx_t_3;
/* "silx/math/chistogramnd_lut.pyx":386
*
@@ -30108,8 +31393,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_124_histogramnd_get_lut
* g_max[i] = i_histo_range[2*i+1]
* bins_range[i] = g_max[i] - g_min[i]
*/
- __pyx_t_3 = (2 * __pyx_v_i);
- (__pyx_v_g_min[__pyx_v_i]) = (*((double *) ( /* dim=0 */ (__pyx_v_i_histo_range.data + __pyx_t_3 * __pyx_v_i_histo_range.strides[0]) )));
+ __pyx_t_4 = (2 * __pyx_v_i);
+ (__pyx_v_g_min[__pyx_v_i]) = (*((double *) ( /* dim=0 */ (__pyx_v_i_histo_range.data + __pyx_t_4 * __pyx_v_i_histo_range.strides[0]) )));
/* "silx/math/chistogramnd_lut.pyx":387
* for i in range(i_n_dims):
@@ -30118,8 +31403,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_124_histogramnd_get_lut
* bins_range[i] = g_max[i] - g_min[i]
*
*/
- __pyx_t_4 = ((2 * __pyx_v_i) + 1);
- (__pyx_v_g_max[__pyx_v_i]) = (*((double *) ( /* dim=0 */ (__pyx_v_i_histo_range.data + __pyx_t_4 * __pyx_v_i_histo_range.strides[0]) )));
+ __pyx_t_5 = ((2 * __pyx_v_i) + 1);
+ (__pyx_v_g_max[__pyx_v_i]) = (*((double *) ( /* dim=0 */ (__pyx_v_i_histo_range.data + __pyx_t_5 * __pyx_v_i_histo_range.strides[0]) )));
/* "silx/math/chistogramnd_lut.pyx":388
* g_min[i] = i_histo_range[2*i]
@@ -30160,6 +31445,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_124_histogramnd_get_lut
#ifdef WITH_THREAD
PyThreadState *_save;
Py_UNBLOCK_THREADS
+ __Pyx_FastGIL_Remember();
#endif
/*try:*/ {
@@ -30171,8 +31457,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_124_histogramnd_get_lut
* lut_idx += 1
*/
while (1) {
- __pyx_t_5 = ((__pyx_v_elem_idx < __pyx_v_max_idx) != 0);
- if (!__pyx_t_5) break;
+ __pyx_t_6 = ((__pyx_v_elem_idx < __pyx_v_max_idx) != 0);
+ if (!__pyx_t_6) break;
/* "silx/math/chistogramnd_lut.pyx":395
* with nogil:
@@ -30209,8 +31495,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_124_histogramnd_get_lut
* # =====================
*/
__pyx_t_1 = __pyx_v_i_n_dims;
- for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
- __pyx_v_i = __pyx_t_2;
+ __pyx_t_2 = __pyx_t_1;
+ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
+ __pyx_v_i = __pyx_t_3;
/* "silx/math/chistogramnd_lut.pyx":401
*
@@ -30219,8 +31506,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_124_histogramnd_get_lut
* # =====================
* # Element is rejected if any of the following is NOT true :
*/
- __pyx_t_6 = (__pyx_v_elem_idx + __pyx_v_i);
- __pyx_v_elem_coord = (*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_sample.data + __pyx_t_6 * __pyx_v_i_sample.strides[0]) )));
+ __pyx_t_7 = (__pyx_v_elem_idx + __pyx_v_i);
+ __pyx_v_elem_coord = (*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_sample.data + __pyx_t_7 * __pyx_v_i_sample.strides[0]) )));
/* "silx/math/chistogramnd_lut.pyx":408
* # 3. coordinate==maximum value and last_bin_closed is True
@@ -30229,8 +31516,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_124_histogramnd_get_lut
* bin_idx = -1
* break
*/
- __pyx_t_5 = ((__pyx_v_elem_coord < (__pyx_v_g_min[__pyx_v_i])) != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = ((__pyx_v_elem_coord < (__pyx_v_g_min[__pyx_v_i])) != 0);
+ if (__pyx_t_6) {
/* "silx/math/chistogramnd_lut.pyx":409
* # =====================
@@ -30266,8 +31553,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_124_histogramnd_get_lut
* bin_idx = <long>(bin_idx * i_n_bins[i] + # noqa
* (((elem_coord - g_min[i]) * i_n_bins[i]) /
*/
- __pyx_t_5 = ((__pyx_v_elem_coord < (__pyx_v_g_max[__pyx_v_i])) != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = ((__pyx_v_elem_coord < (__pyx_v_g_max[__pyx_v_i])) != 0);
+ if (__pyx_t_6) {
/* "silx/math/chistogramnd_lut.pyx":418
* # (two tests)
@@ -30276,7 +31563,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_124_histogramnd_get_lut
* (((elem_coord - g_min[i]) * i_n_bins[i]) /
* bins_range[i]))
*/
- __pyx_t_7 = __pyx_v_i;
+ __pyx_t_8 = __pyx_v_i;
/* "silx/math/chistogramnd_lut.pyx":419
* if elem_coord < g_max[i]:
@@ -30285,7 +31572,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_124_histogramnd_get_lut
* bins_range[i]))
* else:
*/
- __pyx_t_8 = __pyx_v_i;
+ __pyx_t_9 = __pyx_v_i;
/* "silx/math/chistogramnd_lut.pyx":418
* # (two tests)
@@ -30294,7 +31581,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_124_histogramnd_get_lut
* (((elem_coord - g_min[i]) * i_n_bins[i]) /
* bins_range[i]))
*/
- __pyx_v_bin_idx = ((long)((__pyx_v_bin_idx * (*((int *) ( /* dim=0 */ (__pyx_v_i_n_bins.data + __pyx_t_7 * __pyx_v_i_n_bins.strides[0]) )))) + (((__pyx_v_elem_coord - (__pyx_v_g_min[__pyx_v_i])) * (*((int *) ( /* dim=0 */ (__pyx_v_i_n_bins.data + __pyx_t_8 * __pyx_v_i_n_bins.strides[0]) )))) / (__pyx_v_bins_range[__pyx_v_i]))));
+ __pyx_v_bin_idx = ((long)((__pyx_v_bin_idx * (*((int *) ( /* dim=0 */ (__pyx_v_i_n_bins.data + __pyx_t_8 * __pyx_v_i_n_bins.strides[0]) )))) + (((__pyx_v_elem_coord - (__pyx_v_g_min[__pyx_v_i])) * (*((int *) ( /* dim=0 */ (__pyx_v_i_n_bins.data + __pyx_t_9 * __pyx_v_i_n_bins.strides[0]) )))) / (__pyx_v_bins_range[__pyx_v_i]))));
/* "silx/math/chistogramnd_lut.pyx":417
* # than coordinates higher or equal to the max
@@ -30314,16 +31601,16 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_124_histogramnd_get_lut
* else:
*/
/*else*/ {
- __pyx_t_9 = (__pyx_v_last_bin_closed != 0);
- if (__pyx_t_9) {
+ __pyx_t_10 = (__pyx_v_last_bin_closed != 0);
+ if (__pyx_t_10) {
} else {
- __pyx_t_5 = __pyx_t_9;
+ __pyx_t_6 = __pyx_t_10;
goto __pyx_L15_bool_binop_done;
}
- __pyx_t_9 = ((__pyx_v_elem_coord == (__pyx_v_g_max[__pyx_v_i])) != 0);
- __pyx_t_5 = __pyx_t_9;
+ __pyx_t_10 = ((__pyx_v_elem_coord == (__pyx_v_g_max[__pyx_v_i])) != 0);
+ __pyx_t_6 = __pyx_t_10;
__pyx_L15_bool_binop_done:;
- if (__pyx_t_5) {
+ if (__pyx_t_6) {
/* "silx/math/chistogramnd_lut.pyx":426
* # else : discard
@@ -30332,8 +31619,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_124_histogramnd_get_lut
* else:
* bin_idx = -1
*/
- __pyx_t_10 = __pyx_v_i;
- __pyx_v_bin_idx = (((__pyx_v_bin_idx + 1) * (*((int *) ( /* dim=0 */ (__pyx_v_i_n_bins.data + __pyx_t_10 * __pyx_v_i_n_bins.strides[0]) )))) - 1);
+ __pyx_t_11 = __pyx_v_i;
+ __pyx_v_bin_idx = (((__pyx_v_bin_idx + 1) * (*((int *) ( /* dim=0 */ (__pyx_v_i_n_bins.data + __pyx_t_11 * __pyx_v_i_n_bins.strides[0]) )))) - 1);
/* "silx/math/chistogramnd_lut.pyx":425
* # put it in the last bin
@@ -30377,8 +31664,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_124_histogramnd_get_lut
* if bin_idx >= 0:
* o_histo[bin_idx] += 1
*/
- __pyx_t_11 = __pyx_v_lut_idx;
- *((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_o_lut.data + __pyx_t_11 * __pyx_v_o_lut.strides[0]) )) = __pyx_v_bin_idx;
+ __pyx_t_12 = __pyx_v_lut_idx;
+ *((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_o_lut.data + __pyx_t_12 * __pyx_v_o_lut.strides[0]) )) = __pyx_v_bin_idx;
/* "silx/math/chistogramnd_lut.pyx":432
*
@@ -30387,8 +31674,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_124_histogramnd_get_lut
* o_histo[bin_idx] += 1
*
*/
- __pyx_t_5 = ((__pyx_v_bin_idx >= 0) != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = ((__pyx_v_bin_idx >= 0) != 0);
+ if (__pyx_t_6) {
/* "silx/math/chistogramnd_lut.pyx":433
* o_lut[lut_idx] = bin_idx
@@ -30397,8 +31684,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_124_histogramnd_get_lut
*
* return 0
*/
- __pyx_t_12 = __pyx_v_bin_idx;
- *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_12 * __pyx_v_o_histo.strides[0]) )) += 1;
+ __pyx_t_13 = __pyx_v_bin_idx;
+ *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_13 * __pyx_v_o_histo.strides[0]) )) += 1;
/* "silx/math/chistogramnd_lut.pyx":432
*
@@ -30421,6 +31708,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_124_histogramnd_get_lut
/*finally:*/ {
/*normal exit:*/{
#ifdef WITH_THREAD
+ __Pyx_FastGIL_Forget();
Py_BLOCK_THREADS
#endif
goto __pyx_L7;
@@ -30482,53 +31770,68 @@ static PyObject *__pyx_fuse_3_1__pyx_pw_4silx_4math_16chistogramnd_lut_127_histo
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
switch (pos_args) {
case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
+ CYTHON_FALLTHROUGH;
case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
+ CYTHON_FALLTHROUGH;
case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ CYTHON_FALLTHROUGH;
case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
case 0: break;
default: goto __pyx_L5_argtuple_error;
}
kw_args = PyDict_Size(__pyx_kwds);
switch (pos_args) {
case 0:
- if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_sample)) != 0)) kw_args--;
+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_sample)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
case 1:
- if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_n_dims)) != 0)) kw_args--;
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_n_dims)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_get_lut_fused", 1, 8, 8, 1); __PYX_ERR(0, 361, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 2:
- if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
+ if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_get_lut_fused", 1, 8, 8, 2); __PYX_ERR(0, 361, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 3:
- if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_histo_range)) != 0)) kw_args--;
+ if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_histo_range)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_get_lut_fused", 1, 8, 8, 3); __PYX_ERR(0, 361, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 4:
- if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_n_bins)) != 0)) kw_args--;
+ if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_n_bins)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_get_lut_fused", 1, 8, 8, 4); __PYX_ERR(0, 361, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 5:
- if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_lut)) != 0)) kw_args--;
+ if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_lut)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_get_lut_fused", 1, 8, 8, 5); __PYX_ERR(0, 361, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 6:
- if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
+ if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_get_lut_fused", 1, 8, 8, 6); __PYX_ERR(0, 361, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 7:
- if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_last_bin_closed)) != 0)) kw_args--;
+ if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_last_bin_closed)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_get_lut_fused", 1, 8, 8, 7); __PYX_ERR(0, 361, __pyx_L3_error)
}
@@ -30548,13 +31851,13 @@ static PyObject *__pyx_fuse_3_1__pyx_pw_4silx_4math_16chistogramnd_lut_127_histo
values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
}
- __pyx_v_i_sample = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[0]); if (unlikely(!__pyx_v_i_sample.memview)) __PYX_ERR(0, 361, __pyx_L3_error)
+ __pyx_v_i_sample = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_sample.memview)) __PYX_ERR(0, 361, __pyx_L3_error)
__pyx_v_i_n_dims = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_i_n_dims == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 362, __pyx_L3_error)
__pyx_v_i_n_elems = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_i_n_elems == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 363, __pyx_L3_error)
- __pyx_v_i_histo_range = __Pyx_PyObject_to_MemoryviewSlice_ds_double(values[3]); if (unlikely(!__pyx_v_i_histo_range.memview)) __PYX_ERR(0, 364, __pyx_L3_error)
- __pyx_v_i_n_bins = __Pyx_PyObject_to_MemoryviewSlice_ds_int(values[4]); if (unlikely(!__pyx_v_i_n_bins.memview)) __PYX_ERR(0, 365, __pyx_L3_error)
- __pyx_v_o_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[5]); if (unlikely(!__pyx_v_o_lut.memview)) __PYX_ERR(0, 366, __pyx_L3_error)
- __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[6]); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 367, __pyx_L3_error)
+ __pyx_v_i_histo_range = __Pyx_PyObject_to_MemoryviewSlice_ds_double(values[3], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_histo_range.memview)) __PYX_ERR(0, 364, __pyx_L3_error)
+ __pyx_v_i_n_bins = __Pyx_PyObject_to_MemoryviewSlice_ds_int(values[4], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_n_bins.memview)) __PYX_ERR(0, 365, __pyx_L3_error)
+ __pyx_v_o_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(values[5], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_lut.memview)) __PYX_ERR(0, 366, __pyx_L3_error)
+ __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[6], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 367, __pyx_L3_error)
__pyx_v_last_bin_closed = __Pyx_PyObject_IsTrue(values[7]); if (unlikely((__pyx_v_last_bin_closed == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 368, __pyx_L3_error)
}
goto __pyx_L4_argument_unpacking_done;
@@ -30586,16 +31889,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_126_histogramnd_get_lut
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
- Py_ssize_t __pyx_t_3;
+ int __pyx_t_3;
Py_ssize_t __pyx_t_4;
- int __pyx_t_5;
- Py_ssize_t __pyx_t_6;
+ Py_ssize_t __pyx_t_5;
+ int __pyx_t_6;
Py_ssize_t __pyx_t_7;
Py_ssize_t __pyx_t_8;
- int __pyx_t_9;
- Py_ssize_t __pyx_t_10;
+ Py_ssize_t __pyx_t_9;
+ int __pyx_t_10;
Py_ssize_t __pyx_t_11;
Py_ssize_t __pyx_t_12;
+ Py_ssize_t __pyx_t_13;
__Pyx_RefNannySetupContext("__pyx_fuse_3_1_histogramnd_get_lut_fused", 0);
/* "silx/math/chistogramnd_lut.pyx":371
@@ -30660,8 +31964,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_126_histogramnd_get_lut
* g_max[i] = i_histo_range[2*i+1]
*/
__pyx_t_1 = __pyx_v_i_n_dims;
- for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
- __pyx_v_i = __pyx_t_2;
+ __pyx_t_2 = __pyx_t_1;
+ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
+ __pyx_v_i = __pyx_t_3;
/* "silx/math/chistogramnd_lut.pyx":386
*
@@ -30670,8 +31975,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_126_histogramnd_get_lut
* g_max[i] = i_histo_range[2*i+1]
* bins_range[i] = g_max[i] - g_min[i]
*/
- __pyx_t_3 = (2 * __pyx_v_i);
- (__pyx_v_g_min[__pyx_v_i]) = (*((double *) ( /* dim=0 */ (__pyx_v_i_histo_range.data + __pyx_t_3 * __pyx_v_i_histo_range.strides[0]) )));
+ __pyx_t_4 = (2 * __pyx_v_i);
+ (__pyx_v_g_min[__pyx_v_i]) = (*((double *) ( /* dim=0 */ (__pyx_v_i_histo_range.data + __pyx_t_4 * __pyx_v_i_histo_range.strides[0]) )));
/* "silx/math/chistogramnd_lut.pyx":387
* for i in range(i_n_dims):
@@ -30680,8 +31985,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_126_histogramnd_get_lut
* bins_range[i] = g_max[i] - g_min[i]
*
*/
- __pyx_t_4 = ((2 * __pyx_v_i) + 1);
- (__pyx_v_g_max[__pyx_v_i]) = (*((double *) ( /* dim=0 */ (__pyx_v_i_histo_range.data + __pyx_t_4 * __pyx_v_i_histo_range.strides[0]) )));
+ __pyx_t_5 = ((2 * __pyx_v_i) + 1);
+ (__pyx_v_g_max[__pyx_v_i]) = (*((double *) ( /* dim=0 */ (__pyx_v_i_histo_range.data + __pyx_t_5 * __pyx_v_i_histo_range.strides[0]) )));
/* "silx/math/chistogramnd_lut.pyx":388
* g_min[i] = i_histo_range[2*i]
@@ -30722,6 +32027,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_126_histogramnd_get_lut
#ifdef WITH_THREAD
PyThreadState *_save;
Py_UNBLOCK_THREADS
+ __Pyx_FastGIL_Remember();
#endif
/*try:*/ {
@@ -30733,8 +32039,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_126_histogramnd_get_lut
* lut_idx += 1
*/
while (1) {
- __pyx_t_5 = ((__pyx_v_elem_idx < __pyx_v_max_idx) != 0);
- if (!__pyx_t_5) break;
+ __pyx_t_6 = ((__pyx_v_elem_idx < __pyx_v_max_idx) != 0);
+ if (!__pyx_t_6) break;
/* "silx/math/chistogramnd_lut.pyx":395
* with nogil:
@@ -30771,8 +32077,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_126_histogramnd_get_lut
* # =====================
*/
__pyx_t_1 = __pyx_v_i_n_dims;
- for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
- __pyx_v_i = __pyx_t_2;
+ __pyx_t_2 = __pyx_t_1;
+ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
+ __pyx_v_i = __pyx_t_3;
/* "silx/math/chistogramnd_lut.pyx":401
*
@@ -30781,8 +32088,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_126_histogramnd_get_lut
* # =====================
* # Element is rejected if any of the following is NOT true :
*/
- __pyx_t_6 = (__pyx_v_elem_idx + __pyx_v_i);
- __pyx_v_elem_coord = (*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_sample.data + __pyx_t_6 * __pyx_v_i_sample.strides[0]) )));
+ __pyx_t_7 = (__pyx_v_elem_idx + __pyx_v_i);
+ __pyx_v_elem_coord = (*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_sample.data + __pyx_t_7 * __pyx_v_i_sample.strides[0]) )));
/* "silx/math/chistogramnd_lut.pyx":408
* # 3. coordinate==maximum value and last_bin_closed is True
@@ -30791,8 +32098,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_126_histogramnd_get_lut
* bin_idx = -1
* break
*/
- __pyx_t_5 = ((__pyx_v_elem_coord < (__pyx_v_g_min[__pyx_v_i])) != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = ((__pyx_v_elem_coord < (__pyx_v_g_min[__pyx_v_i])) != 0);
+ if (__pyx_t_6) {
/* "silx/math/chistogramnd_lut.pyx":409
* # =====================
@@ -30828,8 +32135,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_126_histogramnd_get_lut
* bin_idx = <long>(bin_idx * i_n_bins[i] + # noqa
* (((elem_coord - g_min[i]) * i_n_bins[i]) /
*/
- __pyx_t_5 = ((__pyx_v_elem_coord < (__pyx_v_g_max[__pyx_v_i])) != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = ((__pyx_v_elem_coord < (__pyx_v_g_max[__pyx_v_i])) != 0);
+ if (__pyx_t_6) {
/* "silx/math/chistogramnd_lut.pyx":418
* # (two tests)
@@ -30838,7 +32145,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_126_histogramnd_get_lut
* (((elem_coord - g_min[i]) * i_n_bins[i]) /
* bins_range[i]))
*/
- __pyx_t_7 = __pyx_v_i;
+ __pyx_t_8 = __pyx_v_i;
/* "silx/math/chistogramnd_lut.pyx":419
* if elem_coord < g_max[i]:
@@ -30847,7 +32154,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_126_histogramnd_get_lut
* bins_range[i]))
* else:
*/
- __pyx_t_8 = __pyx_v_i;
+ __pyx_t_9 = __pyx_v_i;
/* "silx/math/chistogramnd_lut.pyx":418
* # (two tests)
@@ -30856,7 +32163,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_126_histogramnd_get_lut
* (((elem_coord - g_min[i]) * i_n_bins[i]) /
* bins_range[i]))
*/
- __pyx_v_bin_idx = ((long)((__pyx_v_bin_idx * (*((int *) ( /* dim=0 */ (__pyx_v_i_n_bins.data + __pyx_t_7 * __pyx_v_i_n_bins.strides[0]) )))) + (((__pyx_v_elem_coord - (__pyx_v_g_min[__pyx_v_i])) * (*((int *) ( /* dim=0 */ (__pyx_v_i_n_bins.data + __pyx_t_8 * __pyx_v_i_n_bins.strides[0]) )))) / (__pyx_v_bins_range[__pyx_v_i]))));
+ __pyx_v_bin_idx = ((long)((__pyx_v_bin_idx * (*((int *) ( /* dim=0 */ (__pyx_v_i_n_bins.data + __pyx_t_8 * __pyx_v_i_n_bins.strides[0]) )))) + (((__pyx_v_elem_coord - (__pyx_v_g_min[__pyx_v_i])) * (*((int *) ( /* dim=0 */ (__pyx_v_i_n_bins.data + __pyx_t_9 * __pyx_v_i_n_bins.strides[0]) )))) / (__pyx_v_bins_range[__pyx_v_i]))));
/* "silx/math/chistogramnd_lut.pyx":417
* # than coordinates higher or equal to the max
@@ -30876,16 +32183,16 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_126_histogramnd_get_lut
* else:
*/
/*else*/ {
- __pyx_t_9 = (__pyx_v_last_bin_closed != 0);
- if (__pyx_t_9) {
+ __pyx_t_10 = (__pyx_v_last_bin_closed != 0);
+ if (__pyx_t_10) {
} else {
- __pyx_t_5 = __pyx_t_9;
+ __pyx_t_6 = __pyx_t_10;
goto __pyx_L15_bool_binop_done;
}
- __pyx_t_9 = ((__pyx_v_elem_coord == (__pyx_v_g_max[__pyx_v_i])) != 0);
- __pyx_t_5 = __pyx_t_9;
+ __pyx_t_10 = ((__pyx_v_elem_coord == (__pyx_v_g_max[__pyx_v_i])) != 0);
+ __pyx_t_6 = __pyx_t_10;
__pyx_L15_bool_binop_done:;
- if (__pyx_t_5) {
+ if (__pyx_t_6) {
/* "silx/math/chistogramnd_lut.pyx":426
* # else : discard
@@ -30894,8 +32201,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_126_histogramnd_get_lut
* else:
* bin_idx = -1
*/
- __pyx_t_10 = __pyx_v_i;
- __pyx_v_bin_idx = (((__pyx_v_bin_idx + 1) * (*((int *) ( /* dim=0 */ (__pyx_v_i_n_bins.data + __pyx_t_10 * __pyx_v_i_n_bins.strides[0]) )))) - 1);
+ __pyx_t_11 = __pyx_v_i;
+ __pyx_v_bin_idx = (((__pyx_v_bin_idx + 1) * (*((int *) ( /* dim=0 */ (__pyx_v_i_n_bins.data + __pyx_t_11 * __pyx_v_i_n_bins.strides[0]) )))) - 1);
/* "silx/math/chistogramnd_lut.pyx":425
* # put it in the last bin
@@ -30939,8 +32246,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_126_histogramnd_get_lut
* if bin_idx >= 0:
* o_histo[bin_idx] += 1
*/
- __pyx_t_11 = __pyx_v_lut_idx;
- *((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_o_lut.data + __pyx_t_11 * __pyx_v_o_lut.strides[0]) )) = __pyx_v_bin_idx;
+ __pyx_t_12 = __pyx_v_lut_idx;
+ *((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_o_lut.data + __pyx_t_12 * __pyx_v_o_lut.strides[0]) )) = __pyx_v_bin_idx;
/* "silx/math/chistogramnd_lut.pyx":432
*
@@ -30949,8 +32256,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_126_histogramnd_get_lut
* o_histo[bin_idx] += 1
*
*/
- __pyx_t_5 = ((__pyx_v_bin_idx >= 0) != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = ((__pyx_v_bin_idx >= 0) != 0);
+ if (__pyx_t_6) {
/* "silx/math/chistogramnd_lut.pyx":433
* o_lut[lut_idx] = bin_idx
@@ -30959,8 +32266,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_126_histogramnd_get_lut
*
* return 0
*/
- __pyx_t_12 = __pyx_v_bin_idx;
- *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_12 * __pyx_v_o_histo.strides[0]) )) += 1;
+ __pyx_t_13 = __pyx_v_bin_idx;
+ *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_13 * __pyx_v_o_histo.strides[0]) )) += 1;
/* "silx/math/chistogramnd_lut.pyx":432
*
@@ -30983,6 +32290,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_126_histogramnd_get_lut
/*finally:*/ {
/*normal exit:*/{
#ifdef WITH_THREAD
+ __Pyx_FastGIL_Forget();
Py_BLOCK_THREADS
#endif
goto __pyx_L7;
@@ -31044,53 +32352,68 @@ static PyObject *__pyx_fuse_3_2__pyx_pw_4silx_4math_16chistogramnd_lut_129_histo
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
switch (pos_args) {
case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
+ CYTHON_FALLTHROUGH;
case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
+ CYTHON_FALLTHROUGH;
case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ CYTHON_FALLTHROUGH;
case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
case 0: break;
default: goto __pyx_L5_argtuple_error;
}
kw_args = PyDict_Size(__pyx_kwds);
switch (pos_args) {
case 0:
- if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_sample)) != 0)) kw_args--;
+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_sample)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
case 1:
- if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_n_dims)) != 0)) kw_args--;
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_n_dims)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_get_lut_fused", 1, 8, 8, 1); __PYX_ERR(0, 361, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 2:
- if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
+ if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_n_elems)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_get_lut_fused", 1, 8, 8, 2); __PYX_ERR(0, 361, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 3:
- if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_histo_range)) != 0)) kw_args--;
+ if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_histo_range)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_get_lut_fused", 1, 8, 8, 3); __PYX_ERR(0, 361, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 4:
- if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i_n_bins)) != 0)) kw_args--;
+ if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i_n_bins)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_get_lut_fused", 1, 8, 8, 4); __PYX_ERR(0, 361, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 5:
- if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_lut)) != 0)) kw_args--;
+ if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_lut)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_get_lut_fused", 1, 8, 8, 5); __PYX_ERR(0, 361, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 6:
- if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
+ if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_o_histo)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_get_lut_fused", 1, 8, 8, 6); __PYX_ERR(0, 361, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 7:
- if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_last_bin_closed)) != 0)) kw_args--;
+ if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_last_bin_closed)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_histogramnd_get_lut_fused", 1, 8, 8, 7); __PYX_ERR(0, 361, __pyx_L3_error)
}
@@ -31110,13 +32433,13 @@ static PyObject *__pyx_fuse_3_2__pyx_pw_4silx_4math_16chistogramnd_lut_129_histo
values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
}
- __pyx_v_i_sample = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[0]); if (unlikely(!__pyx_v_i_sample.memview)) __PYX_ERR(0, 361, __pyx_L3_error)
+ __pyx_v_i_sample = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_sample.memview)) __PYX_ERR(0, 361, __pyx_L3_error)
__pyx_v_i_n_dims = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_i_n_dims == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 362, __pyx_L3_error)
__pyx_v_i_n_elems = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_i_n_elems == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 363, __pyx_L3_error)
- __pyx_v_i_histo_range = __Pyx_PyObject_to_MemoryviewSlice_ds_double(values[3]); if (unlikely(!__pyx_v_i_histo_range.memview)) __PYX_ERR(0, 364, __pyx_L3_error)
- __pyx_v_i_n_bins = __Pyx_PyObject_to_MemoryviewSlice_ds_int(values[4]); if (unlikely(!__pyx_v_i_n_bins.memview)) __PYX_ERR(0, 365, __pyx_L3_error)
- __pyx_v_o_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int16_t(values[5]); if (unlikely(!__pyx_v_o_lut.memview)) __PYX_ERR(0, 366, __pyx_L3_error)
- __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[6]); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 367, __pyx_L3_error)
+ __pyx_v_i_histo_range = __Pyx_PyObject_to_MemoryviewSlice_ds_double(values[3], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_histo_range.memview)) __PYX_ERR(0, 364, __pyx_L3_error)
+ __pyx_v_i_n_bins = __Pyx_PyObject_to_MemoryviewSlice_ds_int(values[4], PyBUF_WRITABLE); if (unlikely(!__pyx_v_i_n_bins.memview)) __PYX_ERR(0, 365, __pyx_L3_error)
+ __pyx_v_o_lut = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int16_t(values[5], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_lut.memview)) __PYX_ERR(0, 366, __pyx_L3_error)
+ __pyx_v_o_histo = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(values[6], PyBUF_WRITABLE); if (unlikely(!__pyx_v_o_histo.memview)) __PYX_ERR(0, 367, __pyx_L3_error)
__pyx_v_last_bin_closed = __Pyx_PyObject_IsTrue(values[7]); if (unlikely((__pyx_v_last_bin_closed == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 368, __pyx_L3_error)
}
goto __pyx_L4_argument_unpacking_done;
@@ -31148,16 +32471,17 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_128_histogramnd_get_lut
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
- Py_ssize_t __pyx_t_3;
+ int __pyx_t_3;
Py_ssize_t __pyx_t_4;
- int __pyx_t_5;
- Py_ssize_t __pyx_t_6;
+ Py_ssize_t __pyx_t_5;
+ int __pyx_t_6;
Py_ssize_t __pyx_t_7;
Py_ssize_t __pyx_t_8;
- int __pyx_t_9;
- Py_ssize_t __pyx_t_10;
+ Py_ssize_t __pyx_t_9;
+ int __pyx_t_10;
Py_ssize_t __pyx_t_11;
Py_ssize_t __pyx_t_12;
+ Py_ssize_t __pyx_t_13;
__Pyx_RefNannySetupContext("__pyx_fuse_3_2_histogramnd_get_lut_fused", 0);
/* "silx/math/chistogramnd_lut.pyx":371
@@ -31222,8 +32546,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_128_histogramnd_get_lut
* g_max[i] = i_histo_range[2*i+1]
*/
__pyx_t_1 = __pyx_v_i_n_dims;
- for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
- __pyx_v_i = __pyx_t_2;
+ __pyx_t_2 = __pyx_t_1;
+ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
+ __pyx_v_i = __pyx_t_3;
/* "silx/math/chistogramnd_lut.pyx":386
*
@@ -31232,8 +32557,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_128_histogramnd_get_lut
* g_max[i] = i_histo_range[2*i+1]
* bins_range[i] = g_max[i] - g_min[i]
*/
- __pyx_t_3 = (2 * __pyx_v_i);
- (__pyx_v_g_min[__pyx_v_i]) = (*((double *) ( /* dim=0 */ (__pyx_v_i_histo_range.data + __pyx_t_3 * __pyx_v_i_histo_range.strides[0]) )));
+ __pyx_t_4 = (2 * __pyx_v_i);
+ (__pyx_v_g_min[__pyx_v_i]) = (*((double *) ( /* dim=0 */ (__pyx_v_i_histo_range.data + __pyx_t_4 * __pyx_v_i_histo_range.strides[0]) )));
/* "silx/math/chistogramnd_lut.pyx":387
* for i in range(i_n_dims):
@@ -31242,8 +32567,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_128_histogramnd_get_lut
* bins_range[i] = g_max[i] - g_min[i]
*
*/
- __pyx_t_4 = ((2 * __pyx_v_i) + 1);
- (__pyx_v_g_max[__pyx_v_i]) = (*((double *) ( /* dim=0 */ (__pyx_v_i_histo_range.data + __pyx_t_4 * __pyx_v_i_histo_range.strides[0]) )));
+ __pyx_t_5 = ((2 * __pyx_v_i) + 1);
+ (__pyx_v_g_max[__pyx_v_i]) = (*((double *) ( /* dim=0 */ (__pyx_v_i_histo_range.data + __pyx_t_5 * __pyx_v_i_histo_range.strides[0]) )));
/* "silx/math/chistogramnd_lut.pyx":388
* g_min[i] = i_histo_range[2*i]
@@ -31284,6 +32609,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_128_histogramnd_get_lut
#ifdef WITH_THREAD
PyThreadState *_save;
Py_UNBLOCK_THREADS
+ __Pyx_FastGIL_Remember();
#endif
/*try:*/ {
@@ -31295,8 +32621,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_128_histogramnd_get_lut
* lut_idx += 1
*/
while (1) {
- __pyx_t_5 = ((__pyx_v_elem_idx < __pyx_v_max_idx) != 0);
- if (!__pyx_t_5) break;
+ __pyx_t_6 = ((__pyx_v_elem_idx < __pyx_v_max_idx) != 0);
+ if (!__pyx_t_6) break;
/* "silx/math/chistogramnd_lut.pyx":395
* with nogil:
@@ -31333,8 +32659,9 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_128_histogramnd_get_lut
* # =====================
*/
__pyx_t_1 = __pyx_v_i_n_dims;
- for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
- __pyx_v_i = __pyx_t_2;
+ __pyx_t_2 = __pyx_t_1;
+ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
+ __pyx_v_i = __pyx_t_3;
/* "silx/math/chistogramnd_lut.pyx":401
*
@@ -31343,8 +32670,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_128_histogramnd_get_lut
* # =====================
* # Element is rejected if any of the following is NOT true :
*/
- __pyx_t_6 = (__pyx_v_elem_idx + __pyx_v_i);
- __pyx_v_elem_coord = (*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_sample.data + __pyx_t_6 * __pyx_v_i_sample.strides[0]) )));
+ __pyx_t_7 = (__pyx_v_elem_idx + __pyx_v_i);
+ __pyx_v_elem_coord = (*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_i_sample.data + __pyx_t_7 * __pyx_v_i_sample.strides[0]) )));
/* "silx/math/chistogramnd_lut.pyx":408
* # 3. coordinate==maximum value and last_bin_closed is True
@@ -31353,8 +32680,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_128_histogramnd_get_lut
* bin_idx = -1
* break
*/
- __pyx_t_5 = ((__pyx_v_elem_coord < (__pyx_v_g_min[__pyx_v_i])) != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = ((__pyx_v_elem_coord < (__pyx_v_g_min[__pyx_v_i])) != 0);
+ if (__pyx_t_6) {
/* "silx/math/chistogramnd_lut.pyx":409
* # =====================
@@ -31390,8 +32717,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_128_histogramnd_get_lut
* bin_idx = <long>(bin_idx * i_n_bins[i] + # noqa
* (((elem_coord - g_min[i]) * i_n_bins[i]) /
*/
- __pyx_t_5 = ((__pyx_v_elem_coord < (__pyx_v_g_max[__pyx_v_i])) != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = ((__pyx_v_elem_coord < (__pyx_v_g_max[__pyx_v_i])) != 0);
+ if (__pyx_t_6) {
/* "silx/math/chistogramnd_lut.pyx":418
* # (two tests)
@@ -31400,7 +32727,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_128_histogramnd_get_lut
* (((elem_coord - g_min[i]) * i_n_bins[i]) /
* bins_range[i]))
*/
- __pyx_t_7 = __pyx_v_i;
+ __pyx_t_8 = __pyx_v_i;
/* "silx/math/chistogramnd_lut.pyx":419
* if elem_coord < g_max[i]:
@@ -31409,7 +32736,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_128_histogramnd_get_lut
* bins_range[i]))
* else:
*/
- __pyx_t_8 = __pyx_v_i;
+ __pyx_t_9 = __pyx_v_i;
/* "silx/math/chistogramnd_lut.pyx":418
* # (two tests)
@@ -31418,7 +32745,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_128_histogramnd_get_lut
* (((elem_coord - g_min[i]) * i_n_bins[i]) /
* bins_range[i]))
*/
- __pyx_v_bin_idx = ((long)((__pyx_v_bin_idx * (*((int *) ( /* dim=0 */ (__pyx_v_i_n_bins.data + __pyx_t_7 * __pyx_v_i_n_bins.strides[0]) )))) + (((__pyx_v_elem_coord - (__pyx_v_g_min[__pyx_v_i])) * (*((int *) ( /* dim=0 */ (__pyx_v_i_n_bins.data + __pyx_t_8 * __pyx_v_i_n_bins.strides[0]) )))) / (__pyx_v_bins_range[__pyx_v_i]))));
+ __pyx_v_bin_idx = ((long)((__pyx_v_bin_idx * (*((int *) ( /* dim=0 */ (__pyx_v_i_n_bins.data + __pyx_t_8 * __pyx_v_i_n_bins.strides[0]) )))) + (((__pyx_v_elem_coord - (__pyx_v_g_min[__pyx_v_i])) * (*((int *) ( /* dim=0 */ (__pyx_v_i_n_bins.data + __pyx_t_9 * __pyx_v_i_n_bins.strides[0]) )))) / (__pyx_v_bins_range[__pyx_v_i]))));
/* "silx/math/chistogramnd_lut.pyx":417
* # than coordinates higher or equal to the max
@@ -31438,16 +32765,16 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_128_histogramnd_get_lut
* else:
*/
/*else*/ {
- __pyx_t_9 = (__pyx_v_last_bin_closed != 0);
- if (__pyx_t_9) {
+ __pyx_t_10 = (__pyx_v_last_bin_closed != 0);
+ if (__pyx_t_10) {
} else {
- __pyx_t_5 = __pyx_t_9;
+ __pyx_t_6 = __pyx_t_10;
goto __pyx_L15_bool_binop_done;
}
- __pyx_t_9 = ((__pyx_v_elem_coord == (__pyx_v_g_max[__pyx_v_i])) != 0);
- __pyx_t_5 = __pyx_t_9;
+ __pyx_t_10 = ((__pyx_v_elem_coord == (__pyx_v_g_max[__pyx_v_i])) != 0);
+ __pyx_t_6 = __pyx_t_10;
__pyx_L15_bool_binop_done:;
- if (__pyx_t_5) {
+ if (__pyx_t_6) {
/* "silx/math/chistogramnd_lut.pyx":426
* # else : discard
@@ -31456,8 +32783,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_128_histogramnd_get_lut
* else:
* bin_idx = -1
*/
- __pyx_t_10 = __pyx_v_i;
- __pyx_v_bin_idx = (((__pyx_v_bin_idx + 1) * (*((int *) ( /* dim=0 */ (__pyx_v_i_n_bins.data + __pyx_t_10 * __pyx_v_i_n_bins.strides[0]) )))) - 1);
+ __pyx_t_11 = __pyx_v_i;
+ __pyx_v_bin_idx = (((__pyx_v_bin_idx + 1) * (*((int *) ( /* dim=0 */ (__pyx_v_i_n_bins.data + __pyx_t_11 * __pyx_v_i_n_bins.strides[0]) )))) - 1);
/* "silx/math/chistogramnd_lut.pyx":425
* # put it in the last bin
@@ -31501,8 +32828,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_128_histogramnd_get_lut
* if bin_idx >= 0:
* o_histo[bin_idx] += 1
*/
- __pyx_t_11 = __pyx_v_lut_idx;
- *((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_o_lut.data + __pyx_t_11 * __pyx_v_o_lut.strides[0]) )) = __pyx_v_bin_idx;
+ __pyx_t_12 = __pyx_v_lut_idx;
+ *((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ (__pyx_v_o_lut.data + __pyx_t_12 * __pyx_v_o_lut.strides[0]) )) = __pyx_v_bin_idx;
/* "silx/math/chistogramnd_lut.pyx":432
*
@@ -31511,8 +32838,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_128_histogramnd_get_lut
* o_histo[bin_idx] += 1
*
*/
- __pyx_t_5 = ((__pyx_v_bin_idx >= 0) != 0);
- if (__pyx_t_5) {
+ __pyx_t_6 = ((__pyx_v_bin_idx >= 0) != 0);
+ if (__pyx_t_6) {
/* "silx/math/chistogramnd_lut.pyx":433
* o_lut[lut_idx] = bin_idx
@@ -31521,8 +32848,8 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_128_histogramnd_get_lut
*
* return 0
*/
- __pyx_t_12 = __pyx_v_bin_idx;
- *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_12 * __pyx_v_o_histo.strides[0]) )) += 1;
+ __pyx_t_13 = __pyx_v_bin_idx;
+ *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_o_histo.data + __pyx_t_13 * __pyx_v_o_histo.strides[0]) )) += 1;
/* "silx/math/chistogramnd_lut.pyx":432
*
@@ -31545,6 +32872,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_128_histogramnd_get_lut
/*finally:*/ {
/*normal exit:*/{
#ifdef WITH_THREAD
+ __Pyx_FastGIL_Forget();
Py_BLOCK_THREADS
#endif
goto __pyx_L7;
@@ -31583,12 +32911,12 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_128_histogramnd_get_lut
return __pyx_r;
}
-/* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":197
+/* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":215
* # experimental exception made for __getbuffer__ and __releasebuffer__
* # -- the details of this may change.
* def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<<
* # This implementation of getbuffer is geared towards Cython
- * # requirements, and does not yet fullfill the PEP.
+ * # requirements, and does not yet fulfill the PEP.
*/
/* Python wrapper */
@@ -31605,7 +32933,6 @@ static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx
}
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;
@@ -31614,7 +32941,6 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
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;
@@ -31622,38 +32948,28 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
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;
+ int __pyx_t_6;
+ PyObject *__pyx_t_7 = NULL;
+ char *__pyx_t_8;
+ if (__pyx_v_info == NULL) {
+ PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete");
+ return -1;
}
+ __Pyx_RefNannySetupContext("__getbuffer__", 0);
+ __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
+ __Pyx_GIVEREF(__pyx_v_info->obj);
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":206
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":222
*
- * cdef int copy_shape, i, ndim
+ * cdef int 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
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":223
+ * cdef int i, ndim
* cdef int endian_detector = 1
* cdef bint little_endian = ((<char*>&endian_detector)[0] != 0) # <<<<<<<<<<<<<<
*
@@ -31661,59 +32977,18 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0);
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":209
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":225
* cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
*
* ndim = PyArray_NDIM(self) # <<<<<<<<<<<<<<
*
- * if sizeof(npy_intp) != sizeof(Py_ssize_t):
+ * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
*/
__pyx_v_ndim = PyArray_NDIM(__pyx_v_self);
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":211
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":227
* 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")
@@ -31722,10 +32997,10 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
if (__pyx_t_2) {
} else {
__pyx_t_1 = __pyx_t_2;
- goto __pyx_L6_bool_binop_done;
+ goto __pyx_L4_bool_binop_done;
}
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":217
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":228
*
* if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
* and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)): # <<<<<<<<<<<<<<
@@ -31734,32 +33009,32 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_C_CONTIGUOUS) != 0)) != 0);
__pyx_t_1 = __pyx_t_2;
- __pyx_L6_bool_binop_done:;
+ __pyx_L4_bool_binop_done:;
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":216
- * copy_shape = 0
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":227
+ * ndim = PyArray_NDIM(self)
*
* if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<<
* and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):
* raise ValueError(u"ndarray is not C contiguous")
*/
- if (__pyx_t_1) {
+ if (unlikely(__pyx_t_1)) {
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":218
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":229
* if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
* and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):
* raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<<
*
* if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
*/
- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__31, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 218, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__31, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 229, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __PYX_ERR(1, 218, __pyx_L1_error)
+ __PYX_ERR(1, 229, __pyx_L1_error)
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":216
- * copy_shape = 0
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":227
+ * ndim = PyArray_NDIM(self)
*
* if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<<
* and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):
@@ -31767,7 +33042,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
}
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":220
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":231
* raise ValueError(u"ndarray is not C contiguous")
*
* if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<<
@@ -31778,10 +33053,10 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
if (__pyx_t_2) {
} else {
__pyx_t_1 = __pyx_t_2;
- goto __pyx_L9_bool_binop_done;
+ goto __pyx_L7_bool_binop_done;
}
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":221
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":232
*
* if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
* and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)): # <<<<<<<<<<<<<<
@@ -31790,31 +33065,31 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_F_CONTIGUOUS) != 0)) != 0);
__pyx_t_1 = __pyx_t_2;
- __pyx_L9_bool_binop_done:;
+ __pyx_L7_bool_binop_done:;
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":220
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":231
* raise ValueError(u"ndarray is not C contiguous")
*
* if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<<
* and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)):
* raise ValueError(u"ndarray is not Fortran contiguous")
*/
- if (__pyx_t_1) {
+ if (unlikely(__pyx_t_1)) {
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":222
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":233
* if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
* and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)):
* raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<<
*
* info.buf = PyArray_DATA(self)
*/
- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__32, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 222, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__32, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 233, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __PYX_ERR(1, 222, __pyx_L1_error)
+ __PYX_ERR(1, 233, __pyx_L1_error)
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":220
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":231
* raise ValueError(u"ndarray is not C contiguous")
*
* if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<<
@@ -31823,64 +33098,65 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
}
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":224
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":235
* raise ValueError(u"ndarray is not Fortran contiguous")
*
* info.buf = PyArray_DATA(self) # <<<<<<<<<<<<<<
* info.ndim = ndim
- * if copy_shape:
+ * if sizeof(npy_intp) != sizeof(Py_ssize_t):
*/
__pyx_v_info->buf = PyArray_DATA(__pyx_v_self);
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":225
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":236
*
* info.buf = PyArray_DATA(self)
* info.ndim = ndim # <<<<<<<<<<<<<<
- * if copy_shape:
+ * if sizeof(npy_intp) != sizeof(Py_ssize_t):
* # 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
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":237
* info.buf = PyArray_DATA(self)
* info.ndim = ndim
- * if copy_shape: # <<<<<<<<<<<<<<
+ * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<<
* # Allocate new buffer for strides and shape info.
* # This is allocated as one block, strides first.
*/
- __pyx_t_1 = (__pyx_v_copy_shape != 0);
+ __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":229
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":240
* # Allocate new buffer for strides and shape info.
* # This is allocated as one block, strides first.
- * info.strides = <Py_ssize_t*>stdlib.malloc(sizeof(Py_ssize_t) * <size_t>ndim * 2) # <<<<<<<<<<<<<<
+ * info.strides = <Py_ssize_t*>PyObject_Malloc(sizeof(Py_ssize_t) * 2 * <size_t>ndim) # <<<<<<<<<<<<<<
* 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)));
+ __pyx_v_info->strides = ((Py_ssize_t *)PyObject_Malloc((((sizeof(Py_ssize_t)) * 2) * ((size_t)__pyx_v_ndim))));
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":230
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":241
* # This is allocated as one block, strides first.
- * info.strides = <Py_ssize_t*>stdlib.malloc(sizeof(Py_ssize_t) * <size_t>ndim * 2)
+ * info.strides = <Py_ssize_t*>PyObject_Malloc(sizeof(Py_ssize_t) * 2 * <size_t>ndim)
* info.shape = info.strides + ndim # <<<<<<<<<<<<<<
* for i in range(ndim):
* info.strides[i] = PyArray_STRIDES(self)[i]
*/
__pyx_v_info->shape = (__pyx_v_info->strides + __pyx_v_ndim);
- /* "../../../../../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)
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":242
+ * info.strides = <Py_ssize_t*>PyObject_Malloc(sizeof(Py_ssize_t) * 2 * <size_t>ndim)
* info.shape = info.strides + ndim
* for i in range(ndim): # <<<<<<<<<<<<<<
* info.strides[i] = PyArray_STRIDES(self)[i]
* info.shape[i] = PyArray_DIMS(self)[i]
*/
__pyx_t_4 = __pyx_v_ndim;
- for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
- __pyx_v_i = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_4;
+ for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
+ __pyx_v_i = __pyx_t_6;
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":232
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":243
* info.shape = info.strides + ndim
* for i in range(ndim):
* info.strides[i] = PyArray_STRIDES(self)[i] # <<<<<<<<<<<<<<
@@ -31889,7 +33165,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
(__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
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":244
* for i in range(ndim):
* info.strides[i] = PyArray_STRIDES(self)[i]
* info.shape[i] = PyArray_DIMS(self)[i] # <<<<<<<<<<<<<<
@@ -31899,17 +33175,17 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
(__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
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":237
* info.buf = PyArray_DATA(self)
* info.ndim = ndim
- * if copy_shape: # <<<<<<<<<<<<<<
+ * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<<
* # Allocate new buffer for strides and shape info.
* # This is allocated as one block, strides first.
*/
- goto __pyx_L11;
+ goto __pyx_L9;
}
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":235
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":246
* info.shape[i] = PyArray_DIMS(self)[i]
* else:
* info.strides = <Py_ssize_t*>PyArray_STRIDES(self) # <<<<<<<<<<<<<<
@@ -31919,7 +33195,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
/*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
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":247
* else:
* info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
* info.shape = <Py_ssize_t*>PyArray_DIMS(self) # <<<<<<<<<<<<<<
@@ -31928,9 +33204,9 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_info->shape = ((Py_ssize_t *)PyArray_DIMS(__pyx_v_self));
}
- __pyx_L11:;
+ __pyx_L9:;
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":237
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":248
* info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
* info.shape = <Py_ssize_t*>PyArray_DIMS(self)
* info.suboffsets = NULL # <<<<<<<<<<<<<<
@@ -31939,7 +33215,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_info->suboffsets = NULL;
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":238
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":249
* info.shape = <Py_ssize_t*>PyArray_DIMS(self)
* info.suboffsets = NULL
* info.itemsize = PyArray_ITEMSIZE(self) # <<<<<<<<<<<<<<
@@ -31948,7 +33224,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_info->itemsize = PyArray_ITEMSIZE(__pyx_v_self);
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":239
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":250
* info.suboffsets = NULL
* info.itemsize = PyArray_ITEMSIZE(self)
* info.readonly = not PyArray_ISWRITEABLE(self) # <<<<<<<<<<<<<<
@@ -31957,7 +33233,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_info->readonly = (!(PyArray_ISWRITEABLE(__pyx_v_self) != 0));
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":242
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":253
*
* cdef int t
* cdef char* f = NULL # <<<<<<<<<<<<<<
@@ -31966,7 +33242,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_f = NULL;
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":243
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":254
* cdef int t
* cdef char* f = NULL
* cdef dtype descr = self.descr # <<<<<<<<<<<<<<
@@ -31978,85 +33254,32 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_v_descr = ((PyArray_Descr *)__pyx_t_3);
__pyx_t_3 = 0;
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":246
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":257
* 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)
+ * info.obj = self # <<<<<<<<<<<<<<
*
- * if not hasfields and not copy_shape: # <<<<<<<<<<<<<<
- * # do not call releasebuffer
- * info.obj = None
+ * if not PyDataType_HASFIELDS(descr):
*/
- __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:;
+ __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);
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":255
- * info.obj = self
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":259
+ * info.obj = self
*
- * if not hasfields: # <<<<<<<<<<<<<<
+ * if not PyDataType_HASFIELDS(descr): # <<<<<<<<<<<<<<
* t = descr.type_num
* if ((descr.byteorder == c'>' and little_endian) or
*/
- __pyx_t_1 = ((!(__pyx_v_hasfields != 0)) != 0);
+ __pyx_t_1 = ((!(PyDataType_HASFIELDS(__pyx_v_descr) != 0)) != 0);
if (__pyx_t_1) {
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":256
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":260
*
- * if not hasfields:
+ * if not PyDataType_HASFIELDS(descr):
* t = descr.type_num # <<<<<<<<<<<<<<
* if ((descr.byteorder == c'>' and little_endian) or
* (descr.byteorder == c'<' and not little_endian)):
@@ -32064,8 +33287,8 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__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:
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":261
+ * if not PyDataType_HASFIELDS(descr):
* t = descr.type_num
* if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
* (descr.byteorder == c'<' and not little_endian)):
@@ -32073,18 +33296,18 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_t_2 = ((__pyx_v_descr->byteorder == '>') != 0);
if (!__pyx_t_2) {
- goto __pyx_L20_next_or;
+ goto __pyx_L15_next_or;
} else {
}
__pyx_t_2 = (__pyx_v_little_endian != 0);
if (!__pyx_t_2) {
} else {
__pyx_t_1 = __pyx_t_2;
- goto __pyx_L19_bool_binop_done;
+ goto __pyx_L14_bool_binop_done;
}
- __pyx_L20_next_or:;
+ __pyx_L15_next_or:;
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":258
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":262
* t = descr.type_num
* if ((descr.byteorder == c'>' and little_endian) or
* (descr.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<<
@@ -32095,36 +33318,36 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
if (__pyx_t_2) {
} else {
__pyx_t_1 = __pyx_t_2;
- goto __pyx_L19_bool_binop_done;
+ goto __pyx_L14_bool_binop_done;
}
__pyx_t_2 = ((!(__pyx_v_little_endian != 0)) != 0);
__pyx_t_1 = __pyx_t_2;
- __pyx_L19_bool_binop_done:;
+ __pyx_L14_bool_binop_done:;
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":257
- * if not hasfields:
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":261
+ * if not PyDataType_HASFIELDS(descr):
* t = descr.type_num
* if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
* (descr.byteorder == c'<' and not little_endian)):
* raise ValueError(u"Non-native byte order not supported")
*/
- if (__pyx_t_1) {
+ if (unlikely(__pyx_t_1)) {
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":259
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":263
* if ((descr.byteorder == c'>' and little_endian) or
* (descr.byteorder == c'<' and not little_endian)):
* raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<<
* if t == NPY_BYTE: f = "b"
* elif t == NPY_UBYTE: f = "B"
*/
- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__33, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 259, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__33, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 263, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __PYX_ERR(1, 259, __pyx_L1_error)
+ __PYX_ERR(1, 263, __pyx_L1_error)
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":257
- * if not hasfields:
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":261
+ * if not PyDataType_HASFIELDS(descr):
* t = descr.type_num
* if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
* (descr.byteorder == c'<' and not little_endian)):
@@ -32132,7 +33355,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
}
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":260
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":264
* (descr.byteorder == c'<' and not little_endian)):
* raise ValueError(u"Non-native byte order not supported")
* if t == NPY_BYTE: f = "b" # <<<<<<<<<<<<<<
@@ -32144,7 +33367,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_v_f = ((char *)"b");
break;
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":261
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":265
* raise ValueError(u"Non-native byte order not supported")
* if t == NPY_BYTE: f = "b"
* elif t == NPY_UBYTE: f = "B" # <<<<<<<<<<<<<<
@@ -32155,7 +33378,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_v_f = ((char *)"B");
break;
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":262
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":266
* if t == NPY_BYTE: f = "b"
* elif t == NPY_UBYTE: f = "B"
* elif t == NPY_SHORT: f = "h" # <<<<<<<<<<<<<<
@@ -32166,7 +33389,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_v_f = ((char *)"h");
break;
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":263
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":267
* elif t == NPY_UBYTE: f = "B"
* elif t == NPY_SHORT: f = "h"
* elif t == NPY_USHORT: f = "H" # <<<<<<<<<<<<<<
@@ -32177,7 +33400,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_v_f = ((char *)"H");
break;
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":264
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":268
* elif t == NPY_SHORT: f = "h"
* elif t == NPY_USHORT: f = "H"
* elif t == NPY_INT: f = "i" # <<<<<<<<<<<<<<
@@ -32188,7 +33411,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_v_f = ((char *)"i");
break;
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":265
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":269
* elif t == NPY_USHORT: f = "H"
* elif t == NPY_INT: f = "i"
* elif t == NPY_UINT: f = "I" # <<<<<<<<<<<<<<
@@ -32199,7 +33422,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_v_f = ((char *)"I");
break;
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":266
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":270
* elif t == NPY_INT: f = "i"
* elif t == NPY_UINT: f = "I"
* elif t == NPY_LONG: f = "l" # <<<<<<<<<<<<<<
@@ -32210,7 +33433,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_v_f = ((char *)"l");
break;
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":267
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":271
* elif t == NPY_UINT: f = "I"
* elif t == NPY_LONG: f = "l"
* elif t == NPY_ULONG: f = "L" # <<<<<<<<<<<<<<
@@ -32221,7 +33444,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_v_f = ((char *)"L");
break;
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":268
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":272
* elif t == NPY_LONG: f = "l"
* elif t == NPY_ULONG: f = "L"
* elif t == NPY_LONGLONG: f = "q" # <<<<<<<<<<<<<<
@@ -32232,7 +33455,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_v_f = ((char *)"q");
break;
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":269
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":273
* elif t == NPY_ULONG: f = "L"
* elif t == NPY_LONGLONG: f = "q"
* elif t == NPY_ULONGLONG: f = "Q" # <<<<<<<<<<<<<<
@@ -32243,7 +33466,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_v_f = ((char *)"Q");
break;
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":270
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":274
* elif t == NPY_LONGLONG: f = "q"
* elif t == NPY_ULONGLONG: f = "Q"
* elif t == NPY_FLOAT: f = "f" # <<<<<<<<<<<<<<
@@ -32254,7 +33477,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_v_f = ((char *)"f");
break;
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":271
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":275
* elif t == NPY_ULONGLONG: f = "Q"
* elif t == NPY_FLOAT: f = "f"
* elif t == NPY_DOUBLE: f = "d" # <<<<<<<<<<<<<<
@@ -32265,7 +33488,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_v_f = ((char *)"d");
break;
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":272
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":276
* elif t == NPY_FLOAT: f = "f"
* elif t == NPY_DOUBLE: f = "d"
* elif t == NPY_LONGDOUBLE: f = "g" # <<<<<<<<<<<<<<
@@ -32276,7 +33499,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_v_f = ((char *)"g");
break;
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":273
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":277
* elif t == NPY_DOUBLE: f = "d"
* elif t == NPY_LONGDOUBLE: f = "g"
* elif t == NPY_CFLOAT: f = "Zf" # <<<<<<<<<<<<<<
@@ -32287,7 +33510,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_v_f = ((char *)"Zf");
break;
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":274
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":278
* elif t == NPY_LONGDOUBLE: f = "g"
* elif t == NPY_CFLOAT: f = "Zf"
* elif t == NPY_CDOUBLE: f = "Zd" # <<<<<<<<<<<<<<
@@ -32298,7 +33521,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_v_f = ((char *)"Zd");
break;
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":275
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":279
* elif t == NPY_CFLOAT: f = "Zf"
* elif t == NPY_CDOUBLE: f = "Zd"
* elif t == NPY_CLONGDOUBLE: f = "Zg" # <<<<<<<<<<<<<<
@@ -32309,7 +33532,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_v_f = ((char *)"Zg");
break;
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":276
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":280
* elif t == NPY_CDOUBLE: f = "Zd"
* elif t == NPY_CLONGDOUBLE: f = "Zg"
* elif t == NPY_OBJECT: f = "O" # <<<<<<<<<<<<<<
@@ -32321,33 +33544,28 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
default:
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":278
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":282
* elif t == NPY_OBJECT: f = "O"
* else:
* raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<<
* info.format = f
* return
*/
- __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 278, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 282, __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_t_7 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 282, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 278, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 282, __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_7); __pyx_t_7 = 0;
+ __Pyx_Raise(__pyx_t_3, 0, 0, 0);
__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)
+ __PYX_ERR(1, 282, __pyx_L1_error)
break;
}
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":279
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":283
* else:
* raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
* info.format = f # <<<<<<<<<<<<<<
@@ -32356,46 +33574,46 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_info->format = __pyx_v_f;
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":280
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":284
* raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
* info.format = f
* return # <<<<<<<<<<<<<<
* else:
- * info.format = <char*>stdlib.malloc(_buffer_format_string_len)
+ * info.format = <char*>PyObject_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
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":259
+ * info.obj = self
*
- * if not hasfields: # <<<<<<<<<<<<<<
+ * if not PyDataType_HASFIELDS(descr): # <<<<<<<<<<<<<<
* t = descr.type_num
* if ((descr.byteorder == c'>' and little_endian) or
*/
}
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":282
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":286
* return
* else:
- * info.format = <char*>stdlib.malloc(_buffer_format_string_len) # <<<<<<<<<<<<<<
+ * info.format = <char*>PyObject_Malloc(_buffer_format_string_len) # <<<<<<<<<<<<<<
* info.format[0] = c'^' # Native data types, manual alignment
* offset = 0
*/
/*else*/ {
- __pyx_v_info->format = ((char *)malloc(0xFF));
+ __pyx_v_info->format = ((char *)PyObject_Malloc(0xFF));
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":283
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":287
* else:
- * info.format = <char*>stdlib.malloc(_buffer_format_string_len)
+ * info.format = <char*>PyObject_Malloc(_buffer_format_string_len)
* info.format[0] = c'^' # Native data types, manual alignment # <<<<<<<<<<<<<<
* offset = 0
* f = _util_dtypestring(descr, info.format + 1,
*/
(__pyx_v_info->format[0]) = '^';
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":284
- * info.format = <char*>stdlib.malloc(_buffer_format_string_len)
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":288
+ * info.format = <char*>PyObject_Malloc(_buffer_format_string_len)
* info.format[0] = c'^' # Native data types, manual alignment
* offset = 0 # <<<<<<<<<<<<<<
* f = _util_dtypestring(descr, info.format + 1,
@@ -32403,17 +33621,17 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_offset = 0;
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":285
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":289
* info.format[0] = c'^' # Native data types, manual alignment
* offset = 0
* f = _util_dtypestring(descr, info.format + 1, # <<<<<<<<<<<<<<
* info.format + _buffer_format_string_len,
* &offset)
*/
- __pyx_t_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;
+ __pyx_t_8 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 0xFF), (&__pyx_v_offset)); if (unlikely(__pyx_t_8 == ((char *)NULL))) __PYX_ERR(1, 289, __pyx_L1_error)
+ __pyx_v_f = __pyx_t_8;
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":288
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":292
* info.format + _buffer_format_string_len,
* &offset)
* f[0] = c'\0' # Terminate format string # <<<<<<<<<<<<<<
@@ -32423,12 +33641,12 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
(__pyx_v_f[0]) = '\x00';
}
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":197
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":215
* # experimental exception made for __getbuffer__ and __releasebuffer__
* # -- the details of this may change.
* def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<<
* # This implementation of getbuffer is geared towards Cython
- * # requirements, and does not yet fullfill the PEP.
+ * # requirements, and does not yet fulfill the PEP.
*/
/* function exit code */
@@ -32436,18 +33654,18 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_3);
- __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_7);
__Pyx_AddTraceback("numpy.ndarray.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
- if (__pyx_v_info != NULL && __pyx_v_info->obj != NULL) {
+ if (__pyx_v_info->obj != NULL) {
__Pyx_GOTREF(__pyx_v_info->obj);
- __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = NULL;
+ __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
}
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;
+ if (__pyx_v_info->obj == Py_None) {
+ __Pyx_GOTREF(__pyx_v_info->obj);
+ __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
}
__pyx_L2:;
__Pyx_XDECREF((PyObject *)__pyx_v_descr);
@@ -32455,12 +33673,12 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
return __pyx_r;
}
-/* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":290
+/* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":294
* f[0] = c'\0' # Terminate format string
*
* def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<<
* if PyArray_HASFIELDS(self):
- * stdlib.free(info.format)
+ * PyObject_Free(info.format)
*/
/* Python wrapper */
@@ -32479,75 +33697,75 @@ static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_s
int __pyx_t_1;
__Pyx_RefNannySetupContext("__releasebuffer__", 0);
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":291
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":295
*
* def __releasebuffer__(ndarray self, Py_buffer* info):
* if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<<
- * stdlib.free(info.format)
+ * PyObject_Free(info.format)
* if sizeof(npy_intp) != sizeof(Py_ssize_t):
*/
__pyx_t_1 = (PyArray_HASFIELDS(__pyx_v_self) != 0);
if (__pyx_t_1) {
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":292
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":296
* def __releasebuffer__(ndarray self, Py_buffer* info):
* if PyArray_HASFIELDS(self):
- * stdlib.free(info.format) # <<<<<<<<<<<<<<
+ * PyObject_Free(info.format) # <<<<<<<<<<<<<<
* if sizeof(npy_intp) != sizeof(Py_ssize_t):
- * stdlib.free(info.strides)
+ * PyObject_Free(info.strides)
*/
- free(__pyx_v_info->format);
+ PyObject_Free(__pyx_v_info->format);
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":291
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":295
*
* def __releasebuffer__(ndarray self, Py_buffer* info):
* if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<<
- * stdlib.free(info.format)
+ * PyObject_Free(info.format)
* if sizeof(npy_intp) != sizeof(Py_ssize_t):
*/
}
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":293
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":297
* if PyArray_HASFIELDS(self):
- * stdlib.free(info.format)
+ * PyObject_Free(info.format)
* if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<<
- * stdlib.free(info.strides)
+ * PyObject_Free(info.strides)
* # info.shape was stored after info.strides in the same block
*/
__pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0);
if (__pyx_t_1) {
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":294
- * stdlib.free(info.format)
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":298
+ * PyObject_Free(info.format)
* if sizeof(npy_intp) != sizeof(Py_ssize_t):
- * stdlib.free(info.strides) # <<<<<<<<<<<<<<
+ * PyObject_Free(info.strides) # <<<<<<<<<<<<<<
* # info.shape was stored after info.strides in the same block
*
*/
- free(__pyx_v_info->strides);
+ PyObject_Free(__pyx_v_info->strides);
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":293
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":297
* if PyArray_HASFIELDS(self):
- * stdlib.free(info.format)
+ * PyObject_Free(info.format)
* if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<<
- * stdlib.free(info.strides)
+ * PyObject_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
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":294
* f[0] = c'\0' # Terminate format string
*
* def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<<
* if PyArray_HASFIELDS(self):
- * stdlib.free(info.format)
+ * PyObject_Free(info.format)
*/
/* function exit code */
__Pyx_RefNannyFinishContext();
}
-/* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":770
+/* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":775
* ctypedef npy_cdouble complex_t
*
* cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<<
@@ -32561,7 +33779,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__
PyObject *__pyx_t_1 = NULL;
__Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0);
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":771
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":776
*
* cdef inline object PyArray_MultiIterNew1(a):
* return PyArray_MultiIterNew(1, <void*>a) # <<<<<<<<<<<<<<
@@ -32569,13 +33787,13 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__
* 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_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 776, __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
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":775
* ctypedef npy_cdouble complex_t
*
* cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<<
@@ -32594,7 +33812,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__
return __pyx_r;
}
-/* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":773
+/* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":778
* return PyArray_MultiIterNew(1, <void*>a)
*
* cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<<
@@ -32608,7 +33826,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__
PyObject *__pyx_t_1 = NULL;
__Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0);
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":774
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":779
*
* cdef inline object PyArray_MultiIterNew2(a, b):
* return PyArray_MultiIterNew(2, <void*>a, <void*>b) # <<<<<<<<<<<<<<
@@ -32616,13 +33834,13 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__
* 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_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 779, __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
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":778
* return PyArray_MultiIterNew(1, <void*>a)
*
* cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<<
@@ -32641,7 +33859,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__
return __pyx_r;
}
-/* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":776
+/* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":781
* return PyArray_MultiIterNew(2, <void*>a, <void*>b)
*
* cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<<
@@ -32655,7 +33873,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__
PyObject *__pyx_t_1 = NULL;
__Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0);
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":777
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":782
*
* cdef inline object PyArray_MultiIterNew3(a, b, c):
* return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c) # <<<<<<<<<<<<<<
@@ -32663,13 +33881,13 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__
* 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_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, 782, __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
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":781
* return PyArray_MultiIterNew(2, <void*>a, <void*>b)
*
* cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<<
@@ -32688,7 +33906,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__
return __pyx_r;
}
-/* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":779
+/* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":784
* return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
*
* cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<<
@@ -32702,7 +33920,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__
PyObject *__pyx_t_1 = NULL;
__Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0);
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":780
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":785
*
* cdef inline object PyArray_MultiIterNew4(a, b, c, d):
* return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d) # <<<<<<<<<<<<<<
@@ -32710,13 +33928,13 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__
* 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_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, 785, __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
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":784
* return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
*
* cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<<
@@ -32735,7 +33953,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__
return __pyx_r;
}
-/* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":782
+/* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":787
* return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
*
* cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<<
@@ -32749,21 +33967,21 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__
PyObject *__pyx_t_1 = NULL;
__Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0);
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":783
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":788
*
* 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:
+ * cdef inline tuple PyDataType_SHAPE(dtype d):
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 783, __pyx_L1_error)
+ __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 788, __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
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":787
* return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
*
* cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<<
@@ -32782,9 +34000,83 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__
return __pyx_r;
}
-/* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":785
+/* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":790
+ * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
+ *
+ * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<<
+ * if PyDataType_HASSUBARRAY(d):
+ * return <tuple>d.subarray.shape
+ */
+
+static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__pyx_v_d) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ int __pyx_t_1;
+ __Pyx_RefNannySetupContext("PyDataType_SHAPE", 0);
+
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":791
+ *
+ * cdef inline tuple PyDataType_SHAPE(dtype d):
+ * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<<
+ * return <tuple>d.subarray.shape
+ * else:
+ */
+ __pyx_t_1 = (PyDataType_HASSUBARRAY(__pyx_v_d) != 0);
+ if (__pyx_t_1) {
+
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":792
+ * cdef inline tuple PyDataType_SHAPE(dtype d):
+ * if PyDataType_HASSUBARRAY(d):
+ * return <tuple>d.subarray.shape # <<<<<<<<<<<<<<
+ * else:
+ * return ()
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(((PyObject*)__pyx_v_d->subarray->shape));
+ __pyx_r = ((PyObject*)__pyx_v_d->subarray->shape);
+ goto __pyx_L0;
+
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":791
+ *
+ * cdef inline tuple PyDataType_SHAPE(dtype d):
+ * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<<
+ * return <tuple>d.subarray.shape
+ * else:
+ */
+ }
+
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":794
+ * return <tuple>d.subarray.shape
+ * else:
+ * return () # <<<<<<<<<<<<<<
+ *
+ * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL:
+ */
+ /*else*/ {
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_empty_tuple);
+ __pyx_r = __pyx_empty_tuple;
+ goto __pyx_L0;
+ }
+
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":790
* return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
*
+ * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<<
+ * if PyDataType_HASSUBARRAY(d):
+ * return <tuple>d.subarray.shape
+ */
+
+ /* function exit code */
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":796
+ * return ()
+ *
* cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<<
* # Recursive utility function used in __getbuffer__ to get format
* # string. The new location in the format string is returned.
@@ -32811,7 +34103,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
char *__pyx_t_9;
__Pyx_RefNannySetupContext("_util_dtypestring", 0);
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":790
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":801
*
* cdef dtype child
* cdef int endian_detector = 1 # <<<<<<<<<<<<<<
@@ -32820,7 +34112,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
*/
__pyx_v_endian_detector = 1;
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":791
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":802
* cdef dtype child
* cdef int endian_detector = 1
* cdef bint little_endian = ((<char*>&endian_detector)[0] != 0) # <<<<<<<<<<<<<<
@@ -32829,7 +34121,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
*/
__pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0);
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":794
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":805
* cdef tuple fields
*
* for childname in descr.names: # <<<<<<<<<<<<<<
@@ -32838,21 +34130,21 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
*/
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_ERR(1, 805, __pyx_L1_error)
}
__pyx_t_1 = __pyx_v_descr->names; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
for (;;) {
if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
- __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(1, 794, __pyx_L1_error)
+ __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, 805, __pyx_L1_error)
#else
- __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 794, __pyx_L1_error)
+ __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 805, __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
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":806
*
* for childname in descr.names:
* fields = descr.fields[childname] # <<<<<<<<<<<<<<
@@ -32861,15 +34153,15 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
*/
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_ERR(1, 806, __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_t_3 = __Pyx_PyDict_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 806, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- if (!(likely(PyTuple_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(1, 795, __pyx_L1_error)
+ 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, 806, __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
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":807
* for childname in descr.names:
* fields = descr.fields[childname]
* child, new_offset = fields # <<<<<<<<<<<<<<
@@ -32878,15 +34170,11 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
*/
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
+ Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
if (unlikely(size != 2)) {
if (size > 2) __Pyx_RaiseTooManyValuesError(2);
else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
- __PYX_ERR(1, 796, __pyx_L1_error)
+ __PYX_ERR(1, 807, __pyx_L1_error)
}
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
__pyx_t_3 = PyTuple_GET_ITEM(sequence, 0);
@@ -32894,51 +34182,51 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__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_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 807, __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_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 807, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
#endif
} else {
- __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(1, 796, __pyx_L1_error)
+ __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(1, 807, __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)
+ if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) __PYX_ERR(1, 807, __pyx_L1_error)
__Pyx_XDECREF_SET(__pyx_v_child, ((PyArray_Descr *)__pyx_t_3));
__pyx_t_3 = 0;
__Pyx_XDECREF_SET(__pyx_v_new_offset, __pyx_t_4);
__pyx_t_4 = 0;
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":798
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":809
* 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_t_4 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 809, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_3 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 798, __pyx_L1_error)
+ __pyx_t_3 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 809, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 798, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 809, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_t_6 = ((((__pyx_v_end - __pyx_v_f) - ((int)__pyx_t_5)) < 15) != 0);
- if (__pyx_t_6) {
+ if (unlikely(__pyx_t_6)) {
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":799
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":810
*
* 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__34, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 799, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__34, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 810, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __PYX_ERR(1, 799, __pyx_L1_error)
+ __PYX_ERR(1, 810, __pyx_L1_error)
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":798
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":809
* child, new_offset = fields
*
* if (end - f) - <int>(new_offset - offset[0]) < 15: # <<<<<<<<<<<<<<
@@ -32947,7 +34235,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
*/
}
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":801
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":812
* raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
*
* if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
@@ -32967,7 +34255,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
}
__pyx_L8_next_or:;
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":802
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":813
*
* if ((child.byteorder == c'>' and little_endian) or
* (child.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<<
@@ -32984,29 +34272,29 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__pyx_t_6 = __pyx_t_7;
__pyx_L7_bool_binop_done:;
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":801
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":812
* raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
*
* if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
* (child.byteorder == c'<' and not little_endian)):
* raise ValueError(u"Non-native byte order not supported")
*/
- if (__pyx_t_6) {
+ if (unlikely(__pyx_t_6)) {
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":803
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":814
* if ((child.byteorder == c'>' and little_endian) or
* (child.byteorder == c'<' and not little_endian)):
* raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<<
* # One could encode it in the format string and have Cython
* # complain instead, BUT: < and > in format strings also imply
*/
- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__35, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 803, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__35, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 814, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __PYX_ERR(1, 803, __pyx_L1_error)
+ __PYX_ERR(1, 814, __pyx_L1_error)
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":801
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":812
* raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
*
* if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
@@ -33015,7 +34303,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
*/
}
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":813
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":824
*
* # Output padding bytes
* while offset[0] < new_offset: # <<<<<<<<<<<<<<
@@ -33023,15 +34311,15 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
* 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_t_3 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 824, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_v_new_offset, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 813, __pyx_L1_error)
+ __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, 824, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 813, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 824, __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
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":825
* # Output padding bytes
* while offset[0] < new_offset:
* f[0] = 120 # "x"; pad byte # <<<<<<<<<<<<<<
@@ -33040,7 +34328,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
*/
(__pyx_v_f[0]) = 0x78;
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":815
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":826
* while offset[0] < new_offset:
* f[0] = 120 # "x"; pad byte
* f += 1 # <<<<<<<<<<<<<<
@@ -33049,7 +34337,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
*/
__pyx_v_f = (__pyx_v_f + 1);
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":816
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":827
* f[0] = 120 # "x"; pad byte
* f += 1
* offset[0] += 1 # <<<<<<<<<<<<<<
@@ -33060,7 +34348,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
(__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
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":829
* offset[0] += 1
*
* offset[0] += child.itemsize # <<<<<<<<<<<<<<
@@ -33070,7 +34358,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__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
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":831
* offset[0] += child.itemsize
*
* if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<<
@@ -33080,19 +34368,19 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__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
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":832
*
* if not PyDataType_HASFIELDS(child):
* t = child.type_num # <<<<<<<<<<<<<<
* if end - f < 5:
* raise RuntimeError(u"Format string allocated too short.")
*/
- __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_child->type_num); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 821, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_child->type_num); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 832, __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
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":833
* if not PyDataType_HASFIELDS(child):
* t = child.type_num
* if end - f < 5: # <<<<<<<<<<<<<<
@@ -33100,22 +34388,22 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
*
*/
__pyx_t_6 = (((__pyx_v_end - __pyx_v_f) < 5) != 0);
- if (__pyx_t_6) {
+ if (unlikely(__pyx_t_6)) {
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":823
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":834
* t = child.type_num
* if end - f < 5:
* raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<<
*
* # Until ticket #99 is fixed, use integers to avoid warnings
*/
- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__36, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 823, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__36, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 834, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_Raise(__pyx_t_4, 0, 0, 0);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __PYX_ERR(1, 823, __pyx_L1_error)
+ __PYX_ERR(1, 834, __pyx_L1_error)
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":822
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":833
* if not PyDataType_HASFIELDS(child):
* t = child.type_num
* if end - f < 5: # <<<<<<<<<<<<<<
@@ -33124,252 +34412,252 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
*/
}
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":826
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":837
*
* # Until ticket #99 is fixed, use integers to avoid warnings
* if t == NPY_BYTE: f[0] = 98 #"b" # <<<<<<<<<<<<<<
* elif t == NPY_UBYTE: f[0] = 66 #"B"
* elif t == NPY_SHORT: f[0] = 104 #"h"
*/
- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_BYTE); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 826, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_BYTE); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 837, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 826, __pyx_L1_error)
+ __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, 837, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 826, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 837, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
if (__pyx_t_6) {
(__pyx_v_f[0]) = 98;
goto __pyx_L15;
}
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":827
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":838
* # Until ticket #99 is fixed, use integers to avoid warnings
* if t == NPY_BYTE: f[0] = 98 #"b"
* elif t == NPY_UBYTE: f[0] = 66 #"B" # <<<<<<<<<<<<<<
* elif t == NPY_SHORT: f[0] = 104 #"h"
* elif t == NPY_USHORT: f[0] = 72 #"H"
*/
- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UBYTE); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 827, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UBYTE); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 838, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 827, __pyx_L1_error)
+ __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, 838, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 827, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 838, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (__pyx_t_6) {
(__pyx_v_f[0]) = 66;
goto __pyx_L15;
}
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":828
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":839
* if t == NPY_BYTE: f[0] = 98 #"b"
* elif t == NPY_UBYTE: f[0] = 66 #"B"
* elif t == NPY_SHORT: f[0] = 104 #"h" # <<<<<<<<<<<<<<
* elif t == NPY_USHORT: f[0] = 72 #"H"
* elif t == NPY_INT: f[0] = 105 #"i"
*/
- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_SHORT); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 828, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_SHORT); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 839, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 828, __pyx_L1_error)
+ __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, 839, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 828, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 839, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
if (__pyx_t_6) {
(__pyx_v_f[0]) = 0x68;
goto __pyx_L15;
}
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":829
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":840
* elif t == NPY_UBYTE: f[0] = 66 #"B"
* elif t == NPY_SHORT: f[0] = 104 #"h"
* elif t == NPY_USHORT: f[0] = 72 #"H" # <<<<<<<<<<<<<<
* elif t == NPY_INT: f[0] = 105 #"i"
* elif t == NPY_UINT: f[0] = 73 #"I"
*/
- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_USHORT); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 829, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_USHORT); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 840, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 829, __pyx_L1_error)
+ __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, 840, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 829, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 840, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (__pyx_t_6) {
(__pyx_v_f[0]) = 72;
goto __pyx_L15;
}
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":830
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":841
* elif t == NPY_SHORT: f[0] = 104 #"h"
* elif t == NPY_USHORT: f[0] = 72 #"H"
* elif t == NPY_INT: f[0] = 105 #"i" # <<<<<<<<<<<<<<
* elif t == NPY_UINT: f[0] = 73 #"I"
* elif t == NPY_LONG: f[0] = 108 #"l"
*/
- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_INT); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 830, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_INT); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 841, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 830, __pyx_L1_error)
+ __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, 841, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 830, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 841, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
if (__pyx_t_6) {
(__pyx_v_f[0]) = 0x69;
goto __pyx_L15;
}
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":831
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":842
* elif t == NPY_USHORT: f[0] = 72 #"H"
* elif t == NPY_INT: f[0] = 105 #"i"
* elif t == NPY_UINT: f[0] = 73 #"I" # <<<<<<<<<<<<<<
* elif t == NPY_LONG: f[0] = 108 #"l"
* elif t == NPY_ULONG: f[0] = 76 #"L"
*/
- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UINT); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 831, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UINT); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 842, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 831, __pyx_L1_error)
+ __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, 842, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 831, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 842, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (__pyx_t_6) {
(__pyx_v_f[0]) = 73;
goto __pyx_L15;
}
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":832
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":843
* elif t == NPY_INT: f[0] = 105 #"i"
* elif t == NPY_UINT: f[0] = 73 #"I"
* elif t == NPY_LONG: f[0] = 108 #"l" # <<<<<<<<<<<<<<
* elif t == NPY_ULONG: f[0] = 76 #"L"
* elif t == NPY_LONGLONG: f[0] = 113 #"q"
*/
- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 832, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 843, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 832, __pyx_L1_error)
+ __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, 843, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 832, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 843, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
if (__pyx_t_6) {
(__pyx_v_f[0]) = 0x6C;
goto __pyx_L15;
}
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":833
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":844
* elif t == NPY_UINT: f[0] = 73 #"I"
* elif t == NPY_LONG: f[0] = 108 #"l"
* elif t == NPY_ULONG: f[0] = 76 #"L" # <<<<<<<<<<<<<<
* elif t == NPY_LONGLONG: f[0] = 113 #"q"
* elif t == NPY_ULONGLONG: f[0] = 81 #"Q"
*/
- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 833, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 844, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 833, __pyx_L1_error)
+ __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, 844, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 833, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 844, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (__pyx_t_6) {
(__pyx_v_f[0]) = 76;
goto __pyx_L15;
}
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":834
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":845
* elif t == NPY_LONG: f[0] = 108 #"l"
* elif t == NPY_ULONG: f[0] = 76 #"L"
* elif t == NPY_LONGLONG: f[0] = 113 #"q" # <<<<<<<<<<<<<<
* elif t == NPY_ULONGLONG: f[0] = 81 #"Q"
* elif t == NPY_FLOAT: f[0] = 102 #"f"
*/
- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGLONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 834, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGLONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 845, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 834, __pyx_L1_error)
+ __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, 845, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 834, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 845, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
if (__pyx_t_6) {
(__pyx_v_f[0]) = 0x71;
goto __pyx_L15;
}
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":835
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":846
* elif t == NPY_ULONG: f[0] = 76 #"L"
* elif t == NPY_LONGLONG: f[0] = 113 #"q"
* elif t == NPY_ULONGLONG: f[0] = 81 #"Q" # <<<<<<<<<<<<<<
* elif t == NPY_FLOAT: f[0] = 102 #"f"
* elif t == NPY_DOUBLE: f[0] = 100 #"d"
*/
- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONGLONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 835, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONGLONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 846, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 835, __pyx_L1_error)
+ __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, 846, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 835, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 846, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (__pyx_t_6) {
(__pyx_v_f[0]) = 81;
goto __pyx_L15;
}
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":836
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":847
* elif t == NPY_LONGLONG: f[0] = 113 #"q"
* elif t == NPY_ULONGLONG: f[0] = 81 #"Q"
* elif t == NPY_FLOAT: f[0] = 102 #"f" # <<<<<<<<<<<<<<
* elif t == NPY_DOUBLE: f[0] = 100 #"d"
* elif t == NPY_LONGDOUBLE: f[0] = 103 #"g"
*/
- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_FLOAT); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 836, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_FLOAT); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 847, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 836, __pyx_L1_error)
+ __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, 847, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 836, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 847, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
if (__pyx_t_6) {
(__pyx_v_f[0]) = 0x66;
goto __pyx_L15;
}
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":837
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":848
* elif t == NPY_ULONGLONG: f[0] = 81 #"Q"
* elif t == NPY_FLOAT: f[0] = 102 #"f"
* elif t == NPY_DOUBLE: f[0] = 100 #"d" # <<<<<<<<<<<<<<
* elif t == NPY_LONGDOUBLE: f[0] = 103 #"g"
* elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf
*/
- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_DOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 837, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_DOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 848, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 837, __pyx_L1_error)
+ __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, 848, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 837, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 848, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (__pyx_t_6) {
(__pyx_v_f[0]) = 0x64;
goto __pyx_L15;
}
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":838
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":849
* elif t == NPY_FLOAT: f[0] = 102 #"f"
* elif t == NPY_DOUBLE: f[0] = 100 #"d"
* elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" # <<<<<<<<<<<<<<
* elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf
* elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd
*/
- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 838, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 849, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 838, __pyx_L1_error)
+ __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, 849, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 838, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 849, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
if (__pyx_t_6) {
(__pyx_v_f[0]) = 0x67;
goto __pyx_L15;
}
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":839
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":850
* elif t == NPY_DOUBLE: f[0] = 100 #"d"
* elif t == NPY_LONGDOUBLE: f[0] = 103 #"g"
* elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf # <<<<<<<<<<<<<<
* elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd
* elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
*/
- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CFLOAT); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 839, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CFLOAT); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 850, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 839, __pyx_L1_error)
+ __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, 850, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 839, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 850, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (__pyx_t_6) {
(__pyx_v_f[0]) = 90;
@@ -33378,18 +34666,18 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":840
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":851
* elif t == NPY_LONGDOUBLE: f[0] = 103 #"g"
* elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf
* elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd # <<<<<<<<<<<<<<
* elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
* elif t == NPY_OBJECT: f[0] = 79 #"O"
*/
- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 840, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 851, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 840, __pyx_L1_error)
+ __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, 851, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 840, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 851, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
if (__pyx_t_6) {
(__pyx_v_f[0]) = 90;
@@ -33398,18 +34686,18 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":841
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":852
* elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf
* elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd
* elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg # <<<<<<<<<<<<<<
* elif t == NPY_OBJECT: f[0] = 79 #"O"
* else:
*/
- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 841, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 852, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 841, __pyx_L1_error)
+ __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, 852, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 841, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 852, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (__pyx_t_6) {
(__pyx_v_f[0]) = 90;
@@ -33418,25 +34706,25 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":842
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":853
* elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd
* elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
* elif t == NPY_OBJECT: f[0] = 79 #"O" # <<<<<<<<<<<<<<
* else:
* raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
*/
- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_OBJECT); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 842, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_OBJECT); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 853, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 842, __pyx_L1_error)
+ __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, 853, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 842, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 853, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- if (__pyx_t_6) {
+ if (likely(__pyx_t_6)) {
(__pyx_v_f[0]) = 79;
goto __pyx_L15;
}
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":844
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":855
* elif t == NPY_OBJECT: f[0] = 79 #"O"
* else:
* raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<<
@@ -33444,23 +34732,18 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
* 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_t_3 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 855, __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_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 855, __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_Raise(__pyx_t_4, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __PYX_ERR(1, 855, __pyx_L1_error)
}
__pyx_L15:;
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":845
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":856
* else:
* raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
* f += 1 # <<<<<<<<<<<<<<
@@ -33469,7 +34752,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
*/
__pyx_v_f = (__pyx_v_f + 1);
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":820
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":831
* offset[0] += child.itemsize
*
* if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<<
@@ -33479,7 +34762,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L13;
}
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":849
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":860
* # Cython ignores struct boundary information ("T{...}"),
* # so don't output it
* f = _util_dtypestring(child, f, end, offset) # <<<<<<<<<<<<<<
@@ -33487,12 +34770,12 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
*
*/
/*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_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_9 == ((char *)NULL))) __PYX_ERR(1, 860, __pyx_L1_error)
__pyx_v_f = __pyx_t_9;
}
__pyx_L13:;
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":794
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":805
* cdef tuple fields
*
* for childname in descr.names: # <<<<<<<<<<<<<<
@@ -33502,7 +34785,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":850
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":861
* # so don't output it
* f = _util_dtypestring(child, f, end, offset)
* return f # <<<<<<<<<<<<<<
@@ -33512,8 +34795,8 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__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)
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":796
+ * return ()
*
* cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<<
* # Recursive utility function used in __getbuffer__ to get format
@@ -33537,7 +34820,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
return __pyx_r;
}
-/* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":966
+/* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":977
*
*
* cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<<
@@ -33552,7 +34835,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a
int __pyx_t_2;
__Pyx_RefNannySetupContext("set_array_base", 0);
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":968
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":979
* cdef inline void set_array_base(ndarray arr, object base):
* cdef PyObject* baseptr
* if base is None: # <<<<<<<<<<<<<<
@@ -33563,7 +34846,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a
__pyx_t_2 = (__pyx_t_1 != 0);
if (__pyx_t_2) {
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":969
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":980
* cdef PyObject* baseptr
* if base is None:
* baseptr = NULL # <<<<<<<<<<<<<<
@@ -33572,7 +34855,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a
*/
__pyx_v_baseptr = NULL;
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":968
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":979
* cdef inline void set_array_base(ndarray arr, object base):
* cdef PyObject* baseptr
* if base is None: # <<<<<<<<<<<<<<
@@ -33582,7 +34865,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a
goto __pyx_L3;
}
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":971
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":982
* baseptr = NULL
* else:
* Py_INCREF(base) # important to do this before decref below! # <<<<<<<<<<<<<<
@@ -33592,7 +34875,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a
/*else*/ {
Py_INCREF(__pyx_v_base);
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":972
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":983
* else:
* Py_INCREF(base) # important to do this before decref below!
* baseptr = <PyObject*>base # <<<<<<<<<<<<<<
@@ -33603,7 +34886,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a
}
__pyx_L3:;
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":973
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":984
* Py_INCREF(base) # important to do this before decref below!
* baseptr = <PyObject*>base
* Py_XDECREF(arr.base) # <<<<<<<<<<<<<<
@@ -33612,7 +34895,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a
*/
Py_XDECREF(__pyx_v_arr->base);
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":974
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":985
* baseptr = <PyObject*>base
* Py_XDECREF(arr.base)
* arr.base = baseptr # <<<<<<<<<<<<<<
@@ -33621,7 +34904,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a
*/
__pyx_v_arr->base = __pyx_v_baseptr;
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":966
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":977
*
*
* cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<<
@@ -33633,7 +34916,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a
__Pyx_RefNannyFinishContext();
}
-/* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":976
+/* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":987
* arr.base = baseptr
*
* cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<<
@@ -33647,7 +34930,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py
int __pyx_t_1;
__Pyx_RefNannySetupContext("get_array_base", 0);
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":977
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":988
*
* cdef inline object get_array_base(ndarray arr):
* if arr.base is NULL: # <<<<<<<<<<<<<<
@@ -33657,7 +34940,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py
__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
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":989
* cdef inline object get_array_base(ndarray arr):
* if arr.base is NULL:
* return None # <<<<<<<<<<<<<<
@@ -33665,11 +34948,10 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py
* return <object>arr.base
*/
__Pyx_XDECREF(__pyx_r);
- __Pyx_INCREF(Py_None);
- __pyx_r = Py_None;
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
goto __pyx_L0;
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":977
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":988
*
* cdef inline object get_array_base(ndarray arr):
* if arr.base is NULL: # <<<<<<<<<<<<<<
@@ -33678,7 +34960,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py
*/
}
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":980
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":991
* return None
* else:
* return <object>arr.base # <<<<<<<<<<<<<<
@@ -33692,7 +34974,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py
goto __pyx_L0;
}
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":976
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":987
* arr.base = baseptr
*
* cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<<
@@ -33707,7 +34989,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py
return __pyx_r;
}
-/* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":985
+/* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":996
* # Versions of the import_* functions which are more suitable for
* # Cython code.
* cdef inline int import_array() except -1: # <<<<<<<<<<<<<<
@@ -33728,7 +35010,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
PyObject *__pyx_t_8 = NULL;
__Pyx_RefNannySetupContext("import_array", 0);
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":986
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":997
* # Cython code.
* cdef inline int import_array() except -1:
* try: # <<<<<<<<<<<<<<
@@ -33744,16 +35026,16 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
__Pyx_XGOTREF(__pyx_t_3);
/*try:*/ {
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":987
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":998
* cdef inline int import_array() except -1:
* try:
* _import_array() # <<<<<<<<<<<<<<
* except Exception:
* raise ImportError("numpy.core.multiarray failed to import")
*/
- __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(1, 987, __pyx_L3_error)
+ __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 998, __pyx_L3_error)
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":986
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":997
* # Cython code.
* cdef inline int import_array() except -1:
* try: # <<<<<<<<<<<<<<
@@ -33764,11 +35046,10 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
__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;
+ goto __pyx_L8_try_end;
__pyx_L3_error:;
- __Pyx_PyThreadState_assign
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":988
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":999
* try:
* _import_array()
* except Exception: # <<<<<<<<<<<<<<
@@ -33778,44 +35059,43 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
__pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
if (__pyx_t_4) {
__Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
- if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 988, __pyx_L5_except_error)
+ if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 999, __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
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":1000
* _import_array()
* except Exception:
* raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<<
*
* cdef inline int import_umath() except -1:
*/
- __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__37, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 989, __pyx_L5_except_error)
+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__37, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1000, __pyx_L5_except_error)
__Pyx_GOTREF(__pyx_t_8);
__Pyx_Raise(__pyx_t_8, 0, 0, 0);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __PYX_ERR(1, 989, __pyx_L5_except_error)
+ __PYX_ERR(1, 1000, __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
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":997
* # 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:;
+ __pyx_L8_try_end:;
}
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":985
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":996
* # Versions of the import_* functions which are more suitable for
* # Cython code.
* cdef inline int import_array() except -1: # <<<<<<<<<<<<<<
@@ -33838,7 +35118,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
return __pyx_r;
}
-/* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":991
+/* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":1002
* raise ImportError("numpy.core.multiarray failed to import")
*
* cdef inline int import_umath() except -1: # <<<<<<<<<<<<<<
@@ -33859,7 +35139,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
PyObject *__pyx_t_8 = NULL;
__Pyx_RefNannySetupContext("import_umath", 0);
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":992
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":1003
*
* cdef inline int import_umath() except -1:
* try: # <<<<<<<<<<<<<<
@@ -33875,16 +35155,16 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
__Pyx_XGOTREF(__pyx_t_3);
/*try:*/ {
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":993
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":1004
* cdef inline int import_umath() except -1:
* try:
* _import_umath() # <<<<<<<<<<<<<<
* except Exception:
* raise ImportError("numpy.core.umath failed to import")
*/
- __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(1, 993, __pyx_L3_error)
+ __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 1004, __pyx_L3_error)
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":992
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":1003
*
* cdef inline int import_umath() except -1:
* try: # <<<<<<<<<<<<<<
@@ -33895,11 +35175,10 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
__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;
+ goto __pyx_L8_try_end;
__pyx_L3_error:;
- __Pyx_PyThreadState_assign
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":994
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":1005
* try:
* _import_umath()
* except Exception: # <<<<<<<<<<<<<<
@@ -33909,44 +35188,43 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
__pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
if (__pyx_t_4) {
__Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
- if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 994, __pyx_L5_except_error)
+ if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 1005, __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
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":1006
* _import_umath()
* except Exception:
* raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<<
*
* cdef inline int import_ufunc() except -1:
*/
- __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__38, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 995, __pyx_L5_except_error)
+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__38, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1006, __pyx_L5_except_error)
__Pyx_GOTREF(__pyx_t_8);
__Pyx_Raise(__pyx_t_8, 0, 0, 0);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __PYX_ERR(1, 995, __pyx_L5_except_error)
+ __PYX_ERR(1, 1006, __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
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":1003
*
* 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:;
+ __pyx_L8_try_end:;
}
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":991
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":1002
* raise ImportError("numpy.core.multiarray failed to import")
*
* cdef inline int import_umath() except -1: # <<<<<<<<<<<<<<
@@ -33969,7 +35247,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
return __pyx_r;
}
-/* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":997
+/* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":1008
* raise ImportError("numpy.core.umath failed to import")
*
* cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<<
@@ -33990,7 +35268,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) {
PyObject *__pyx_t_8 = NULL;
__Pyx_RefNannySetupContext("import_ufunc", 0);
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":998
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":1009
*
* cdef inline int import_ufunc() except -1:
* try: # <<<<<<<<<<<<<<
@@ -34006,16 +35284,16 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) {
__Pyx_XGOTREF(__pyx_t_3);
/*try:*/ {
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":999
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":1010
* cdef inline int import_ufunc() except -1:
* try:
* _import_umath() # <<<<<<<<<<<<<<
* except Exception:
* raise ImportError("numpy.core.umath failed to import")
*/
- __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(1, 999, __pyx_L3_error)
+ __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 1010, __pyx_L3_error)
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":998
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":1009
*
* cdef inline int import_ufunc() except -1:
* try: # <<<<<<<<<<<<<<
@@ -34026,11 +35304,10 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) {
__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;
+ goto __pyx_L8_try_end;
__pyx_L3_error:;
- __Pyx_PyThreadState_assign
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":1000
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":1011
* try:
* _import_umath()
* except Exception: # <<<<<<<<<<<<<<
@@ -34039,42 +35316,41 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) {
__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)
+ if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 1011, __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
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":1012
* _import_umath()
* except Exception:
* raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<<
*/
- __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__39, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1001, __pyx_L5_except_error)
+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__39, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1012, __pyx_L5_except_error)
__Pyx_GOTREF(__pyx_t_8);
__Pyx_Raise(__pyx_t_8, 0, 0, 0);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __PYX_ERR(1, 1001, __pyx_L5_except_error)
+ __PYX_ERR(1, 1012, __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
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":1009
*
* 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:;
+ __pyx_L8_try_end:;
}
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":997
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":1008
* raise ImportError("numpy.core.umath failed to import")
*
* cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<<
@@ -34097,7 +35373,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) {
return __pyx_r;
}
-/* "View.MemoryView":120
+/* "View.MemoryView":121
* cdef bint dtype_is_object
*
* def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None, # <<<<<<<<<<<<<<
@@ -34125,46 +35401,57 @@ static int __pyx_array___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, P
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
switch (pos_args) {
case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
case 0: break;
default: goto __pyx_L5_argtuple_error;
}
kw_args = PyDict_Size(__pyx_kwds);
switch (pos_args) {
case 0:
- if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_shape)) != 0)) kw_args--;
+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_shape)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
case 1:
- if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_itemsize)) != 0)) kw_args--;
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_itemsize)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, 1); __PYX_ERR(2, 120, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, 1); __PYX_ERR(2, 121, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 2:
- if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_format)) != 0)) kw_args--;
+ if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_format)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, 2); __PYX_ERR(2, 120, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, 2); __PYX_ERR(2, 121, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 3:
if (kw_args > 0) {
- PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mode);
+ PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mode);
if (value) { values[3] = value; kw_args--; }
}
+ CYTHON_FALLTHROUGH;
case 4:
if (kw_args > 0) {
- PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_allocate_buffer);
+ PyObject* value = __Pyx_PyDict_GetItemStr(__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)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(2, 121, __pyx_L3_error)
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
@@ -34173,14 +35460,14 @@ static int __pyx_array___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, P
}
}
__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_itemsize = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_itemsize == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(2, 121, __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)
+ __pyx_v_allocate_buffer = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_allocate_buffer == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 122, __pyx_L3_error)
} else {
- /* "View.MemoryView":121
+ /* "View.MemoryView":122
*
* def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None,
* mode="c", bint allocate_buffer=True): # <<<<<<<<<<<<<<
@@ -34192,19 +35479,19 @@ static int __pyx_array___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, P
}
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_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 121, __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(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_shape), (&PyTuple_Type), 1, "shape", 1))) __PYX_ERR(2, 121, __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)
+ PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "format"); __PYX_ERR(2, 121, __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
+ /* "View.MemoryView":121
* cdef bint dtype_is_object
*
* def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None, # <<<<<<<<<<<<<<
@@ -34239,10 +35526,11 @@ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __
Py_ssize_t __pyx_t_8;
PyObject *__pyx_t_9 = NULL;
PyObject *__pyx_t_10 = NULL;
+ Py_ssize_t __pyx_t_11;
__Pyx_RefNannySetupContext("__cinit__", 0);
__Pyx_INCREF(__pyx_v_format);
- /* "View.MemoryView":127
+ /* "View.MemoryView":128
* cdef PyObject **p
*
* self.ndim = <int> len(shape) # <<<<<<<<<<<<<<
@@ -34251,12 +35539,12 @@ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __
*/
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_ERR(2, 128, __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_t_1 = PyTuple_GET_SIZE(__pyx_v_shape); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(2, 128, __pyx_L1_error)
__pyx_v_self->ndim = ((int)__pyx_t_1);
- /* "View.MemoryView":128
+ /* "View.MemoryView":129
*
* self.ndim = <int> len(shape)
* self.itemsize = itemsize # <<<<<<<<<<<<<<
@@ -34265,7 +35553,7 @@ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __
*/
__pyx_v_self->itemsize = __pyx_v_itemsize;
- /* "View.MemoryView":130
+ /* "View.MemoryView":131
* self.itemsize = itemsize
*
* if not self.ndim: # <<<<<<<<<<<<<<
@@ -34273,22 +35561,22 @@ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __
*
*/
__pyx_t_2 = ((!(__pyx_v_self->ndim != 0)) != 0);
- if (__pyx_t_2) {
+ if (unlikely(__pyx_t_2)) {
- /* "View.MemoryView":131
+ /* "View.MemoryView":132
*
* 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__40, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 131, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__40, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 132, __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)
+ __PYX_ERR(2, 132, __pyx_L1_error)
- /* "View.MemoryView":130
+ /* "View.MemoryView":131
* self.itemsize = itemsize
*
* if not self.ndim: # <<<<<<<<<<<<<<
@@ -34297,7 +35585,7 @@ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __
*/
}
- /* "View.MemoryView":133
+ /* "View.MemoryView":134
* raise ValueError("Empty shape tuple for cython.array")
*
* if itemsize <= 0: # <<<<<<<<<<<<<<
@@ -34305,22 +35593,22 @@ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __
*
*/
__pyx_t_2 = ((__pyx_v_itemsize <= 0) != 0);
- if (__pyx_t_2) {
+ if (unlikely(__pyx_t_2)) {
- /* "View.MemoryView":134
+ /* "View.MemoryView":135
*
* 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__41, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 134, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__41, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 135, __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)
+ __PYX_ERR(2, 135, __pyx_L1_error)
- /* "View.MemoryView":133
+ /* "View.MemoryView":134
* raise ValueError("Empty shape tuple for cython.array")
*
* if itemsize <= 0: # <<<<<<<<<<<<<<
@@ -34329,7 +35617,7 @@ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __
*/
}
- /* "View.MemoryView":136
+ /* "View.MemoryView":137
* raise ValueError("itemsize <= 0 for cython.array")
*
* if not isinstance(format, bytes): # <<<<<<<<<<<<<<
@@ -34340,22 +35628,22 @@ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __
__pyx_t_4 = ((!(__pyx_t_2 != 0)) != 0);
if (__pyx_t_4) {
- /* "View.MemoryView":137
+ /* "View.MemoryView":138
*
* 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_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_format, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 138, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__42, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 137, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__42, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 138, __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;
- /* "View.MemoryView":136
+ /* "View.MemoryView":137
* raise ValueError("itemsize <= 0 for cython.array")
*
* if not isinstance(format, bytes): # <<<<<<<<<<<<<<
@@ -34364,14 +35652,14 @@ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __
*/
}
- /* "View.MemoryView":138
+ /* "View.MemoryView":139
* if not isinstance(format, bytes):
* format = format.encode('ASCII')
* self._format = format # keep a reference to the byte string # <<<<<<<<<<<<<<
* self.format = self._format
*
*/
- if (!(likely(PyBytes_CheckExact(__pyx_v_format))||((__pyx_v_format) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_format)->tp_name), 0))) __PYX_ERR(2, 138, __pyx_L1_error)
+ if (!(likely(PyBytes_CheckExact(__pyx_v_format))||((__pyx_v_format) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_format)->tp_name), 0))) __PYX_ERR(2, 139, __pyx_L1_error)
__pyx_t_5 = __pyx_v_format;
__Pyx_INCREF(__pyx_t_5);
__Pyx_GIVEREF(__pyx_t_5);
@@ -34380,17 +35668,21 @@ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __
__pyx_v_self->_format = ((PyObject*)__pyx_t_5);
__pyx_t_5 = 0;
- /* "View.MemoryView":139
+ /* "View.MemoryView":140
* format = format.encode('ASCII')
* self._format = format # keep a reference to the byte string
* self.format = self._format # <<<<<<<<<<<<<<
*
*
*/
- __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_self->_format); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(2, 139, __pyx_L1_error)
+ if (unlikely(__pyx_v_self->_format == Py_None)) {
+ PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
+ __PYX_ERR(2, 140, __pyx_L1_error)
+ }
+ __pyx_t_6 = __Pyx_PyBytes_AsWritableString(__pyx_v_self->_format); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(2, 140, __pyx_L1_error)
__pyx_v_self->format = __pyx_t_6;
- /* "View.MemoryView":142
+ /* "View.MemoryView":143
*
*
* self._shape = <Py_ssize_t *> PyObject_Malloc(sizeof(Py_ssize_t)*self.ndim*2) # <<<<<<<<<<<<<<
@@ -34399,7 +35691,7 @@ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __
*/
__pyx_v_self->_shape = ((Py_ssize_t *)PyObject_Malloc((((sizeof(Py_ssize_t)) * __pyx_v_self->ndim) * 2)));
- /* "View.MemoryView":143
+ /* "View.MemoryView":144
*
* self._shape = <Py_ssize_t *> PyObject_Malloc(sizeof(Py_ssize_t)*self.ndim*2)
* self._strides = self._shape + self.ndim # <<<<<<<<<<<<<<
@@ -34408,7 +35700,7 @@ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __
*/
__pyx_v_self->_strides = (__pyx_v_self->_shape + __pyx_v_self->ndim);
- /* "View.MemoryView":145
+ /* "View.MemoryView":146
* self._strides = self._shape + self.ndim
*
* if not self._shape: # <<<<<<<<<<<<<<
@@ -34416,22 +35708,22 @@ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __
*
*/
__pyx_t_4 = ((!(__pyx_v_self->_shape != 0)) != 0);
- if (__pyx_t_4) {
+ if (unlikely(__pyx_t_4)) {
- /* "View.MemoryView":146
+ /* "View.MemoryView":147
*
* if not self._shape:
* raise MemoryError("unable to allocate shape and strides.") # <<<<<<<<<<<<<<
*
*
*/
- __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_MemoryError, __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 146, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_MemoryError, __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 147, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_Raise(__pyx_t_5, 0, 0, 0);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __PYX_ERR(2, 146, __pyx_L1_error)
+ __PYX_ERR(2, 147, __pyx_L1_error)
- /* "View.MemoryView":145
+ /* "View.MemoryView":146
* self._strides = self._shape + self.ndim
*
* if not self._shape: # <<<<<<<<<<<<<<
@@ -34440,7 +35732,7 @@ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __
*/
}
- /* "View.MemoryView":149
+ /* "View.MemoryView":150
*
*
* for idx, dim in enumerate(shape): # <<<<<<<<<<<<<<
@@ -34452,18 +35744,18 @@ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __
for (;;) {
if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
- __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_1); __Pyx_INCREF(__pyx_t_3); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(2, 149, __pyx_L1_error)
+ __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_1); __Pyx_INCREF(__pyx_t_3); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(2, 150, __pyx_L1_error)
#else
- __pyx_t_3 = PySequence_ITEM(__pyx_t_5, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 149, __pyx_L1_error)
+ __pyx_t_3 = PySequence_ITEM(__pyx_t_5, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 150, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
#endif
- __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(2, 149, __pyx_L1_error)
+ __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(2, 150, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_v_dim = __pyx_t_8;
__pyx_v_idx = __pyx_t_7;
__pyx_t_7 = (__pyx_t_7 + 1);
- /* "View.MemoryView":150
+ /* "View.MemoryView":151
*
* for idx, dim in enumerate(shape):
* if dim <= 0: # <<<<<<<<<<<<<<
@@ -34471,20 +35763,20 @@ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __
* self._shape[idx] = dim
*/
__pyx_t_4 = ((__pyx_v_dim <= 0) != 0);
- if (__pyx_t_4) {
+ if (unlikely(__pyx_t_4)) {
- /* "View.MemoryView":151
+ /* "View.MemoryView":152
* for idx, dim in enumerate(shape):
* if dim <= 0:
* raise ValueError("Invalid shape in axis %d: %d." % (idx, dim)) # <<<<<<<<<<<<<<
* self._shape[idx] = dim
*
*/
- __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_idx); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 151, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_idx); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 152, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_9 = PyInt_FromSsize_t(__pyx_v_dim); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 151, __pyx_L1_error)
+ __pyx_t_9 = PyInt_FromSsize_t(__pyx_v_dim); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 152, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_9);
- __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 151, __pyx_L1_error)
+ __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 152, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_10);
__Pyx_GIVEREF(__pyx_t_3);
PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3);
@@ -34492,22 +35784,17 @@ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __
PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_9);
__pyx_t_3 = 0;
__pyx_t_9 = 0;
- __pyx_t_9 = __Pyx_PyString_Format(__pyx_kp_s_Invalid_shape_in_axis_d_d, __pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 151, __pyx_L1_error)
+ __pyx_t_9 = __Pyx_PyString_Format(__pyx_kp_s_Invalid_shape_in_axis_d_d, __pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 152, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_9);
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 151, __pyx_L1_error)
+ __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 152, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_10);
- __Pyx_GIVEREF(__pyx_t_9);
- PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9);
- __pyx_t_9 = 0;
- __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_10, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 151, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- __Pyx_Raise(__pyx_t_9, 0, 0, 0);
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- __PYX_ERR(2, 151, __pyx_L1_error)
+ __Pyx_Raise(__pyx_t_10, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __PYX_ERR(2, 152, __pyx_L1_error)
- /* "View.MemoryView":150
+ /* "View.MemoryView":151
*
* for idx, dim in enumerate(shape):
* if dim <= 0: # <<<<<<<<<<<<<<
@@ -34516,7 +35803,7 @@ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __
*/
}
- /* "View.MemoryView":152
+ /* "View.MemoryView":153
* if dim <= 0:
* raise ValueError("Invalid shape in axis %d: %d." % (idx, dim))
* self._shape[idx] = dim # <<<<<<<<<<<<<<
@@ -34525,7 +35812,7 @@ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __
*/
(__pyx_v_self->_shape[__pyx_v_idx]) = __pyx_v_dim;
- /* "View.MemoryView":149
+ /* "View.MemoryView":150
*
*
* for idx, dim in enumerate(shape): # <<<<<<<<<<<<<<
@@ -34535,17 +35822,17 @@ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __
}
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- /* "View.MemoryView":155
+ /* "View.MemoryView":156
*
* cdef char order
* if mode == 'fortran': # <<<<<<<<<<<<<<
* order = b'F'
* self.mode = u'fortran'
*/
- __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_fortran, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(2, 155, __pyx_L1_error)
+ __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_fortran, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(2, 156, __pyx_L1_error)
if (__pyx_t_4) {
- /* "View.MemoryView":156
+ /* "View.MemoryView":157
* cdef char order
* if mode == 'fortran':
* order = b'F' # <<<<<<<<<<<<<<
@@ -34554,7 +35841,7 @@ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __
*/
__pyx_v_order = 'F';
- /* "View.MemoryView":157
+ /* "View.MemoryView":158
* if mode == 'fortran':
* order = b'F'
* self.mode = u'fortran' # <<<<<<<<<<<<<<
@@ -34567,7 +35854,7 @@ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __
__Pyx_DECREF(__pyx_v_self->mode);
__pyx_v_self->mode = __pyx_n_u_fortran;
- /* "View.MemoryView":155
+ /* "View.MemoryView":156
*
* cdef char order
* if mode == 'fortran': # <<<<<<<<<<<<<<
@@ -34577,17 +35864,17 @@ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __
goto __pyx_L10;
}
- /* "View.MemoryView":158
+ /* "View.MemoryView":159
* order = b'F'
* self.mode = u'fortran'
* elif mode == 'c': # <<<<<<<<<<<<<<
* order = b'C'
* self.mode = u'c'
*/
- __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_c, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(2, 158, __pyx_L1_error)
- if (__pyx_t_4) {
+ __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_c, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(2, 159, __pyx_L1_error)
+ if (likely(__pyx_t_4)) {
- /* "View.MemoryView":159
+ /* "View.MemoryView":160
* self.mode = u'fortran'
* elif mode == 'c':
* order = b'C' # <<<<<<<<<<<<<<
@@ -34596,7 +35883,7 @@ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __
*/
__pyx_v_order = 'C';
- /* "View.MemoryView":160
+ /* "View.MemoryView":161
* elif mode == 'c':
* order = b'C'
* self.mode = u'c' # <<<<<<<<<<<<<<
@@ -34609,7 +35896,7 @@ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __
__Pyx_DECREF(__pyx_v_self->mode);
__pyx_v_self->mode = __pyx_n_u_c;
- /* "View.MemoryView":158
+ /* "View.MemoryView":159
* order = b'F'
* self.mode = u'fortran'
* elif mode == 'c': # <<<<<<<<<<<<<<
@@ -34619,7 +35906,7 @@ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __
goto __pyx_L10;
}
- /* "View.MemoryView":162
+ /* "View.MemoryView":163
* self.mode = u'c'
* else:
* raise ValueError("Invalid mode, expected 'c' or 'fortran', got %s" % mode) # <<<<<<<<<<<<<<
@@ -34627,23 +35914,18 @@ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __
* self.len = fill_contig_strides_array(self._shape, self._strides,
*/
/*else*/ {
- __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Invalid_mode_expected_c_or_fortr, __pyx_v_mode); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 162, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Invalid_mode_expected_c_or_fortr, __pyx_v_mode); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 163, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 162, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- __Pyx_GIVEREF(__pyx_t_5);
- PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_5);
- __pyx_t_5 = 0;
- __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 162, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_5);
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- __Pyx_Raise(__pyx_t_5, 0, 0, 0);
+ __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_5); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 163, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __PYX_ERR(2, 162, __pyx_L1_error)
+ __Pyx_Raise(__pyx_t_10, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __PYX_ERR(2, 163, __pyx_L1_error)
}
__pyx_L10:;
- /* "View.MemoryView":164
+ /* "View.MemoryView":165
* raise ValueError("Invalid mode, expected 'c' or 'fortran', got %s" % mode)
*
* self.len = fill_contig_strides_array(self._shape, self._strides, # <<<<<<<<<<<<<<
@@ -34652,7 +35934,7 @@ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __
*/
__pyx_v_self->len = __pyx_fill_contig_strides_array(__pyx_v_self->_shape, __pyx_v_self->_strides, __pyx_v_itemsize, __pyx_v_self->ndim, __pyx_v_order);
- /* "View.MemoryView":167
+ /* "View.MemoryView":168
* itemsize, self.ndim, order)
*
* self.free_data = allocate_buffer # <<<<<<<<<<<<<<
@@ -34661,19 +35943,19 @@ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __
*/
__pyx_v_self->free_data = __pyx_v_allocate_buffer;
- /* "View.MemoryView":168
+ /* "View.MemoryView":169
*
* self.free_data = allocate_buffer
* self.dtype_is_object = format == b'O' # <<<<<<<<<<<<<<
* if allocate_buffer:
*
*/
- __pyx_t_5 = PyObject_RichCompare(__pyx_v_format, __pyx_n_b_O, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 168, __pyx_L1_error)
- __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 168, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_10 = PyObject_RichCompare(__pyx_v_format, __pyx_n_b_O, Py_EQ); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 169, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 169, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
__pyx_v_self->dtype_is_object = __pyx_t_4;
- /* "View.MemoryView":169
+ /* "View.MemoryView":170
* self.free_data = allocate_buffer
* self.dtype_is_object = format == b'O'
* if allocate_buffer: # <<<<<<<<<<<<<<
@@ -34683,7 +35965,7 @@ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __
__pyx_t_4 = (__pyx_v_allocate_buffer != 0);
if (__pyx_t_4) {
- /* "View.MemoryView":172
+ /* "View.MemoryView":173
*
*
* self.data = <char *>malloc(self.len) # <<<<<<<<<<<<<<
@@ -34692,7 +35974,7 @@ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __
*/
__pyx_v_self->data = ((char *)malloc(__pyx_v_self->len));
- /* "View.MemoryView":173
+ /* "View.MemoryView":174
*
* self.data = <char *>malloc(self.len)
* if not self.data: # <<<<<<<<<<<<<<
@@ -34700,22 +35982,22 @@ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __
*
*/
__pyx_t_4 = ((!(__pyx_v_self->data != 0)) != 0);
- if (__pyx_t_4) {
+ if (unlikely(__pyx_t_4)) {
- /* "View.MemoryView":174
+ /* "View.MemoryView":175
* self.data = <char *>malloc(self.len)
* if not self.data:
* raise MemoryError("unable to allocate array data.") # <<<<<<<<<<<<<<
*
* if self.dtype_is_object:
*/
- __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_MemoryError, __pyx_tuple__44, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 174, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_5);
- __Pyx_Raise(__pyx_t_5, 0, 0, 0);
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __PYX_ERR(2, 174, __pyx_L1_error)
+ __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_MemoryError, __pyx_tuple__44, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 175, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_Raise(__pyx_t_10, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __PYX_ERR(2, 175, __pyx_L1_error)
- /* "View.MemoryView":173
+ /* "View.MemoryView":174
*
* self.data = <char *>malloc(self.len)
* if not self.data: # <<<<<<<<<<<<<<
@@ -34724,7 +36006,7 @@ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __
*/
}
- /* "View.MemoryView":176
+ /* "View.MemoryView":177
* raise MemoryError("unable to allocate array data.")
*
* if self.dtype_is_object: # <<<<<<<<<<<<<<
@@ -34734,7 +36016,7 @@ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __
__pyx_t_4 = (__pyx_v_self->dtype_is_object != 0);
if (__pyx_t_4) {
- /* "View.MemoryView":177
+ /* "View.MemoryView":178
*
* if self.dtype_is_object:
* p = <PyObject **> self.data # <<<<<<<<<<<<<<
@@ -34743,7 +36025,7 @@ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __
*/
__pyx_v_p = ((PyObject **)__pyx_v_self->data);
- /* "View.MemoryView":178
+ /* "View.MemoryView":179
* if self.dtype_is_object:
* p = <PyObject **> self.data
* for i in range(self.len / itemsize): # <<<<<<<<<<<<<<
@@ -34752,17 +36034,18 @@ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __
*/
if (unlikely(__pyx_v_itemsize == 0)) {
PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
- __PYX_ERR(2, 178, __pyx_L1_error)
+ __PYX_ERR(2, 179, __pyx_L1_error)
}
else if (sizeof(Py_ssize_t) == sizeof(long) && (!(((Py_ssize_t)-1) > 0)) && unlikely(__pyx_v_itemsize == (Py_ssize_t)-1) && unlikely(UNARY_NEG_WOULD_OVERFLOW(__pyx_v_self->len))) {
PyErr_SetString(PyExc_OverflowError, "value too large to perform division");
- __PYX_ERR(2, 178, __pyx_L1_error)
+ __PYX_ERR(2, 179, __pyx_L1_error)
}
__pyx_t_1 = __Pyx_div_Py_ssize_t(__pyx_v_self->len, __pyx_v_itemsize);
- for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_1; __pyx_t_8+=1) {
- __pyx_v_i = __pyx_t_8;
+ __pyx_t_8 = __pyx_t_1;
+ for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_8; __pyx_t_11+=1) {
+ __pyx_v_i = __pyx_t_11;
- /* "View.MemoryView":179
+ /* "View.MemoryView":180
* p = <PyObject **> self.data
* for i in range(self.len / itemsize):
* p[i] = Py_None # <<<<<<<<<<<<<<
@@ -34771,7 +36054,7 @@ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __
*/
(__pyx_v_p[__pyx_v_i]) = Py_None;
- /* "View.MemoryView":180
+ /* "View.MemoryView":181
* for i in range(self.len / itemsize):
* p[i] = Py_None
* Py_INCREF(Py_None) # <<<<<<<<<<<<<<
@@ -34781,7 +36064,7 @@ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __
Py_INCREF(Py_None);
}
- /* "View.MemoryView":176
+ /* "View.MemoryView":177
* raise MemoryError("unable to allocate array data.")
*
* if self.dtype_is_object: # <<<<<<<<<<<<<<
@@ -34790,7 +36073,7 @@ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __
*/
}
- /* "View.MemoryView":169
+ /* "View.MemoryView":170
* self.free_data = allocate_buffer
* self.dtype_is_object = format == b'O'
* if allocate_buffer: # <<<<<<<<<<<<<<
@@ -34799,7 +36082,7 @@ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __
*/
}
- /* "View.MemoryView":120
+ /* "View.MemoryView":121
* cdef bint dtype_is_object
*
* def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None, # <<<<<<<<<<<<<<
@@ -34823,7 +36106,7 @@ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __
return __pyx_r;
}
-/* "View.MemoryView":183
+/* "View.MemoryView":184
*
* @cname('getbuffer')
* def __getbuffer__(self, Py_buffer *info, int flags): # <<<<<<<<<<<<<<
@@ -34855,13 +36138,15 @@ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(stru
Py_ssize_t __pyx_t_5;
int __pyx_t_6;
Py_ssize_t *__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);
+ if (__pyx_v_info == NULL) {
+ PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete");
+ return -1;
}
+ __Pyx_RefNannySetupContext("__getbuffer__", 0);
+ __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
+ __Pyx_GIVEREF(__pyx_v_info->obj);
- /* "View.MemoryView":184
+ /* "View.MemoryView":185
* @cname('getbuffer')
* def __getbuffer__(self, Py_buffer *info, int flags):
* cdef int bufmode = -1 # <<<<<<<<<<<<<<
@@ -34870,18 +36155,18 @@ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(stru
*/
__pyx_v_bufmode = -1;
- /* "View.MemoryView":185
+ /* "View.MemoryView":186
* def __getbuffer__(self, Py_buffer *info, int flags):
* cdef int bufmode = -1
* if self.mode == u"c": # <<<<<<<<<<<<<<
* bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
* elif self.mode == u"fortran":
*/
- __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_self->mode, __pyx_n_u_c, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 185, __pyx_L1_error)
+ __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_self->mode, __pyx_n_u_c, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 186, __pyx_L1_error)
__pyx_t_2 = (__pyx_t_1 != 0);
if (__pyx_t_2) {
- /* "View.MemoryView":186
+ /* "View.MemoryView":187
* cdef int bufmode = -1
* if self.mode == u"c":
* bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS # <<<<<<<<<<<<<<
@@ -34890,7 +36175,7 @@ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(stru
*/
__pyx_v_bufmode = (PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS);
- /* "View.MemoryView":185
+ /* "View.MemoryView":186
* def __getbuffer__(self, Py_buffer *info, int flags):
* cdef int bufmode = -1
* if self.mode == u"c": # <<<<<<<<<<<<<<
@@ -34900,18 +36185,18 @@ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(stru
goto __pyx_L3;
}
- /* "View.MemoryView":187
+ /* "View.MemoryView":188
* if self.mode == u"c":
* bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
* elif self.mode == u"fortran": # <<<<<<<<<<<<<<
* bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
* if not (flags & bufmode):
*/
- __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_v_self->mode, __pyx_n_u_fortran, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(2, 187, __pyx_L1_error)
+ __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_v_self->mode, __pyx_n_u_fortran, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(2, 188, __pyx_L1_error)
__pyx_t_1 = (__pyx_t_2 != 0);
if (__pyx_t_1) {
- /* "View.MemoryView":188
+ /* "View.MemoryView":189
* bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
* elif self.mode == u"fortran":
* bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS # <<<<<<<<<<<<<<
@@ -34920,7 +36205,7 @@ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(stru
*/
__pyx_v_bufmode = (PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS);
- /* "View.MemoryView":187
+ /* "View.MemoryView":188
* if self.mode == u"c":
* bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
* elif self.mode == u"fortran": # <<<<<<<<<<<<<<
@@ -34930,7 +36215,7 @@ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(stru
}
__pyx_L3:;
- /* "View.MemoryView":189
+ /* "View.MemoryView":190
* elif self.mode == u"fortran":
* bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
* if not (flags & bufmode): # <<<<<<<<<<<<<<
@@ -34938,22 +36223,22 @@ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(stru
* info.buf = self.data
*/
__pyx_t_1 = ((!((__pyx_v_flags & __pyx_v_bufmode) != 0)) != 0);
- if (__pyx_t_1) {
+ if (unlikely(__pyx_t_1)) {
- /* "View.MemoryView":190
+ /* "View.MemoryView":191
* bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
* if not (flags & bufmode):
* raise ValueError("Can only create a buffer that is contiguous in memory.") # <<<<<<<<<<<<<<
* info.buf = self.data
* info.len = self.len
*/
- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__45, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 190, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__45, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 191, __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, 190, __pyx_L1_error)
+ __PYX_ERR(2, 191, __pyx_L1_error)
- /* "View.MemoryView":189
+ /* "View.MemoryView":190
* elif self.mode == u"fortran":
* bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
* if not (flags & bufmode): # <<<<<<<<<<<<<<
@@ -34962,7 +36247,7 @@ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(stru
*/
}
- /* "View.MemoryView":191
+ /* "View.MemoryView":192
* if not (flags & bufmode):
* raise ValueError("Can only create a buffer that is contiguous in memory.")
* info.buf = self.data # <<<<<<<<<<<<<<
@@ -34972,7 +36257,7 @@ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(stru
__pyx_t_4 = __pyx_v_self->data;
__pyx_v_info->buf = __pyx_t_4;
- /* "View.MemoryView":192
+ /* "View.MemoryView":193
* raise ValueError("Can only create a buffer that is contiguous in memory.")
* info.buf = self.data
* info.len = self.len # <<<<<<<<<<<<<<
@@ -34982,7 +36267,7 @@ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(stru
__pyx_t_5 = __pyx_v_self->len;
__pyx_v_info->len = __pyx_t_5;
- /* "View.MemoryView":193
+ /* "View.MemoryView":194
* info.buf = self.data
* info.len = self.len
* info.ndim = self.ndim # <<<<<<<<<<<<<<
@@ -34992,7 +36277,7 @@ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(stru
__pyx_t_6 = __pyx_v_self->ndim;
__pyx_v_info->ndim = __pyx_t_6;
- /* "View.MemoryView":194
+ /* "View.MemoryView":195
* info.len = self.len
* info.ndim = self.ndim
* info.shape = self._shape # <<<<<<<<<<<<<<
@@ -35002,7 +36287,7 @@ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(stru
__pyx_t_7 = __pyx_v_self->_shape;
__pyx_v_info->shape = __pyx_t_7;
- /* "View.MemoryView":195
+ /* "View.MemoryView":196
* info.ndim = self.ndim
* info.shape = self._shape
* info.strides = self._strides # <<<<<<<<<<<<<<
@@ -35012,7 +36297,7 @@ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(stru
__pyx_t_7 = __pyx_v_self->_strides;
__pyx_v_info->strides = __pyx_t_7;
- /* "View.MemoryView":196
+ /* "View.MemoryView":197
* info.shape = self._shape
* info.strides = self._strides
* info.suboffsets = NULL # <<<<<<<<<<<<<<
@@ -35021,7 +36306,7 @@ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(stru
*/
__pyx_v_info->suboffsets = NULL;
- /* "View.MemoryView":197
+ /* "View.MemoryView":198
* info.strides = self._strides
* info.suboffsets = NULL
* info.itemsize = self.itemsize # <<<<<<<<<<<<<<
@@ -35031,7 +36316,7 @@ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(stru
__pyx_t_5 = __pyx_v_self->itemsize;
__pyx_v_info->itemsize = __pyx_t_5;
- /* "View.MemoryView":198
+ /* "View.MemoryView":199
* info.suboffsets = NULL
* info.itemsize = self.itemsize
* info.readonly = 0 # <<<<<<<<<<<<<<
@@ -35040,7 +36325,7 @@ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(stru
*/
__pyx_v_info->readonly = 0;
- /* "View.MemoryView":200
+ /* "View.MemoryView":201
* info.readonly = 0
*
* if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<<
@@ -35050,7 +36335,7 @@ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(stru
__pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0);
if (__pyx_t_1) {
- /* "View.MemoryView":201
+ /* "View.MemoryView":202
*
* if flags & PyBUF_FORMAT:
* info.format = self.format # <<<<<<<<<<<<<<
@@ -35060,7 +36345,7 @@ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(stru
__pyx_t_4 = __pyx_v_self->format;
__pyx_v_info->format = __pyx_t_4;
- /* "View.MemoryView":200
+ /* "View.MemoryView":201
* info.readonly = 0
*
* if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<<
@@ -35070,7 +36355,7 @@ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(stru
goto __pyx_L5;
}
- /* "View.MemoryView":203
+ /* "View.MemoryView":204
* info.format = self.format
* else:
* info.format = NULL # <<<<<<<<<<<<<<
@@ -35082,7 +36367,7 @@ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(stru
}
__pyx_L5:;
- /* "View.MemoryView":205
+ /* "View.MemoryView":206
* info.format = NULL
*
* info.obj = self # <<<<<<<<<<<<<<
@@ -35095,7 +36380,7 @@ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(stru
__Pyx_DECREF(__pyx_v_info->obj);
__pyx_v_info->obj = ((PyObject *)__pyx_v_self);
- /* "View.MemoryView":183
+ /* "View.MemoryView":184
*
* @cname('getbuffer')
* def __getbuffer__(self, Py_buffer *info, int flags): # <<<<<<<<<<<<<<
@@ -35110,22 +36395,22 @@ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(stru
__Pyx_XDECREF(__pyx_t_3);
__Pyx_AddTraceback("View.MemoryView.array.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
- if (__pyx_v_info != NULL && __pyx_v_info->obj != NULL) {
+ if (__pyx_v_info->obj != NULL) {
__Pyx_GOTREF(__pyx_v_info->obj);
- __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = NULL;
+ __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
}
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;
+ if (__pyx_v_info->obj == Py_None) {
+ __Pyx_GOTREF(__pyx_v_info->obj);
+ __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
}
__pyx_L2:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "View.MemoryView":209
+/* "View.MemoryView":210
* __pyx_getbuffer = capsule(<void *> &__pyx_array_getbuffer, "getbuffer(obj, view, flags)")
*
* def __dealloc__(array self): # <<<<<<<<<<<<<<
@@ -35149,7 +36434,7 @@ static void __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(struc
int __pyx_t_1;
__Pyx_RefNannySetupContext("__dealloc__", 0);
- /* "View.MemoryView":210
+ /* "View.MemoryView":211
*
* def __dealloc__(array self):
* if self.callback_free_data != NULL: # <<<<<<<<<<<<<<
@@ -35159,7 +36444,7 @@ static void __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(struc
__pyx_t_1 = ((__pyx_v_self->callback_free_data != NULL) != 0);
if (__pyx_t_1) {
- /* "View.MemoryView":211
+ /* "View.MemoryView":212
* def __dealloc__(array self):
* if self.callback_free_data != NULL:
* self.callback_free_data(self.data) # <<<<<<<<<<<<<<
@@ -35168,7 +36453,7 @@ static void __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(struc
*/
__pyx_v_self->callback_free_data(__pyx_v_self->data);
- /* "View.MemoryView":210
+ /* "View.MemoryView":211
*
* def __dealloc__(array self):
* if self.callback_free_data != NULL: # <<<<<<<<<<<<<<
@@ -35178,7 +36463,7 @@ static void __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(struc
goto __pyx_L3;
}
- /* "View.MemoryView":212
+ /* "View.MemoryView":213
* if self.callback_free_data != NULL:
* self.callback_free_data(self.data)
* elif self.free_data: # <<<<<<<<<<<<<<
@@ -35188,7 +36473,7 @@ static void __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(struc
__pyx_t_1 = (__pyx_v_self->free_data != 0);
if (__pyx_t_1) {
- /* "View.MemoryView":213
+ /* "View.MemoryView":214
* self.callback_free_data(self.data)
* elif self.free_data:
* if self.dtype_is_object: # <<<<<<<<<<<<<<
@@ -35198,7 +36483,7 @@ static void __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(struc
__pyx_t_1 = (__pyx_v_self->dtype_is_object != 0);
if (__pyx_t_1) {
- /* "View.MemoryView":214
+ /* "View.MemoryView":215
* elif self.free_data:
* if self.dtype_is_object:
* refcount_objects_in_slice(self.data, self._shape, # <<<<<<<<<<<<<<
@@ -35207,7 +36492,7 @@ static void __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(struc
*/
__pyx_memoryview_refcount_objects_in_slice(__pyx_v_self->data, __pyx_v_self->_shape, __pyx_v_self->_strides, __pyx_v_self->ndim, 0);
- /* "View.MemoryView":213
+ /* "View.MemoryView":214
* self.callback_free_data(self.data)
* elif self.free_data:
* if self.dtype_is_object: # <<<<<<<<<<<<<<
@@ -35216,7 +36501,7 @@ static void __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(struc
*/
}
- /* "View.MemoryView":216
+ /* "View.MemoryView":217
* refcount_objects_in_slice(self.data, self._shape,
* self._strides, self.ndim, False)
* free(self.data) # <<<<<<<<<<<<<<
@@ -35225,7 +36510,7 @@ static void __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(struc
*/
free(__pyx_v_self->data);
- /* "View.MemoryView":212
+ /* "View.MemoryView":213
* if self.callback_free_data != NULL:
* self.callback_free_data(self.data)
* elif self.free_data: # <<<<<<<<<<<<<<
@@ -35235,7 +36520,7 @@ static void __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(struc
}
__pyx_L3:;
- /* "View.MemoryView":217
+ /* "View.MemoryView":218
* self._strides, self.ndim, False)
* free(self.data)
* PyObject_Free(self._shape) # <<<<<<<<<<<<<<
@@ -35244,7 +36529,7 @@ static void __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(struc
*/
PyObject_Free(__pyx_v_self->_shape);
- /* "View.MemoryView":209
+ /* "View.MemoryView":210
* __pyx_getbuffer = capsule(<void *> &__pyx_array_getbuffer, "getbuffer(obj, view, flags)")
*
* def __dealloc__(array self): # <<<<<<<<<<<<<<
@@ -35256,7 +36541,7 @@ static void __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(struc
__Pyx_RefNannyFinishContext();
}
-/* "View.MemoryView":220
+/* "View.MemoryView":221
*
* @property
* def memview(self): # <<<<<<<<<<<<<<
@@ -35283,7 +36568,7 @@ static PyObject *__pyx_pf_15View_dot_MemoryView_5array_7memview___get__(struct _
PyObject *__pyx_t_1 = NULL;
__Pyx_RefNannySetupContext("__get__", 0);
- /* "View.MemoryView":221
+ /* "View.MemoryView":222
* @property
* def memview(self):
* return self.get_memview() # <<<<<<<<<<<<<<
@@ -35291,13 +36576,13 @@ static PyObject *__pyx_pf_15View_dot_MemoryView_5array_7memview___get__(struct _
* @cname('get_memview')
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = ((struct __pyx_vtabstruct_array *)__pyx_v_self->__pyx_vtab)->get_memview(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 221, __pyx_L1_error)
+ __pyx_t_1 = ((struct __pyx_vtabstruct_array *)__pyx_v_self->__pyx_vtab)->get_memview(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 222, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "View.MemoryView":220
+ /* "View.MemoryView":221
*
* @property
* def memview(self): # <<<<<<<<<<<<<<
@@ -35316,7 +36601,7 @@ static PyObject *__pyx_pf_15View_dot_MemoryView_5array_7memview___get__(struct _
return __pyx_r;
}
-/* "View.MemoryView":224
+/* "View.MemoryView":225
*
* @cname('get_memview')
* cdef get_memview(self): # <<<<<<<<<<<<<<
@@ -35333,7 +36618,7 @@ static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *__pyx_v_self) {
PyObject *__pyx_t_3 = NULL;
__Pyx_RefNannySetupContext("get_memview", 0);
- /* "View.MemoryView":225
+ /* "View.MemoryView":226
* @cname('get_memview')
* cdef get_memview(self):
* flags = PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE # <<<<<<<<<<<<<<
@@ -35342,19 +36627,19 @@ static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *__pyx_v_self) {
*/
__pyx_v_flags = ((PyBUF_ANY_CONTIGUOUS | PyBUF_FORMAT) | PyBUF_WRITABLE);
- /* "View.MemoryView":226
+ /* "View.MemoryView":227
* cdef get_memview(self):
* flags = PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE
* return memoryview(self, flags, self.dtype_is_object) # <<<<<<<<<<<<<<
*
- *
+ * def __len__(self):
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 226, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 227, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 226, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 227, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 226, __pyx_L1_error)
+ __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 227, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_INCREF(((PyObject *)__pyx_v_self));
__Pyx_GIVEREF(((PyObject *)__pyx_v_self));
@@ -35365,14 +36650,14 @@ static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *__pyx_v_self) {
PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2);
__pyx_t_1 = 0;
__pyx_t_2 = 0;
- __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryview_type), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 226, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryview_type), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 227, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
goto __pyx_L0;
- /* "View.MemoryView":224
+ /* "View.MemoryView":225
*
* @cname('get_memview')
* cdef get_memview(self): # <<<<<<<<<<<<<<
@@ -35394,7 +36679,57 @@ static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *__pyx_v_self) {
}
/* "View.MemoryView":229
+ * return memoryview(self, flags, self.dtype_is_object)
*
+ * def __len__(self): # <<<<<<<<<<<<<<
+ * return self._shape[0]
+ *
+ */
+
+/* Python wrapper */
+static Py_ssize_t __pyx_array___len__(PyObject *__pyx_v_self); /*proto*/
+static Py_ssize_t __pyx_array___len__(PyObject *__pyx_v_self) {
+ Py_ssize_t __pyx_r;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
+ __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(((struct __pyx_array_obj *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static Py_ssize_t __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(struct __pyx_array_obj *__pyx_v_self) {
+ Py_ssize_t __pyx_r;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__len__", 0);
+
+ /* "View.MemoryView":230
+ *
+ * def __len__(self):
+ * return self._shape[0] # <<<<<<<<<<<<<<
+ *
+ * def __getattr__(self, attr):
+ */
+ __pyx_r = (__pyx_v_self->_shape[0]);
+ goto __pyx_L0;
+
+ /* "View.MemoryView":229
+ * return memoryview(self, flags, self.dtype_is_object)
+ *
+ * def __len__(self): # <<<<<<<<<<<<<<
+ * return self._shape[0]
+ *
+ */
+
+ /* function exit code */
+ __pyx_L0:;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "View.MemoryView":232
+ * return self._shape[0]
*
* def __getattr__(self, attr): # <<<<<<<<<<<<<<
* return getattr(self.memview, attr)
@@ -35407,21 +36742,21 @@ static PyObject *__pyx_array___getattr__(PyObject *__pyx_v_self, PyObject *__pyx
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__getattr__ (wrapper)", 0);
- __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__getattr__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_attr));
+ __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_attr));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__getattr__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_attr) {
+static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_attr) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
PyObject *__pyx_t_2 = NULL;
__Pyx_RefNannySetupContext("__getattr__", 0);
- /* "View.MemoryView":230
+ /* "View.MemoryView":233
*
* def __getattr__(self, attr):
* return getattr(self.memview, attr) # <<<<<<<<<<<<<<
@@ -35429,17 +36764,17 @@ static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__getattr__(
* def __getitem__(self, item):
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 230, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 233, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_GetAttr(__pyx_t_1, __pyx_v_attr); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 230, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_GetAttr(__pyx_t_1, __pyx_v_attr); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 233, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
goto __pyx_L0;
- /* "View.MemoryView":229
- *
+ /* "View.MemoryView":232
+ * return self._shape[0]
*
* def __getattr__(self, attr): # <<<<<<<<<<<<<<
* return getattr(self.memview, attr)
@@ -35458,7 +36793,7 @@ static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__getattr__(
return __pyx_r;
}
-/* "View.MemoryView":232
+/* "View.MemoryView":235
* return getattr(self.memview, attr)
*
* def __getitem__(self, item): # <<<<<<<<<<<<<<
@@ -35472,21 +36807,21 @@ static PyObject *__pyx_array___getitem__(PyObject *__pyx_v_self, PyObject *__pyx
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
- __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getitem__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_item));
+ __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_item));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item) {
+static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
PyObject *__pyx_t_2 = NULL;
__Pyx_RefNannySetupContext("__getitem__", 0);
- /* "View.MemoryView":233
+ /* "View.MemoryView":236
*
* def __getitem__(self, item):
* return self.memview[item] # <<<<<<<<<<<<<<
@@ -35494,16 +36829,16 @@ static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getitem__(
* def __setitem__(self, item, value):
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 233, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 236, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_v_item); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 233, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_item); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 236, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
goto __pyx_L0;
- /* "View.MemoryView":232
+ /* "View.MemoryView":235
* return getattr(self.memview, attr)
*
* def __getitem__(self, item): # <<<<<<<<<<<<<<
@@ -35523,7 +36858,7 @@ static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getitem__(
return __pyx_r;
}
-/* "View.MemoryView":235
+/* "View.MemoryView":238
* return self.memview[item]
*
* def __setitem__(self, item, value): # <<<<<<<<<<<<<<
@@ -35537,32 +36872,32 @@ static int __pyx_array___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_ite
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
- __pyx_r = __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));
+ __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_12__setitem__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_item), ((PyObject *)__pyx_v_value));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-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) {
+static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_12__setitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value) {
int __pyx_r;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
__Pyx_RefNannySetupContext("__setitem__", 0);
- /* "View.MemoryView":236
+ /* "View.MemoryView":239
*
* def __setitem__(self, item, value):
* self.memview[item] = value # <<<<<<<<<<<<<<
*
*
*/
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 236, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 239, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_v_item, __pyx_v_value) < 0)) __PYX_ERR(2, 236, __pyx_L1_error)
+ if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_v_item, __pyx_v_value) < 0)) __PYX_ERR(2, 239, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "View.MemoryView":235
+ /* "View.MemoryView":238
* return self.memview[item]
*
* def __setitem__(self, item, value): # <<<<<<<<<<<<<<
@@ -35582,7 +36917,114 @@ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__setitem__(struc
return __pyx_r;
}
-/* "View.MemoryView":240
+/* "(tree fragment)":1
+ * def __reduce_cython__(self): # <<<<<<<<<<<<<<
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ * def __setstate_cython__(self, __pyx_state):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw___pyx_array_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw___pyx_array_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
+ __pyx_r = __pyx_pf___pyx_array___reduce_cython__(((struct __pyx_array_obj *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf___pyx_array___reduce_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("__reduce_cython__", 0);
+
+ /* "(tree fragment)":2
+ * def __reduce_cython__(self):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
+ * def __setstate_cython__(self, __pyx_state):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ */
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__46, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __PYX_ERR(2, 2, __pyx_L1_error)
+
+ /* "(tree fragment)":1
+ * def __reduce_cython__(self): # <<<<<<<<<<<<<<
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ * def __setstate_cython__(self, __pyx_state):
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("View.MemoryView.array.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "(tree fragment)":3
+ * def __reduce_cython__(self):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw___pyx_array_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
+static PyObject *__pyx_pw___pyx_array_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
+ __pyx_r = __pyx_pf___pyx_array_2__setstate_cython__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf___pyx_array_2__setstate_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("__setstate_cython__", 0);
+
+ /* "(tree fragment)":4
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ * def __setstate_cython__(self, __pyx_state):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
+ */
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__47, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __PYX_ERR(2, 4, __pyx_L1_error)
+
+ /* "(tree fragment)":3
+ * def __reduce_cython__(self):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("View.MemoryView.array.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "View.MemoryView":243
*
* @cname("__pyx_array_new")
* cdef array array_cwrapper(tuple shape, Py_ssize_t itemsize, char *format, # <<<<<<<<<<<<<<
@@ -35601,7 +37043,7 @@ static struct __pyx_array_obj *__pyx_array_new(PyObject *__pyx_v_shape, Py_ssize
PyObject *__pyx_t_5 = NULL;
__Pyx_RefNannySetupContext("array_cwrapper", 0);
- /* "View.MemoryView":244
+ /* "View.MemoryView":247
* cdef array result
*
* if buf == NULL: # <<<<<<<<<<<<<<
@@ -35611,20 +37053,20 @@ static struct __pyx_array_obj *__pyx_array_new(PyObject *__pyx_v_shape, Py_ssize
__pyx_t_1 = ((__pyx_v_buf == NULL) != 0);
if (__pyx_t_1) {
- /* "View.MemoryView":245
+ /* "View.MemoryView":248
*
* if buf == NULL:
* result = array(shape, itemsize, format, mode.decode('ASCII')) # <<<<<<<<<<<<<<
* else:
* result = array(shape, itemsize, format, mode.decode('ASCII'),
*/
- __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_itemsize); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 245, __pyx_L1_error)
+ __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_itemsize); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 248, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 245, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 248, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = __Pyx_decode_c_string(__pyx_v_mode, 0, strlen(__pyx_v_mode), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 245, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_decode_c_string(__pyx_v_mode, 0, strlen(__pyx_v_mode), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 248, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 245, __pyx_L1_error)
+ __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 248, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_INCREF(__pyx_v_shape);
__Pyx_GIVEREF(__pyx_v_shape);
@@ -35638,13 +37080,13 @@ static struct __pyx_array_obj *__pyx_array_new(PyObject *__pyx_v_shape, Py_ssize
__pyx_t_2 = 0;
__pyx_t_3 = 0;
__pyx_t_4 = 0;
- __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_array_type), __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 245, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_array_type), __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 248, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__pyx_v_result = ((struct __pyx_array_obj *)__pyx_t_4);
__pyx_t_4 = 0;
- /* "View.MemoryView":244
+ /* "View.MemoryView":247
* cdef array result
*
* if buf == NULL: # <<<<<<<<<<<<<<
@@ -35654,7 +37096,7 @@ static struct __pyx_array_obj *__pyx_array_new(PyObject *__pyx_v_shape, Py_ssize
goto __pyx_L3;
}
- /* "View.MemoryView":247
+ /* "View.MemoryView":250
* result = array(shape, itemsize, format, mode.decode('ASCII'))
* else:
* result = array(shape, itemsize, format, mode.decode('ASCII'), # <<<<<<<<<<<<<<
@@ -35662,13 +37104,13 @@ static struct __pyx_array_obj *__pyx_array_new(PyObject *__pyx_v_shape, Py_ssize
* result.data = buf
*/
/*else*/ {
- __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_itemsize); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 247, __pyx_L1_error)
+ __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_itemsize); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 250, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = __Pyx_PyBytes_FromString(__pyx_v_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 247, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyBytes_FromString(__pyx_v_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 250, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_3 = __Pyx_decode_c_string(__pyx_v_mode, 0, strlen(__pyx_v_mode), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 247, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_decode_c_string(__pyx_v_mode, 0, strlen(__pyx_v_mode), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 250, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 247, __pyx_L1_error)
+ __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 250, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(__pyx_v_shape);
__Pyx_GIVEREF(__pyx_v_shape);
@@ -35683,32 +37125,32 @@ static struct __pyx_array_obj *__pyx_array_new(PyObject *__pyx_v_shape, Py_ssize
__pyx_t_5 = 0;
__pyx_t_3 = 0;
- /* "View.MemoryView":248
+ /* "View.MemoryView":251
* else:
* result = array(shape, itemsize, format, mode.decode('ASCII'),
* allocate_buffer=False) # <<<<<<<<<<<<<<
* result.data = buf
*
*/
- __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 248, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 251, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_allocate_buffer, Py_False) < 0) __PYX_ERR(2, 248, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_allocate_buffer, Py_False) < 0) __PYX_ERR(2, 251, __pyx_L1_error)
- /* "View.MemoryView":247
+ /* "View.MemoryView":250
* result = array(shape, itemsize, format, mode.decode('ASCII'))
* else:
* result = array(shape, itemsize, format, mode.decode('ASCII'), # <<<<<<<<<<<<<<
* allocate_buffer=False)
* result.data = buf
*/
- __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_array_type), __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 247, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_array_type), __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 250, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_v_result = ((struct __pyx_array_obj *)__pyx_t_5);
__pyx_t_5 = 0;
- /* "View.MemoryView":249
+ /* "View.MemoryView":252
* result = array(shape, itemsize, format, mode.decode('ASCII'),
* allocate_buffer=False)
* result.data = buf # <<<<<<<<<<<<<<
@@ -35719,7 +37161,7 @@ static struct __pyx_array_obj *__pyx_array_new(PyObject *__pyx_v_shape, Py_ssize
}
__pyx_L3:;
- /* "View.MemoryView":251
+ /* "View.MemoryView":254
* result.data = buf
*
* return result # <<<<<<<<<<<<<<
@@ -35731,7 +37173,7 @@ static struct __pyx_array_obj *__pyx_array_new(PyObject *__pyx_v_shape, Py_ssize
__pyx_r = __pyx_v_result;
goto __pyx_L0;
- /* "View.MemoryView":240
+ /* "View.MemoryView":243
*
* @cname("__pyx_array_new")
* cdef array array_cwrapper(tuple shape, Py_ssize_t itemsize, char *format, # <<<<<<<<<<<<<<
@@ -35754,7 +37196,7 @@ static struct __pyx_array_obj *__pyx_array_new(PyObject *__pyx_v_shape, Py_ssize
return __pyx_r;
}
-/* "View.MemoryView":277
+/* "View.MemoryView":280
* cdef class Enum(object):
* cdef object name
* def __init__(self, name): # <<<<<<<<<<<<<<
@@ -35777,17 +37219,18 @@ static int __pyx_MemviewEnum___init__(PyObject *__pyx_v_self, PyObject *__pyx_ar
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
switch (pos_args) {
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
case 0: break;
default: goto __pyx_L5_argtuple_error;
}
kw_args = PyDict_Size(__pyx_kwds);
switch (pos_args) {
case 0:
- if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--;
+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(2, 277, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(2, 280, __pyx_L3_error)
}
} else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
goto __pyx_L5_argtuple_error;
@@ -35798,7 +37241,7 @@ static int __pyx_MemviewEnum___init__(PyObject *__pyx_v_self, PyObject *__pyx_ar
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 277, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 280, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("View.MemoryView.Enum.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
@@ -35816,7 +37259,7 @@ static int __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(struc
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__init__", 0);
- /* "View.MemoryView":278
+ /* "View.MemoryView":281
* cdef object name
* def __init__(self, name):
* self.name = name # <<<<<<<<<<<<<<
@@ -35829,7 +37272,7 @@ static int __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(struc
__Pyx_DECREF(__pyx_v_self->name);
__pyx_v_self->name = __pyx_v_name;
- /* "View.MemoryView":277
+ /* "View.MemoryView":280
* cdef class Enum(object):
* cdef object name
* def __init__(self, name): # <<<<<<<<<<<<<<
@@ -35843,7 +37286,7 @@ static int __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(struc
return __pyx_r;
}
-/* "View.MemoryView":279
+/* "View.MemoryView":282
* def __init__(self, name):
* self.name = name
* def __repr__(self): # <<<<<<<<<<<<<<
@@ -35869,7 +37312,7 @@ static PyObject *__pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr_
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__repr__", 0);
- /* "View.MemoryView":280
+ /* "View.MemoryView":283
* self.name = name
* def __repr__(self):
* return self.name # <<<<<<<<<<<<<<
@@ -35881,7 +37324,7 @@ static PyObject *__pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr_
__pyx_r = __pyx_v_self->name;
goto __pyx_L0;
- /* "View.MemoryView":279
+ /* "View.MemoryView":282
* def __init__(self, name):
* self.name = name
* def __repr__(self): # <<<<<<<<<<<<<<
@@ -35896,7 +37339,294 @@ static PyObject *__pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr_
return __pyx_r;
}
-/* "View.MemoryView":294
+/* "(tree fragment)":1
+ * def __reduce_cython__(self): # <<<<<<<<<<<<<<
+ * cdef bint use_setstate
+ * state = (self.name,)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw___pyx_MemviewEnum_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw___pyx_MemviewEnum_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
+ __pyx_r = __pyx_pf___pyx_MemviewEnum___reduce_cython__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf___pyx_MemviewEnum___reduce_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self) {
+ int __pyx_v_use_setstate;
+ PyObject *__pyx_v_state = NULL;
+ PyObject *__pyx_v__dict = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ int __pyx_t_2;
+ int __pyx_t_3;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ __Pyx_RefNannySetupContext("__reduce_cython__", 0);
+
+ /* "(tree fragment)":3
+ * def __reduce_cython__(self):
+ * cdef bint use_setstate
+ * state = (self.name,) # <<<<<<<<<<<<<<
+ * _dict = getattr(self, '__dict__', None)
+ * if _dict is not None:
+ */
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 3, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_v_self->name);
+ __Pyx_GIVEREF(__pyx_v_self->name);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->name);
+ __pyx_v_state = ((PyObject*)__pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "(tree fragment)":4
+ * cdef bint use_setstate
+ * state = (self.name,)
+ * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
+ * if _dict is not None:
+ * state += (_dict,)
+ */
+ __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_v__dict = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "(tree fragment)":5
+ * state = (self.name,)
+ * _dict = getattr(self, '__dict__', None)
+ * if _dict is not None: # <<<<<<<<<<<<<<
+ * state += (_dict,)
+ * use_setstate = True
+ */
+ __pyx_t_2 = (__pyx_v__dict != Py_None);
+ __pyx_t_3 = (__pyx_t_2 != 0);
+ if (__pyx_t_3) {
+
+ /* "(tree fragment)":6
+ * _dict = getattr(self, '__dict__', None)
+ * if _dict is not None:
+ * state += (_dict,) # <<<<<<<<<<<<<<
+ * use_setstate = True
+ * else:
+ */
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 6, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_v__dict);
+ __Pyx_GIVEREF(__pyx_v__dict);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
+ __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 6, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
+ __pyx_t_4 = 0;
+
+ /* "(tree fragment)":7
+ * if _dict is not None:
+ * state += (_dict,)
+ * use_setstate = True # <<<<<<<<<<<<<<
+ * else:
+ * use_setstate = self.name is not None
+ */
+ __pyx_v_use_setstate = 1;
+
+ /* "(tree fragment)":5
+ * state = (self.name,)
+ * _dict = getattr(self, '__dict__', None)
+ * if _dict is not None: # <<<<<<<<<<<<<<
+ * state += (_dict,)
+ * use_setstate = True
+ */
+ goto __pyx_L3;
+ }
+
+ /* "(tree fragment)":9
+ * use_setstate = True
+ * else:
+ * use_setstate = self.name is not None # <<<<<<<<<<<<<<
+ * if use_setstate:
+ * return __pyx_unpickle_Enum, (type(self), 0xb068931, None), state
+ */
+ /*else*/ {
+ __pyx_t_3 = (__pyx_v_self->name != Py_None);
+ __pyx_v_use_setstate = __pyx_t_3;
+ }
+ __pyx_L3:;
+
+ /* "(tree fragment)":10
+ * else:
+ * use_setstate = self.name is not None
+ * if use_setstate: # <<<<<<<<<<<<<<
+ * return __pyx_unpickle_Enum, (type(self), 0xb068931, None), state
+ * else:
+ */
+ __pyx_t_3 = (__pyx_v_use_setstate != 0);
+ if (__pyx_t_3) {
+
+ /* "(tree fragment)":11
+ * use_setstate = self.name is not None
+ * if use_setstate:
+ * return __pyx_unpickle_Enum, (type(self), 0xb068931, None), state # <<<<<<<<<<<<<<
+ * else:
+ * return __pyx_unpickle_Enum, (type(self), 0xb068931, state)
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyx_unpickle_Enum); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 11, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 11, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
+ __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
+ PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
+ __Pyx_INCREF(__pyx_int_184977713);
+ __Pyx_GIVEREF(__pyx_int_184977713);
+ PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_184977713);
+ __Pyx_INCREF(Py_None);
+ __Pyx_GIVEREF(Py_None);
+ PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
+ __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 11, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1);
+ __Pyx_INCREF(__pyx_v_state);
+ __Pyx_GIVEREF(__pyx_v_state);
+ PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
+ __pyx_t_4 = 0;
+ __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_5;
+ __pyx_t_5 = 0;
+ goto __pyx_L0;
+
+ /* "(tree fragment)":10
+ * else:
+ * use_setstate = self.name is not None
+ * if use_setstate: # <<<<<<<<<<<<<<
+ * return __pyx_unpickle_Enum, (type(self), 0xb068931, None), state
+ * else:
+ */
+ }
+
+ /* "(tree fragment)":13
+ * return __pyx_unpickle_Enum, (type(self), 0xb068931, None), state
+ * else:
+ * return __pyx_unpickle_Enum, (type(self), 0xb068931, state) # <<<<<<<<<<<<<<
+ * def __setstate_cython__(self, __pyx_state):
+ * __pyx_unpickle_Enum__set_state(self, __pyx_state)
+ */
+ /*else*/ {
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyx_unpickle_Enum); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 13, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
+ __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
+ PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
+ __Pyx_INCREF(__pyx_int_184977713);
+ __Pyx_GIVEREF(__pyx_int_184977713);
+ PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_184977713);
+ __Pyx_INCREF(__pyx_v_state);
+ __Pyx_GIVEREF(__pyx_v_state);
+ PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
+ __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 13, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
+ __pyx_t_5 = 0;
+ __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_4;
+ __pyx_t_4 = 0;
+ goto __pyx_L0;
+ }
+
+ /* "(tree fragment)":1
+ * def __reduce_cython__(self): # <<<<<<<<<<<<<<
+ * cdef bint use_setstate
+ * state = (self.name,)
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_AddTraceback("View.MemoryView.Enum.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_state);
+ __Pyx_XDECREF(__pyx_v__dict);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "(tree fragment)":14
+ * else:
+ * return __pyx_unpickle_Enum, (type(self), 0xb068931, state)
+ * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
+ * __pyx_unpickle_Enum__set_state(self, __pyx_state)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw___pyx_MemviewEnum_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
+static PyObject *__pyx_pw___pyx_MemviewEnum_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
+ __pyx_r = __pyx_pf___pyx_MemviewEnum_2__setstate_cython__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf___pyx_MemviewEnum_2__setstate_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("__setstate_cython__", 0);
+
+ /* "(tree fragment)":15
+ * return __pyx_unpickle_Enum, (type(self), 0xb068931, state)
+ * def __setstate_cython__(self, __pyx_state):
+ * __pyx_unpickle_Enum__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
+ */
+ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 15, __pyx_L1_error)
+ __pyx_t_1 = __pyx_unpickle_Enum__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "(tree fragment)":14
+ * else:
+ * return __pyx_unpickle_Enum, (type(self), 0xb068931, state)
+ * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
+ * __pyx_unpickle_Enum__set_state(self, __pyx_state)
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("View.MemoryView.Enum.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "View.MemoryView":297
*
* @cname('__pyx_align_pointer')
* cdef void *align_pointer(void *memory, size_t alignment) nogil: # <<<<<<<<<<<<<<
@@ -35910,7 +37640,7 @@ static void *__pyx_align_pointer(void *__pyx_v_memory, size_t __pyx_v_alignment)
void *__pyx_r;
int __pyx_t_1;
- /* "View.MemoryView":296
+ /* "View.MemoryView":299
* cdef void *align_pointer(void *memory, size_t alignment) nogil:
* "Align pointer memory on a given boundary"
* cdef Py_intptr_t aligned_p = <Py_intptr_t> memory # <<<<<<<<<<<<<<
@@ -35919,7 +37649,7 @@ static void *__pyx_align_pointer(void *__pyx_v_memory, size_t __pyx_v_alignment)
*/
__pyx_v_aligned_p = ((Py_intptr_t)__pyx_v_memory);
- /* "View.MemoryView":300
+ /* "View.MemoryView":303
*
* with cython.cdivision(True):
* offset = aligned_p % alignment # <<<<<<<<<<<<<<
@@ -35928,7 +37658,7 @@ static void *__pyx_align_pointer(void *__pyx_v_memory, size_t __pyx_v_alignment)
*/
__pyx_v_offset = (__pyx_v_aligned_p % __pyx_v_alignment);
- /* "View.MemoryView":302
+ /* "View.MemoryView":305
* offset = aligned_p % alignment
*
* if offset > 0: # <<<<<<<<<<<<<<
@@ -35938,7 +37668,7 @@ static void *__pyx_align_pointer(void *__pyx_v_memory, size_t __pyx_v_alignment)
__pyx_t_1 = ((__pyx_v_offset > 0) != 0);
if (__pyx_t_1) {
- /* "View.MemoryView":303
+ /* "View.MemoryView":306
*
* if offset > 0:
* aligned_p += alignment - offset # <<<<<<<<<<<<<<
@@ -35947,7 +37677,7 @@ static void *__pyx_align_pointer(void *__pyx_v_memory, size_t __pyx_v_alignment)
*/
__pyx_v_aligned_p = (__pyx_v_aligned_p + (__pyx_v_alignment - __pyx_v_offset));
- /* "View.MemoryView":302
+ /* "View.MemoryView":305
* offset = aligned_p % alignment
*
* if offset > 0: # <<<<<<<<<<<<<<
@@ -35956,7 +37686,7 @@ static void *__pyx_align_pointer(void *__pyx_v_memory, size_t __pyx_v_alignment)
*/
}
- /* "View.MemoryView":305
+ /* "View.MemoryView":308
* aligned_p += alignment - offset
*
* return <void *> aligned_p # <<<<<<<<<<<<<<
@@ -35966,7 +37696,7 @@ static void *__pyx_align_pointer(void *__pyx_v_memory, size_t __pyx_v_alignment)
__pyx_r = ((void *)__pyx_v_aligned_p);
goto __pyx_L0;
- /* "View.MemoryView":294
+ /* "View.MemoryView":297
*
* @cname('__pyx_align_pointer')
* cdef void *align_pointer(void *memory, size_t alignment) nogil: # <<<<<<<<<<<<<<
@@ -35979,7 +37709,7 @@ static void *__pyx_align_pointer(void *__pyx_v_memory, size_t __pyx_v_alignment)
return __pyx_r;
}
-/* "View.MemoryView":341
+/* "View.MemoryView":344
* cdef __Pyx_TypeInfo *typeinfo
*
* def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False): # <<<<<<<<<<<<<<
@@ -36004,33 +37734,39 @@ static int __pyx_memoryview___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_ar
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
switch (pos_args) {
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
case 0: break;
default: goto __pyx_L5_argtuple_error;
}
kw_args = PyDict_Size(__pyx_kwds);
switch (pos_args) {
case 0:
- if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
case 1:
- if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_flags)) != 0)) kw_args--;
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_flags)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, 1); __PYX_ERR(2, 341, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, 1); __PYX_ERR(2, 344, __pyx_L3_error)
}
+ CYTHON_FALLTHROUGH;
case 2:
if (kw_args > 0) {
- PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dtype_is_object);
+ PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dtype_is_object);
if (value) { values[2] = 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, 341, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(2, 344, __pyx_L3_error)
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
break;
@@ -36038,16 +37774,16 @@ static int __pyx_memoryview___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_ar
}
}
__pyx_v_obj = values[0];
- __pyx_v_flags = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_flags == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 341, __pyx_L3_error)
+ __pyx_v_flags = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_flags == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 344, __pyx_L3_error)
if (values[2]) {
- __pyx_v_dtype_is_object = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_dtype_is_object == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 341, __pyx_L3_error)
+ __pyx_v_dtype_is_object = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_dtype_is_object == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 344, __pyx_L3_error)
} else {
__pyx_v_dtype_is_object = ((int)0);
}
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 341, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 344, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("View.MemoryView.memoryview.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
@@ -36069,7 +37805,7 @@ static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit_
int __pyx_t_4;
__Pyx_RefNannySetupContext("__cinit__", 0);
- /* "View.MemoryView":342
+ /* "View.MemoryView":345
*
* def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False):
* self.obj = obj # <<<<<<<<<<<<<<
@@ -36082,7 +37818,7 @@ static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit_
__Pyx_DECREF(__pyx_v_self->obj);
__pyx_v_self->obj = __pyx_v_obj;
- /* "View.MemoryView":343
+ /* "View.MemoryView":346
* def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False):
* self.obj = obj
* self.flags = flags # <<<<<<<<<<<<<<
@@ -36091,7 +37827,7 @@ static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit_
*/
__pyx_v_self->flags = __pyx_v_flags;
- /* "View.MemoryView":344
+ /* "View.MemoryView":347
* self.obj = obj
* self.flags = flags
* if type(self) is memoryview or obj is not None: # <<<<<<<<<<<<<<
@@ -36111,16 +37847,16 @@ static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit_
__pyx_L4_bool_binop_done:;
if (__pyx_t_1) {
- /* "View.MemoryView":345
+ /* "View.MemoryView":348
* self.flags = flags
* if type(self) is memoryview or obj is not None:
* __Pyx_GetBuffer(obj, &self.view, flags) # <<<<<<<<<<<<<<
* if <PyObject *> self.view.obj == NULL:
* (<__pyx_buffer *> &self.view).obj = Py_None
*/
- __pyx_t_4 = __Pyx_GetBuffer(__pyx_v_obj, (&__pyx_v_self->view), __pyx_v_flags); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(2, 345, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_GetBuffer(__pyx_v_obj, (&__pyx_v_self->view), __pyx_v_flags); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 348, __pyx_L1_error)
- /* "View.MemoryView":346
+ /* "View.MemoryView":349
* if type(self) is memoryview or obj is not None:
* __Pyx_GetBuffer(obj, &self.view, flags)
* if <PyObject *> self.view.obj == NULL: # <<<<<<<<<<<<<<
@@ -36130,7 +37866,7 @@ static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit_
__pyx_t_1 = ((((PyObject *)__pyx_v_self->view.obj) == NULL) != 0);
if (__pyx_t_1) {
- /* "View.MemoryView":347
+ /* "View.MemoryView":350
* __Pyx_GetBuffer(obj, &self.view, flags)
* if <PyObject *> self.view.obj == NULL:
* (<__pyx_buffer *> &self.view).obj = Py_None # <<<<<<<<<<<<<<
@@ -36139,7 +37875,7 @@ static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit_
*/
((Py_buffer *)(&__pyx_v_self->view))->obj = Py_None;
- /* "View.MemoryView":348
+ /* "View.MemoryView":351
* if <PyObject *> self.view.obj == NULL:
* (<__pyx_buffer *> &self.view).obj = Py_None
* Py_INCREF(Py_None) # <<<<<<<<<<<<<<
@@ -36148,7 +37884,7 @@ static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit_
*/
Py_INCREF(Py_None);
- /* "View.MemoryView":346
+ /* "View.MemoryView":349
* if type(self) is memoryview or obj is not None:
* __Pyx_GetBuffer(obj, &self.view, flags)
* if <PyObject *> self.view.obj == NULL: # <<<<<<<<<<<<<<
@@ -36157,7 +37893,7 @@ static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit_
*/
}
- /* "View.MemoryView":344
+ /* "View.MemoryView":347
* self.obj = obj
* self.flags = flags
* if type(self) is memoryview or obj is not None: # <<<<<<<<<<<<<<
@@ -36166,7 +37902,7 @@ static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit_
*/
}
- /* "View.MemoryView":351
+ /* "View.MemoryView":354
*
* global __pyx_memoryview_thread_locks_used
* if __pyx_memoryview_thread_locks_used < THREAD_LOCKS_PREALLOCATED: # <<<<<<<<<<<<<<
@@ -36176,7 +37912,7 @@ static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit_
__pyx_t_1 = ((__pyx_memoryview_thread_locks_used < 8) != 0);
if (__pyx_t_1) {
- /* "View.MemoryView":352
+ /* "View.MemoryView":355
* global __pyx_memoryview_thread_locks_used
* if __pyx_memoryview_thread_locks_used < THREAD_LOCKS_PREALLOCATED:
* self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] # <<<<<<<<<<<<<<
@@ -36185,7 +37921,7 @@ static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit_
*/
__pyx_v_self->lock = (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]);
- /* "View.MemoryView":353
+ /* "View.MemoryView":356
* if __pyx_memoryview_thread_locks_used < THREAD_LOCKS_PREALLOCATED:
* self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
* __pyx_memoryview_thread_locks_used += 1 # <<<<<<<<<<<<<<
@@ -36194,7 +37930,7 @@ static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit_
*/
__pyx_memoryview_thread_locks_used = (__pyx_memoryview_thread_locks_used + 1);
- /* "View.MemoryView":351
+ /* "View.MemoryView":354
*
* global __pyx_memoryview_thread_locks_used
* if __pyx_memoryview_thread_locks_used < THREAD_LOCKS_PREALLOCATED: # <<<<<<<<<<<<<<
@@ -36203,7 +37939,7 @@ static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit_
*/
}
- /* "View.MemoryView":354
+ /* "View.MemoryView":357
* self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
* __pyx_memoryview_thread_locks_used += 1
* if self.lock is NULL: # <<<<<<<<<<<<<<
@@ -36213,7 +37949,7 @@ static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit_
__pyx_t_1 = ((__pyx_v_self->lock == NULL) != 0);
if (__pyx_t_1) {
- /* "View.MemoryView":355
+ /* "View.MemoryView":358
* __pyx_memoryview_thread_locks_used += 1
* if self.lock is NULL:
* self.lock = PyThread_allocate_lock() # <<<<<<<<<<<<<<
@@ -36222,7 +37958,7 @@ static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit_
*/
__pyx_v_self->lock = PyThread_allocate_lock();
- /* "View.MemoryView":356
+ /* "View.MemoryView":359
* if self.lock is NULL:
* self.lock = PyThread_allocate_lock()
* if self.lock is NULL: # <<<<<<<<<<<<<<
@@ -36230,18 +37966,18 @@ static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit_
*
*/
__pyx_t_1 = ((__pyx_v_self->lock == NULL) != 0);
- if (__pyx_t_1) {
+ if (unlikely(__pyx_t_1)) {
- /* "View.MemoryView":357
+ /* "View.MemoryView":360
* self.lock = PyThread_allocate_lock()
* if self.lock is NULL:
* raise MemoryError # <<<<<<<<<<<<<<
*
* if flags & PyBUF_FORMAT:
*/
- PyErr_NoMemory(); __PYX_ERR(2, 357, __pyx_L1_error)
+ PyErr_NoMemory(); __PYX_ERR(2, 360, __pyx_L1_error)
- /* "View.MemoryView":356
+ /* "View.MemoryView":359
* if self.lock is NULL:
* self.lock = PyThread_allocate_lock()
* if self.lock is NULL: # <<<<<<<<<<<<<<
@@ -36250,7 +37986,7 @@ static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit_
*/
}
- /* "View.MemoryView":354
+ /* "View.MemoryView":357
* self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
* __pyx_memoryview_thread_locks_used += 1
* if self.lock is NULL: # <<<<<<<<<<<<<<
@@ -36259,7 +37995,7 @@ static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit_
*/
}
- /* "View.MemoryView":359
+ /* "View.MemoryView":362
* raise MemoryError
*
* if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<<
@@ -36269,7 +38005,7 @@ static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit_
__pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0);
if (__pyx_t_1) {
- /* "View.MemoryView":360
+ /* "View.MemoryView":363
*
* if flags & PyBUF_FORMAT:
* self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0') # <<<<<<<<<<<<<<
@@ -36287,7 +38023,7 @@ static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit_
__pyx_L11_bool_binop_done:;
__pyx_v_self->dtype_is_object = __pyx_t_1;
- /* "View.MemoryView":359
+ /* "View.MemoryView":362
* raise MemoryError
*
* if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<<
@@ -36297,7 +38033,7 @@ static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit_
goto __pyx_L10;
}
- /* "View.MemoryView":362
+ /* "View.MemoryView":365
* self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0')
* else:
* self.dtype_is_object = dtype_is_object # <<<<<<<<<<<<<<
@@ -36309,7 +38045,7 @@ static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit_
}
__pyx_L10:;
- /* "View.MemoryView":364
+ /* "View.MemoryView":367
* self.dtype_is_object = dtype_is_object
*
* self.acquisition_count_aligned_p = <__pyx_atomic_int *> align_pointer( # <<<<<<<<<<<<<<
@@ -36318,7 +38054,7 @@ static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit_
*/
__pyx_v_self->acquisition_count_aligned_p = ((__pyx_atomic_int *)__pyx_align_pointer(((void *)(&(__pyx_v_self->acquisition_count[0]))), (sizeof(__pyx_atomic_int))));
- /* "View.MemoryView":366
+ /* "View.MemoryView":369
* self.acquisition_count_aligned_p = <__pyx_atomic_int *> align_pointer(
* <void *> &self.acquisition_count[0], sizeof(__pyx_atomic_int))
* self.typeinfo = NULL # <<<<<<<<<<<<<<
@@ -36327,7 +38063,7 @@ static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit_
*/
__pyx_v_self->typeinfo = NULL;
- /* "View.MemoryView":341
+ /* "View.MemoryView":344
* cdef __Pyx_TypeInfo *typeinfo
*
* def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False): # <<<<<<<<<<<<<<
@@ -36346,7 +38082,7 @@ static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit_
return __pyx_r;
}
-/* "View.MemoryView":368
+/* "View.MemoryView":371
* self.typeinfo = NULL
*
* def __dealloc__(memoryview self): # <<<<<<<<<<<<<<
@@ -36372,11 +38108,12 @@ static void __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__deal
int __pyx_t_2;
int __pyx_t_3;
int __pyx_t_4;
- PyThread_type_lock __pyx_t_5;
+ int __pyx_t_5;
PyThread_type_lock __pyx_t_6;
+ PyThread_type_lock __pyx_t_7;
__Pyx_RefNannySetupContext("__dealloc__", 0);
- /* "View.MemoryView":369
+ /* "View.MemoryView":372
*
* def __dealloc__(memoryview self):
* if self.obj is not None: # <<<<<<<<<<<<<<
@@ -36387,7 +38124,7 @@ static void __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__deal
__pyx_t_2 = (__pyx_t_1 != 0);
if (__pyx_t_2) {
- /* "View.MemoryView":370
+ /* "View.MemoryView":373
* def __dealloc__(memoryview self):
* if self.obj is not None:
* __Pyx_ReleaseBuffer(&self.view) # <<<<<<<<<<<<<<
@@ -36396,7 +38133,7 @@ static void __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__deal
*/
__Pyx_ReleaseBuffer((&__pyx_v_self->view));
- /* "View.MemoryView":369
+ /* "View.MemoryView":372
*
* def __dealloc__(memoryview self):
* if self.obj is not None: # <<<<<<<<<<<<<<
@@ -36405,7 +38142,7 @@ static void __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__deal
*/
}
- /* "View.MemoryView":374
+ /* "View.MemoryView":377
* cdef int i
* global __pyx_memoryview_thread_locks_used
* if self.lock != NULL: # <<<<<<<<<<<<<<
@@ -36415,7 +38152,7 @@ static void __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__deal
__pyx_t_2 = ((__pyx_v_self->lock != NULL) != 0);
if (__pyx_t_2) {
- /* "View.MemoryView":375
+ /* "View.MemoryView":378
* global __pyx_memoryview_thread_locks_used
* if self.lock != NULL:
* for i in range(__pyx_memoryview_thread_locks_used): # <<<<<<<<<<<<<<
@@ -36423,10 +38160,11 @@ static void __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__deal
* __pyx_memoryview_thread_locks_used -= 1
*/
__pyx_t_3 = __pyx_memoryview_thread_locks_used;
- for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
- __pyx_v_i = __pyx_t_4;
+ __pyx_t_4 = __pyx_t_3;
+ for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
+ __pyx_v_i = __pyx_t_5;
- /* "View.MemoryView":376
+ /* "View.MemoryView":379
* if self.lock != NULL:
* for i in range(__pyx_memoryview_thread_locks_used):
* if __pyx_memoryview_thread_locks[i] is self.lock: # <<<<<<<<<<<<<<
@@ -36436,7 +38174,7 @@ static void __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__deal
__pyx_t_2 = (((__pyx_memoryview_thread_locks[__pyx_v_i]) == __pyx_v_self->lock) != 0);
if (__pyx_t_2) {
- /* "View.MemoryView":377
+ /* "View.MemoryView":380
* for i in range(__pyx_memoryview_thread_locks_used):
* if __pyx_memoryview_thread_locks[i] is self.lock:
* __pyx_memoryview_thread_locks_used -= 1 # <<<<<<<<<<<<<<
@@ -36445,7 +38183,7 @@ static void __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__deal
*/
__pyx_memoryview_thread_locks_used = (__pyx_memoryview_thread_locks_used - 1);
- /* "View.MemoryView":378
+ /* "View.MemoryView":381
* if __pyx_memoryview_thread_locks[i] is self.lock:
* __pyx_memoryview_thread_locks_used -= 1
* if i != __pyx_memoryview_thread_locks_used: # <<<<<<<<<<<<<<
@@ -36455,27 +38193,27 @@ static void __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__deal
__pyx_t_2 = ((__pyx_v_i != __pyx_memoryview_thread_locks_used) != 0);
if (__pyx_t_2) {
- /* "View.MemoryView":380
+ /* "View.MemoryView":383
* if i != __pyx_memoryview_thread_locks_used:
* __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
* __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i]) # <<<<<<<<<<<<<<
* break
* else:
*/
- __pyx_t_5 = (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]);
- __pyx_t_6 = (__pyx_memoryview_thread_locks[__pyx_v_i]);
+ __pyx_t_6 = (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]);
+ __pyx_t_7 = (__pyx_memoryview_thread_locks[__pyx_v_i]);
- /* "View.MemoryView":379
+ /* "View.MemoryView":382
* __pyx_memoryview_thread_locks_used -= 1
* if i != __pyx_memoryview_thread_locks_used:
* __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = ( # <<<<<<<<<<<<<<
* __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
* break
*/
- (__pyx_memoryview_thread_locks[__pyx_v_i]) = __pyx_t_5;
- (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]) = __pyx_t_6;
+ (__pyx_memoryview_thread_locks[__pyx_v_i]) = __pyx_t_6;
+ (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]) = __pyx_t_7;
- /* "View.MemoryView":378
+ /* "View.MemoryView":381
* if __pyx_memoryview_thread_locks[i] is self.lock:
* __pyx_memoryview_thread_locks_used -= 1
* if i != __pyx_memoryview_thread_locks_used: # <<<<<<<<<<<<<<
@@ -36484,7 +38222,7 @@ static void __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__deal
*/
}
- /* "View.MemoryView":381
+ /* "View.MemoryView":384
* __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
* __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
* break # <<<<<<<<<<<<<<
@@ -36493,7 +38231,7 @@ static void __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__deal
*/
goto __pyx_L6_break;
- /* "View.MemoryView":376
+ /* "View.MemoryView":379
* if self.lock != NULL:
* for i in range(__pyx_memoryview_thread_locks_used):
* if __pyx_memoryview_thread_locks[i] is self.lock: # <<<<<<<<<<<<<<
@@ -36504,7 +38242,7 @@ static void __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__deal
}
/*else*/ {
- /* "View.MemoryView":383
+ /* "View.MemoryView":386
* break
* else:
* PyThread_free_lock(self.lock) # <<<<<<<<<<<<<<
@@ -36515,7 +38253,7 @@ static void __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__deal
}
__pyx_L6_break:;
- /* "View.MemoryView":374
+ /* "View.MemoryView":377
* cdef int i
* global __pyx_memoryview_thread_locks_used
* if self.lock != NULL: # <<<<<<<<<<<<<<
@@ -36524,7 +38262,7 @@ static void __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__deal
*/
}
- /* "View.MemoryView":368
+ /* "View.MemoryView":371
* self.typeinfo = NULL
*
* def __dealloc__(memoryview self): # <<<<<<<<<<<<<<
@@ -36536,7 +38274,7 @@ static void __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__deal
__Pyx_RefNannyFinishContext();
}
-/* "View.MemoryView":385
+/* "View.MemoryView":388
* PyThread_free_lock(self.lock)
*
* cdef char *get_item_pointer(memoryview self, object index) except NULL: # <<<<<<<<<<<<<<
@@ -36559,7 +38297,7 @@ static char *__pyx_memoryview_get_item_pointer(struct __pyx_memoryview_obj *__py
char *__pyx_t_7;
__Pyx_RefNannySetupContext("get_item_pointer", 0);
- /* "View.MemoryView":387
+ /* "View.MemoryView":390
* cdef char *get_item_pointer(memoryview self, object index) except NULL:
* cdef Py_ssize_t dim
* cdef char *itemp = <char *> self.view.buf # <<<<<<<<<<<<<<
@@ -36568,7 +38306,7 @@ static char *__pyx_memoryview_get_item_pointer(struct __pyx_memoryview_obj *__py
*/
__pyx_v_itemp = ((char *)__pyx_v_self->view.buf);
- /* "View.MemoryView":389
+ /* "View.MemoryView":392
* cdef char *itemp = <char *> self.view.buf
*
* for dim, idx in enumerate(index): # <<<<<<<<<<<<<<
@@ -36580,26 +38318,26 @@ static char *__pyx_memoryview_get_item_pointer(struct __pyx_memoryview_obj *__py
__pyx_t_2 = __pyx_v_index; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
__pyx_t_4 = NULL;
} else {
- __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 389, __pyx_L1_error)
+ __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 392, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 389, __pyx_L1_error)
+ __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 392, __pyx_L1_error)
}
for (;;) {
if (likely(!__pyx_t_4)) {
if (likely(PyList_CheckExact(__pyx_t_2))) {
if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
- __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(2, 389, __pyx_L1_error)
+ __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(2, 392, __pyx_L1_error)
#else
- __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 389, __pyx_L1_error)
+ __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 392, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
#endif
} else {
if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
- __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(2, 389, __pyx_L1_error)
+ __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(2, 392, __pyx_L1_error)
#else
- __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 389, __pyx_L1_error)
+ __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 392, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
#endif
}
@@ -36608,8 +38346,8 @@ static char *__pyx_memoryview_get_item_pointer(struct __pyx_memoryview_obj *__py
if (unlikely(!__pyx_t_5)) {
PyObject* exc_type = PyErr_Occurred();
if (exc_type) {
- if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
- else __PYX_ERR(2, 389, __pyx_L1_error)
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(2, 392, __pyx_L1_error)
}
break;
}
@@ -36620,18 +38358,18 @@ static char *__pyx_memoryview_get_item_pointer(struct __pyx_memoryview_obj *__py
__pyx_v_dim = __pyx_t_1;
__pyx_t_1 = (__pyx_t_1 + 1);
- /* "View.MemoryView":390
+ /* "View.MemoryView":393
*
* for dim, idx in enumerate(index):
* itemp = pybuffer_index(&self.view, itemp, idx, dim) # <<<<<<<<<<<<<<
*
* return itemp
*/
- __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_v_idx); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(2, 390, __pyx_L1_error)
- __pyx_t_7 = __pyx_pybuffer_index((&__pyx_v_self->view), __pyx_v_itemp, __pyx_t_6, __pyx_v_dim); if (unlikely(__pyx_t_7 == NULL)) __PYX_ERR(2, 390, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_v_idx); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(2, 393, __pyx_L1_error)
+ __pyx_t_7 = __pyx_pybuffer_index((&__pyx_v_self->view), __pyx_v_itemp, __pyx_t_6, __pyx_v_dim); if (unlikely(__pyx_t_7 == ((char *)NULL))) __PYX_ERR(2, 393, __pyx_L1_error)
__pyx_v_itemp = __pyx_t_7;
- /* "View.MemoryView":389
+ /* "View.MemoryView":392
* cdef char *itemp = <char *> self.view.buf
*
* for dim, idx in enumerate(index): # <<<<<<<<<<<<<<
@@ -36641,7 +38379,7 @@ static char *__pyx_memoryview_get_item_pointer(struct __pyx_memoryview_obj *__py
}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "View.MemoryView":392
+ /* "View.MemoryView":395
* itemp = pybuffer_index(&self.view, itemp, idx, dim)
*
* return itemp # <<<<<<<<<<<<<<
@@ -36651,7 +38389,7 @@ static char *__pyx_memoryview_get_item_pointer(struct __pyx_memoryview_obj *__py
__pyx_r = __pyx_v_itemp;
goto __pyx_L0;
- /* "View.MemoryView":385
+ /* "View.MemoryView":388
* PyThread_free_lock(self.lock)
*
* cdef char *get_item_pointer(memoryview self, object index) except NULL: # <<<<<<<<<<<<<<
@@ -36671,7 +38409,7 @@ static char *__pyx_memoryview_get_item_pointer(struct __pyx_memoryview_obj *__py
return __pyx_r;
}
-/* "View.MemoryView":395
+/* "View.MemoryView":398
*
*
* def __getitem__(memoryview self, object index): # <<<<<<<<<<<<<<
@@ -36706,7 +38444,7 @@ static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4_
char *__pyx_t_6;
__Pyx_RefNannySetupContext("__getitem__", 0);
- /* "View.MemoryView":396
+ /* "View.MemoryView":399
*
* def __getitem__(memoryview self, object index):
* if index is Ellipsis: # <<<<<<<<<<<<<<
@@ -36717,7 +38455,7 @@ static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4_
__pyx_t_2 = (__pyx_t_1 != 0);
if (__pyx_t_2) {
- /* "View.MemoryView":397
+ /* "View.MemoryView":400
* def __getitem__(memoryview self, object index):
* if index is Ellipsis:
* return self # <<<<<<<<<<<<<<
@@ -36729,7 +38467,7 @@ static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4_
__pyx_r = ((PyObject *)__pyx_v_self);
goto __pyx_L0;
- /* "View.MemoryView":396
+ /* "View.MemoryView":399
*
* def __getitem__(memoryview self, object index):
* if index is Ellipsis: # <<<<<<<<<<<<<<
@@ -36738,26 +38476,22 @@ static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4_
*/
}
- /* "View.MemoryView":399
+ /* "View.MemoryView":402
* return self
*
* have_slices, indices = _unellipsify(index, self.view.ndim) # <<<<<<<<<<<<<<
*
* cdef char *itemp
*/
- __pyx_t_3 = _unellipsify(__pyx_v_index, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 399, __pyx_L1_error)
+ __pyx_t_3 = _unellipsify(__pyx_v_index, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 402, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
if (likely(__pyx_t_3 != Py_None)) {
PyObject* sequence = __pyx_t_3;
- #if !CYTHON_COMPILING_IN_PYPY
- Py_ssize_t size = Py_SIZE(sequence);
- #else
- Py_ssize_t size = PySequence_Size(sequence);
- #endif
+ Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
if (unlikely(size != 2)) {
if (size > 2) __Pyx_RaiseTooManyValuesError(2);
else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
- __PYX_ERR(2, 399, __pyx_L1_error)
+ __PYX_ERR(2, 402, __pyx_L1_error)
}
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
__pyx_t_4 = PyTuple_GET_ITEM(sequence, 0);
@@ -36765,31 +38499,31 @@ static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4_
__Pyx_INCREF(__pyx_t_4);
__Pyx_INCREF(__pyx_t_5);
#else
- __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 399, __pyx_L1_error)
+ __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 402, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 399, __pyx_L1_error)
+ __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 402, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
#endif
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
} else {
- __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(2, 399, __pyx_L1_error)
+ __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(2, 402, __pyx_L1_error)
}
__pyx_v_have_slices = __pyx_t_4;
__pyx_t_4 = 0;
__pyx_v_indices = __pyx_t_5;
__pyx_t_5 = 0;
- /* "View.MemoryView":402
+ /* "View.MemoryView":405
*
* cdef char *itemp
* if have_slices: # <<<<<<<<<<<<<<
* return memview_slice(self, indices)
* else:
*/
- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_have_slices); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(2, 402, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_have_slices); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(2, 405, __pyx_L1_error)
if (__pyx_t_2) {
- /* "View.MemoryView":403
+ /* "View.MemoryView":406
* cdef char *itemp
* if have_slices:
* return memview_slice(self, indices) # <<<<<<<<<<<<<<
@@ -36797,13 +38531,13 @@ static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4_
* itemp = self.get_item_pointer(indices)
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_3 = ((PyObject *)__pyx_memview_slice(__pyx_v_self, __pyx_v_indices)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 403, __pyx_L1_error)
+ __pyx_t_3 = ((PyObject *)__pyx_memview_slice(__pyx_v_self, __pyx_v_indices)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 406, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_r = __pyx_t_3;
__pyx_t_3 = 0;
goto __pyx_L0;
- /* "View.MemoryView":402
+ /* "View.MemoryView":405
*
* cdef char *itemp
* if have_slices: # <<<<<<<<<<<<<<
@@ -36812,7 +38546,7 @@ static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4_
*/
}
- /* "View.MemoryView":405
+ /* "View.MemoryView":408
* return memview_slice(self, indices)
* else:
* itemp = self.get_item_pointer(indices) # <<<<<<<<<<<<<<
@@ -36820,10 +38554,10 @@ static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4_
*
*/
/*else*/ {
- __pyx_t_6 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->get_item_pointer(__pyx_v_self, __pyx_v_indices); if (unlikely(__pyx_t_6 == NULL)) __PYX_ERR(2, 405, __pyx_L1_error)
+ __pyx_t_6 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->get_item_pointer(__pyx_v_self, __pyx_v_indices); if (unlikely(__pyx_t_6 == ((char *)NULL))) __PYX_ERR(2, 408, __pyx_L1_error)
__pyx_v_itemp = __pyx_t_6;
- /* "View.MemoryView":406
+ /* "View.MemoryView":409
* else:
* itemp = self.get_item_pointer(indices)
* return self.convert_item_to_object(itemp) # <<<<<<<<<<<<<<
@@ -36831,14 +38565,14 @@ static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4_
* def __setitem__(memoryview self, object index, object value):
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_3 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->convert_item_to_object(__pyx_v_self, __pyx_v_itemp); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 406, __pyx_L1_error)
+ __pyx_t_3 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->convert_item_to_object(__pyx_v_self, __pyx_v_itemp); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 409, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_r = __pyx_t_3;
__pyx_t_3 = 0;
goto __pyx_L0;
}
- /* "View.MemoryView":395
+ /* "View.MemoryView":398
*
*
* def __getitem__(memoryview self, object index): # <<<<<<<<<<<<<<
@@ -36861,12 +38595,12 @@ static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4_
return __pyx_r;
}
-/* "View.MemoryView":408
+/* "View.MemoryView":411
* return self.convert_item_to_object(itemp)
*
* def __setitem__(memoryview self, object index, object value): # <<<<<<<<<<<<<<
- * have_slices, index = _unellipsify(index, self.view.ndim)
- *
+ * if self.view.readonly:
+ * raise TypeError("Cannot assign to read-only memoryview")
*/
/* Python wrapper */
@@ -36887,111 +38621,139 @@ static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setit
PyObject *__pyx_v_obj = NULL;
int __pyx_r;
__Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
+ int __pyx_t_1;
PyObject *__pyx_t_2 = NULL;
PyObject *__pyx_t_3 = NULL;
- int __pyx_t_4;
+ PyObject *__pyx_t_4 = NULL;
__Pyx_RefNannySetupContext("__setitem__", 0);
__Pyx_INCREF(__pyx_v_index);
- /* "View.MemoryView":409
+ /* "View.MemoryView":412
+ *
+ * def __setitem__(memoryview self, object index, object value):
+ * if self.view.readonly: # <<<<<<<<<<<<<<
+ * raise TypeError("Cannot assign to read-only memoryview")
+ *
+ */
+ __pyx_t_1 = (__pyx_v_self->view.readonly != 0);
+ if (unlikely(__pyx_t_1)) {
+
+ /* "View.MemoryView":413
+ * def __setitem__(memoryview self, object index, object value):
+ * if self.view.readonly:
+ * raise TypeError("Cannot assign to read-only memoryview") # <<<<<<<<<<<<<<
+ *
+ * have_slices, index = _unellipsify(index, self.view.ndim)
+ */
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__48, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 413, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_Raise(__pyx_t_2, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __PYX_ERR(2, 413, __pyx_L1_error)
+
+ /* "View.MemoryView":412
*
* def __setitem__(memoryview self, object index, object value):
+ * if self.view.readonly: # <<<<<<<<<<<<<<
+ * raise TypeError("Cannot assign to read-only memoryview")
+ *
+ */
+ }
+
+ /* "View.MemoryView":415
+ * raise TypeError("Cannot assign to read-only memoryview")
+ *
* have_slices, index = _unellipsify(index, self.view.ndim) # <<<<<<<<<<<<<<
*
* if have_slices:
*/
- __pyx_t_1 = _unellipsify(__pyx_v_index, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 409, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- if (likely(__pyx_t_1 != Py_None)) {
- PyObject* sequence = __pyx_t_1;
- #if !CYTHON_COMPILING_IN_PYPY
- Py_ssize_t size = Py_SIZE(sequence);
- #else
- Py_ssize_t size = PySequence_Size(sequence);
- #endif
+ __pyx_t_2 = _unellipsify(__pyx_v_index, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 415, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (likely(__pyx_t_2 != Py_None)) {
+ PyObject* sequence = __pyx_t_2;
+ Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
if (unlikely(size != 2)) {
if (size > 2) __Pyx_RaiseTooManyValuesError(2);
else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
- __PYX_ERR(2, 409, __pyx_L1_error)
+ __PYX_ERR(2, 415, __pyx_L1_error)
}
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
- __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0);
- __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1);
- __Pyx_INCREF(__pyx_t_2);
+ __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_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 409, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 409, __pyx_L1_error)
+ __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 415, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 415, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
#endif
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
} else {
- __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(2, 409, __pyx_L1_error)
+ __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(2, 415, __pyx_L1_error)
}
- __pyx_v_have_slices = __pyx_t_2;
- __pyx_t_2 = 0;
- __Pyx_DECREF_SET(__pyx_v_index, __pyx_t_3);
+ __pyx_v_have_slices = __pyx_t_3;
__pyx_t_3 = 0;
+ __Pyx_DECREF_SET(__pyx_v_index, __pyx_t_4);
+ __pyx_t_4 = 0;
- /* "View.MemoryView":411
+ /* "View.MemoryView":417
* have_slices, index = _unellipsify(index, self.view.ndim)
*
* if have_slices: # <<<<<<<<<<<<<<
* obj = self.is_slice(value)
* if obj:
*/
- __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_have_slices); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(2, 411, __pyx_L1_error)
- if (__pyx_t_4) {
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_have_slices); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 417, __pyx_L1_error)
+ if (__pyx_t_1) {
- /* "View.MemoryView":412
+ /* "View.MemoryView":418
*
* if have_slices:
* obj = self.is_slice(value) # <<<<<<<<<<<<<<
* if obj:
* self.setitem_slice_assignment(self[index], obj)
*/
- __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->is_slice(__pyx_v_self, __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 412, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_v_obj = __pyx_t_1;
- __pyx_t_1 = 0;
+ __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->is_slice(__pyx_v_self, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 418, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_v_obj = __pyx_t_2;
+ __pyx_t_2 = 0;
- /* "View.MemoryView":413
+ /* "View.MemoryView":419
* if have_slices:
* obj = self.is_slice(value)
* if obj: # <<<<<<<<<<<<<<
* self.setitem_slice_assignment(self[index], obj)
* else:
*/
- __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_obj); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(2, 413, __pyx_L1_error)
- if (__pyx_t_4) {
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_obj); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 419, __pyx_L1_error)
+ if (__pyx_t_1) {
- /* "View.MemoryView":414
+ /* "View.MemoryView":420
* obj = self.is_slice(value)
* if obj:
* self.setitem_slice_assignment(self[index], obj) # <<<<<<<<<<<<<<
* else:
* self.setitem_slice_assign_scalar(self[index], value)
*/
- __pyx_t_1 = PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_v_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 414, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_slice_assignment(__pyx_v_self, __pyx_t_1, __pyx_v_obj); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 414, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_2 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_v_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 420, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_slice_assignment(__pyx_v_self, __pyx_t_2, __pyx_v_obj); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 420, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "View.MemoryView":413
+ /* "View.MemoryView":419
* if have_slices:
* obj = self.is_slice(value)
* if obj: # <<<<<<<<<<<<<<
* self.setitem_slice_assignment(self[index], obj)
* else:
*/
- goto __pyx_L4;
+ goto __pyx_L5;
}
- /* "View.MemoryView":416
+ /* "View.MemoryView":422
* self.setitem_slice_assignment(self[index], obj)
* else:
* self.setitem_slice_assign_scalar(self[index], value) # <<<<<<<<<<<<<<
@@ -36999,27 +38761,27 @@ static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setit
* self.setitem_indexed(index, value)
*/
/*else*/ {
- __pyx_t_3 = PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_v_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 416, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_memoryview_type))))) __PYX_ERR(2, 416, __pyx_L1_error)
- __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_slice_assign_scalar(__pyx_v_self, ((struct __pyx_memoryview_obj *)__pyx_t_3), __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 416, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_4 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_v_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 422, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_memoryview_type))))) __PYX_ERR(2, 422, __pyx_L1_error)
+ __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_slice_assign_scalar(__pyx_v_self, ((struct __pyx_memoryview_obj *)__pyx_t_4), __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 422, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
}
- __pyx_L4:;
+ __pyx_L5:;
- /* "View.MemoryView":411
+ /* "View.MemoryView":417
* have_slices, index = _unellipsify(index, self.view.ndim)
*
* if have_slices: # <<<<<<<<<<<<<<
* obj = self.is_slice(value)
* if obj:
*/
- goto __pyx_L3;
+ goto __pyx_L4;
}
- /* "View.MemoryView":418
+ /* "View.MemoryView":424
* self.setitem_slice_assign_scalar(self[index], value)
* else:
* self.setitem_indexed(index, value) # <<<<<<<<<<<<<<
@@ -37027,27 +38789,27 @@ static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setit
* cdef is_slice(self, obj):
*/
/*else*/ {
- __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_indexed(__pyx_v_self, __pyx_v_index, __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 418, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_indexed(__pyx_v_self, __pyx_v_index, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 424, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
}
- __pyx_L3:;
+ __pyx_L4:;
- /* "View.MemoryView":408
+ /* "View.MemoryView":411
* return self.convert_item_to_object(itemp)
*
* def __setitem__(memoryview self, object index, object value): # <<<<<<<<<<<<<<
- * have_slices, index = _unellipsify(index, self.view.ndim)
- *
+ * if self.view.readonly:
+ * raise TypeError("Cannot assign to read-only memoryview")
*/
/* function exit code */
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
__Pyx_AddTraceback("View.MemoryView.memoryview.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
@@ -37058,7 +38820,7 @@ static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setit
return __pyx_r;
}
-/* "View.MemoryView":420
+/* "View.MemoryView":426
* self.setitem_indexed(index, value)
*
* cdef is_slice(self, obj): # <<<<<<<<<<<<<<
@@ -37081,7 +38843,7 @@ static PyObject *__pyx_memoryview_is_slice(struct __pyx_memoryview_obj *__pyx_v_
__Pyx_RefNannySetupContext("is_slice", 0);
__Pyx_INCREF(__pyx_v_obj);
- /* "View.MemoryView":421
+ /* "View.MemoryView":427
*
* cdef is_slice(self, obj):
* if not isinstance(obj, memoryview): # <<<<<<<<<<<<<<
@@ -37092,7 +38854,7 @@ static PyObject *__pyx_memoryview_is_slice(struct __pyx_memoryview_obj *__pyx_v_
__pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
if (__pyx_t_2) {
- /* "View.MemoryView":422
+ /* "View.MemoryView":428
* cdef is_slice(self, obj):
* if not isinstance(obj, memoryview):
* try: # <<<<<<<<<<<<<<
@@ -37108,34 +38870,34 @@ static PyObject *__pyx_memoryview_is_slice(struct __pyx_memoryview_obj *__pyx_v_
__Pyx_XGOTREF(__pyx_t_5);
/*try:*/ {
- /* "View.MemoryView":423
+ /* "View.MemoryView":429
* if not isinstance(obj, memoryview):
* try:
* obj = memoryview(obj, self.flags|PyBUF_ANY_CONTIGUOUS, # <<<<<<<<<<<<<<
* self.dtype_is_object)
* except TypeError:
*/
- __pyx_t_6 = __Pyx_PyInt_From_int((__pyx_v_self->flags | PyBUF_ANY_CONTIGUOUS)); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 423, __pyx_L4_error)
+ __pyx_t_6 = __Pyx_PyInt_From_int((__pyx_v_self->flags | PyBUF_ANY_CONTIGUOUS)); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 429, __pyx_L4_error)
__Pyx_GOTREF(__pyx_t_6);
- /* "View.MemoryView":424
+ /* "View.MemoryView":430
* try:
* obj = memoryview(obj, self.flags|PyBUF_ANY_CONTIGUOUS,
* self.dtype_is_object) # <<<<<<<<<<<<<<
* except TypeError:
* return None
*/
- __pyx_t_7 = __Pyx_PyBool_FromLong(__pyx_v_self->dtype_is_object); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 424, __pyx_L4_error)
+ __pyx_t_7 = __Pyx_PyBool_FromLong(__pyx_v_self->dtype_is_object); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 430, __pyx_L4_error)
__Pyx_GOTREF(__pyx_t_7);
- /* "View.MemoryView":423
+ /* "View.MemoryView":429
* if not isinstance(obj, memoryview):
* try:
* obj = memoryview(obj, self.flags|PyBUF_ANY_CONTIGUOUS, # <<<<<<<<<<<<<<
* self.dtype_is_object)
* except TypeError:
*/
- __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 423, __pyx_L4_error)
+ __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 429, __pyx_L4_error)
__Pyx_GOTREF(__pyx_t_8);
__Pyx_INCREF(__pyx_v_obj);
__Pyx_GIVEREF(__pyx_v_obj);
@@ -37146,13 +38908,13 @@ static PyObject *__pyx_memoryview_is_slice(struct __pyx_memoryview_obj *__pyx_v_
PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_7);
__pyx_t_6 = 0;
__pyx_t_7 = 0;
- __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryview_type), __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 423, __pyx_L4_error)
+ __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryview_type), __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 429, __pyx_L4_error)
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__Pyx_DECREF_SET(__pyx_v_obj, __pyx_t_7);
__pyx_t_7 = 0;
- /* "View.MemoryView":422
+ /* "View.MemoryView":428
* cdef is_slice(self, obj):
* if not isinstance(obj, memoryview):
* try: # <<<<<<<<<<<<<<
@@ -37163,14 +38925,13 @@ static PyObject *__pyx_memoryview_is_slice(struct __pyx_memoryview_obj *__pyx_v_
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
- goto __pyx_L11_try_end;
+ goto __pyx_L9_try_end;
__pyx_L4_error:;
- __Pyx_PyThreadState_assign
__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
__Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
- /* "View.MemoryView":425
+ /* "View.MemoryView":431
* obj = memoryview(obj, self.flags|PyBUF_ANY_CONTIGUOUS,
* self.dtype_is_object)
* except TypeError: # <<<<<<<<<<<<<<
@@ -37180,12 +38941,12 @@ static PyObject *__pyx_memoryview_is_slice(struct __pyx_memoryview_obj *__pyx_v_
__pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError);
if (__pyx_t_9) {
__Pyx_AddTraceback("View.MemoryView.memoryview.is_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
- if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_8, &__pyx_t_6) < 0) __PYX_ERR(2, 425, __pyx_L6_except_error)
+ if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_8, &__pyx_t_6) < 0) __PYX_ERR(2, 431, __pyx_L6_except_error)
__Pyx_GOTREF(__pyx_t_7);
__Pyx_GOTREF(__pyx_t_8);
__Pyx_GOTREF(__pyx_t_6);
- /* "View.MemoryView":426
+ /* "View.MemoryView":432
* self.dtype_is_object)
* except TypeError:
* return None # <<<<<<<<<<<<<<
@@ -37193,8 +38954,7 @@ static PyObject *__pyx_memoryview_is_slice(struct __pyx_memoryview_obj *__pyx_v_
* return obj
*/
__Pyx_XDECREF(__pyx_r);
- __Pyx_INCREF(Py_None);
- __pyx_r = Py_None;
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
@@ -37203,30 +38963,28 @@ static PyObject *__pyx_memoryview_is_slice(struct __pyx_memoryview_obj *__pyx_v_
goto __pyx_L6_except_error;
__pyx_L6_except_error:;
- /* "View.MemoryView":422
+ /* "View.MemoryView":428
* cdef is_slice(self, obj):
* if not isinstance(obj, memoryview):
* try: # <<<<<<<<<<<<<<
* obj = memoryview(obj, self.flags|PyBUF_ANY_CONTIGUOUS,
* self.dtype_is_object)
*/
- __Pyx_PyThreadState_assign
__Pyx_XGIVEREF(__pyx_t_3);
__Pyx_XGIVEREF(__pyx_t_4);
__Pyx_XGIVEREF(__pyx_t_5);
__Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
goto __pyx_L1_error;
__pyx_L7_except_return:;
- __Pyx_PyThreadState_assign
__Pyx_XGIVEREF(__pyx_t_3);
__Pyx_XGIVEREF(__pyx_t_4);
__Pyx_XGIVEREF(__pyx_t_5);
__Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
goto __pyx_L0;
- __pyx_L11_try_end:;
+ __pyx_L9_try_end:;
}
- /* "View.MemoryView":421
+ /* "View.MemoryView":427
*
* cdef is_slice(self, obj):
* if not isinstance(obj, memoryview): # <<<<<<<<<<<<<<
@@ -37235,7 +38993,7 @@ static PyObject *__pyx_memoryview_is_slice(struct __pyx_memoryview_obj *__pyx_v_
*/
}
- /* "View.MemoryView":428
+ /* "View.MemoryView":434
* return None
*
* return obj # <<<<<<<<<<<<<<
@@ -37247,7 +39005,7 @@ static PyObject *__pyx_memoryview_is_slice(struct __pyx_memoryview_obj *__pyx_v_
__pyx_r = __pyx_v_obj;
goto __pyx_L0;
- /* "View.MemoryView":420
+ /* "View.MemoryView":426
* self.setitem_indexed(index, value)
*
* cdef is_slice(self, obj): # <<<<<<<<<<<<<<
@@ -37269,7 +39027,7 @@ static PyObject *__pyx_memoryview_is_slice(struct __pyx_memoryview_obj *__pyx_v_
return __pyx_r;
}
-/* "View.MemoryView":430
+/* "View.MemoryView":436
* return obj
*
* cdef setitem_slice_assignment(self, dst, src): # <<<<<<<<<<<<<<
@@ -37288,50 +39046,50 @@ static PyObject *__pyx_memoryview_setitem_slice_assignment(struct __pyx_memoryvi
int __pyx_t_4;
__Pyx_RefNannySetupContext("setitem_slice_assignment", 0);
- /* "View.MemoryView":434
+ /* "View.MemoryView":440
* cdef __Pyx_memviewslice src_slice
*
* memoryview_copy_contents(get_slice_from_memview(src, &src_slice)[0], # <<<<<<<<<<<<<<
* get_slice_from_memview(dst, &dst_slice)[0],
* src.ndim, dst.ndim, self.dtype_is_object)
*/
- if (!(likely(((__pyx_v_src) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_src, __pyx_memoryview_type))))) __PYX_ERR(2, 434, __pyx_L1_error)
+ if (!(likely(((__pyx_v_src) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_src, __pyx_memoryview_type))))) __PYX_ERR(2, 440, __pyx_L1_error)
- /* "View.MemoryView":435
+ /* "View.MemoryView":441
*
* memoryview_copy_contents(get_slice_from_memview(src, &src_slice)[0],
* get_slice_from_memview(dst, &dst_slice)[0], # <<<<<<<<<<<<<<
* src.ndim, dst.ndim, self.dtype_is_object)
*
*/
- if (!(likely(((__pyx_v_dst) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dst, __pyx_memoryview_type))))) __PYX_ERR(2, 435, __pyx_L1_error)
+ if (!(likely(((__pyx_v_dst) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dst, __pyx_memoryview_type))))) __PYX_ERR(2, 441, __pyx_L1_error)
- /* "View.MemoryView":436
+ /* "View.MemoryView":442
* memoryview_copy_contents(get_slice_from_memview(src, &src_slice)[0],
* get_slice_from_memview(dst, &dst_slice)[0],
* src.ndim, dst.ndim, self.dtype_is_object) # <<<<<<<<<<<<<<
*
* cdef setitem_slice_assign_scalar(self, memoryview dst, value):
*/
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_src, __pyx_n_s_ndim); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 436, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_src, __pyx_n_s_ndim); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 442, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 436, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 442, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dst, __pyx_n_s_ndim); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 436, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dst, __pyx_n_s_ndim); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 442, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 436, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 442, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "View.MemoryView":434
+ /* "View.MemoryView":440
* cdef __Pyx_memviewslice src_slice
*
* memoryview_copy_contents(get_slice_from_memview(src, &src_slice)[0], # <<<<<<<<<<<<<<
* get_slice_from_memview(dst, &dst_slice)[0],
* src.ndim, dst.ndim, self.dtype_is_object)
*/
- __pyx_t_4 = __pyx_memoryview_copy_contents((__pyx_memoryview_get_slice_from_memoryview(((struct __pyx_memoryview_obj *)__pyx_v_src), (&__pyx_v_src_slice))[0]), (__pyx_memoryview_get_slice_from_memoryview(((struct __pyx_memoryview_obj *)__pyx_v_dst), (&__pyx_v_dst_slice))[0]), __pyx_t_2, __pyx_t_3, __pyx_v_self->dtype_is_object); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(2, 434, __pyx_L1_error)
+ __pyx_t_4 = __pyx_memoryview_copy_contents((__pyx_memoryview_get_slice_from_memoryview(((struct __pyx_memoryview_obj *)__pyx_v_src), (&__pyx_v_src_slice))[0]), (__pyx_memoryview_get_slice_from_memoryview(((struct __pyx_memoryview_obj *)__pyx_v_dst), (&__pyx_v_dst_slice))[0]), __pyx_t_2, __pyx_t_3, __pyx_v_self->dtype_is_object); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 440, __pyx_L1_error)
- /* "View.MemoryView":430
+ /* "View.MemoryView":436
* return obj
*
* cdef setitem_slice_assignment(self, dst, src): # <<<<<<<<<<<<<<
@@ -37352,7 +39110,7 @@ static PyObject *__pyx_memoryview_setitem_slice_assignment(struct __pyx_memoryvi
return __pyx_r;
}
-/* "View.MemoryView":438
+/* "View.MemoryView":444
* src.ndim, dst.ndim, self.dtype_is_object)
*
* cdef setitem_slice_assign_scalar(self, memoryview dst, value): # <<<<<<<<<<<<<<
@@ -37381,7 +39139,7 @@ static PyObject *__pyx_memoryview_setitem_slice_assign_scalar(struct __pyx_memor
PyObject *__pyx_t_11 = NULL;
__Pyx_RefNannySetupContext("setitem_slice_assign_scalar", 0);
- /* "View.MemoryView":440
+ /* "View.MemoryView":446
* cdef setitem_slice_assign_scalar(self, memoryview dst, value):
* cdef int array[128]
* cdef void *tmp = NULL # <<<<<<<<<<<<<<
@@ -37390,7 +39148,7 @@ static PyObject *__pyx_memoryview_setitem_slice_assign_scalar(struct __pyx_memor
*/
__pyx_v_tmp = NULL;
- /* "View.MemoryView":445
+ /* "View.MemoryView":451
* cdef __Pyx_memviewslice *dst_slice
* cdef __Pyx_memviewslice tmp_slice
* dst_slice = get_slice_from_memview(dst, &tmp_slice) # <<<<<<<<<<<<<<
@@ -37399,7 +39157,7 @@ static PyObject *__pyx_memoryview_setitem_slice_assign_scalar(struct __pyx_memor
*/
__pyx_v_dst_slice = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_dst, (&__pyx_v_tmp_slice));
- /* "View.MemoryView":447
+ /* "View.MemoryView":453
* dst_slice = get_slice_from_memview(dst, &tmp_slice)
*
* if <size_t>self.view.itemsize > sizeof(array): # <<<<<<<<<<<<<<
@@ -37409,7 +39167,7 @@ static PyObject *__pyx_memoryview_setitem_slice_assign_scalar(struct __pyx_memor
__pyx_t_1 = ((((size_t)__pyx_v_self->view.itemsize) > (sizeof(__pyx_v_array))) != 0);
if (__pyx_t_1) {
- /* "View.MemoryView":448
+ /* "View.MemoryView":454
*
* if <size_t>self.view.itemsize > sizeof(array):
* tmp = PyMem_Malloc(self.view.itemsize) # <<<<<<<<<<<<<<
@@ -37418,7 +39176,7 @@ static PyObject *__pyx_memoryview_setitem_slice_assign_scalar(struct __pyx_memor
*/
__pyx_v_tmp = PyMem_Malloc(__pyx_v_self->view.itemsize);
- /* "View.MemoryView":449
+ /* "View.MemoryView":455
* if <size_t>self.view.itemsize > sizeof(array):
* tmp = PyMem_Malloc(self.view.itemsize)
* if tmp == NULL: # <<<<<<<<<<<<<<
@@ -37426,18 +39184,18 @@ static PyObject *__pyx_memoryview_setitem_slice_assign_scalar(struct __pyx_memor
* item = tmp
*/
__pyx_t_1 = ((__pyx_v_tmp == NULL) != 0);
- if (__pyx_t_1) {
+ if (unlikely(__pyx_t_1)) {
- /* "View.MemoryView":450
+ /* "View.MemoryView":456
* tmp = PyMem_Malloc(self.view.itemsize)
* if tmp == NULL:
* raise MemoryError # <<<<<<<<<<<<<<
* item = tmp
* else:
*/
- PyErr_NoMemory(); __PYX_ERR(2, 450, __pyx_L1_error)
+ PyErr_NoMemory(); __PYX_ERR(2, 456, __pyx_L1_error)
- /* "View.MemoryView":449
+ /* "View.MemoryView":455
* if <size_t>self.view.itemsize > sizeof(array):
* tmp = PyMem_Malloc(self.view.itemsize)
* if tmp == NULL: # <<<<<<<<<<<<<<
@@ -37446,7 +39204,7 @@ static PyObject *__pyx_memoryview_setitem_slice_assign_scalar(struct __pyx_memor
*/
}
- /* "View.MemoryView":451
+ /* "View.MemoryView":457
* if tmp == NULL:
* raise MemoryError
* item = tmp # <<<<<<<<<<<<<<
@@ -37455,7 +39213,7 @@ static PyObject *__pyx_memoryview_setitem_slice_assign_scalar(struct __pyx_memor
*/
__pyx_v_item = __pyx_v_tmp;
- /* "View.MemoryView":447
+ /* "View.MemoryView":453
* dst_slice = get_slice_from_memview(dst, &tmp_slice)
*
* if <size_t>self.view.itemsize > sizeof(array): # <<<<<<<<<<<<<<
@@ -37465,7 +39223,7 @@ static PyObject *__pyx_memoryview_setitem_slice_assign_scalar(struct __pyx_memor
goto __pyx_L3;
}
- /* "View.MemoryView":453
+ /* "View.MemoryView":459
* item = tmp
* else:
* item = <void *> array # <<<<<<<<<<<<<<
@@ -37477,7 +39235,7 @@ static PyObject *__pyx_memoryview_setitem_slice_assign_scalar(struct __pyx_memor
}
__pyx_L3:;
- /* "View.MemoryView":455
+ /* "View.MemoryView":461
* item = <void *> array
*
* try: # <<<<<<<<<<<<<<
@@ -37486,7 +39244,7 @@ static PyObject *__pyx_memoryview_setitem_slice_assign_scalar(struct __pyx_memor
*/
/*try:*/ {
- /* "View.MemoryView":456
+ /* "View.MemoryView":462
*
* try:
* if self.dtype_is_object: # <<<<<<<<<<<<<<
@@ -37496,7 +39254,7 @@ static PyObject *__pyx_memoryview_setitem_slice_assign_scalar(struct __pyx_memor
__pyx_t_1 = (__pyx_v_self->dtype_is_object != 0);
if (__pyx_t_1) {
- /* "View.MemoryView":457
+ /* "View.MemoryView":463
* try:
* if self.dtype_is_object:
* (<PyObject **> item)[0] = <PyObject *> value # <<<<<<<<<<<<<<
@@ -37505,7 +39263,7 @@ static PyObject *__pyx_memoryview_setitem_slice_assign_scalar(struct __pyx_memor
*/
(((PyObject **)__pyx_v_item)[0]) = ((PyObject *)__pyx_v_value);
- /* "View.MemoryView":456
+ /* "View.MemoryView":462
*
* try:
* if self.dtype_is_object: # <<<<<<<<<<<<<<
@@ -37515,7 +39273,7 @@ static PyObject *__pyx_memoryview_setitem_slice_assign_scalar(struct __pyx_memor
goto __pyx_L8;
}
- /* "View.MemoryView":459
+ /* "View.MemoryView":465
* (<PyObject **> item)[0] = <PyObject *> value
* else:
* self.assign_item_from_object(<char *> item, value) # <<<<<<<<<<<<<<
@@ -37523,13 +39281,13 @@ static PyObject *__pyx_memoryview_setitem_slice_assign_scalar(struct __pyx_memor
*
*/
/*else*/ {
- __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->assign_item_from_object(__pyx_v_self, ((char *)__pyx_v_item), __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 459, __pyx_L6_error)
+ __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->assign_item_from_object(__pyx_v_self, ((char *)__pyx_v_item), __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 465, __pyx_L6_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
}
__pyx_L8:;
- /* "View.MemoryView":463
+ /* "View.MemoryView":469
*
*
* if self.view.suboffsets != NULL: # <<<<<<<<<<<<<<
@@ -37539,18 +39297,18 @@ static PyObject *__pyx_memoryview_setitem_slice_assign_scalar(struct __pyx_memor
__pyx_t_1 = ((__pyx_v_self->view.suboffsets != NULL) != 0);
if (__pyx_t_1) {
- /* "View.MemoryView":464
+ /* "View.MemoryView":470
*
* if self.view.suboffsets != NULL:
* assert_direct_dimensions(self.view.suboffsets, self.view.ndim) # <<<<<<<<<<<<<<
* slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize,
* item, self.dtype_is_object)
*/
- __pyx_t_2 = assert_direct_dimensions(__pyx_v_self->view.suboffsets, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 464, __pyx_L6_error)
+ __pyx_t_2 = assert_direct_dimensions(__pyx_v_self->view.suboffsets, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 470, __pyx_L6_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "View.MemoryView":463
+ /* "View.MemoryView":469
*
*
* if self.view.suboffsets != NULL: # <<<<<<<<<<<<<<
@@ -37559,7 +39317,7 @@ static PyObject *__pyx_memoryview_setitem_slice_assign_scalar(struct __pyx_memor
*/
}
- /* "View.MemoryView":465
+ /* "View.MemoryView":471
* if self.view.suboffsets != NULL:
* assert_direct_dimensions(self.view.suboffsets, self.view.ndim)
* slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize, # <<<<<<<<<<<<<<
@@ -37569,7 +39327,7 @@ static PyObject *__pyx_memoryview_setitem_slice_assign_scalar(struct __pyx_memor
__pyx_memoryview_slice_assign_scalar(__pyx_v_dst_slice, __pyx_v_dst->view.ndim, __pyx_v_self->view.itemsize, __pyx_v_item, __pyx_v_self->dtype_is_object);
}
- /* "View.MemoryView":468
+ /* "View.MemoryView":474
* item, self.dtype_is_object)
* finally:
* PyMem_Free(tmp) # <<<<<<<<<<<<<<
@@ -37581,11 +39339,11 @@ static PyObject *__pyx_memoryview_setitem_slice_assign_scalar(struct __pyx_memor
PyMem_Free(__pyx_v_tmp);
goto __pyx_L7;
}
+ __pyx_L6_error:;
/*exception exit:*/{
__Pyx_PyThreadState_declare
- __pyx_L6_error:;
- __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0;
__Pyx_PyThreadState_assign
+ __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0;
__Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8) < 0)) __Pyx_ErrFetch(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
@@ -37599,7 +39357,6 @@ static PyObject *__pyx_memoryview_setitem_slice_assign_scalar(struct __pyx_memor
{
PyMem_Free(__pyx_v_tmp);
}
- __Pyx_PyThreadState_assign
if (PY_MAJOR_VERSION >= 3) {
__Pyx_XGIVEREF(__pyx_t_9);
__Pyx_XGIVEREF(__pyx_t_10);
@@ -37617,7 +39374,7 @@ static PyObject *__pyx_memoryview_setitem_slice_assign_scalar(struct __pyx_memor
__pyx_L7:;
}
- /* "View.MemoryView":438
+ /* "View.MemoryView":444
* src.ndim, dst.ndim, self.dtype_is_object)
*
* cdef setitem_slice_assign_scalar(self, memoryview dst, value): # <<<<<<<<<<<<<<
@@ -37638,7 +39395,7 @@ static PyObject *__pyx_memoryview_setitem_slice_assign_scalar(struct __pyx_memor
return __pyx_r;
}
-/* "View.MemoryView":470
+/* "View.MemoryView":476
* PyMem_Free(tmp)
*
* cdef setitem_indexed(self, index, value): # <<<<<<<<<<<<<<
@@ -37654,28 +39411,28 @@ static PyObject *__pyx_memoryview_setitem_indexed(struct __pyx_memoryview_obj *_
PyObject *__pyx_t_2 = NULL;
__Pyx_RefNannySetupContext("setitem_indexed", 0);
- /* "View.MemoryView":471
+ /* "View.MemoryView":477
*
* cdef setitem_indexed(self, index, value):
* cdef char *itemp = self.get_item_pointer(index) # <<<<<<<<<<<<<<
* self.assign_item_from_object(itemp, value)
*
*/
- __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->get_item_pointer(__pyx_v_self, __pyx_v_index); if (unlikely(__pyx_t_1 == NULL)) __PYX_ERR(2, 471, __pyx_L1_error)
+ __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->get_item_pointer(__pyx_v_self, __pyx_v_index); if (unlikely(__pyx_t_1 == ((char *)NULL))) __PYX_ERR(2, 477, __pyx_L1_error)
__pyx_v_itemp = __pyx_t_1;
- /* "View.MemoryView":472
+ /* "View.MemoryView":478
* cdef setitem_indexed(self, index, value):
* cdef char *itemp = self.get_item_pointer(index)
* self.assign_item_from_object(itemp, value) # <<<<<<<<<<<<<<
*
* cdef convert_item_to_object(self, char *itemp):
*/
- __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->assign_item_from_object(__pyx_v_self, __pyx_v_itemp, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 472, __pyx_L1_error)
+ __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->assign_item_from_object(__pyx_v_self, __pyx_v_itemp, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 478, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "View.MemoryView":470
+ /* "View.MemoryView":476
* PyMem_Free(tmp)
*
* cdef setitem_indexed(self, index, value): # <<<<<<<<<<<<<<
@@ -37696,7 +39453,7 @@ static PyObject *__pyx_memoryview_setitem_indexed(struct __pyx_memoryview_obj *_
return __pyx_r;
}
-/* "View.MemoryView":474
+/* "View.MemoryView":480
* self.assign_item_from_object(itemp, value)
*
* cdef convert_item_to_object(self, char *itemp): # <<<<<<<<<<<<<<
@@ -37723,31 +39480,31 @@ static PyObject *__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview
int __pyx_t_11;
__Pyx_RefNannySetupContext("convert_item_to_object", 0);
- /* "View.MemoryView":477
+ /* "View.MemoryView":483
* """Only used if instantiated manually by the user, or if Cython doesn't
* know how to convert the type"""
* import struct # <<<<<<<<<<<<<<
* cdef bytes bytesitem
*
*/
- __pyx_t_1 = __Pyx_Import(__pyx_n_s_struct, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 477, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_Import(__pyx_n_s_struct, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 483, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_v_struct = __pyx_t_1;
__pyx_t_1 = 0;
- /* "View.MemoryView":480
+ /* "View.MemoryView":486
* cdef bytes bytesitem
*
* bytesitem = itemp[:self.view.itemsize] # <<<<<<<<<<<<<<
* try:
* result = struct.unpack(self.view.format, bytesitem)
*/
- __pyx_t_1 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_itemp + 0, __pyx_v_self->view.itemsize - 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 480, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_itemp + 0, __pyx_v_self->view.itemsize - 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 486, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_v_bytesitem = ((PyObject*)__pyx_t_1);
__pyx_t_1 = 0;
- /* "View.MemoryView":481
+ /* "View.MemoryView":487
*
* bytesitem = itemp[:self.view.itemsize]
* try: # <<<<<<<<<<<<<<
@@ -37763,16 +39520,16 @@ static PyObject *__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview
__Pyx_XGOTREF(__pyx_t_4);
/*try:*/ {
- /* "View.MemoryView":482
+ /* "View.MemoryView":488
* bytesitem = itemp[:self.view.itemsize]
* try:
* result = struct.unpack(self.view.format, bytesitem) # <<<<<<<<<<<<<<
* except struct.error:
* raise ValueError("Unable to convert item to object")
*/
- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_unpack); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 482, __pyx_L3_error)
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_unpack); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 488, __pyx_L3_error)
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_6 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 482, __pyx_L3_error)
+ __pyx_t_6 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 488, __pyx_L3_error)
__Pyx_GOTREF(__pyx_t_6);
__pyx_t_7 = NULL;
__pyx_t_8 = 0;
@@ -37789,7 +39546,7 @@ static PyObject *__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview
#if CYTHON_FAST_PYCALL
if (PyFunction_Check(__pyx_t_5)) {
PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_6, __pyx_v_bytesitem};
- __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 482, __pyx_L3_error)
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 488, __pyx_L3_error)
__Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
@@ -37798,14 +39555,14 @@ static PyObject *__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview
#if CYTHON_FAST_PYCCALL
if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_6, __pyx_v_bytesitem};
- __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 482, __pyx_L3_error)
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 488, __pyx_L3_error)
__Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
} else
#endif
{
- __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 482, __pyx_L3_error)
+ __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 488, __pyx_L3_error)
__Pyx_GOTREF(__pyx_t_9);
if (__pyx_t_7) {
__Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
@@ -37816,7 +39573,7 @@ static PyObject *__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview
__Pyx_GIVEREF(__pyx_v_bytesitem);
PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v_bytesitem);
__pyx_t_6 = 0;
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 482, __pyx_L3_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 488, __pyx_L3_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
}
@@ -37824,7 +39581,7 @@ static PyObject *__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview
__pyx_v_result = __pyx_t_1;
__pyx_t_1 = 0;
- /* "View.MemoryView":481
+ /* "View.MemoryView":487
*
* bytesitem = itemp[:self.view.itemsize]
* try: # <<<<<<<<<<<<<<
@@ -37833,7 +39590,7 @@ static PyObject *__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview
*/
}
- /* "View.MemoryView":486
+ /* "View.MemoryView":492
* raise ValueError("Unable to convert item to object")
* else:
* if len(self.view.format) == 1: # <<<<<<<<<<<<<<
@@ -37845,7 +39602,7 @@ static PyObject *__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview
__pyx_t_11 = ((__pyx_t_10 == 1) != 0);
if (__pyx_t_11) {
- /* "View.MemoryView":487
+ /* "View.MemoryView":493
* else:
* if len(self.view.format) == 1:
* return result[0] # <<<<<<<<<<<<<<
@@ -37853,13 +39610,13 @@ static PyObject *__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview
*
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_result, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 487, __pyx_L5_except_error)
+ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_result, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 493, __pyx_L5_except_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L6_except_return;
- /* "View.MemoryView":486
+ /* "View.MemoryView":492
* raise ValueError("Unable to convert item to object")
* else:
* if len(self.view.format) == 1: # <<<<<<<<<<<<<<
@@ -37868,7 +39625,7 @@ static PyObject *__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview
*/
}
- /* "View.MemoryView":488
+ /* "View.MemoryView":494
* if len(self.view.format) == 1:
* return result[0]
* return result # <<<<<<<<<<<<<<
@@ -37881,62 +39638,62 @@ static PyObject *__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview
goto __pyx_L6_except_return;
}
__pyx_L3_error:;
- __Pyx_PyThreadState_assign
__Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "View.MemoryView":483
+ /* "View.MemoryView":489
* try:
* result = struct.unpack(self.view.format, bytesitem)
* except struct.error: # <<<<<<<<<<<<<<
* raise ValueError("Unable to convert item to object")
* else:
*/
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_error); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 483, __pyx_L5_except_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_ErrFetch(&__pyx_t_1, &__pyx_t_5, &__pyx_t_9);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_error); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 489, __pyx_L5_except_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_8 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_1, __pyx_t_6);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_ErrRestore(__pyx_t_1, __pyx_t_5, __pyx_t_9);
+ __pyx_t_1 = 0; __pyx_t_5 = 0; __pyx_t_9 = 0;
if (__pyx_t_8) {
__Pyx_AddTraceback("View.MemoryView.memoryview.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
- if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_5, &__pyx_t_9) < 0) __PYX_ERR(2, 483, __pyx_L5_except_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_GOTREF(__pyx_t_5);
+ if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_5, &__pyx_t_1) < 0) __PYX_ERR(2, 489, __pyx_L5_except_error)
__Pyx_GOTREF(__pyx_t_9);
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_GOTREF(__pyx_t_1);
- /* "View.MemoryView":484
+ /* "View.MemoryView":490
* result = struct.unpack(self.view.format, bytesitem)
* except struct.error:
* raise ValueError("Unable to convert item to object") # <<<<<<<<<<<<<<
* else:
* if len(self.view.format) == 1:
*/
- __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__46, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 484, __pyx_L5_except_error)
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__49, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 490, __pyx_L5_except_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(2, 484, __pyx_L5_except_error)
+ __PYX_ERR(2, 490, __pyx_L5_except_error)
}
goto __pyx_L5_except_error;
__pyx_L5_except_error:;
- /* "View.MemoryView":481
+ /* "View.MemoryView":487
*
* bytesitem = itemp[:self.view.itemsize]
* try: # <<<<<<<<<<<<<<
* result = struct.unpack(self.view.format, bytesitem)
* except struct.error:
*/
- __Pyx_PyThreadState_assign
__Pyx_XGIVEREF(__pyx_t_2);
__Pyx_XGIVEREF(__pyx_t_3);
__Pyx_XGIVEREF(__pyx_t_4);
__Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
goto __pyx_L1_error;
__pyx_L6_except_return:;
- __Pyx_PyThreadState_assign
__Pyx_XGIVEREF(__pyx_t_2);
__Pyx_XGIVEREF(__pyx_t_3);
__Pyx_XGIVEREF(__pyx_t_4);
@@ -37944,7 +39701,7 @@ static PyObject *__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview
goto __pyx_L0;
}
- /* "View.MemoryView":474
+ /* "View.MemoryView":480
* self.assign_item_from_object(itemp, value)
*
* cdef convert_item_to_object(self, char *itemp): # <<<<<<<<<<<<<<
@@ -37970,7 +39727,7 @@ static PyObject *__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview
return __pyx_r;
}
-/* "View.MemoryView":490
+/* "View.MemoryView":496
* return result
*
* cdef assign_item_from_object(self, char *itemp, object value): # <<<<<<<<<<<<<<
@@ -38001,19 +39758,19 @@ static PyObject *__pyx_memoryview_assign_item_from_object(struct __pyx_memoryvie
char *__pyx_t_14;
__Pyx_RefNannySetupContext("assign_item_from_object", 0);
- /* "View.MemoryView":493
+ /* "View.MemoryView":499
* """Only used if instantiated manually by the user, or if Cython doesn't
* know how to convert the type"""
* import struct # <<<<<<<<<<<<<<
* cdef char c
* cdef bytes bytesvalue
*/
- __pyx_t_1 = __Pyx_Import(__pyx_n_s_struct, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 493, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_Import(__pyx_n_s_struct, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 499, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_v_struct = __pyx_t_1;
__pyx_t_1 = 0;
- /* "View.MemoryView":498
+ /* "View.MemoryView":504
* cdef Py_ssize_t i
*
* if isinstance(value, tuple): # <<<<<<<<<<<<<<
@@ -38024,37 +39781,37 @@ static PyObject *__pyx_memoryview_assign_item_from_object(struct __pyx_memoryvie
__pyx_t_3 = (__pyx_t_2 != 0);
if (__pyx_t_3) {
- /* "View.MemoryView":499
+ /* "View.MemoryView":505
*
* if isinstance(value, tuple):
* bytesvalue = struct.pack(self.view.format, *value) # <<<<<<<<<<<<<<
* else:
* bytesvalue = struct.pack(self.view.format, value)
*/
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_pack); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 499, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_pack); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 505, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 499, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 505, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 499, __pyx_L1_error)
+ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 505, __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 = PySequence_Tuple(__pyx_v_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 499, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_v_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 505, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_6 = PyNumber_Add(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 499, __pyx_L1_error)
+ __pyx_t_6 = PyNumber_Add(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 505, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 499, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 505, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_4)->tp_name), 0))) __PYX_ERR(2, 499, __pyx_L1_error)
+ if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_4)->tp_name), 0))) __PYX_ERR(2, 505, __pyx_L1_error)
__pyx_v_bytesvalue = ((PyObject*)__pyx_t_4);
__pyx_t_4 = 0;
- /* "View.MemoryView":498
+ /* "View.MemoryView":504
* cdef Py_ssize_t i
*
* if isinstance(value, tuple): # <<<<<<<<<<<<<<
@@ -38064,7 +39821,7 @@ static PyObject *__pyx_memoryview_assign_item_from_object(struct __pyx_memoryvie
goto __pyx_L3;
}
- /* "View.MemoryView":501
+ /* "View.MemoryView":507
* bytesvalue = struct.pack(self.view.format, *value)
* else:
* bytesvalue = struct.pack(self.view.format, value) # <<<<<<<<<<<<<<
@@ -38072,9 +39829,9 @@ static PyObject *__pyx_memoryview_assign_item_from_object(struct __pyx_memoryvie
* for i, c in enumerate(bytesvalue):
*/
/*else*/ {
- __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_pack); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 501, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_pack); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 507, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 501, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 507, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_5 = NULL;
__pyx_t_7 = 0;
@@ -38091,7 +39848,7 @@ static PyObject *__pyx_memoryview_assign_item_from_object(struct __pyx_memoryvie
#if CYTHON_FAST_PYCALL
if (PyFunction_Check(__pyx_t_6)) {
PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_1, __pyx_v_value};
- __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 501, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 507, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
@@ -38100,14 +39857,14 @@ static PyObject *__pyx_memoryview_assign_item_from_object(struct __pyx_memoryvie
#if CYTHON_FAST_PYCCALL
if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_1, __pyx_v_value};
- __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 501, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 507, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
} else
#endif
{
- __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 501, __pyx_L1_error)
+ __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 507, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_8);
if (__pyx_t_5) {
__Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL;
@@ -38118,18 +39875,18 @@ static PyObject *__pyx_memoryview_assign_item_from_object(struct __pyx_memoryvie
__Pyx_GIVEREF(__pyx_v_value);
PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_value);
__pyx_t_1 = 0;
- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 501, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 507, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
}
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_4)->tp_name), 0))) __PYX_ERR(2, 501, __pyx_L1_error)
+ if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_4)->tp_name), 0))) __PYX_ERR(2, 507, __pyx_L1_error)
__pyx_v_bytesvalue = ((PyObject*)__pyx_t_4);
__pyx_t_4 = 0;
}
__pyx_L3:;
- /* "View.MemoryView":503
+ /* "View.MemoryView":509
* bytesvalue = struct.pack(self.view.format, value)
*
* for i, c in enumerate(bytesvalue): # <<<<<<<<<<<<<<
@@ -38139,7 +39896,7 @@ static PyObject *__pyx_memoryview_assign_item_from_object(struct __pyx_memoryvie
__pyx_t_9 = 0;
if (unlikely(__pyx_v_bytesvalue == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' is not iterable");
- __PYX_ERR(2, 503, __pyx_L1_error)
+ __PYX_ERR(2, 509, __pyx_L1_error)
}
__Pyx_INCREF(__pyx_v_bytesvalue);
__pyx_t_10 = __pyx_v_bytesvalue;
@@ -38149,7 +39906,7 @@ static PyObject *__pyx_memoryview_assign_item_from_object(struct __pyx_memoryvie
__pyx_t_11 = __pyx_t_14;
__pyx_v_c = (__pyx_t_11[0]);
- /* "View.MemoryView":504
+ /* "View.MemoryView":510
*
* for i, c in enumerate(bytesvalue):
* itemp[i] = c # <<<<<<<<<<<<<<
@@ -38158,7 +39915,7 @@ static PyObject *__pyx_memoryview_assign_item_from_object(struct __pyx_memoryvie
*/
__pyx_v_i = __pyx_t_9;
- /* "View.MemoryView":503
+ /* "View.MemoryView":509
* bytesvalue = struct.pack(self.view.format, value)
*
* for i, c in enumerate(bytesvalue): # <<<<<<<<<<<<<<
@@ -38167,7 +39924,7 @@ static PyObject *__pyx_memoryview_assign_item_from_object(struct __pyx_memoryvie
*/
__pyx_t_9 = (__pyx_t_9 + 1);
- /* "View.MemoryView":504
+ /* "View.MemoryView":510
*
* for i, c in enumerate(bytesvalue):
* itemp[i] = c # <<<<<<<<<<<<<<
@@ -38178,7 +39935,7 @@ static PyObject *__pyx_memoryview_assign_item_from_object(struct __pyx_memoryvie
}
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- /* "View.MemoryView":490
+ /* "View.MemoryView":496
* return result
*
* cdef assign_item_from_object(self, char *itemp, object value): # <<<<<<<<<<<<<<
@@ -38206,12 +39963,12 @@ static PyObject *__pyx_memoryview_assign_item_from_object(struct __pyx_memoryvie
return __pyx_r;
}
-/* "View.MemoryView":507
+/* "View.MemoryView":513
*
* @cname('getbuffer')
* def __getbuffer__(self, Py_buffer *info, int flags): # <<<<<<<<<<<<<<
- * if flags & PyBUF_STRIDES:
- * info.shape = self.view.shape
+ * if flags & PyBUF_WRITABLE and self.view.readonly:
+ * raise ValueError("Cannot create writable memory view from read-only memoryview")
*/
/* Python wrapper */
@@ -38231,20 +39988,64 @@ static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbu
int __pyx_r;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
- Py_ssize_t *__pyx_t_2;
- char *__pyx_t_3;
- void *__pyx_t_4;
- int __pyx_t_5;
- Py_ssize_t __pyx_t_6;
+ int __pyx_t_2;
+ PyObject *__pyx_t_3 = NULL;
+ Py_ssize_t *__pyx_t_4;
+ char *__pyx_t_5;
+ void *__pyx_t_6;
+ int __pyx_t_7;
+ Py_ssize_t __pyx_t_8;
+ if (__pyx_v_info == NULL) {
+ PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete");
+ return -1;
+ }
__Pyx_RefNannySetupContext("__getbuffer__", 0);
- if (__pyx_v_info != NULL) {
- __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
- __Pyx_GIVEREF(__pyx_v_info->obj);
+ __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
+ __Pyx_GIVEREF(__pyx_v_info->obj);
+
+ /* "View.MemoryView":514
+ * @cname('getbuffer')
+ * def __getbuffer__(self, Py_buffer *info, int flags):
+ * if flags & PyBUF_WRITABLE and self.view.readonly: # <<<<<<<<<<<<<<
+ * raise ValueError("Cannot create writable memory view from read-only memoryview")
+ *
+ */
+ __pyx_t_2 = ((__pyx_v_flags & PyBUF_WRITABLE) != 0);
+ if (__pyx_t_2) {
+ } else {
+ __pyx_t_1 = __pyx_t_2;
+ goto __pyx_L4_bool_binop_done;
}
+ __pyx_t_2 = (__pyx_v_self->view.readonly != 0);
+ __pyx_t_1 = __pyx_t_2;
+ __pyx_L4_bool_binop_done:;
+ if (unlikely(__pyx_t_1)) {
+
+ /* "View.MemoryView":515
+ * def __getbuffer__(self, Py_buffer *info, int flags):
+ * if flags & PyBUF_WRITABLE and self.view.readonly:
+ * raise ValueError("Cannot create writable memory view from read-only memoryview") # <<<<<<<<<<<<<<
+ *
+ * if flags & PyBUF_STRIDES:
+ */
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__50, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 515, __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, 515, __pyx_L1_error)
- /* "View.MemoryView":508
+ /* "View.MemoryView":514
* @cname('getbuffer')
* def __getbuffer__(self, Py_buffer *info, int flags):
+ * if flags & PyBUF_WRITABLE and self.view.readonly: # <<<<<<<<<<<<<<
+ * raise ValueError("Cannot create writable memory view from read-only memoryview")
+ *
+ */
+ }
+
+ /* "View.MemoryView":517
+ * raise ValueError("Cannot create writable memory view from read-only memoryview")
+ *
* if flags & PyBUF_STRIDES: # <<<<<<<<<<<<<<
* info.shape = self.view.shape
* else:
@@ -38252,27 +40053,27 @@ static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbu
__pyx_t_1 = ((__pyx_v_flags & PyBUF_STRIDES) != 0);
if (__pyx_t_1) {
- /* "View.MemoryView":509
- * def __getbuffer__(self, Py_buffer *info, int flags):
+ /* "View.MemoryView":518
+ *
* if flags & PyBUF_STRIDES:
* info.shape = self.view.shape # <<<<<<<<<<<<<<
* else:
* info.shape = NULL
*/
- __pyx_t_2 = __pyx_v_self->view.shape;
- __pyx_v_info->shape = __pyx_t_2;
+ __pyx_t_4 = __pyx_v_self->view.shape;
+ __pyx_v_info->shape = __pyx_t_4;
- /* "View.MemoryView":508
- * @cname('getbuffer')
- * def __getbuffer__(self, Py_buffer *info, int flags):
+ /* "View.MemoryView":517
+ * raise ValueError("Cannot create writable memory view from read-only memoryview")
+ *
* if flags & PyBUF_STRIDES: # <<<<<<<<<<<<<<
* info.shape = self.view.shape
* else:
*/
- goto __pyx_L3;
+ goto __pyx_L6;
}
- /* "View.MemoryView":511
+ /* "View.MemoryView":520
* info.shape = self.view.shape
* else:
* info.shape = NULL # <<<<<<<<<<<<<<
@@ -38282,9 +40083,9 @@ static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbu
/*else*/ {
__pyx_v_info->shape = NULL;
}
- __pyx_L3:;
+ __pyx_L6:;
- /* "View.MemoryView":513
+ /* "View.MemoryView":522
* info.shape = NULL
*
* if flags & PyBUF_STRIDES: # <<<<<<<<<<<<<<
@@ -38294,27 +40095,27 @@ static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbu
__pyx_t_1 = ((__pyx_v_flags & PyBUF_STRIDES) != 0);
if (__pyx_t_1) {
- /* "View.MemoryView":514
+ /* "View.MemoryView":523
*
* if flags & PyBUF_STRIDES:
* info.strides = self.view.strides # <<<<<<<<<<<<<<
* else:
* info.strides = NULL
*/
- __pyx_t_2 = __pyx_v_self->view.strides;
- __pyx_v_info->strides = __pyx_t_2;
+ __pyx_t_4 = __pyx_v_self->view.strides;
+ __pyx_v_info->strides = __pyx_t_4;
- /* "View.MemoryView":513
+ /* "View.MemoryView":522
* info.shape = NULL
*
* if flags & PyBUF_STRIDES: # <<<<<<<<<<<<<<
* info.strides = self.view.strides
* else:
*/
- goto __pyx_L4;
+ goto __pyx_L7;
}
- /* "View.MemoryView":516
+ /* "View.MemoryView":525
* info.strides = self.view.strides
* else:
* info.strides = NULL # <<<<<<<<<<<<<<
@@ -38324,9 +40125,9 @@ static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbu
/*else*/ {
__pyx_v_info->strides = NULL;
}
- __pyx_L4:;
+ __pyx_L7:;
- /* "View.MemoryView":518
+ /* "View.MemoryView":527
* info.strides = NULL
*
* if flags & PyBUF_INDIRECT: # <<<<<<<<<<<<<<
@@ -38336,27 +40137,27 @@ static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbu
__pyx_t_1 = ((__pyx_v_flags & PyBUF_INDIRECT) != 0);
if (__pyx_t_1) {
- /* "View.MemoryView":519
+ /* "View.MemoryView":528
*
* if flags & PyBUF_INDIRECT:
* info.suboffsets = self.view.suboffsets # <<<<<<<<<<<<<<
* else:
* info.suboffsets = NULL
*/
- __pyx_t_2 = __pyx_v_self->view.suboffsets;
- __pyx_v_info->suboffsets = __pyx_t_2;
+ __pyx_t_4 = __pyx_v_self->view.suboffsets;
+ __pyx_v_info->suboffsets = __pyx_t_4;
- /* "View.MemoryView":518
+ /* "View.MemoryView":527
* info.strides = NULL
*
* if flags & PyBUF_INDIRECT: # <<<<<<<<<<<<<<
* info.suboffsets = self.view.suboffsets
* else:
*/
- goto __pyx_L5;
+ goto __pyx_L8;
}
- /* "View.MemoryView":521
+ /* "View.MemoryView":530
* info.suboffsets = self.view.suboffsets
* else:
* info.suboffsets = NULL # <<<<<<<<<<<<<<
@@ -38366,9 +40167,9 @@ static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbu
/*else*/ {
__pyx_v_info->suboffsets = NULL;
}
- __pyx_L5:;
+ __pyx_L8:;
- /* "View.MemoryView":523
+ /* "View.MemoryView":532
* info.suboffsets = NULL
*
* if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<<
@@ -38378,27 +40179,27 @@ static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbu
__pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0);
if (__pyx_t_1) {
- /* "View.MemoryView":524
+ /* "View.MemoryView":533
*
* if flags & PyBUF_FORMAT:
* info.format = self.view.format # <<<<<<<<<<<<<<
* else:
* info.format = NULL
*/
- __pyx_t_3 = __pyx_v_self->view.format;
- __pyx_v_info->format = __pyx_t_3;
+ __pyx_t_5 = __pyx_v_self->view.format;
+ __pyx_v_info->format = __pyx_t_5;
- /* "View.MemoryView":523
+ /* "View.MemoryView":532
* info.suboffsets = NULL
*
* if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<<
* info.format = self.view.format
* else:
*/
- goto __pyx_L6;
+ goto __pyx_L9;
}
- /* "View.MemoryView":526
+ /* "View.MemoryView":535
* info.format = self.view.format
* else:
* info.format = NULL # <<<<<<<<<<<<<<
@@ -38408,60 +40209,61 @@ static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbu
/*else*/ {
__pyx_v_info->format = NULL;
}
- __pyx_L6:;
+ __pyx_L9:;
- /* "View.MemoryView":528
+ /* "View.MemoryView":537
* info.format = NULL
*
* info.buf = self.view.buf # <<<<<<<<<<<<<<
* info.ndim = self.view.ndim
* info.itemsize = self.view.itemsize
*/
- __pyx_t_4 = __pyx_v_self->view.buf;
- __pyx_v_info->buf = __pyx_t_4;
+ __pyx_t_6 = __pyx_v_self->view.buf;
+ __pyx_v_info->buf = __pyx_t_6;
- /* "View.MemoryView":529
+ /* "View.MemoryView":538
*
* info.buf = self.view.buf
* info.ndim = self.view.ndim # <<<<<<<<<<<<<<
* info.itemsize = self.view.itemsize
* info.len = self.view.len
*/
- __pyx_t_5 = __pyx_v_self->view.ndim;
- __pyx_v_info->ndim = __pyx_t_5;
+ __pyx_t_7 = __pyx_v_self->view.ndim;
+ __pyx_v_info->ndim = __pyx_t_7;
- /* "View.MemoryView":530
+ /* "View.MemoryView":539
* info.buf = self.view.buf
* info.ndim = self.view.ndim
* info.itemsize = self.view.itemsize # <<<<<<<<<<<<<<
* info.len = self.view.len
- * info.readonly = 0
+ * info.readonly = self.view.readonly
*/
- __pyx_t_6 = __pyx_v_self->view.itemsize;
- __pyx_v_info->itemsize = __pyx_t_6;
+ __pyx_t_8 = __pyx_v_self->view.itemsize;
+ __pyx_v_info->itemsize = __pyx_t_8;
- /* "View.MemoryView":531
+ /* "View.MemoryView":540
* info.ndim = self.view.ndim
* info.itemsize = self.view.itemsize
* info.len = self.view.len # <<<<<<<<<<<<<<
- * info.readonly = 0
+ * info.readonly = self.view.readonly
* info.obj = self
*/
- __pyx_t_6 = __pyx_v_self->view.len;
- __pyx_v_info->len = __pyx_t_6;
+ __pyx_t_8 = __pyx_v_self->view.len;
+ __pyx_v_info->len = __pyx_t_8;
- /* "View.MemoryView":532
+ /* "View.MemoryView":541
* info.itemsize = self.view.itemsize
* info.len = self.view.len
- * info.readonly = 0 # <<<<<<<<<<<<<<
+ * info.readonly = self.view.readonly # <<<<<<<<<<<<<<
* info.obj = self
*
*/
- __pyx_v_info->readonly = 0;
+ __pyx_t_1 = __pyx_v_self->view.readonly;
+ __pyx_v_info->readonly = __pyx_t_1;
- /* "View.MemoryView":533
+ /* "View.MemoryView":542
* info.len = self.view.len
- * info.readonly = 0
+ * info.readonly = self.view.readonly
* info.obj = self # <<<<<<<<<<<<<<
*
* __pyx_getbuffer = capsule(<void *> &__pyx_memoryview_getbuffer, "getbuffer(obj, view, flags)")
@@ -38472,25 +40274,37 @@ static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbu
__Pyx_DECREF(__pyx_v_info->obj);
__pyx_v_info->obj = ((PyObject *)__pyx_v_self);
- /* "View.MemoryView":507
+ /* "View.MemoryView":513
*
* @cname('getbuffer')
* def __getbuffer__(self, Py_buffer *info, int flags): # <<<<<<<<<<<<<<
- * if flags & PyBUF_STRIDES:
- * info.shape = self.view.shape
+ * if flags & PyBUF_WRITABLE and self.view.readonly:
+ * raise ValueError("Cannot create writable memory view from read-only memoryview")
*/
/* function exit code */
__pyx_r = 0;
- if (__pyx_v_info != NULL && __pyx_v_info->obj == Py_None) {
- __Pyx_GOTREF(Py_None);
- __Pyx_DECREF(Py_None); __pyx_v_info->obj = NULL;
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_AddTraceback("View.MemoryView.memoryview.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = -1;
+ if (__pyx_v_info->obj != NULL) {
+ __Pyx_GOTREF(__pyx_v_info->obj);
+ __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
}
+ goto __pyx_L2;
+ __pyx_L0:;
+ if (__pyx_v_info->obj == Py_None) {
+ __Pyx_GOTREF(__pyx_v_info->obj);
+ __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
+ }
+ __pyx_L2:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "View.MemoryView":539
+/* "View.MemoryView":548
*
* @property
* def T(self): # <<<<<<<<<<<<<<
@@ -38519,29 +40333,29 @@ static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(struct _
int __pyx_t_2;
__Pyx_RefNannySetupContext("__get__", 0);
- /* "View.MemoryView":540
+ /* "View.MemoryView":549
* @property
* def T(self):
* cdef _memoryviewslice result = memoryview_copy(self) # <<<<<<<<<<<<<<
* transpose_memslice(&result.from_slice)
* return result
*/
- __pyx_t_1 = __pyx_memoryview_copy_object(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 540, __pyx_L1_error)
+ __pyx_t_1 = __pyx_memoryview_copy_object(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 549, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_memoryviewslice_type))))) __PYX_ERR(2, 540, __pyx_L1_error)
+ if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_memoryviewslice_type))))) __PYX_ERR(2, 549, __pyx_L1_error)
__pyx_v_result = ((struct __pyx_memoryviewslice_obj *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "View.MemoryView":541
+ /* "View.MemoryView":550
* def T(self):
* cdef _memoryviewslice result = memoryview_copy(self)
* transpose_memslice(&result.from_slice) # <<<<<<<<<<<<<<
* return result
*
*/
- __pyx_t_2 = __pyx_memslice_transpose((&__pyx_v_result->from_slice)); if (unlikely(__pyx_t_2 == 0)) __PYX_ERR(2, 541, __pyx_L1_error)
+ __pyx_t_2 = __pyx_memslice_transpose((&__pyx_v_result->from_slice)); if (unlikely(__pyx_t_2 == ((int)0))) __PYX_ERR(2, 550, __pyx_L1_error)
- /* "View.MemoryView":542
+ /* "View.MemoryView":551
* cdef _memoryviewslice result = memoryview_copy(self)
* transpose_memslice(&result.from_slice)
* return result # <<<<<<<<<<<<<<
@@ -38553,7 +40367,7 @@ static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(struct _
__pyx_r = ((PyObject *)__pyx_v_result);
goto __pyx_L0;
- /* "View.MemoryView":539
+ /* "View.MemoryView":548
*
* @property
* def T(self): # <<<<<<<<<<<<<<
@@ -38573,7 +40387,7 @@ static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(struct _
return __pyx_r;
}
-/* "View.MemoryView":545
+/* "View.MemoryView":554
*
* @property
* def base(self): # <<<<<<<<<<<<<<
@@ -38599,7 +40413,7 @@ static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(struc
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__get__", 0);
- /* "View.MemoryView":546
+ /* "View.MemoryView":555
* @property
* def base(self):
* return self.obj # <<<<<<<<<<<<<<
@@ -38611,7 +40425,7 @@ static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(struc
__pyx_r = __pyx_v_self->obj;
goto __pyx_L0;
- /* "View.MemoryView":545
+ /* "View.MemoryView":554
*
* @property
* def base(self): # <<<<<<<<<<<<<<
@@ -38626,7 +40440,7 @@ static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(struc
return __pyx_r;
}
-/* "View.MemoryView":549
+/* "View.MemoryView":558
*
* @property
* def shape(self): # <<<<<<<<<<<<<<
@@ -38658,7 +40472,7 @@ static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(stru
PyObject *__pyx_t_5 = NULL;
__Pyx_RefNannySetupContext("__get__", 0);
- /* "View.MemoryView":550
+ /* "View.MemoryView":559
* @property
* def shape(self):
* return tuple([length for length in self.view.shape[:self.view.ndim]]) # <<<<<<<<<<<<<<
@@ -38666,25 +40480,25 @@ static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(stru
* @property
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 550, __pyx_L1_error)
+ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 559, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_3 = (__pyx_v_self->view.shape + __pyx_v_self->view.ndim);
for (__pyx_t_4 = __pyx_v_self->view.shape; __pyx_t_4 < __pyx_t_3; __pyx_t_4++) {
__pyx_t_2 = __pyx_t_4;
__pyx_v_length = (__pyx_t_2[0]);
- __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_length); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 550, __pyx_L1_error)
+ __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_length); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 559, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
- if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(2, 550, __pyx_L1_error)
+ if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(2, 559, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
}
- __pyx_t_5 = PyList_AsTuple(((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 550, __pyx_L1_error)
+ __pyx_t_5 = PyList_AsTuple(((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 559, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_r = __pyx_t_5;
__pyx_t_5 = 0;
goto __pyx_L0;
- /* "View.MemoryView":549
+ /* "View.MemoryView":558
*
* @property
* def shape(self): # <<<<<<<<<<<<<<
@@ -38704,7 +40518,7 @@ static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(stru
return __pyx_r;
}
-/* "View.MemoryView":553
+/* "View.MemoryView":562
*
* @property
* def strides(self): # <<<<<<<<<<<<<<
@@ -38737,7 +40551,7 @@ static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(st
PyObject *__pyx_t_6 = NULL;
__Pyx_RefNannySetupContext("__get__", 0);
- /* "View.MemoryView":554
+ /* "View.MemoryView":563
* @property
* def strides(self):
* if self.view.strides == NULL: # <<<<<<<<<<<<<<
@@ -38745,22 +40559,22 @@ static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(st
* raise ValueError("Buffer view does not expose strides")
*/
__pyx_t_1 = ((__pyx_v_self->view.strides == NULL) != 0);
- if (__pyx_t_1) {
+ if (unlikely(__pyx_t_1)) {
- /* "View.MemoryView":556
+ /* "View.MemoryView":565
* if self.view.strides == NULL:
*
* raise ValueError("Buffer view does not expose strides") # <<<<<<<<<<<<<<
*
* return tuple([stride for stride in self.view.strides[:self.view.ndim]])
*/
- __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__47, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 556, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__51, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 565, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __PYX_ERR(2, 556, __pyx_L1_error)
+ __PYX_ERR(2, 565, __pyx_L1_error)
- /* "View.MemoryView":554
+ /* "View.MemoryView":563
* @property
* def strides(self):
* if self.view.strides == NULL: # <<<<<<<<<<<<<<
@@ -38769,7 +40583,7 @@ static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(st
*/
}
- /* "View.MemoryView":558
+ /* "View.MemoryView":567
* raise ValueError("Buffer view does not expose strides")
*
* return tuple([stride for stride in self.view.strides[:self.view.ndim]]) # <<<<<<<<<<<<<<
@@ -38777,25 +40591,25 @@ static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(st
* @property
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 558, __pyx_L1_error)
+ __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 567, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_4 = (__pyx_v_self->view.strides + __pyx_v_self->view.ndim);
for (__pyx_t_5 = __pyx_v_self->view.strides; __pyx_t_5 < __pyx_t_4; __pyx_t_5++) {
__pyx_t_3 = __pyx_t_5;
__pyx_v_stride = (__pyx_t_3[0]);
- __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_stride); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 558, __pyx_L1_error)
+ __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_stride); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 567, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
- if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_6))) __PYX_ERR(2, 558, __pyx_L1_error)
+ if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_6))) __PYX_ERR(2, 567, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
}
- __pyx_t_6 = PyList_AsTuple(((PyObject*)__pyx_t_2)); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 558, __pyx_L1_error)
+ __pyx_t_6 = PyList_AsTuple(((PyObject*)__pyx_t_2)); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 567, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_r = __pyx_t_6;
__pyx_t_6 = 0;
goto __pyx_L0;
- /* "View.MemoryView":553
+ /* "View.MemoryView":562
*
* @property
* def strides(self): # <<<<<<<<<<<<<<
@@ -38815,7 +40629,7 @@ static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(st
return __pyx_r;
}
-/* "View.MemoryView":561
+/* "View.MemoryView":570
*
* @property
* def suboffsets(self): # <<<<<<<<<<<<<<
@@ -38848,7 +40662,7 @@ static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get_
Py_ssize_t *__pyx_t_6;
__Pyx_RefNannySetupContext("__get__", 0);
- /* "View.MemoryView":562
+ /* "View.MemoryView":571
* @property
* def suboffsets(self):
* if self.view.suboffsets == NULL: # <<<<<<<<<<<<<<
@@ -38858,7 +40672,7 @@ static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get_
__pyx_t_1 = ((__pyx_v_self->view.suboffsets == NULL) != 0);
if (__pyx_t_1) {
- /* "View.MemoryView":563
+ /* "View.MemoryView":572
* def suboffsets(self):
* if self.view.suboffsets == NULL:
* return (-1,) * self.view.ndim # <<<<<<<<<<<<<<
@@ -38866,16 +40680,16 @@ static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get_
* return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]])
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->view.ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 563, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->view.ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 572, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = PyNumber_Multiply(__pyx_tuple__48, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 563, __pyx_L1_error)
+ __pyx_t_3 = PyNumber_Multiply(__pyx_tuple__52, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 572, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_r = __pyx_t_3;
__pyx_t_3 = 0;
goto __pyx_L0;
- /* "View.MemoryView":562
+ /* "View.MemoryView":571
* @property
* def suboffsets(self):
* if self.view.suboffsets == NULL: # <<<<<<<<<<<<<<
@@ -38884,7 +40698,7 @@ static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get_
*/
}
- /* "View.MemoryView":565
+ /* "View.MemoryView":574
* return (-1,) * self.view.ndim
*
* return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]]) # <<<<<<<<<<<<<<
@@ -38892,25 +40706,25 @@ static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get_
* @property
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 565, __pyx_L1_error)
+ __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 574, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_5 = (__pyx_v_self->view.suboffsets + __pyx_v_self->view.ndim);
for (__pyx_t_6 = __pyx_v_self->view.suboffsets; __pyx_t_6 < __pyx_t_5; __pyx_t_6++) {
__pyx_t_4 = __pyx_t_6;
__pyx_v_suboffset = (__pyx_t_4[0]);
- __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_suboffset); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 565, __pyx_L1_error)
+ __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_suboffset); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 574, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_2))) __PYX_ERR(2, 565, __pyx_L1_error)
+ if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_2))) __PYX_ERR(2, 574, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
}
- __pyx_t_2 = PyList_AsTuple(((PyObject*)__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 565, __pyx_L1_error)
+ __pyx_t_2 = PyList_AsTuple(((PyObject*)__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 574, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
goto __pyx_L0;
- /* "View.MemoryView":561
+ /* "View.MemoryView":570
*
* @property
* def suboffsets(self): # <<<<<<<<<<<<<<
@@ -38930,7 +40744,7 @@ static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get_
return __pyx_r;
}
-/* "View.MemoryView":568
+/* "View.MemoryView":577
*
* @property
* def ndim(self): # <<<<<<<<<<<<<<
@@ -38957,7 +40771,7 @@ static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(struc
PyObject *__pyx_t_1 = NULL;
__Pyx_RefNannySetupContext("__get__", 0);
- /* "View.MemoryView":569
+ /* "View.MemoryView":578
* @property
* def ndim(self):
* return self.view.ndim # <<<<<<<<<<<<<<
@@ -38965,13 +40779,13 @@ static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(struc
* @property
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->view.ndim); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 569, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->view.ndim); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 578, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "View.MemoryView":568
+ /* "View.MemoryView":577
*
* @property
* def ndim(self): # <<<<<<<<<<<<<<
@@ -38990,7 +40804,7 @@ static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(struc
return __pyx_r;
}
-/* "View.MemoryView":572
+/* "View.MemoryView":581
*
* @property
* def itemsize(self): # <<<<<<<<<<<<<<
@@ -39017,7 +40831,7 @@ static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(s
PyObject *__pyx_t_1 = NULL;
__Pyx_RefNannySetupContext("__get__", 0);
- /* "View.MemoryView":573
+ /* "View.MemoryView":582
* @property
* def itemsize(self):
* return self.view.itemsize # <<<<<<<<<<<<<<
@@ -39025,13 +40839,13 @@ static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(s
* @property
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_self->view.itemsize); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 573, __pyx_L1_error)
+ __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_self->view.itemsize); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 582, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "View.MemoryView":572
+ /* "View.MemoryView":581
*
* @property
* def itemsize(self): # <<<<<<<<<<<<<<
@@ -39050,7 +40864,7 @@ static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(s
return __pyx_r;
}
-/* "View.MemoryView":576
+/* "View.MemoryView":585
*
* @property
* def nbytes(self): # <<<<<<<<<<<<<<
@@ -39079,7 +40893,7 @@ static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(str
PyObject *__pyx_t_3 = NULL;
__Pyx_RefNannySetupContext("__get__", 0);
- /* "View.MemoryView":577
+ /* "View.MemoryView":586
* @property
* def nbytes(self):
* return self.size * self.view.itemsize # <<<<<<<<<<<<<<
@@ -39087,11 +40901,11 @@ static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(str
* @property
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 577, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 586, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_self->view.itemsize); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 577, __pyx_L1_error)
+ __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_self->view.itemsize); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 586, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = PyNumber_Multiply(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 577, __pyx_L1_error)
+ __pyx_t_3 = PyNumber_Multiply(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 586, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
@@ -39099,7 +40913,7 @@ static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(str
__pyx_t_3 = 0;
goto __pyx_L0;
- /* "View.MemoryView":576
+ /* "View.MemoryView":585
*
* @property
* def nbytes(self): # <<<<<<<<<<<<<<
@@ -39120,7 +40934,7 @@ static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(str
return __pyx_r;
}
-/* "View.MemoryView":580
+/* "View.MemoryView":589
*
* @property
* def size(self): # <<<<<<<<<<<<<<
@@ -39154,7 +40968,7 @@ static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(struc
PyObject *__pyx_t_6 = NULL;
__Pyx_RefNannySetupContext("__get__", 0);
- /* "View.MemoryView":581
+ /* "View.MemoryView":590
* @property
* def size(self):
* if self._size is None: # <<<<<<<<<<<<<<
@@ -39165,7 +40979,7 @@ static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(struc
__pyx_t_2 = (__pyx_t_1 != 0);
if (__pyx_t_2) {
- /* "View.MemoryView":582
+ /* "View.MemoryView":591
* def size(self):
* if self._size is None:
* result = 1 # <<<<<<<<<<<<<<
@@ -39175,7 +40989,7 @@ static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(struc
__Pyx_INCREF(__pyx_int_1);
__pyx_v_result = __pyx_int_1;
- /* "View.MemoryView":584
+ /* "View.MemoryView":593
* result = 1
*
* for length in self.view.shape[:self.view.ndim]: # <<<<<<<<<<<<<<
@@ -39185,25 +40999,25 @@ static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(struc
__pyx_t_4 = (__pyx_v_self->view.shape + __pyx_v_self->view.ndim);
for (__pyx_t_5 = __pyx_v_self->view.shape; __pyx_t_5 < __pyx_t_4; __pyx_t_5++) {
__pyx_t_3 = __pyx_t_5;
- __pyx_t_6 = PyInt_FromSsize_t((__pyx_t_3[0])); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 584, __pyx_L1_error)
+ __pyx_t_6 = PyInt_FromSsize_t((__pyx_t_3[0])); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 593, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__Pyx_XDECREF_SET(__pyx_v_length, __pyx_t_6);
__pyx_t_6 = 0;
- /* "View.MemoryView":585
+ /* "View.MemoryView":594
*
* for length in self.view.shape[:self.view.ndim]:
* result *= length # <<<<<<<<<<<<<<
*
* self._size = result
*/
- __pyx_t_6 = PyNumber_InPlaceMultiply(__pyx_v_result, __pyx_v_length); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 585, __pyx_L1_error)
+ __pyx_t_6 = PyNumber_InPlaceMultiply(__pyx_v_result, __pyx_v_length); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 594, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF_SET(__pyx_v_result, __pyx_t_6);
__pyx_t_6 = 0;
}
- /* "View.MemoryView":587
+ /* "View.MemoryView":596
* result *= length
*
* self._size = result # <<<<<<<<<<<<<<
@@ -39216,7 +41030,7 @@ static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(struc
__Pyx_DECREF(__pyx_v_self->_size);
__pyx_v_self->_size = __pyx_v_result;
- /* "View.MemoryView":581
+ /* "View.MemoryView":590
* @property
* def size(self):
* if self._size is None: # <<<<<<<<<<<<<<
@@ -39225,7 +41039,7 @@ static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(struc
*/
}
- /* "View.MemoryView":589
+ /* "View.MemoryView":598
* self._size = result
*
* return self._size # <<<<<<<<<<<<<<
@@ -39237,7 +41051,7 @@ static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(struc
__pyx_r = __pyx_v_self->_size;
goto __pyx_L0;
- /* "View.MemoryView":580
+ /* "View.MemoryView":589
*
* @property
* def size(self): # <<<<<<<<<<<<<<
@@ -39258,7 +41072,7 @@ static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(struc
return __pyx_r;
}
-/* "View.MemoryView":591
+/* "View.MemoryView":600
* return self._size
*
* def __len__(self): # <<<<<<<<<<<<<<
@@ -39285,7 +41099,7 @@ static Py_ssize_t __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_1
int __pyx_t_1;
__Pyx_RefNannySetupContext("__len__", 0);
- /* "View.MemoryView":592
+ /* "View.MemoryView":601
*
* def __len__(self):
* if self.view.ndim >= 1: # <<<<<<<<<<<<<<
@@ -39295,7 +41109,7 @@ static Py_ssize_t __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_1
__pyx_t_1 = ((__pyx_v_self->view.ndim >= 1) != 0);
if (__pyx_t_1) {
- /* "View.MemoryView":593
+ /* "View.MemoryView":602
* def __len__(self):
* if self.view.ndim >= 1:
* return self.view.shape[0] # <<<<<<<<<<<<<<
@@ -39305,7 +41119,7 @@ static Py_ssize_t __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_1
__pyx_r = (__pyx_v_self->view.shape[0]);
goto __pyx_L0;
- /* "View.MemoryView":592
+ /* "View.MemoryView":601
*
* def __len__(self):
* if self.view.ndim >= 1: # <<<<<<<<<<<<<<
@@ -39314,7 +41128,7 @@ static Py_ssize_t __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_1
*/
}
- /* "View.MemoryView":595
+ /* "View.MemoryView":604
* return self.view.shape[0]
*
* return 0 # <<<<<<<<<<<<<<
@@ -39324,7 +41138,7 @@ static Py_ssize_t __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_1
__pyx_r = 0;
goto __pyx_L0;
- /* "View.MemoryView":591
+ /* "View.MemoryView":600
* return self._size
*
* def __len__(self): # <<<<<<<<<<<<<<
@@ -39338,7 +41152,7 @@ static Py_ssize_t __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_1
return __pyx_r;
}
-/* "View.MemoryView":597
+/* "View.MemoryView":606
* return 0
*
* def __repr__(self): # <<<<<<<<<<<<<<
@@ -39367,7 +41181,7 @@ static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12
PyObject *__pyx_t_3 = NULL;
__Pyx_RefNannySetupContext("__repr__", 0);
- /* "View.MemoryView":598
+ /* "View.MemoryView":607
*
* def __repr__(self):
* return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__, # <<<<<<<<<<<<<<
@@ -39375,54 +41189,48 @@ static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12
*
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_base); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 598, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_base); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 607, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 598, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 607, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 598, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 607, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "View.MemoryView":599
+ /* "View.MemoryView":608
* def __repr__(self):
* return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,
* id(self)) # <<<<<<<<<<<<<<
*
* def __str__(self):
*/
- __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 599, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 608, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __Pyx_INCREF(((PyObject *)__pyx_v_self));
- __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
- PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self));
- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_id, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 599, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "View.MemoryView":598
+ /* "View.MemoryView":607
*
* def __repr__(self):
* return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__, # <<<<<<<<<<<<<<
* id(self))
*
*/
- __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 598, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 607, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
__Pyx_GIVEREF(__pyx_t_1);
- PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
- __Pyx_GIVEREF(__pyx_t_3);
- PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
__pyx_t_1 = 0;
- __pyx_t_3 = 0;
- __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_MemoryView_of_r_at_0x_x, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 598, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_r = __pyx_t_3;
- __pyx_t_3 = 0;
+ __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_MemoryView_of_r_at_0x_x, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 607, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
goto __pyx_L0;
- /* "View.MemoryView":597
+ /* "View.MemoryView":606
* return 0
*
* def __repr__(self): # <<<<<<<<<<<<<<
@@ -39443,7 +41251,7 @@ static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12
return __pyx_r;
}
-/* "View.MemoryView":601
+/* "View.MemoryView":610
* id(self))
*
* def __str__(self): # <<<<<<<<<<<<<<
@@ -39471,7 +41279,7 @@ static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14
PyObject *__pyx_t_2 = NULL;
__Pyx_RefNannySetupContext("__str__", 0);
- /* "View.MemoryView":602
+ /* "View.MemoryView":611
*
* def __str__(self):
* return "<MemoryView of %r object>" % (self.base.__class__.__name__,) # <<<<<<<<<<<<<<
@@ -39479,27 +41287,27 @@ static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14
*
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_base); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 602, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_base); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 611, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 602, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 611, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 602, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 611, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 602, __pyx_L1_error)
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 611, __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_PyString_Format(__pyx_kp_s_MemoryView_of_r_object, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 602, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_MemoryView_of_r_object, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 611, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "View.MemoryView":601
+ /* "View.MemoryView":610
* id(self))
*
* def __str__(self): # <<<<<<<<<<<<<<
@@ -39519,7 +41327,7 @@ static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14
return __pyx_r;
}
-/* "View.MemoryView":605
+/* "View.MemoryView":614
*
*
* def is_c_contig(self): # <<<<<<<<<<<<<<
@@ -39548,7 +41356,7 @@ static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16
PyObject *__pyx_t_1 = NULL;
__Pyx_RefNannySetupContext("is_c_contig", 0);
- /* "View.MemoryView":608
+ /* "View.MemoryView":617
* cdef __Pyx_memviewslice *mslice
* cdef __Pyx_memviewslice tmp
* mslice = get_slice_from_memview(self, &tmp) # <<<<<<<<<<<<<<
@@ -39557,7 +41365,7 @@ static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16
*/
__pyx_v_mslice = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_self, (&__pyx_v_tmp));
- /* "View.MemoryView":609
+ /* "View.MemoryView":618
* cdef __Pyx_memviewslice tmp
* mslice = get_slice_from_memview(self, &tmp)
* return slice_is_contig(mslice[0], 'C', self.view.ndim) # <<<<<<<<<<<<<<
@@ -39565,13 +41373,13 @@ static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16
* def is_f_contig(self):
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_memviewslice_is_contig((__pyx_v_mslice[0]), 'C', __pyx_v_self->view.ndim)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 609, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_memviewslice_is_contig((__pyx_v_mslice[0]), 'C', __pyx_v_self->view.ndim)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 618, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "View.MemoryView":605
+ /* "View.MemoryView":614
*
*
* def is_c_contig(self): # <<<<<<<<<<<<<<
@@ -39590,7 +41398,7 @@ static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16
return __pyx_r;
}
-/* "View.MemoryView":611
+/* "View.MemoryView":620
* return slice_is_contig(mslice[0], 'C', self.view.ndim)
*
* def is_f_contig(self): # <<<<<<<<<<<<<<
@@ -39619,7 +41427,7 @@ static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18
PyObject *__pyx_t_1 = NULL;
__Pyx_RefNannySetupContext("is_f_contig", 0);
- /* "View.MemoryView":614
+ /* "View.MemoryView":623
* cdef __Pyx_memviewslice *mslice
* cdef __Pyx_memviewslice tmp
* mslice = get_slice_from_memview(self, &tmp) # <<<<<<<<<<<<<<
@@ -39628,7 +41436,7 @@ static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18
*/
__pyx_v_mslice = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_self, (&__pyx_v_tmp));
- /* "View.MemoryView":615
+ /* "View.MemoryView":624
* cdef __Pyx_memviewslice tmp
* mslice = get_slice_from_memview(self, &tmp)
* return slice_is_contig(mslice[0], 'F', self.view.ndim) # <<<<<<<<<<<<<<
@@ -39636,13 +41444,13 @@ static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18
* def copy(self):
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_memviewslice_is_contig((__pyx_v_mslice[0]), 'F', __pyx_v_self->view.ndim)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 615, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_memviewslice_is_contig((__pyx_v_mslice[0]), 'F', __pyx_v_self->view.ndim)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 624, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "View.MemoryView":611
+ /* "View.MemoryView":620
* return slice_is_contig(mslice[0], 'C', self.view.ndim)
*
* def is_f_contig(self): # <<<<<<<<<<<<<<
@@ -39661,7 +41469,7 @@ static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18
return __pyx_r;
}
-/* "View.MemoryView":617
+/* "View.MemoryView":626
* return slice_is_contig(mslice[0], 'F', self.view.ndim)
*
* def copy(self): # <<<<<<<<<<<<<<
@@ -39691,7 +41499,7 @@ static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20
PyObject *__pyx_t_2 = NULL;
__Pyx_RefNannySetupContext("copy", 0);
- /* "View.MemoryView":619
+ /* "View.MemoryView":628
* def copy(self):
* cdef __Pyx_memviewslice mslice
* cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS # <<<<<<<<<<<<<<
@@ -39700,7 +41508,7 @@ static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20
*/
__pyx_v_flags = (__pyx_v_self->flags & (~PyBUF_F_CONTIGUOUS));
- /* "View.MemoryView":621
+ /* "View.MemoryView":630
* cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS
*
* slice_copy(self, &mslice) # <<<<<<<<<<<<<<
@@ -39709,17 +41517,17 @@ static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20
*/
__pyx_memoryview_slice_copy(__pyx_v_self, (&__pyx_v_mslice));
- /* "View.MemoryView":622
+ /* "View.MemoryView":631
*
* slice_copy(self, &mslice)
* mslice = slice_copy_contig(&mslice, "c", self.view.ndim, # <<<<<<<<<<<<<<
* self.view.itemsize,
* flags|PyBUF_C_CONTIGUOUS,
*/
- __pyx_t_1 = __pyx_memoryview_copy_new_contig((&__pyx_v_mslice), ((char *)"c"), __pyx_v_self->view.ndim, __pyx_v_self->view.itemsize, (__pyx_v_flags | PyBUF_C_CONTIGUOUS), __pyx_v_self->dtype_is_object); if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 622, __pyx_L1_error)
+ __pyx_t_1 = __pyx_memoryview_copy_new_contig((&__pyx_v_mslice), ((char *)"c"), __pyx_v_self->view.ndim, __pyx_v_self->view.itemsize, (__pyx_v_flags | PyBUF_C_CONTIGUOUS), __pyx_v_self->dtype_is_object); if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 631, __pyx_L1_error)
__pyx_v_mslice = __pyx_t_1;
- /* "View.MemoryView":627
+ /* "View.MemoryView":636
* self.dtype_is_object)
*
* return memoryview_copy_from_slice(self, &mslice) # <<<<<<<<<<<<<<
@@ -39727,13 +41535,13 @@ static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20
* def copy_fortran(self):
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_2 = __pyx_memoryview_copy_object_from_slice(__pyx_v_self, (&__pyx_v_mslice)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 627, __pyx_L1_error)
+ __pyx_t_2 = __pyx_memoryview_copy_object_from_slice(__pyx_v_self, (&__pyx_v_mslice)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 636, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
goto __pyx_L0;
- /* "View.MemoryView":617
+ /* "View.MemoryView":626
* return slice_is_contig(mslice[0], 'F', self.view.ndim)
*
* def copy(self): # <<<<<<<<<<<<<<
@@ -39752,7 +41560,7 @@ static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20
return __pyx_r;
}
-/* "View.MemoryView":629
+/* "View.MemoryView":638
* return memoryview_copy_from_slice(self, &mslice)
*
* def copy_fortran(self): # <<<<<<<<<<<<<<
@@ -39783,7 +41591,7 @@ static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22
PyObject *__pyx_t_2 = NULL;
__Pyx_RefNannySetupContext("copy_fortran", 0);
- /* "View.MemoryView":631
+ /* "View.MemoryView":640
* def copy_fortran(self):
* cdef __Pyx_memviewslice src, dst
* cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS # <<<<<<<<<<<<<<
@@ -39792,7 +41600,7 @@ static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22
*/
__pyx_v_flags = (__pyx_v_self->flags & (~PyBUF_C_CONTIGUOUS));
- /* "View.MemoryView":633
+ /* "View.MemoryView":642
* cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS
*
* slice_copy(self, &src) # <<<<<<<<<<<<<<
@@ -39801,17 +41609,17 @@ static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22
*/
__pyx_memoryview_slice_copy(__pyx_v_self, (&__pyx_v_src));
- /* "View.MemoryView":634
+ /* "View.MemoryView":643
*
* slice_copy(self, &src)
* dst = slice_copy_contig(&src, "fortran", self.view.ndim, # <<<<<<<<<<<<<<
* self.view.itemsize,
* flags|PyBUF_F_CONTIGUOUS,
*/
- __pyx_t_1 = __pyx_memoryview_copy_new_contig((&__pyx_v_src), ((char *)"fortran"), __pyx_v_self->view.ndim, __pyx_v_self->view.itemsize, (__pyx_v_flags | PyBUF_F_CONTIGUOUS), __pyx_v_self->dtype_is_object); if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 634, __pyx_L1_error)
+ __pyx_t_1 = __pyx_memoryview_copy_new_contig((&__pyx_v_src), ((char *)"fortran"), __pyx_v_self->view.ndim, __pyx_v_self->view.itemsize, (__pyx_v_flags | PyBUF_F_CONTIGUOUS), __pyx_v_self->dtype_is_object); if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 643, __pyx_L1_error)
__pyx_v_dst = __pyx_t_1;
- /* "View.MemoryView":639
+ /* "View.MemoryView":648
* self.dtype_is_object)
*
* return memoryview_copy_from_slice(self, &dst) # <<<<<<<<<<<<<<
@@ -39819,13 +41627,13 @@ static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22
*
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_2 = __pyx_memoryview_copy_object_from_slice(__pyx_v_self, (&__pyx_v_dst)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 639, __pyx_L1_error)
+ __pyx_t_2 = __pyx_memoryview_copy_object_from_slice(__pyx_v_self, (&__pyx_v_dst)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 648, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
goto __pyx_L0;
- /* "View.MemoryView":629
+ /* "View.MemoryView":638
* return memoryview_copy_from_slice(self, &mslice)
*
* def copy_fortran(self): # <<<<<<<<<<<<<<
@@ -39844,7 +41652,114 @@ static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22
return __pyx_r;
}
-/* "View.MemoryView":643
+/* "(tree fragment)":1
+ * def __reduce_cython__(self): # <<<<<<<<<<<<<<
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ * def __setstate_cython__(self, __pyx_state):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw___pyx_memoryview_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw___pyx_memoryview_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
+ __pyx_r = __pyx_pf___pyx_memoryview___reduce_cython__(((struct __pyx_memoryview_obj *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf___pyx_memoryview___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("__reduce_cython__", 0);
+
+ /* "(tree fragment)":2
+ * def __reduce_cython__(self):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
+ * def __setstate_cython__(self, __pyx_state):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ */
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__53, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __PYX_ERR(2, 2, __pyx_L1_error)
+
+ /* "(tree fragment)":1
+ * def __reduce_cython__(self): # <<<<<<<<<<<<<<
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ * def __setstate_cython__(self, __pyx_state):
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("View.MemoryView.memoryview.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "(tree fragment)":3
+ * def __reduce_cython__(self):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw___pyx_memoryview_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
+static PyObject *__pyx_pw___pyx_memoryview_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
+ __pyx_r = __pyx_pf___pyx_memoryview_2__setstate_cython__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf___pyx_memoryview_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("__setstate_cython__", 0);
+
+ /* "(tree fragment)":4
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ * def __setstate_cython__(self, __pyx_state):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
+ */
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__54, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __PYX_ERR(2, 4, __pyx_L1_error)
+
+ /* "(tree fragment)":3
+ * def __reduce_cython__(self):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("View.MemoryView.memoryview.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "View.MemoryView":652
*
* @cname('__pyx_memoryview_new')
* cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo): # <<<<<<<<<<<<<<
@@ -39861,18 +41776,18 @@ static PyObject *__pyx_memoryview_new(PyObject *__pyx_v_o, int __pyx_v_flags, in
PyObject *__pyx_t_3 = NULL;
__Pyx_RefNannySetupContext("memoryview_cwrapper", 0);
- /* "View.MemoryView":644
+ /* "View.MemoryView":653
* @cname('__pyx_memoryview_new')
* cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo):
* cdef memoryview result = memoryview(o, flags, dtype_is_object) # <<<<<<<<<<<<<<
* result.typeinfo = typeinfo
* return result
*/
- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 644, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 653, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 644, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 653, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 644, __pyx_L1_error)
+ __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 653, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_INCREF(__pyx_v_o);
__Pyx_GIVEREF(__pyx_v_o);
@@ -39883,13 +41798,13 @@ static PyObject *__pyx_memoryview_new(PyObject *__pyx_v_o, int __pyx_v_flags, in
PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2);
__pyx_t_1 = 0;
__pyx_t_2 = 0;
- __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryview_type), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 644, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryview_type), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 653, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_v_result = ((struct __pyx_memoryview_obj *)__pyx_t_2);
__pyx_t_2 = 0;
- /* "View.MemoryView":645
+ /* "View.MemoryView":654
* cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo):
* cdef memoryview result = memoryview(o, flags, dtype_is_object)
* result.typeinfo = typeinfo # <<<<<<<<<<<<<<
@@ -39898,7 +41813,7 @@ static PyObject *__pyx_memoryview_new(PyObject *__pyx_v_o, int __pyx_v_flags, in
*/
__pyx_v_result->typeinfo = __pyx_v_typeinfo;
- /* "View.MemoryView":646
+ /* "View.MemoryView":655
* cdef memoryview result = memoryview(o, flags, dtype_is_object)
* result.typeinfo = typeinfo
* return result # <<<<<<<<<<<<<<
@@ -39910,7 +41825,7 @@ static PyObject *__pyx_memoryview_new(PyObject *__pyx_v_o, int __pyx_v_flags, in
__pyx_r = ((PyObject *)__pyx_v_result);
goto __pyx_L0;
- /* "View.MemoryView":643
+ /* "View.MemoryView":652
*
* @cname('__pyx_memoryview_new')
* cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo): # <<<<<<<<<<<<<<
@@ -39932,7 +41847,7 @@ static PyObject *__pyx_memoryview_new(PyObject *__pyx_v_o, int __pyx_v_flags, in
return __pyx_r;
}
-/* "View.MemoryView":649
+/* "View.MemoryView":658
*
* @cname('__pyx_memoryview_check')
* cdef inline bint memoryview_check(object o): # <<<<<<<<<<<<<<
@@ -39946,7 +41861,7 @@ static CYTHON_INLINE int __pyx_memoryview_check(PyObject *__pyx_v_o) {
int __pyx_t_1;
__Pyx_RefNannySetupContext("memoryview_check", 0);
- /* "View.MemoryView":650
+ /* "View.MemoryView":659
* @cname('__pyx_memoryview_check')
* cdef inline bint memoryview_check(object o):
* return isinstance(o, memoryview) # <<<<<<<<<<<<<<
@@ -39957,7 +41872,7 @@ static CYTHON_INLINE int __pyx_memoryview_check(PyObject *__pyx_v_o) {
__pyx_r = __pyx_t_1;
goto __pyx_L0;
- /* "View.MemoryView":649
+ /* "View.MemoryView":658
*
* @cname('__pyx_memoryview_check')
* cdef inline bint memoryview_check(object o): # <<<<<<<<<<<<<<
@@ -39971,7 +41886,7 @@ static CYTHON_INLINE int __pyx_memoryview_check(PyObject *__pyx_v_o) {
return __pyx_r;
}
-/* "View.MemoryView":652
+/* "View.MemoryView":661
* return isinstance(o, memoryview)
*
* cdef tuple _unellipsify(object index, int ndim): # <<<<<<<<<<<<<<
@@ -40002,7 +41917,7 @@ static PyObject *_unellipsify(PyObject *__pyx_v_index, int __pyx_v_ndim) {
PyObject *__pyx_t_11 = NULL;
__Pyx_RefNannySetupContext("_unellipsify", 0);
- /* "View.MemoryView":657
+ /* "View.MemoryView":666
* full slices.
* """
* if not isinstance(index, tuple): # <<<<<<<<<<<<<<
@@ -40013,14 +41928,14 @@ static PyObject *_unellipsify(PyObject *__pyx_v_index, int __pyx_v_ndim) {
__pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
if (__pyx_t_2) {
- /* "View.MemoryView":658
+ /* "View.MemoryView":667
* """
* if not isinstance(index, tuple):
* tup = (index,) # <<<<<<<<<<<<<<
* else:
* tup = index
*/
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 658, __pyx_L1_error)
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 667, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_INCREF(__pyx_v_index);
__Pyx_GIVEREF(__pyx_v_index);
@@ -40028,7 +41943,7 @@ static PyObject *_unellipsify(PyObject *__pyx_v_index, int __pyx_v_ndim) {
__pyx_v_tup = __pyx_t_3;
__pyx_t_3 = 0;
- /* "View.MemoryView":657
+ /* "View.MemoryView":666
* full slices.
* """
* if not isinstance(index, tuple): # <<<<<<<<<<<<<<
@@ -40038,7 +41953,7 @@ static PyObject *_unellipsify(PyObject *__pyx_v_index, int __pyx_v_ndim) {
goto __pyx_L3;
}
- /* "View.MemoryView":660
+ /* "View.MemoryView":669
* tup = (index,)
* else:
* tup = index # <<<<<<<<<<<<<<
@@ -40051,19 +41966,19 @@ static PyObject *_unellipsify(PyObject *__pyx_v_index, int __pyx_v_ndim) {
}
__pyx_L3:;
- /* "View.MemoryView":662
+ /* "View.MemoryView":671
* tup = index
*
* result = [] # <<<<<<<<<<<<<<
* have_slices = False
* seen_ellipsis = False
*/
- __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 662, __pyx_L1_error)
+ __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 671, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_v_result = ((PyObject*)__pyx_t_3);
__pyx_t_3 = 0;
- /* "View.MemoryView":663
+ /* "View.MemoryView":672
*
* result = []
* have_slices = False # <<<<<<<<<<<<<<
@@ -40072,7 +41987,7 @@ static PyObject *_unellipsify(PyObject *__pyx_v_index, int __pyx_v_ndim) {
*/
__pyx_v_have_slices = 0;
- /* "View.MemoryView":664
+ /* "View.MemoryView":673
* result = []
* have_slices = False
* seen_ellipsis = False # <<<<<<<<<<<<<<
@@ -40081,7 +41996,7 @@ static PyObject *_unellipsify(PyObject *__pyx_v_index, int __pyx_v_ndim) {
*/
__pyx_v_seen_ellipsis = 0;
- /* "View.MemoryView":665
+ /* "View.MemoryView":674
* have_slices = False
* seen_ellipsis = False
* for idx, item in enumerate(tup): # <<<<<<<<<<<<<<
@@ -40094,26 +42009,26 @@ static PyObject *_unellipsify(PyObject *__pyx_v_index, int __pyx_v_ndim) {
__pyx_t_4 = __pyx_v_tup; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
__pyx_t_6 = NULL;
} else {
- __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_tup); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 665, __pyx_L1_error)
+ __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_tup); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 674, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 665, __pyx_L1_error)
+ __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 674, __pyx_L1_error)
}
for (;;) {
if (likely(!__pyx_t_6)) {
if (likely(PyList_CheckExact(__pyx_t_4))) {
if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
- __pyx_t_7 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(2, 665, __pyx_L1_error)
+ __pyx_t_7 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(2, 674, __pyx_L1_error)
#else
- __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 665, __pyx_L1_error)
+ __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 674, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
#endif
} else {
if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
- __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(2, 665, __pyx_L1_error)
+ __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(2, 674, __pyx_L1_error)
#else
- __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 665, __pyx_L1_error)
+ __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 674, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
#endif
}
@@ -40122,8 +42037,8 @@ static PyObject *_unellipsify(PyObject *__pyx_v_index, int __pyx_v_ndim) {
if (unlikely(!__pyx_t_7)) {
PyObject* exc_type = PyErr_Occurred();
if (exc_type) {
- if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
- else __PYX_ERR(2, 665, __pyx_L1_error)
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(2, 674, __pyx_L1_error)
}
break;
}
@@ -40133,13 +42048,13 @@ static PyObject *_unellipsify(PyObject *__pyx_v_index, int __pyx_v_ndim) {
__pyx_t_7 = 0;
__Pyx_INCREF(__pyx_t_3);
__Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_3);
- __pyx_t_7 = __Pyx_PyInt_AddObjC(__pyx_t_3, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 665, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyInt_AddObjC(__pyx_t_3, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 674, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_3);
__pyx_t_3 = __pyx_t_7;
__pyx_t_7 = 0;
- /* "View.MemoryView":666
+ /* "View.MemoryView":675
* seen_ellipsis = False
* for idx, item in enumerate(tup):
* if item is Ellipsis: # <<<<<<<<<<<<<<
@@ -40150,7 +42065,7 @@ static PyObject *_unellipsify(PyObject *__pyx_v_index, int __pyx_v_ndim) {
__pyx_t_1 = (__pyx_t_2 != 0);
if (__pyx_t_1) {
- /* "View.MemoryView":667
+ /* "View.MemoryView":676
* for idx, item in enumerate(tup):
* if item is Ellipsis:
* if not seen_ellipsis: # <<<<<<<<<<<<<<
@@ -40160,27 +42075,27 @@ static PyObject *_unellipsify(PyObject *__pyx_v_index, int __pyx_v_ndim) {
__pyx_t_1 = ((!(__pyx_v_seen_ellipsis != 0)) != 0);
if (__pyx_t_1) {
- /* "View.MemoryView":668
+ /* "View.MemoryView":677
* if item is Ellipsis:
* if not seen_ellipsis:
* result.extend([slice(None)] * (ndim - len(tup) + 1)) # <<<<<<<<<<<<<<
* seen_ellipsis = True
* else:
*/
- __pyx_t_8 = PyObject_Length(__pyx_v_tup); if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(2, 668, __pyx_L1_error)
- __pyx_t_7 = PyList_New(1 * ((((__pyx_v_ndim - __pyx_t_8) + 1)<0) ? 0:((__pyx_v_ndim - __pyx_t_8) + 1))); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 668, __pyx_L1_error)
+ __pyx_t_8 = PyObject_Length(__pyx_v_tup); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(2, 677, __pyx_L1_error)
+ __pyx_t_7 = PyList_New(1 * ((((__pyx_v_ndim - __pyx_t_8) + 1)<0) ? 0:((__pyx_v_ndim - __pyx_t_8) + 1))); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 677, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
{ Py_ssize_t __pyx_temp;
for (__pyx_temp=0; __pyx_temp < ((__pyx_v_ndim - __pyx_t_8) + 1); __pyx_temp++) {
- __Pyx_INCREF(__pyx_slice__49);
- __Pyx_GIVEREF(__pyx_slice__49);
- PyList_SET_ITEM(__pyx_t_7, __pyx_temp, __pyx_slice__49);
+ __Pyx_INCREF(__pyx_slice__55);
+ __Pyx_GIVEREF(__pyx_slice__55);
+ PyList_SET_ITEM(__pyx_t_7, __pyx_temp, __pyx_slice__55);
}
}
- __pyx_t_9 = __Pyx_PyList_Extend(__pyx_v_result, __pyx_t_7); if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(2, 668, __pyx_L1_error)
+ __pyx_t_9 = __Pyx_PyList_Extend(__pyx_v_result, __pyx_t_7); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(2, 677, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- /* "View.MemoryView":669
+ /* "View.MemoryView":678
* if not seen_ellipsis:
* result.extend([slice(None)] * (ndim - len(tup) + 1))
* seen_ellipsis = True # <<<<<<<<<<<<<<
@@ -40189,7 +42104,7 @@ static PyObject *_unellipsify(PyObject *__pyx_v_index, int __pyx_v_ndim) {
*/
__pyx_v_seen_ellipsis = 1;
- /* "View.MemoryView":667
+ /* "View.MemoryView":676
* for idx, item in enumerate(tup):
* if item is Ellipsis:
* if not seen_ellipsis: # <<<<<<<<<<<<<<
@@ -40199,7 +42114,7 @@ static PyObject *_unellipsify(PyObject *__pyx_v_index, int __pyx_v_ndim) {
goto __pyx_L7;
}
- /* "View.MemoryView":671
+ /* "View.MemoryView":680
* seen_ellipsis = True
* else:
* result.append(slice(None)) # <<<<<<<<<<<<<<
@@ -40207,11 +42122,11 @@ static PyObject *_unellipsify(PyObject *__pyx_v_index, int __pyx_v_ndim) {
* else:
*/
/*else*/ {
- __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_result, __pyx_slice__50); if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(2, 671, __pyx_L1_error)
+ __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_result, __pyx_slice__56); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(2, 680, __pyx_L1_error)
}
__pyx_L7:;
- /* "View.MemoryView":672
+ /* "View.MemoryView":681
* else:
* result.append(slice(None))
* have_slices = True # <<<<<<<<<<<<<<
@@ -40220,7 +42135,7 @@ static PyObject *_unellipsify(PyObject *__pyx_v_index, int __pyx_v_ndim) {
*/
__pyx_v_have_slices = 1;
- /* "View.MemoryView":666
+ /* "View.MemoryView":675
* seen_ellipsis = False
* for idx, item in enumerate(tup):
* if item is Ellipsis: # <<<<<<<<<<<<<<
@@ -40230,7 +42145,7 @@ static PyObject *_unellipsify(PyObject *__pyx_v_index, int __pyx_v_ndim) {
goto __pyx_L6;
}
- /* "View.MemoryView":674
+ /* "View.MemoryView":683
* have_slices = True
* else:
* if not isinstance(item, slice) and not PyIndex_Check(item): # <<<<<<<<<<<<<<
@@ -40248,30 +42163,25 @@ static PyObject *_unellipsify(PyObject *__pyx_v_index, int __pyx_v_ndim) {
__pyx_t_10 = ((!(PyIndex_Check(__pyx_v_item) != 0)) != 0);
__pyx_t_1 = __pyx_t_10;
__pyx_L9_bool_binop_done:;
- if (__pyx_t_1) {
+ if (unlikely(__pyx_t_1)) {
- /* "View.MemoryView":675
+ /* "View.MemoryView":684
* else:
* if not isinstance(item, slice) and not PyIndex_Check(item):
* raise TypeError("Cannot index with type '%s'" % type(item)) # <<<<<<<<<<<<<<
*
* have_slices = have_slices or isinstance(item, slice)
*/
- __pyx_t_7 = __Pyx_PyString_Format(__pyx_kp_s_Cannot_index_with_type_s, ((PyObject *)Py_TYPE(__pyx_v_item))); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 675, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyString_Format(__pyx_kp_s_Cannot_index_with_type_s, ((PyObject *)Py_TYPE(__pyx_v_item))); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 684, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
- __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 675, __pyx_L1_error)
+ __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_7); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 684, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_11);
- __Pyx_GIVEREF(__pyx_t_7);
- PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_7);
- __pyx_t_7 = 0;
- __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_11, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 675, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
- __Pyx_Raise(__pyx_t_7, 0, 0, 0);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __PYX_ERR(2, 675, __pyx_L1_error)
+ __Pyx_Raise(__pyx_t_11, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __PYX_ERR(2, 684, __pyx_L1_error)
- /* "View.MemoryView":674
+ /* "View.MemoryView":683
* have_slices = True
* else:
* if not isinstance(item, slice) and not PyIndex_Check(item): # <<<<<<<<<<<<<<
@@ -40280,7 +42190,7 @@ static PyObject *_unellipsify(PyObject *__pyx_v_index, int __pyx_v_ndim) {
*/
}
- /* "View.MemoryView":677
+ /* "View.MemoryView":686
* raise TypeError("Cannot index with type '%s'" % type(item))
*
* have_slices = have_slices or isinstance(item, slice) # <<<<<<<<<<<<<<
@@ -40299,18 +42209,18 @@ static PyObject *_unellipsify(PyObject *__pyx_v_index, int __pyx_v_ndim) {
__pyx_L11_bool_binop_done:;
__pyx_v_have_slices = __pyx_t_1;
- /* "View.MemoryView":678
+ /* "View.MemoryView":687
*
* have_slices = have_slices or isinstance(item, slice)
* result.append(item) # <<<<<<<<<<<<<<
*
* nslices = ndim - len(result)
*/
- __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_result, __pyx_v_item); if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(2, 678, __pyx_L1_error)
+ __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_result, __pyx_v_item); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(2, 687, __pyx_L1_error)
}
__pyx_L6:;
- /* "View.MemoryView":665
+ /* "View.MemoryView":674
* have_slices = False
* seen_ellipsis = False
* for idx, item in enumerate(tup): # <<<<<<<<<<<<<<
@@ -40321,17 +42231,17 @@ static PyObject *_unellipsify(PyObject *__pyx_v_index, int __pyx_v_ndim) {
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "View.MemoryView":680
+ /* "View.MemoryView":689
* result.append(item)
*
* nslices = ndim - len(result) # <<<<<<<<<<<<<<
* if nslices:
* result.extend([slice(None)] * nslices)
*/
- __pyx_t_5 = PyList_GET_SIZE(__pyx_v_result); if (unlikely(__pyx_t_5 == -1)) __PYX_ERR(2, 680, __pyx_L1_error)
+ __pyx_t_5 = PyList_GET_SIZE(__pyx_v_result); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(2, 689, __pyx_L1_error)
__pyx_v_nslices = (__pyx_v_ndim - __pyx_t_5);
- /* "View.MemoryView":681
+ /* "View.MemoryView":690
*
* nslices = ndim - len(result)
* if nslices: # <<<<<<<<<<<<<<
@@ -40341,26 +42251,26 @@ static PyObject *_unellipsify(PyObject *__pyx_v_index, int __pyx_v_ndim) {
__pyx_t_1 = (__pyx_v_nslices != 0);
if (__pyx_t_1) {
- /* "View.MemoryView":682
+ /* "View.MemoryView":691
* nslices = ndim - len(result)
* if nslices:
* result.extend([slice(None)] * nslices) # <<<<<<<<<<<<<<
*
* return have_slices or nslices, tuple(result)
*/
- __pyx_t_3 = PyList_New(1 * ((__pyx_v_nslices<0) ? 0:__pyx_v_nslices)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 682, __pyx_L1_error)
+ __pyx_t_3 = PyList_New(1 * ((__pyx_v_nslices<0) ? 0:__pyx_v_nslices)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 691, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
{ Py_ssize_t __pyx_temp;
for (__pyx_temp=0; __pyx_temp < __pyx_v_nslices; __pyx_temp++) {
- __Pyx_INCREF(__pyx_slice__51);
- __Pyx_GIVEREF(__pyx_slice__51);
- PyList_SET_ITEM(__pyx_t_3, __pyx_temp, __pyx_slice__51);
+ __Pyx_INCREF(__pyx_slice__57);
+ __Pyx_GIVEREF(__pyx_slice__57);
+ PyList_SET_ITEM(__pyx_t_3, __pyx_temp, __pyx_slice__57);
}
}
- __pyx_t_9 = __Pyx_PyList_Extend(__pyx_v_result, __pyx_t_3); if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(2, 682, __pyx_L1_error)
+ __pyx_t_9 = __Pyx_PyList_Extend(__pyx_v_result, __pyx_t_3); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(2, 691, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "View.MemoryView":681
+ /* "View.MemoryView":690
*
* nslices = ndim - len(result)
* if nslices: # <<<<<<<<<<<<<<
@@ -40369,7 +42279,7 @@ static PyObject *_unellipsify(PyObject *__pyx_v_index, int __pyx_v_ndim) {
*/
}
- /* "View.MemoryView":684
+ /* "View.MemoryView":693
* result.extend([slice(None)] * nslices)
*
* return have_slices or nslices, tuple(result) # <<<<<<<<<<<<<<
@@ -40379,32 +42289,32 @@ static PyObject *_unellipsify(PyObject *__pyx_v_index, int __pyx_v_ndim) {
__Pyx_XDECREF(__pyx_r);
if (!__pyx_v_have_slices) {
} else {
- __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_have_slices); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 684, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_have_slices); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 693, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__pyx_t_3 = __pyx_t_4;
__pyx_t_4 = 0;
goto __pyx_L14_bool_binop_done;
}
- __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_nslices); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 684, __pyx_L1_error)
+ __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_nslices); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 693, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__pyx_t_3 = __pyx_t_4;
__pyx_t_4 = 0;
__pyx_L14_bool_binop_done:;
- __pyx_t_4 = PyList_AsTuple(__pyx_v_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 684, __pyx_L1_error)
+ __pyx_t_4 = PyList_AsTuple(__pyx_v_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 693, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 684, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 693, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
__Pyx_GIVEREF(__pyx_t_3);
- PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_3);
__Pyx_GIVEREF(__pyx_t_4);
- PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_4);
__pyx_t_3 = 0;
__pyx_t_4 = 0;
- __pyx_r = ((PyObject*)__pyx_t_7);
- __pyx_t_7 = 0;
+ __pyx_r = ((PyObject*)__pyx_t_11);
+ __pyx_t_11 = 0;
goto __pyx_L0;
- /* "View.MemoryView":652
+ /* "View.MemoryView":661
* return isinstance(o, memoryview)
*
* cdef tuple _unellipsify(object index, int ndim): # <<<<<<<<<<<<<<
@@ -40430,7 +42340,7 @@ static PyObject *_unellipsify(PyObject *__pyx_v_index, int __pyx_v_ndim) {
return __pyx_r;
}
-/* "View.MemoryView":686
+/* "View.MemoryView":695
* return have_slices or nslices, tuple(result)
*
* cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim): # <<<<<<<<<<<<<<
@@ -40449,7 +42359,7 @@ static PyObject *assert_direct_dimensions(Py_ssize_t *__pyx_v_suboffsets, int __
PyObject *__pyx_t_5 = NULL;
__Pyx_RefNannySetupContext("assert_direct_dimensions", 0);
- /* "View.MemoryView":687
+ /* "View.MemoryView":696
*
* cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim):
* for suboffset in suboffsets[:ndim]: # <<<<<<<<<<<<<<
@@ -40461,7 +42371,7 @@ static PyObject *assert_direct_dimensions(Py_ssize_t *__pyx_v_suboffsets, int __
__pyx_t_1 = __pyx_t_3;
__pyx_v_suboffset = (__pyx_t_1[0]);
- /* "View.MemoryView":688
+ /* "View.MemoryView":697
* cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim):
* for suboffset in suboffsets[:ndim]:
* if suboffset >= 0: # <<<<<<<<<<<<<<
@@ -40469,22 +42379,22 @@ static PyObject *assert_direct_dimensions(Py_ssize_t *__pyx_v_suboffsets, int __
*
*/
__pyx_t_4 = ((__pyx_v_suboffset >= 0) != 0);
- if (__pyx_t_4) {
+ if (unlikely(__pyx_t_4)) {
- /* "View.MemoryView":689
+ /* "View.MemoryView":698
* for suboffset in suboffsets[:ndim]:
* if suboffset >= 0:
* raise ValueError("Indirect dimensions not supported") # <<<<<<<<<<<<<<
*
*
*/
- __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__52, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 689, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__58, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 698, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_Raise(__pyx_t_5, 0, 0, 0);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __PYX_ERR(2, 689, __pyx_L1_error)
+ __PYX_ERR(2, 698, __pyx_L1_error)
- /* "View.MemoryView":688
+ /* "View.MemoryView":697
* cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim):
* for suboffset in suboffsets[:ndim]:
* if suboffset >= 0: # <<<<<<<<<<<<<<
@@ -40494,7 +42404,7 @@ static PyObject *assert_direct_dimensions(Py_ssize_t *__pyx_v_suboffsets, int __
}
}
- /* "View.MemoryView":686
+ /* "View.MemoryView":695
* return have_slices or nslices, tuple(result)
*
* cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim): # <<<<<<<<<<<<<<
@@ -40515,7 +42425,7 @@ static PyObject *assert_direct_dimensions(Py_ssize_t *__pyx_v_suboffsets, int __
return __pyx_r;
}
-/* "View.MemoryView":696
+/* "View.MemoryView":705
*
* @cname('__pyx_memview_slice')
* cdef memoryview memview_slice(memoryview memview, object indices): # <<<<<<<<<<<<<<
@@ -40556,7 +42466,7 @@ static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_
Py_ssize_t __pyx_t_12;
__Pyx_RefNannySetupContext("memview_slice", 0);
- /* "View.MemoryView":697
+ /* "View.MemoryView":706
* @cname('__pyx_memview_slice')
* cdef memoryview memview_slice(memoryview memview, object indices):
* cdef int new_ndim = 0, suboffset_dim = -1, dim # <<<<<<<<<<<<<<
@@ -40566,16 +42476,16 @@ static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_
__pyx_v_new_ndim = 0;
__pyx_v_suboffset_dim = -1;
- /* "View.MemoryView":704
+ /* "View.MemoryView":713
*
*
* memset(&dst, 0, sizeof(dst)) # <<<<<<<<<<<<<<
*
* cdef _memoryviewslice memviewsliceobj
*/
- memset((&__pyx_v_dst), 0, (sizeof(__pyx_v_dst)));
+ (void)(memset((&__pyx_v_dst), 0, (sizeof(__pyx_v_dst))));
- /* "View.MemoryView":708
+ /* "View.MemoryView":717
* cdef _memoryviewslice memviewsliceobj
*
* assert memview.view.ndim > 0 # <<<<<<<<<<<<<<
@@ -40586,12 +42496,12 @@ static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_
if (unlikely(!Py_OptimizeFlag)) {
if (unlikely(!((__pyx_v_memview->view.ndim > 0) != 0))) {
PyErr_SetNone(PyExc_AssertionError);
- __PYX_ERR(2, 708, __pyx_L1_error)
+ __PYX_ERR(2, 717, __pyx_L1_error)
}
}
#endif
- /* "View.MemoryView":710
+ /* "View.MemoryView":719
* assert memview.view.ndim > 0
*
* if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<<
@@ -40602,20 +42512,20 @@ static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_
__pyx_t_2 = (__pyx_t_1 != 0);
if (__pyx_t_2) {
- /* "View.MemoryView":711
+ /* "View.MemoryView":720
*
* if isinstance(memview, _memoryviewslice):
* memviewsliceobj = memview # <<<<<<<<<<<<<<
* p_src = &memviewsliceobj.from_slice
* else:
*/
- if (!(likely(((((PyObject *)__pyx_v_memview)) == Py_None) || likely(__Pyx_TypeTest(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type))))) __PYX_ERR(2, 711, __pyx_L1_error)
+ if (!(likely(((((PyObject *)__pyx_v_memview)) == Py_None) || likely(__Pyx_TypeTest(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type))))) __PYX_ERR(2, 720, __pyx_L1_error)
__pyx_t_3 = ((PyObject *)__pyx_v_memview);
__Pyx_INCREF(__pyx_t_3);
__pyx_v_memviewsliceobj = ((struct __pyx_memoryviewslice_obj *)__pyx_t_3);
__pyx_t_3 = 0;
- /* "View.MemoryView":712
+ /* "View.MemoryView":721
* if isinstance(memview, _memoryviewslice):
* memviewsliceobj = memview
* p_src = &memviewsliceobj.from_slice # <<<<<<<<<<<<<<
@@ -40624,7 +42534,7 @@ static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_
*/
__pyx_v_p_src = (&__pyx_v_memviewsliceobj->from_slice);
- /* "View.MemoryView":710
+ /* "View.MemoryView":719
* assert memview.view.ndim > 0
*
* if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<<
@@ -40634,7 +42544,7 @@ static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_
goto __pyx_L3;
}
- /* "View.MemoryView":714
+ /* "View.MemoryView":723
* p_src = &memviewsliceobj.from_slice
* else:
* slice_copy(memview, &src) # <<<<<<<<<<<<<<
@@ -40644,7 +42554,7 @@ static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_
/*else*/ {
__pyx_memoryview_slice_copy(__pyx_v_memview, (&__pyx_v_src));
- /* "View.MemoryView":715
+ /* "View.MemoryView":724
* else:
* slice_copy(memview, &src)
* p_src = &src # <<<<<<<<<<<<<<
@@ -40655,7 +42565,7 @@ static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_
}
__pyx_L3:;
- /* "View.MemoryView":721
+ /* "View.MemoryView":730
*
*
* dst.memview = p_src.memview # <<<<<<<<<<<<<<
@@ -40665,7 +42575,7 @@ static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_
__pyx_t_4 = __pyx_v_p_src->memview;
__pyx_v_dst.memview = __pyx_t_4;
- /* "View.MemoryView":722
+ /* "View.MemoryView":731
*
* dst.memview = p_src.memview
* dst.data = p_src.data # <<<<<<<<<<<<<<
@@ -40675,7 +42585,7 @@ static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_
__pyx_t_5 = __pyx_v_p_src->data;
__pyx_v_dst.data = __pyx_t_5;
- /* "View.MemoryView":727
+ /* "View.MemoryView":736
*
*
* cdef __Pyx_memviewslice *p_dst = &dst # <<<<<<<<<<<<<<
@@ -40684,7 +42594,7 @@ static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_
*/
__pyx_v_p_dst = (&__pyx_v_dst);
- /* "View.MemoryView":728
+ /* "View.MemoryView":737
*
* cdef __Pyx_memviewslice *p_dst = &dst
* cdef int *p_suboffset_dim = &suboffset_dim # <<<<<<<<<<<<<<
@@ -40693,7 +42603,7 @@ static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_
*/
__pyx_v_p_suboffset_dim = (&__pyx_v_suboffset_dim);
- /* "View.MemoryView":732
+ /* "View.MemoryView":741
* cdef bint have_start, have_stop, have_step
*
* for dim, index in enumerate(indices): # <<<<<<<<<<<<<<
@@ -40705,26 +42615,26 @@ static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_
__pyx_t_3 = __pyx_v_indices; __Pyx_INCREF(__pyx_t_3); __pyx_t_7 = 0;
__pyx_t_8 = NULL;
} else {
- __pyx_t_7 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_indices); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 732, __pyx_L1_error)
+ __pyx_t_7 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_indices); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 741, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_8 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 732, __pyx_L1_error)
+ __pyx_t_8 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 741, __pyx_L1_error)
}
for (;;) {
if (likely(!__pyx_t_8)) {
if (likely(PyList_CheckExact(__pyx_t_3))) {
if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_3)) break;
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
- __pyx_t_9 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(2, 732, __pyx_L1_error)
+ __pyx_t_9 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(2, 741, __pyx_L1_error)
#else
- __pyx_t_9 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 732, __pyx_L1_error)
+ __pyx_t_9 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 741, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_9);
#endif
} else {
if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
- __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(2, 732, __pyx_L1_error)
+ __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(2, 741, __pyx_L1_error)
#else
- __pyx_t_9 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 732, __pyx_L1_error)
+ __pyx_t_9 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 741, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_9);
#endif
}
@@ -40733,8 +42643,8 @@ static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_
if (unlikely(!__pyx_t_9)) {
PyObject* exc_type = PyErr_Occurred();
if (exc_type) {
- if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
- else __PYX_ERR(2, 732, __pyx_L1_error)
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(2, 741, __pyx_L1_error)
}
break;
}
@@ -40745,7 +42655,7 @@ static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_
__pyx_v_dim = __pyx_t_6;
__pyx_t_6 = (__pyx_t_6 + 1);
- /* "View.MemoryView":733
+ /* "View.MemoryView":742
*
* for dim, index in enumerate(indices):
* if PyIndex_Check(index): # <<<<<<<<<<<<<<
@@ -40755,25 +42665,25 @@ static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_
__pyx_t_2 = (PyIndex_Check(__pyx_v_index) != 0);
if (__pyx_t_2) {
- /* "View.MemoryView":737
+ /* "View.MemoryView":746
* p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
* dim, new_ndim, p_suboffset_dim,
* index, 0, 0, # start, stop, step # <<<<<<<<<<<<<<
* 0, 0, 0, # have_{start,stop,step}
* False)
*/
- __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_index); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(2, 737, __pyx_L1_error)
+ __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_index); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(2, 746, __pyx_L1_error)
- /* "View.MemoryView":734
+ /* "View.MemoryView":743
* for dim, index in enumerate(indices):
* if PyIndex_Check(index):
* slice_memviewslice( # <<<<<<<<<<<<<<
* p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
* dim, new_ndim, p_suboffset_dim,
*/
- __pyx_t_11 = __pyx_memoryview_slice_memviewslice(__pyx_v_p_dst, (__pyx_v_p_src->shape[__pyx_v_dim]), (__pyx_v_p_src->strides[__pyx_v_dim]), (__pyx_v_p_src->suboffsets[__pyx_v_dim]), __pyx_v_dim, __pyx_v_new_ndim, __pyx_v_p_suboffset_dim, __pyx_t_10, 0, 0, 0, 0, 0, 0); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(2, 734, __pyx_L1_error)
+ __pyx_t_11 = __pyx_memoryview_slice_memviewslice(__pyx_v_p_dst, (__pyx_v_p_src->shape[__pyx_v_dim]), (__pyx_v_p_src->strides[__pyx_v_dim]), (__pyx_v_p_src->suboffsets[__pyx_v_dim]), __pyx_v_dim, __pyx_v_new_ndim, __pyx_v_p_suboffset_dim, __pyx_t_10, 0, 0, 0, 0, 0, 0); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(2, 743, __pyx_L1_error)
- /* "View.MemoryView":733
+ /* "View.MemoryView":742
*
* for dim, index in enumerate(indices):
* if PyIndex_Check(index): # <<<<<<<<<<<<<<
@@ -40783,7 +42693,7 @@ static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_
goto __pyx_L6;
}
- /* "View.MemoryView":740
+ /* "View.MemoryView":749
* 0, 0, 0, # have_{start,stop,step}
* False)
* elif index is None: # <<<<<<<<<<<<<<
@@ -40794,7 +42704,7 @@ static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_
__pyx_t_1 = (__pyx_t_2 != 0);
if (__pyx_t_1) {
- /* "View.MemoryView":741
+ /* "View.MemoryView":750
* False)
* elif index is None:
* p_dst.shape[new_ndim] = 1 # <<<<<<<<<<<<<<
@@ -40803,7 +42713,7 @@ static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_
*/
(__pyx_v_p_dst->shape[__pyx_v_new_ndim]) = 1;
- /* "View.MemoryView":742
+ /* "View.MemoryView":751
* elif index is None:
* p_dst.shape[new_ndim] = 1
* p_dst.strides[new_ndim] = 0 # <<<<<<<<<<<<<<
@@ -40812,7 +42722,7 @@ static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_
*/
(__pyx_v_p_dst->strides[__pyx_v_new_ndim]) = 0;
- /* "View.MemoryView":743
+ /* "View.MemoryView":752
* p_dst.shape[new_ndim] = 1
* p_dst.strides[new_ndim] = 0
* p_dst.suboffsets[new_ndim] = -1 # <<<<<<<<<<<<<<
@@ -40821,7 +42731,7 @@ static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_
*/
(__pyx_v_p_dst->suboffsets[__pyx_v_new_ndim]) = -1L;
- /* "View.MemoryView":744
+ /* "View.MemoryView":753
* p_dst.strides[new_ndim] = 0
* p_dst.suboffsets[new_ndim] = -1
* new_ndim += 1 # <<<<<<<<<<<<<<
@@ -40830,7 +42740,7 @@ static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_
*/
__pyx_v_new_ndim = (__pyx_v_new_ndim + 1);
- /* "View.MemoryView":740
+ /* "View.MemoryView":749
* 0, 0, 0, # have_{start,stop,step}
* False)
* elif index is None: # <<<<<<<<<<<<<<
@@ -40840,7 +42750,7 @@ static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_
goto __pyx_L6;
}
- /* "View.MemoryView":746
+ /* "View.MemoryView":755
* new_ndim += 1
* else:
* start = index.start or 0 # <<<<<<<<<<<<<<
@@ -40848,13 +42758,13 @@ static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_
* step = index.step or 0
*/
/*else*/ {
- __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_start); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 746, __pyx_L1_error)
+ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_start); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 755, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_9);
- __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 746, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 755, __pyx_L1_error)
if (!__pyx_t_1) {
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
} else {
- __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_9); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(2, 746, __pyx_L1_error)
+ __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_9); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(2, 755, __pyx_L1_error)
__pyx_t_10 = __pyx_t_12;
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
goto __pyx_L7_bool_binop_done;
@@ -40863,20 +42773,20 @@ static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_
__pyx_L7_bool_binop_done:;
__pyx_v_start = __pyx_t_10;
- /* "View.MemoryView":747
+ /* "View.MemoryView":756
* else:
* start = index.start or 0
* stop = index.stop or 0 # <<<<<<<<<<<<<<
* step = index.step or 0
*
*/
- __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_stop); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 747, __pyx_L1_error)
+ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_stop); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 756, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_9);
- __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 747, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 756, __pyx_L1_error)
if (!__pyx_t_1) {
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
} else {
- __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_9); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(2, 747, __pyx_L1_error)
+ __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_9); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(2, 756, __pyx_L1_error)
__pyx_t_10 = __pyx_t_12;
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
goto __pyx_L9_bool_binop_done;
@@ -40885,20 +42795,20 @@ static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_
__pyx_L9_bool_binop_done:;
__pyx_v_stop = __pyx_t_10;
- /* "View.MemoryView":748
+ /* "View.MemoryView":757
* start = index.start or 0
* stop = index.stop or 0
* step = index.step or 0 # <<<<<<<<<<<<<<
*
* have_start = index.start is not None
*/
- __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_step); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 748, __pyx_L1_error)
+ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_step); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 757, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_9);
- __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 748, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(2, 757, __pyx_L1_error)
if (!__pyx_t_1) {
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
} else {
- __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_9); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(2, 748, __pyx_L1_error)
+ __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_9); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(2, 757, __pyx_L1_error)
__pyx_t_10 = __pyx_t_12;
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
goto __pyx_L11_bool_binop_done;
@@ -40907,55 +42817,55 @@ static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_
__pyx_L11_bool_binop_done:;
__pyx_v_step = __pyx_t_10;
- /* "View.MemoryView":750
+ /* "View.MemoryView":759
* step = index.step or 0
*
* have_start = index.start is not None # <<<<<<<<<<<<<<
* have_stop = index.stop is not None
* have_step = index.step is not None
*/
- __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_start); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 750, __pyx_L1_error)
+ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_start); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 759, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_9);
__pyx_t_1 = (__pyx_t_9 != Py_None);
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
__pyx_v_have_start = __pyx_t_1;
- /* "View.MemoryView":751
+ /* "View.MemoryView":760
*
* have_start = index.start is not None
* have_stop = index.stop is not None # <<<<<<<<<<<<<<
* have_step = index.step is not None
*
*/
- __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_stop); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 751, __pyx_L1_error)
+ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_stop); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 760, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_9);
__pyx_t_1 = (__pyx_t_9 != Py_None);
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
__pyx_v_have_stop = __pyx_t_1;
- /* "View.MemoryView":752
+ /* "View.MemoryView":761
* have_start = index.start is not None
* have_stop = index.stop is not None
* have_step = index.step is not None # <<<<<<<<<<<<<<
*
* slice_memviewslice(
*/
- __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_step); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 752, __pyx_L1_error)
+ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_step); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 761, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_9);
__pyx_t_1 = (__pyx_t_9 != Py_None);
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
__pyx_v_have_step = __pyx_t_1;
- /* "View.MemoryView":754
+ /* "View.MemoryView":763
* have_step = index.step is not None
*
* slice_memviewslice( # <<<<<<<<<<<<<<
* p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
* dim, new_ndim, p_suboffset_dim,
*/
- __pyx_t_11 = __pyx_memoryview_slice_memviewslice(__pyx_v_p_dst, (__pyx_v_p_src->shape[__pyx_v_dim]), (__pyx_v_p_src->strides[__pyx_v_dim]), (__pyx_v_p_src->suboffsets[__pyx_v_dim]), __pyx_v_dim, __pyx_v_new_ndim, __pyx_v_p_suboffset_dim, __pyx_v_start, __pyx_v_stop, __pyx_v_step, __pyx_v_have_start, __pyx_v_have_stop, __pyx_v_have_step, 1); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(2, 754, __pyx_L1_error)
+ __pyx_t_11 = __pyx_memoryview_slice_memviewslice(__pyx_v_p_dst, (__pyx_v_p_src->shape[__pyx_v_dim]), (__pyx_v_p_src->strides[__pyx_v_dim]), (__pyx_v_p_src->suboffsets[__pyx_v_dim]), __pyx_v_dim, __pyx_v_new_ndim, __pyx_v_p_suboffset_dim, __pyx_v_start, __pyx_v_stop, __pyx_v_step, __pyx_v_have_start, __pyx_v_have_stop, __pyx_v_have_step, 1); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(2, 763, __pyx_L1_error)
- /* "View.MemoryView":760
+ /* "View.MemoryView":769
* have_start, have_stop, have_step,
* True)
* new_ndim += 1 # <<<<<<<<<<<<<<
@@ -40966,7 +42876,7 @@ static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_
}
__pyx_L6:;
- /* "View.MemoryView":732
+ /* "View.MemoryView":741
* cdef bint have_start, have_stop, have_step
*
* for dim, index in enumerate(indices): # <<<<<<<<<<<<<<
@@ -40976,7 +42886,7 @@ static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_
}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "View.MemoryView":762
+ /* "View.MemoryView":771
* new_ndim += 1
*
* if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<<
@@ -40987,7 +42897,7 @@ static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_
__pyx_t_2 = (__pyx_t_1 != 0);
if (__pyx_t_2) {
- /* "View.MemoryView":763
+ /* "View.MemoryView":772
*
* if isinstance(memview, _memoryviewslice):
* return memoryview_fromslice(dst, new_ndim, # <<<<<<<<<<<<<<
@@ -40996,39 +42906,39 @@ static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_
*/
__Pyx_XDECREF(((PyObject *)__pyx_r));
- /* "View.MemoryView":764
+ /* "View.MemoryView":773
* if isinstance(memview, _memoryviewslice):
* return memoryview_fromslice(dst, new_ndim,
* memviewsliceobj.to_object_func, # <<<<<<<<<<<<<<
* memviewsliceobj.to_dtype_func,
* memview.dtype_is_object)
*/
- if (unlikely(!__pyx_v_memviewsliceobj)) { __Pyx_RaiseUnboundLocalError("memviewsliceobj"); __PYX_ERR(2, 764, __pyx_L1_error) }
+ if (unlikely(!__pyx_v_memviewsliceobj)) { __Pyx_RaiseUnboundLocalError("memviewsliceobj"); __PYX_ERR(2, 773, __pyx_L1_error) }
- /* "View.MemoryView":765
+ /* "View.MemoryView":774
* return memoryview_fromslice(dst, new_ndim,
* memviewsliceobj.to_object_func,
* memviewsliceobj.to_dtype_func, # <<<<<<<<<<<<<<
* memview.dtype_is_object)
* else:
*/
- if (unlikely(!__pyx_v_memviewsliceobj)) { __Pyx_RaiseUnboundLocalError("memviewsliceobj"); __PYX_ERR(2, 765, __pyx_L1_error) }
+ if (unlikely(!__pyx_v_memviewsliceobj)) { __Pyx_RaiseUnboundLocalError("memviewsliceobj"); __PYX_ERR(2, 774, __pyx_L1_error) }
- /* "View.MemoryView":763
+ /* "View.MemoryView":772
*
* if isinstance(memview, _memoryviewslice):
* return memoryview_fromslice(dst, new_ndim, # <<<<<<<<<<<<<<
* memviewsliceobj.to_object_func,
* memviewsliceobj.to_dtype_func,
*/
- __pyx_t_3 = __pyx_memoryview_fromslice(__pyx_v_dst, __pyx_v_new_ndim, __pyx_v_memviewsliceobj->to_object_func, __pyx_v_memviewsliceobj->to_dtype_func, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 763, __pyx_L1_error)
+ __pyx_t_3 = __pyx_memoryview_fromslice(__pyx_v_dst, __pyx_v_new_ndim, __pyx_v_memviewsliceobj->to_object_func, __pyx_v_memviewsliceobj->to_dtype_func, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 772, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_memoryview_type))))) __PYX_ERR(2, 763, __pyx_L1_error)
+ if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_memoryview_type))))) __PYX_ERR(2, 772, __pyx_L1_error)
__pyx_r = ((struct __pyx_memoryview_obj *)__pyx_t_3);
__pyx_t_3 = 0;
goto __pyx_L0;
- /* "View.MemoryView":762
+ /* "View.MemoryView":771
* new_ndim += 1
*
* if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<<
@@ -41037,7 +42947,7 @@ static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_
*/
}
- /* "View.MemoryView":768
+ /* "View.MemoryView":777
* memview.dtype_is_object)
* else:
* return memoryview_fromslice(dst, new_ndim, NULL, NULL, # <<<<<<<<<<<<<<
@@ -41047,30 +42957,30 @@ static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_
/*else*/ {
__Pyx_XDECREF(((PyObject *)__pyx_r));
- /* "View.MemoryView":769
+ /* "View.MemoryView":778
* else:
* return memoryview_fromslice(dst, new_ndim, NULL, NULL,
* memview.dtype_is_object) # <<<<<<<<<<<<<<
*
*
*/
- __pyx_t_3 = __pyx_memoryview_fromslice(__pyx_v_dst, __pyx_v_new_ndim, NULL, NULL, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 768, __pyx_L1_error)
+ __pyx_t_3 = __pyx_memoryview_fromslice(__pyx_v_dst, __pyx_v_new_ndim, NULL, NULL, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 777, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- /* "View.MemoryView":768
+ /* "View.MemoryView":777
* memview.dtype_is_object)
* else:
* return memoryview_fromslice(dst, new_ndim, NULL, NULL, # <<<<<<<<<<<<<<
* memview.dtype_is_object)
*
*/
- if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_memoryview_type))))) __PYX_ERR(2, 768, __pyx_L1_error)
+ if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_memoryview_type))))) __PYX_ERR(2, 777, __pyx_L1_error)
__pyx_r = ((struct __pyx_memoryview_obj *)__pyx_t_3);
__pyx_t_3 = 0;
goto __pyx_L0;
}
- /* "View.MemoryView":696
+ /* "View.MemoryView":705
*
* @cname('__pyx_memview_slice')
* cdef memoryview memview_slice(memoryview memview, object indices): # <<<<<<<<<<<<<<
@@ -41092,7 +43002,7 @@ static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_
return __pyx_r;
}
-/* "View.MemoryView":793
+/* "View.MemoryView":802
*
* @cname('__pyx_memoryview_slice_memviewslice')
* cdef int slice_memviewslice( # <<<<<<<<<<<<<<
@@ -41108,7 +43018,7 @@ static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst,
int __pyx_t_2;
int __pyx_t_3;
- /* "View.MemoryView":813
+ /* "View.MemoryView":822
* cdef bint negative_step
*
* if not is_slice: # <<<<<<<<<<<<<<
@@ -41118,7 +43028,7 @@ static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst,
__pyx_t_1 = ((!(__pyx_v_is_slice != 0)) != 0);
if (__pyx_t_1) {
- /* "View.MemoryView":815
+ /* "View.MemoryView":824
* if not is_slice:
*
* if start < 0: # <<<<<<<<<<<<<<
@@ -41128,7 +43038,7 @@ static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst,
__pyx_t_1 = ((__pyx_v_start < 0) != 0);
if (__pyx_t_1) {
- /* "View.MemoryView":816
+ /* "View.MemoryView":825
*
* if start < 0:
* start += shape # <<<<<<<<<<<<<<
@@ -41137,7 +43047,7 @@ static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst,
*/
__pyx_v_start = (__pyx_v_start + __pyx_v_shape);
- /* "View.MemoryView":815
+ /* "View.MemoryView":824
* if not is_slice:
*
* if start < 0: # <<<<<<<<<<<<<<
@@ -41146,7 +43056,7 @@ static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst,
*/
}
- /* "View.MemoryView":817
+ /* "View.MemoryView":826
* if start < 0:
* start += shape
* if not 0 <= start < shape: # <<<<<<<<<<<<<<
@@ -41160,16 +43070,16 @@ static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst,
__pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
if (__pyx_t_2) {
- /* "View.MemoryView":818
+ /* "View.MemoryView":827
* start += shape
* if not 0 <= start < shape:
* _err_dim(IndexError, "Index out of bounds (axis %d)", dim) # <<<<<<<<<<<<<<
* else:
*
*/
- __pyx_t_3 = __pyx_memoryview_err_dim(__pyx_builtin_IndexError, ((char *)"Index out of bounds (axis %d)"), __pyx_v_dim); if (unlikely(__pyx_t_3 == -1)) __PYX_ERR(2, 818, __pyx_L1_error)
+ __pyx_t_3 = __pyx_memoryview_err_dim(__pyx_builtin_IndexError, ((char *)"Index out of bounds (axis %d)"), __pyx_v_dim); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(2, 827, __pyx_L1_error)
- /* "View.MemoryView":817
+ /* "View.MemoryView":826
* if start < 0:
* start += shape
* if not 0 <= start < shape: # <<<<<<<<<<<<<<
@@ -41178,7 +43088,7 @@ static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst,
*/
}
- /* "View.MemoryView":813
+ /* "View.MemoryView":822
* cdef bint negative_step
*
* if not is_slice: # <<<<<<<<<<<<<<
@@ -41188,7 +43098,7 @@ static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst,
goto __pyx_L3;
}
- /* "View.MemoryView":821
+ /* "View.MemoryView":830
* else:
*
* negative_step = have_step != 0 and step < 0 # <<<<<<<<<<<<<<
@@ -41207,7 +43117,7 @@ static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst,
__pyx_L6_bool_binop_done:;
__pyx_v_negative_step = __pyx_t_2;
- /* "View.MemoryView":823
+ /* "View.MemoryView":832
* negative_step = have_step != 0 and step < 0
*
* if have_step and step == 0: # <<<<<<<<<<<<<<
@@ -41225,16 +43135,16 @@ static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst,
__pyx_L9_bool_binop_done:;
if (__pyx_t_2) {
- /* "View.MemoryView":824
+ /* "View.MemoryView":833
*
* if have_step and step == 0:
* _err_dim(ValueError, "Step may not be zero (axis %d)", dim) # <<<<<<<<<<<<<<
*
*
*/
- __pyx_t_3 = __pyx_memoryview_err_dim(__pyx_builtin_ValueError, ((char *)"Step may not be zero (axis %d)"), __pyx_v_dim); if (unlikely(__pyx_t_3 == -1)) __PYX_ERR(2, 824, __pyx_L1_error)
+ __pyx_t_3 = __pyx_memoryview_err_dim(__pyx_builtin_ValueError, ((char *)"Step may not be zero (axis %d)"), __pyx_v_dim); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(2, 833, __pyx_L1_error)
- /* "View.MemoryView":823
+ /* "View.MemoryView":832
* negative_step = have_step != 0 and step < 0
*
* if have_step and step == 0: # <<<<<<<<<<<<<<
@@ -41243,7 +43153,7 @@ static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst,
*/
}
- /* "View.MemoryView":827
+ /* "View.MemoryView":836
*
*
* if have_start: # <<<<<<<<<<<<<<
@@ -41253,7 +43163,7 @@ static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst,
__pyx_t_2 = (__pyx_v_have_start != 0);
if (__pyx_t_2) {
- /* "View.MemoryView":828
+ /* "View.MemoryView":837
*
* if have_start:
* if start < 0: # <<<<<<<<<<<<<<
@@ -41263,7 +43173,7 @@ static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst,
__pyx_t_2 = ((__pyx_v_start < 0) != 0);
if (__pyx_t_2) {
- /* "View.MemoryView":829
+ /* "View.MemoryView":838
* if have_start:
* if start < 0:
* start += shape # <<<<<<<<<<<<<<
@@ -41272,7 +43182,7 @@ static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst,
*/
__pyx_v_start = (__pyx_v_start + __pyx_v_shape);
- /* "View.MemoryView":830
+ /* "View.MemoryView":839
* if start < 0:
* start += shape
* if start < 0: # <<<<<<<<<<<<<<
@@ -41282,7 +43192,7 @@ static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst,
__pyx_t_2 = ((__pyx_v_start < 0) != 0);
if (__pyx_t_2) {
- /* "View.MemoryView":831
+ /* "View.MemoryView":840
* start += shape
* if start < 0:
* start = 0 # <<<<<<<<<<<<<<
@@ -41291,7 +43201,7 @@ static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst,
*/
__pyx_v_start = 0;
- /* "View.MemoryView":830
+ /* "View.MemoryView":839
* if start < 0:
* start += shape
* if start < 0: # <<<<<<<<<<<<<<
@@ -41300,7 +43210,7 @@ static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst,
*/
}
- /* "View.MemoryView":828
+ /* "View.MemoryView":837
*
* if have_start:
* if start < 0: # <<<<<<<<<<<<<<
@@ -41310,7 +43220,7 @@ static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst,
goto __pyx_L12;
}
- /* "View.MemoryView":832
+ /* "View.MemoryView":841
* if start < 0:
* start = 0
* elif start >= shape: # <<<<<<<<<<<<<<
@@ -41320,7 +43230,7 @@ static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst,
__pyx_t_2 = ((__pyx_v_start >= __pyx_v_shape) != 0);
if (__pyx_t_2) {
- /* "View.MemoryView":833
+ /* "View.MemoryView":842
* start = 0
* elif start >= shape:
* if negative_step: # <<<<<<<<<<<<<<
@@ -41330,7 +43240,7 @@ static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst,
__pyx_t_2 = (__pyx_v_negative_step != 0);
if (__pyx_t_2) {
- /* "View.MemoryView":834
+ /* "View.MemoryView":843
* elif start >= shape:
* if negative_step:
* start = shape - 1 # <<<<<<<<<<<<<<
@@ -41339,7 +43249,7 @@ static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst,
*/
__pyx_v_start = (__pyx_v_shape - 1);
- /* "View.MemoryView":833
+ /* "View.MemoryView":842
* start = 0
* elif start >= shape:
* if negative_step: # <<<<<<<<<<<<<<
@@ -41349,7 +43259,7 @@ static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst,
goto __pyx_L14;
}
- /* "View.MemoryView":836
+ /* "View.MemoryView":845
* start = shape - 1
* else:
* start = shape # <<<<<<<<<<<<<<
@@ -41361,7 +43271,7 @@ static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst,
}
__pyx_L14:;
- /* "View.MemoryView":832
+ /* "View.MemoryView":841
* if start < 0:
* start = 0
* elif start >= shape: # <<<<<<<<<<<<<<
@@ -41371,7 +43281,7 @@ static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst,
}
__pyx_L12:;
- /* "View.MemoryView":827
+ /* "View.MemoryView":836
*
*
* if have_start: # <<<<<<<<<<<<<<
@@ -41381,7 +43291,7 @@ static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst,
goto __pyx_L11;
}
- /* "View.MemoryView":838
+ /* "View.MemoryView":847
* start = shape
* else:
* if negative_step: # <<<<<<<<<<<<<<
@@ -41392,7 +43302,7 @@ static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst,
__pyx_t_2 = (__pyx_v_negative_step != 0);
if (__pyx_t_2) {
- /* "View.MemoryView":839
+ /* "View.MemoryView":848
* else:
* if negative_step:
* start = shape - 1 # <<<<<<<<<<<<<<
@@ -41401,7 +43311,7 @@ static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst,
*/
__pyx_v_start = (__pyx_v_shape - 1);
- /* "View.MemoryView":838
+ /* "View.MemoryView":847
* start = shape
* else:
* if negative_step: # <<<<<<<<<<<<<<
@@ -41411,7 +43321,7 @@ static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst,
goto __pyx_L15;
}
- /* "View.MemoryView":841
+ /* "View.MemoryView":850
* start = shape - 1
* else:
* start = 0 # <<<<<<<<<<<<<<
@@ -41425,7 +43335,7 @@ static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst,
}
__pyx_L11:;
- /* "View.MemoryView":843
+ /* "View.MemoryView":852
* start = 0
*
* if have_stop: # <<<<<<<<<<<<<<
@@ -41435,7 +43345,7 @@ static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst,
__pyx_t_2 = (__pyx_v_have_stop != 0);
if (__pyx_t_2) {
- /* "View.MemoryView":844
+ /* "View.MemoryView":853
*
* if have_stop:
* if stop < 0: # <<<<<<<<<<<<<<
@@ -41445,7 +43355,7 @@ static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst,
__pyx_t_2 = ((__pyx_v_stop < 0) != 0);
if (__pyx_t_2) {
- /* "View.MemoryView":845
+ /* "View.MemoryView":854
* if have_stop:
* if stop < 0:
* stop += shape # <<<<<<<<<<<<<<
@@ -41454,7 +43364,7 @@ static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst,
*/
__pyx_v_stop = (__pyx_v_stop + __pyx_v_shape);
- /* "View.MemoryView":846
+ /* "View.MemoryView":855
* if stop < 0:
* stop += shape
* if stop < 0: # <<<<<<<<<<<<<<
@@ -41464,7 +43374,7 @@ static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst,
__pyx_t_2 = ((__pyx_v_stop < 0) != 0);
if (__pyx_t_2) {
- /* "View.MemoryView":847
+ /* "View.MemoryView":856
* stop += shape
* if stop < 0:
* stop = 0 # <<<<<<<<<<<<<<
@@ -41473,7 +43383,7 @@ static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst,
*/
__pyx_v_stop = 0;
- /* "View.MemoryView":846
+ /* "View.MemoryView":855
* if stop < 0:
* stop += shape
* if stop < 0: # <<<<<<<<<<<<<<
@@ -41482,7 +43392,7 @@ static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst,
*/
}
- /* "View.MemoryView":844
+ /* "View.MemoryView":853
*
* if have_stop:
* if stop < 0: # <<<<<<<<<<<<<<
@@ -41492,7 +43402,7 @@ static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst,
goto __pyx_L17;
}
- /* "View.MemoryView":848
+ /* "View.MemoryView":857
* if stop < 0:
* stop = 0
* elif stop > shape: # <<<<<<<<<<<<<<
@@ -41502,7 +43412,7 @@ static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst,
__pyx_t_2 = ((__pyx_v_stop > __pyx_v_shape) != 0);
if (__pyx_t_2) {
- /* "View.MemoryView":849
+ /* "View.MemoryView":858
* stop = 0
* elif stop > shape:
* stop = shape # <<<<<<<<<<<<<<
@@ -41511,7 +43421,7 @@ static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst,
*/
__pyx_v_stop = __pyx_v_shape;
- /* "View.MemoryView":848
+ /* "View.MemoryView":857
* if stop < 0:
* stop = 0
* elif stop > shape: # <<<<<<<<<<<<<<
@@ -41521,7 +43431,7 @@ static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst,
}
__pyx_L17:;
- /* "View.MemoryView":843
+ /* "View.MemoryView":852
* start = 0
*
* if have_stop: # <<<<<<<<<<<<<<
@@ -41531,7 +43441,7 @@ static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst,
goto __pyx_L16;
}
- /* "View.MemoryView":851
+ /* "View.MemoryView":860
* stop = shape
* else:
* if negative_step: # <<<<<<<<<<<<<<
@@ -41542,7 +43452,7 @@ static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst,
__pyx_t_2 = (__pyx_v_negative_step != 0);
if (__pyx_t_2) {
- /* "View.MemoryView":852
+ /* "View.MemoryView":861
* else:
* if negative_step:
* stop = -1 # <<<<<<<<<<<<<<
@@ -41551,7 +43461,7 @@ static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst,
*/
__pyx_v_stop = -1L;
- /* "View.MemoryView":851
+ /* "View.MemoryView":860
* stop = shape
* else:
* if negative_step: # <<<<<<<<<<<<<<
@@ -41561,7 +43471,7 @@ static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst,
goto __pyx_L19;
}
- /* "View.MemoryView":854
+ /* "View.MemoryView":863
* stop = -1
* else:
* stop = shape # <<<<<<<<<<<<<<
@@ -41575,7 +43485,7 @@ static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst,
}
__pyx_L16:;
- /* "View.MemoryView":856
+ /* "View.MemoryView":865
* stop = shape
*
* if not have_step: # <<<<<<<<<<<<<<
@@ -41585,7 +43495,7 @@ static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst,
__pyx_t_2 = ((!(__pyx_v_have_step != 0)) != 0);
if (__pyx_t_2) {
- /* "View.MemoryView":857
+ /* "View.MemoryView":866
*
* if not have_step:
* step = 1 # <<<<<<<<<<<<<<
@@ -41594,7 +43504,7 @@ static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst,
*/
__pyx_v_step = 1;
- /* "View.MemoryView":856
+ /* "View.MemoryView":865
* stop = shape
*
* if not have_step: # <<<<<<<<<<<<<<
@@ -41603,7 +43513,7 @@ static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst,
*/
}
- /* "View.MemoryView":861
+ /* "View.MemoryView":870
*
* with cython.cdivision(True):
* new_shape = (stop - start) // step # <<<<<<<<<<<<<<
@@ -41612,7 +43522,7 @@ static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst,
*/
__pyx_v_new_shape = ((__pyx_v_stop - __pyx_v_start) / __pyx_v_step);
- /* "View.MemoryView":863
+ /* "View.MemoryView":872
* new_shape = (stop - start) // step
*
* if (stop - start) - step * new_shape: # <<<<<<<<<<<<<<
@@ -41622,7 +43532,7 @@ static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst,
__pyx_t_2 = (((__pyx_v_stop - __pyx_v_start) - (__pyx_v_step * __pyx_v_new_shape)) != 0);
if (__pyx_t_2) {
- /* "View.MemoryView":864
+ /* "View.MemoryView":873
*
* if (stop - start) - step * new_shape:
* new_shape += 1 # <<<<<<<<<<<<<<
@@ -41631,7 +43541,7 @@ static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst,
*/
__pyx_v_new_shape = (__pyx_v_new_shape + 1);
- /* "View.MemoryView":863
+ /* "View.MemoryView":872
* new_shape = (stop - start) // step
*
* if (stop - start) - step * new_shape: # <<<<<<<<<<<<<<
@@ -41640,7 +43550,7 @@ static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst,
*/
}
- /* "View.MemoryView":866
+ /* "View.MemoryView":875
* new_shape += 1
*
* if new_shape < 0: # <<<<<<<<<<<<<<
@@ -41650,7 +43560,7 @@ static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst,
__pyx_t_2 = ((__pyx_v_new_shape < 0) != 0);
if (__pyx_t_2) {
- /* "View.MemoryView":867
+ /* "View.MemoryView":876
*
* if new_shape < 0:
* new_shape = 0 # <<<<<<<<<<<<<<
@@ -41659,7 +43569,7 @@ static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst,
*/
__pyx_v_new_shape = 0;
- /* "View.MemoryView":866
+ /* "View.MemoryView":875
* new_shape += 1
*
* if new_shape < 0: # <<<<<<<<<<<<<<
@@ -41668,7 +43578,7 @@ static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst,
*/
}
- /* "View.MemoryView":870
+ /* "View.MemoryView":879
*
*
* dst.strides[new_ndim] = stride * step # <<<<<<<<<<<<<<
@@ -41677,7 +43587,7 @@ static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst,
*/
(__pyx_v_dst->strides[__pyx_v_new_ndim]) = (__pyx_v_stride * __pyx_v_step);
- /* "View.MemoryView":871
+ /* "View.MemoryView":880
*
* dst.strides[new_ndim] = stride * step
* dst.shape[new_ndim] = new_shape # <<<<<<<<<<<<<<
@@ -41686,7 +43596,7 @@ static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst,
*/
(__pyx_v_dst->shape[__pyx_v_new_ndim]) = __pyx_v_new_shape;
- /* "View.MemoryView":872
+ /* "View.MemoryView":881
* dst.strides[new_ndim] = stride * step
* dst.shape[new_ndim] = new_shape
* dst.suboffsets[new_ndim] = suboffset # <<<<<<<<<<<<<<
@@ -41697,7 +43607,7 @@ static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst,
}
__pyx_L3:;
- /* "View.MemoryView":875
+ /* "View.MemoryView":884
*
*
* if suboffset_dim[0] < 0: # <<<<<<<<<<<<<<
@@ -41707,7 +43617,7 @@ static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst,
__pyx_t_2 = (((__pyx_v_suboffset_dim[0]) < 0) != 0);
if (__pyx_t_2) {
- /* "View.MemoryView":876
+ /* "View.MemoryView":885
*
* if suboffset_dim[0] < 0:
* dst.data += start * stride # <<<<<<<<<<<<<<
@@ -41716,7 +43626,7 @@ static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst,
*/
__pyx_v_dst->data = (__pyx_v_dst->data + (__pyx_v_start * __pyx_v_stride));
- /* "View.MemoryView":875
+ /* "View.MemoryView":884
*
*
* if suboffset_dim[0] < 0: # <<<<<<<<<<<<<<
@@ -41726,7 +43636,7 @@ static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst,
goto __pyx_L23;
}
- /* "View.MemoryView":878
+ /* "View.MemoryView":887
* dst.data += start * stride
* else:
* dst.suboffsets[suboffset_dim[0]] += start * stride # <<<<<<<<<<<<<<
@@ -41739,7 +43649,7 @@ static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst,
}
__pyx_L23:;
- /* "View.MemoryView":880
+ /* "View.MemoryView":889
* dst.suboffsets[suboffset_dim[0]] += start * stride
*
* if suboffset >= 0: # <<<<<<<<<<<<<<
@@ -41749,7 +43659,7 @@ static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst,
__pyx_t_2 = ((__pyx_v_suboffset >= 0) != 0);
if (__pyx_t_2) {
- /* "View.MemoryView":881
+ /* "View.MemoryView":890
*
* if suboffset >= 0:
* if not is_slice: # <<<<<<<<<<<<<<
@@ -41759,7 +43669,7 @@ static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst,
__pyx_t_2 = ((!(__pyx_v_is_slice != 0)) != 0);
if (__pyx_t_2) {
- /* "View.MemoryView":882
+ /* "View.MemoryView":891
* if suboffset >= 0:
* if not is_slice:
* if new_ndim == 0: # <<<<<<<<<<<<<<
@@ -41769,7 +43679,7 @@ static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst,
__pyx_t_2 = ((__pyx_v_new_ndim == 0) != 0);
if (__pyx_t_2) {
- /* "View.MemoryView":883
+ /* "View.MemoryView":892
* if not is_slice:
* if new_ndim == 0:
* dst.data = (<char **> dst.data)[0] + suboffset # <<<<<<<<<<<<<<
@@ -41778,7 +43688,7 @@ static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst,
*/
__pyx_v_dst->data = ((((char **)__pyx_v_dst->data)[0]) + __pyx_v_suboffset);
- /* "View.MemoryView":882
+ /* "View.MemoryView":891
* if suboffset >= 0:
* if not is_slice:
* if new_ndim == 0: # <<<<<<<<<<<<<<
@@ -41788,7 +43698,7 @@ static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst,
goto __pyx_L26;
}
- /* "View.MemoryView":885
+ /* "View.MemoryView":894
* dst.data = (<char **> dst.data)[0] + suboffset
* else:
* _err_dim(IndexError, "All dimensions preceding dimension %d " # <<<<<<<<<<<<<<
@@ -41797,18 +43707,18 @@ static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst,
*/
/*else*/ {
- /* "View.MemoryView":886
+ /* "View.MemoryView":895
* else:
* _err_dim(IndexError, "All dimensions preceding dimension %d "
* "must be indexed and not sliced", dim) # <<<<<<<<<<<<<<
* else:
* suboffset_dim[0] = new_ndim
*/
- __pyx_t_3 = __pyx_memoryview_err_dim(__pyx_builtin_IndexError, ((char *)"All dimensions preceding dimension %d must be indexed and not sliced"), __pyx_v_dim); if (unlikely(__pyx_t_3 == -1)) __PYX_ERR(2, 885, __pyx_L1_error)
+ __pyx_t_3 = __pyx_memoryview_err_dim(__pyx_builtin_IndexError, ((char *)"All dimensions preceding dimension %d must be indexed and not sliced"), __pyx_v_dim); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(2, 894, __pyx_L1_error)
}
__pyx_L26:;
- /* "View.MemoryView":881
+ /* "View.MemoryView":890
*
* if suboffset >= 0:
* if not is_slice: # <<<<<<<<<<<<<<
@@ -41818,7 +43728,7 @@ static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst,
goto __pyx_L25;
}
- /* "View.MemoryView":888
+ /* "View.MemoryView":897
* "must be indexed and not sliced", dim)
* else:
* suboffset_dim[0] = new_ndim # <<<<<<<<<<<<<<
@@ -41830,7 +43740,7 @@ static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst,
}
__pyx_L25:;
- /* "View.MemoryView":880
+ /* "View.MemoryView":889
* dst.suboffsets[suboffset_dim[0]] += start * stride
*
* if suboffset >= 0: # <<<<<<<<<<<<<<
@@ -41839,7 +43749,7 @@ static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst,
*/
}
- /* "View.MemoryView":890
+ /* "View.MemoryView":899
* suboffset_dim[0] = new_ndim
*
* return 0 # <<<<<<<<<<<<<<
@@ -41849,7 +43759,7 @@ static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst,
__pyx_r = 0;
goto __pyx_L0;
- /* "View.MemoryView":793
+ /* "View.MemoryView":802
*
* @cname('__pyx_memoryview_slice_memviewslice')
* cdef int slice_memviewslice( # <<<<<<<<<<<<<<
@@ -41861,11 +43771,11 @@ static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst,
__pyx_L1_error:;
{
#ifdef WITH_THREAD
- PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();
+ PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
#endif
__Pyx_AddTraceback("View.MemoryView.slice_memviewslice", __pyx_clineno, __pyx_lineno, __pyx_filename);
#ifdef WITH_THREAD
- PyGILState_Release(__pyx_gilstate_save);
+ __Pyx_PyGILState_Release(__pyx_gilstate_save);
#endif
}
__pyx_r = -1;
@@ -41873,7 +43783,7 @@ static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst,
return __pyx_r;
}
-/* "View.MemoryView":896
+/* "View.MemoryView":905
*
* @cname('__pyx_pybuffer_index')
* cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index, # <<<<<<<<<<<<<<
@@ -41895,7 +43805,7 @@ static char *__pyx_pybuffer_index(Py_buffer *__pyx_v_view, char *__pyx_v_bufp, P
PyObject *__pyx_t_4 = NULL;
__Pyx_RefNannySetupContext("pybuffer_index", 0);
- /* "View.MemoryView":898
+ /* "View.MemoryView":907
* cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index,
* Py_ssize_t dim) except NULL:
* cdef Py_ssize_t shape, stride, suboffset = -1 # <<<<<<<<<<<<<<
@@ -41904,7 +43814,7 @@ static char *__pyx_pybuffer_index(Py_buffer *__pyx_v_view, char *__pyx_v_bufp, P
*/
__pyx_v_suboffset = -1L;
- /* "View.MemoryView":899
+ /* "View.MemoryView":908
* Py_ssize_t dim) except NULL:
* cdef Py_ssize_t shape, stride, suboffset = -1
* cdef Py_ssize_t itemsize = view.itemsize # <<<<<<<<<<<<<<
@@ -41914,7 +43824,7 @@ static char *__pyx_pybuffer_index(Py_buffer *__pyx_v_view, char *__pyx_v_bufp, P
__pyx_t_1 = __pyx_v_view->itemsize;
__pyx_v_itemsize = __pyx_t_1;
- /* "View.MemoryView":902
+ /* "View.MemoryView":911
* cdef char *resultp
*
* if view.ndim == 0: # <<<<<<<<<<<<<<
@@ -41924,7 +43834,7 @@ static char *__pyx_pybuffer_index(Py_buffer *__pyx_v_view, char *__pyx_v_bufp, P
__pyx_t_2 = ((__pyx_v_view->ndim == 0) != 0);
if (__pyx_t_2) {
- /* "View.MemoryView":903
+ /* "View.MemoryView":912
*
* if view.ndim == 0:
* shape = view.len / itemsize # <<<<<<<<<<<<<<
@@ -41933,15 +43843,15 @@ static char *__pyx_pybuffer_index(Py_buffer *__pyx_v_view, char *__pyx_v_bufp, P
*/
if (unlikely(__pyx_v_itemsize == 0)) {
PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
- __PYX_ERR(2, 903, __pyx_L1_error)
+ __PYX_ERR(2, 912, __pyx_L1_error)
}
else if (sizeof(Py_ssize_t) == sizeof(long) && (!(((Py_ssize_t)-1) > 0)) && unlikely(__pyx_v_itemsize == (Py_ssize_t)-1) && unlikely(UNARY_NEG_WOULD_OVERFLOW(__pyx_v_view->len))) {
PyErr_SetString(PyExc_OverflowError, "value too large to perform division");
- __PYX_ERR(2, 903, __pyx_L1_error)
+ __PYX_ERR(2, 912, __pyx_L1_error)
}
__pyx_v_shape = __Pyx_div_Py_ssize_t(__pyx_v_view->len, __pyx_v_itemsize);
- /* "View.MemoryView":904
+ /* "View.MemoryView":913
* if view.ndim == 0:
* shape = view.len / itemsize
* stride = itemsize # <<<<<<<<<<<<<<
@@ -41950,7 +43860,7 @@ static char *__pyx_pybuffer_index(Py_buffer *__pyx_v_view, char *__pyx_v_bufp, P
*/
__pyx_v_stride = __pyx_v_itemsize;
- /* "View.MemoryView":902
+ /* "View.MemoryView":911
* cdef char *resultp
*
* if view.ndim == 0: # <<<<<<<<<<<<<<
@@ -41960,7 +43870,7 @@ static char *__pyx_pybuffer_index(Py_buffer *__pyx_v_view, char *__pyx_v_bufp, P
goto __pyx_L3;
}
- /* "View.MemoryView":906
+ /* "View.MemoryView":915
* stride = itemsize
* else:
* shape = view.shape[dim] # <<<<<<<<<<<<<<
@@ -41970,7 +43880,7 @@ static char *__pyx_pybuffer_index(Py_buffer *__pyx_v_view, char *__pyx_v_bufp, P
/*else*/ {
__pyx_v_shape = (__pyx_v_view->shape[__pyx_v_dim]);
- /* "View.MemoryView":907
+ /* "View.MemoryView":916
* else:
* shape = view.shape[dim]
* stride = view.strides[dim] # <<<<<<<<<<<<<<
@@ -41979,7 +43889,7 @@ static char *__pyx_pybuffer_index(Py_buffer *__pyx_v_view, char *__pyx_v_bufp, P
*/
__pyx_v_stride = (__pyx_v_view->strides[__pyx_v_dim]);
- /* "View.MemoryView":908
+ /* "View.MemoryView":917
* shape = view.shape[dim]
* stride = view.strides[dim]
* if view.suboffsets != NULL: # <<<<<<<<<<<<<<
@@ -41989,7 +43899,7 @@ static char *__pyx_pybuffer_index(Py_buffer *__pyx_v_view, char *__pyx_v_bufp, P
__pyx_t_2 = ((__pyx_v_view->suboffsets != NULL) != 0);
if (__pyx_t_2) {
- /* "View.MemoryView":909
+ /* "View.MemoryView":918
* stride = view.strides[dim]
* if view.suboffsets != NULL:
* suboffset = view.suboffsets[dim] # <<<<<<<<<<<<<<
@@ -41998,7 +43908,7 @@ static char *__pyx_pybuffer_index(Py_buffer *__pyx_v_view, char *__pyx_v_bufp, P
*/
__pyx_v_suboffset = (__pyx_v_view->suboffsets[__pyx_v_dim]);
- /* "View.MemoryView":908
+ /* "View.MemoryView":917
* shape = view.shape[dim]
* stride = view.strides[dim]
* if view.suboffsets != NULL: # <<<<<<<<<<<<<<
@@ -42009,7 +43919,7 @@ static char *__pyx_pybuffer_index(Py_buffer *__pyx_v_view, char *__pyx_v_bufp, P
}
__pyx_L3:;
- /* "View.MemoryView":911
+ /* "View.MemoryView":920
* suboffset = view.suboffsets[dim]
*
* if index < 0: # <<<<<<<<<<<<<<
@@ -42019,7 +43929,7 @@ static char *__pyx_pybuffer_index(Py_buffer *__pyx_v_view, char *__pyx_v_bufp, P
__pyx_t_2 = ((__pyx_v_index < 0) != 0);
if (__pyx_t_2) {
- /* "View.MemoryView":912
+ /* "View.MemoryView":921
*
* if index < 0:
* index += view.shape[dim] # <<<<<<<<<<<<<<
@@ -42028,7 +43938,7 @@ static char *__pyx_pybuffer_index(Py_buffer *__pyx_v_view, char *__pyx_v_bufp, P
*/
__pyx_v_index = (__pyx_v_index + (__pyx_v_view->shape[__pyx_v_dim]));
- /* "View.MemoryView":913
+ /* "View.MemoryView":922
* if index < 0:
* index += view.shape[dim]
* if index < 0: # <<<<<<<<<<<<<<
@@ -42036,33 +43946,28 @@ static char *__pyx_pybuffer_index(Py_buffer *__pyx_v_view, char *__pyx_v_bufp, P
*
*/
__pyx_t_2 = ((__pyx_v_index < 0) != 0);
- if (__pyx_t_2) {
+ if (unlikely(__pyx_t_2)) {
- /* "View.MemoryView":914
+ /* "View.MemoryView":923
* index += view.shape[dim]
* if index < 0:
* raise IndexError("Out of bounds on buffer access (axis %d)" % dim) # <<<<<<<<<<<<<<
*
* if index >= shape:
*/
- __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_dim); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 914, __pyx_L1_error)
+ __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_dim); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 923, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Out_of_bounds_on_buffer_access_a, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 914, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Out_of_bounds_on_buffer_access_a, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 923, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 914, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_IndexError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 923, __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_IndexError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 914, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_Raise(__pyx_t_4, 0, 0, 0);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __PYX_ERR(2, 914, __pyx_L1_error)
+ __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __PYX_ERR(2, 923, __pyx_L1_error)
- /* "View.MemoryView":913
+ /* "View.MemoryView":922
* if index < 0:
* index += view.shape[dim]
* if index < 0: # <<<<<<<<<<<<<<
@@ -42071,7 +43976,7 @@ static char *__pyx_pybuffer_index(Py_buffer *__pyx_v_view, char *__pyx_v_bufp, P
*/
}
- /* "View.MemoryView":911
+ /* "View.MemoryView":920
* suboffset = view.suboffsets[dim]
*
* if index < 0: # <<<<<<<<<<<<<<
@@ -42080,7 +43985,7 @@ static char *__pyx_pybuffer_index(Py_buffer *__pyx_v_view, char *__pyx_v_bufp, P
*/
}
- /* "View.MemoryView":916
+ /* "View.MemoryView":925
* raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
*
* if index >= shape: # <<<<<<<<<<<<<<
@@ -42088,33 +43993,28 @@ static char *__pyx_pybuffer_index(Py_buffer *__pyx_v_view, char *__pyx_v_bufp, P
*
*/
__pyx_t_2 = ((__pyx_v_index >= __pyx_v_shape) != 0);
- if (__pyx_t_2) {
+ if (unlikely(__pyx_t_2)) {
- /* "View.MemoryView":917
+ /* "View.MemoryView":926
*
* if index >= shape:
* raise IndexError("Out of bounds on buffer access (axis %d)" % dim) # <<<<<<<<<<<<<<
*
* resultp = bufp + index * stride
*/
- __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_dim); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 917, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_Out_of_bounds_on_buffer_access_a, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 917, __pyx_L1_error)
+ __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_dim); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 926, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 917, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Out_of_bounds_on_buffer_access_a, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 926, __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_IndexError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 917, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_IndexError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 926, __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(2, 917, __pyx_L1_error)
+ __PYX_ERR(2, 926, __pyx_L1_error)
- /* "View.MemoryView":916
+ /* "View.MemoryView":925
* raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
*
* if index >= shape: # <<<<<<<<<<<<<<
@@ -42123,7 +44023,7 @@ static char *__pyx_pybuffer_index(Py_buffer *__pyx_v_view, char *__pyx_v_bufp, P
*/
}
- /* "View.MemoryView":919
+ /* "View.MemoryView":928
* raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
*
* resultp = bufp + index * stride # <<<<<<<<<<<<<<
@@ -42132,7 +44032,7 @@ static char *__pyx_pybuffer_index(Py_buffer *__pyx_v_view, char *__pyx_v_bufp, P
*/
__pyx_v_resultp = (__pyx_v_bufp + (__pyx_v_index * __pyx_v_stride));
- /* "View.MemoryView":920
+ /* "View.MemoryView":929
*
* resultp = bufp + index * stride
* if suboffset >= 0: # <<<<<<<<<<<<<<
@@ -42142,7 +44042,7 @@ static char *__pyx_pybuffer_index(Py_buffer *__pyx_v_view, char *__pyx_v_bufp, P
__pyx_t_2 = ((__pyx_v_suboffset >= 0) != 0);
if (__pyx_t_2) {
- /* "View.MemoryView":921
+ /* "View.MemoryView":930
* resultp = bufp + index * stride
* if suboffset >= 0:
* resultp = (<char **> resultp)[0] + suboffset # <<<<<<<<<<<<<<
@@ -42151,7 +44051,7 @@ static char *__pyx_pybuffer_index(Py_buffer *__pyx_v_view, char *__pyx_v_bufp, P
*/
__pyx_v_resultp = ((((char **)__pyx_v_resultp)[0]) + __pyx_v_suboffset);
- /* "View.MemoryView":920
+ /* "View.MemoryView":929
*
* resultp = bufp + index * stride
* if suboffset >= 0: # <<<<<<<<<<<<<<
@@ -42160,7 +44060,7 @@ static char *__pyx_pybuffer_index(Py_buffer *__pyx_v_view, char *__pyx_v_bufp, P
*/
}
- /* "View.MemoryView":923
+ /* "View.MemoryView":932
* resultp = (<char **> resultp)[0] + suboffset
*
* return resultp # <<<<<<<<<<<<<<
@@ -42170,7 +44070,7 @@ static char *__pyx_pybuffer_index(Py_buffer *__pyx_v_view, char *__pyx_v_bufp, P
__pyx_r = __pyx_v_resultp;
goto __pyx_L0;
- /* "View.MemoryView":896
+ /* "View.MemoryView":905
*
* @cname('__pyx_pybuffer_index')
* cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index, # <<<<<<<<<<<<<<
@@ -42189,7 +44089,7 @@ static char *__pyx_pybuffer_index(Py_buffer *__pyx_v_view, char *__pyx_v_bufp, P
return __pyx_r;
}
-/* "View.MemoryView":929
+/* "View.MemoryView":938
*
* @cname('__pyx_memslice_transpose')
* cdef int transpose_memslice(__Pyx_memviewslice *memslice) nogil except 0: # <<<<<<<<<<<<<<
@@ -42207,13 +44107,14 @@ static int __pyx_memslice_transpose(__Pyx_memviewslice *__pyx_v_memslice) {
int __pyx_t_1;
Py_ssize_t *__pyx_t_2;
long __pyx_t_3;
- Py_ssize_t __pyx_t_4;
+ long __pyx_t_4;
Py_ssize_t __pyx_t_5;
- int __pyx_t_6;
+ Py_ssize_t __pyx_t_6;
int __pyx_t_7;
int __pyx_t_8;
+ int __pyx_t_9;
- /* "View.MemoryView":930
+ /* "View.MemoryView":939
* @cname('__pyx_memslice_transpose')
* cdef int transpose_memslice(__Pyx_memviewslice *memslice) nogil except 0:
* cdef int ndim = memslice.memview.view.ndim # <<<<<<<<<<<<<<
@@ -42223,7 +44124,7 @@ static int __pyx_memslice_transpose(__Pyx_memviewslice *__pyx_v_memslice) {
__pyx_t_1 = __pyx_v_memslice->memview->view.ndim;
__pyx_v_ndim = __pyx_t_1;
- /* "View.MemoryView":932
+ /* "View.MemoryView":941
* cdef int ndim = memslice.memview.view.ndim
*
* cdef Py_ssize_t *shape = memslice.shape # <<<<<<<<<<<<<<
@@ -42233,7 +44134,7 @@ static int __pyx_memslice_transpose(__Pyx_memviewslice *__pyx_v_memslice) {
__pyx_t_2 = __pyx_v_memslice->shape;
__pyx_v_shape = __pyx_t_2;
- /* "View.MemoryView":933
+ /* "View.MemoryView":942
*
* cdef Py_ssize_t *shape = memslice.shape
* cdef Py_ssize_t *strides = memslice.strides # <<<<<<<<<<<<<<
@@ -42243,7 +44144,7 @@ static int __pyx_memslice_transpose(__Pyx_memviewslice *__pyx_v_memslice) {
__pyx_t_2 = __pyx_v_memslice->strides;
__pyx_v_strides = __pyx_t_2;
- /* "View.MemoryView":937
+ /* "View.MemoryView":946
*
* cdef int i, j
* for i in range(ndim / 2): # <<<<<<<<<<<<<<
@@ -42251,10 +44152,11 @@ static int __pyx_memslice_transpose(__Pyx_memviewslice *__pyx_v_memslice) {
* strides[i], strides[j] = strides[j], strides[i]
*/
__pyx_t_3 = __Pyx_div_long(__pyx_v_ndim, 2);
- for (__pyx_t_1 = 0; __pyx_t_1 < __pyx_t_3; __pyx_t_1+=1) {
+ __pyx_t_4 = __pyx_t_3;
+ for (__pyx_t_1 = 0; __pyx_t_1 < __pyx_t_4; __pyx_t_1+=1) {
__pyx_v_i = __pyx_t_1;
- /* "View.MemoryView":938
+ /* "View.MemoryView":947
* cdef int i, j
* for i in range(ndim / 2):
* j = ndim - 1 - i # <<<<<<<<<<<<<<
@@ -42263,58 +44165,58 @@ static int __pyx_memslice_transpose(__Pyx_memviewslice *__pyx_v_memslice) {
*/
__pyx_v_j = ((__pyx_v_ndim - 1) - __pyx_v_i);
- /* "View.MemoryView":939
+ /* "View.MemoryView":948
* for i in range(ndim / 2):
* j = ndim - 1 - i
* strides[i], strides[j] = strides[j], strides[i] # <<<<<<<<<<<<<<
* shape[i], shape[j] = shape[j], shape[i]
*
*/
- __pyx_t_4 = (__pyx_v_strides[__pyx_v_j]);
- __pyx_t_5 = (__pyx_v_strides[__pyx_v_i]);
- (__pyx_v_strides[__pyx_v_i]) = __pyx_t_4;
- (__pyx_v_strides[__pyx_v_j]) = __pyx_t_5;
+ __pyx_t_5 = (__pyx_v_strides[__pyx_v_j]);
+ __pyx_t_6 = (__pyx_v_strides[__pyx_v_i]);
+ (__pyx_v_strides[__pyx_v_i]) = __pyx_t_5;
+ (__pyx_v_strides[__pyx_v_j]) = __pyx_t_6;
- /* "View.MemoryView":940
+ /* "View.MemoryView":949
* j = ndim - 1 - i
* strides[i], strides[j] = strides[j], strides[i]
* shape[i], shape[j] = shape[j], shape[i] # <<<<<<<<<<<<<<
*
* if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0:
*/
- __pyx_t_5 = (__pyx_v_shape[__pyx_v_j]);
- __pyx_t_4 = (__pyx_v_shape[__pyx_v_i]);
- (__pyx_v_shape[__pyx_v_i]) = __pyx_t_5;
- (__pyx_v_shape[__pyx_v_j]) = __pyx_t_4;
+ __pyx_t_6 = (__pyx_v_shape[__pyx_v_j]);
+ __pyx_t_5 = (__pyx_v_shape[__pyx_v_i]);
+ (__pyx_v_shape[__pyx_v_i]) = __pyx_t_6;
+ (__pyx_v_shape[__pyx_v_j]) = __pyx_t_5;
- /* "View.MemoryView":942
+ /* "View.MemoryView":951
* shape[i], shape[j] = shape[j], shape[i]
*
* if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0: # <<<<<<<<<<<<<<
* _err(ValueError, "Cannot transpose memoryview with indirect dimensions")
*
*/
- __pyx_t_7 = (((__pyx_v_memslice->suboffsets[__pyx_v_i]) >= 0) != 0);
- if (!__pyx_t_7) {
+ __pyx_t_8 = (((__pyx_v_memslice->suboffsets[__pyx_v_i]) >= 0) != 0);
+ if (!__pyx_t_8) {
} else {
- __pyx_t_6 = __pyx_t_7;
+ __pyx_t_7 = __pyx_t_8;
goto __pyx_L6_bool_binop_done;
}
- __pyx_t_7 = (((__pyx_v_memslice->suboffsets[__pyx_v_j]) >= 0) != 0);
- __pyx_t_6 = __pyx_t_7;
+ __pyx_t_8 = (((__pyx_v_memslice->suboffsets[__pyx_v_j]) >= 0) != 0);
+ __pyx_t_7 = __pyx_t_8;
__pyx_L6_bool_binop_done:;
- if (__pyx_t_6) {
+ if (__pyx_t_7) {
- /* "View.MemoryView":943
+ /* "View.MemoryView":952
*
* if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0:
* _err(ValueError, "Cannot transpose memoryview with indirect dimensions") # <<<<<<<<<<<<<<
*
* return 1
*/
- __pyx_t_8 = __pyx_memoryview_err(__pyx_builtin_ValueError, ((char *)"Cannot transpose memoryview with indirect dimensions")); if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(2, 943, __pyx_L1_error)
+ __pyx_t_9 = __pyx_memoryview_err(__pyx_builtin_ValueError, ((char *)"Cannot transpose memoryview with indirect dimensions")); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(2, 952, __pyx_L1_error)
- /* "View.MemoryView":942
+ /* "View.MemoryView":951
* shape[i], shape[j] = shape[j], shape[i]
*
* if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0: # <<<<<<<<<<<<<<
@@ -42324,7 +44226,7 @@ static int __pyx_memslice_transpose(__Pyx_memviewslice *__pyx_v_memslice) {
}
}
- /* "View.MemoryView":945
+ /* "View.MemoryView":954
* _err(ValueError, "Cannot transpose memoryview with indirect dimensions")
*
* return 1 # <<<<<<<<<<<<<<
@@ -42334,7 +44236,7 @@ static int __pyx_memslice_transpose(__Pyx_memviewslice *__pyx_v_memslice) {
__pyx_r = 1;
goto __pyx_L0;
- /* "View.MemoryView":929
+ /* "View.MemoryView":938
*
* @cname('__pyx_memslice_transpose')
* cdef int transpose_memslice(__Pyx_memviewslice *memslice) nogil except 0: # <<<<<<<<<<<<<<
@@ -42346,11 +44248,11 @@ static int __pyx_memslice_transpose(__Pyx_memviewslice *__pyx_v_memslice) {
__pyx_L1_error:;
{
#ifdef WITH_THREAD
- PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();
+ PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
#endif
__Pyx_AddTraceback("View.MemoryView.transpose_memslice", __pyx_clineno, __pyx_lineno, __pyx_filename);
#ifdef WITH_THREAD
- PyGILState_Release(__pyx_gilstate_save);
+ __Pyx_PyGILState_Release(__pyx_gilstate_save);
#endif
}
__pyx_r = 0;
@@ -42358,7 +44260,7 @@ static int __pyx_memslice_transpose(__Pyx_memviewslice *__pyx_v_memslice) {
return __pyx_r;
}
-/* "View.MemoryView":962
+/* "View.MemoryView":971
* cdef int (*to_dtype_func)(char *, object) except 0
*
* def __dealloc__(self): # <<<<<<<<<<<<<<
@@ -42381,7 +44283,7 @@ static void __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewsl
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__dealloc__", 0);
- /* "View.MemoryView":963
+ /* "View.MemoryView":972
*
* def __dealloc__(self):
* __PYX_XDEC_MEMVIEW(&self.from_slice, 1) # <<<<<<<<<<<<<<
@@ -42390,7 +44292,7 @@ static void __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewsl
*/
__PYX_XDEC_MEMVIEW((&__pyx_v_self->from_slice), 1);
- /* "View.MemoryView":962
+ /* "View.MemoryView":971
* cdef int (*to_dtype_func)(char *, object) except 0
*
* def __dealloc__(self): # <<<<<<<<<<<<<<
@@ -42402,7 +44304,7 @@ static void __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewsl
__Pyx_RefNannyFinishContext();
}
-/* "View.MemoryView":965
+/* "View.MemoryView":974
* __PYX_XDEC_MEMVIEW(&self.from_slice, 1)
*
* cdef convert_item_to_object(self, char *itemp): # <<<<<<<<<<<<<<
@@ -42417,7 +44319,7 @@ static PyObject *__pyx_memoryviewslice_convert_item_to_object(struct __pyx_memor
PyObject *__pyx_t_2 = NULL;
__Pyx_RefNannySetupContext("convert_item_to_object", 0);
- /* "View.MemoryView":966
+ /* "View.MemoryView":975
*
* cdef convert_item_to_object(self, char *itemp):
* if self.to_object_func != NULL: # <<<<<<<<<<<<<<
@@ -42427,7 +44329,7 @@ static PyObject *__pyx_memoryviewslice_convert_item_to_object(struct __pyx_memor
__pyx_t_1 = ((__pyx_v_self->to_object_func != NULL) != 0);
if (__pyx_t_1) {
- /* "View.MemoryView":967
+ /* "View.MemoryView":976
* cdef convert_item_to_object(self, char *itemp):
* if self.to_object_func != NULL:
* return self.to_object_func(itemp) # <<<<<<<<<<<<<<
@@ -42435,13 +44337,13 @@ static PyObject *__pyx_memoryviewslice_convert_item_to_object(struct __pyx_memor
* return memoryview.convert_item_to_object(self, itemp)
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_2 = __pyx_v_self->to_object_func(__pyx_v_itemp); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 967, __pyx_L1_error)
+ __pyx_t_2 = __pyx_v_self->to_object_func(__pyx_v_itemp); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 976, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
goto __pyx_L0;
- /* "View.MemoryView":966
+ /* "View.MemoryView":975
*
* cdef convert_item_to_object(self, char *itemp):
* if self.to_object_func != NULL: # <<<<<<<<<<<<<<
@@ -42450,7 +44352,7 @@ static PyObject *__pyx_memoryviewslice_convert_item_to_object(struct __pyx_memor
*/
}
- /* "View.MemoryView":969
+ /* "View.MemoryView":978
* return self.to_object_func(itemp)
* else:
* return memoryview.convert_item_to_object(self, itemp) # <<<<<<<<<<<<<<
@@ -42459,14 +44361,14 @@ static PyObject *__pyx_memoryviewslice_convert_item_to_object(struct __pyx_memor
*/
/*else*/ {
__Pyx_XDECREF(__pyx_r);
- __pyx_t_2 = __pyx_memoryview_convert_item_to_object(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_itemp); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 969, __pyx_L1_error)
+ __pyx_t_2 = __pyx_memoryview_convert_item_to_object(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_itemp); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 978, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
goto __pyx_L0;
}
- /* "View.MemoryView":965
+ /* "View.MemoryView":974
* __PYX_XDEC_MEMVIEW(&self.from_slice, 1)
*
* cdef convert_item_to_object(self, char *itemp): # <<<<<<<<<<<<<<
@@ -42485,7 +44387,7 @@ static PyObject *__pyx_memoryviewslice_convert_item_to_object(struct __pyx_memor
return __pyx_r;
}
-/* "View.MemoryView":971
+/* "View.MemoryView":980
* return memoryview.convert_item_to_object(self, itemp)
*
* cdef assign_item_from_object(self, char *itemp, object value): # <<<<<<<<<<<<<<
@@ -42501,7 +44403,7 @@ static PyObject *__pyx_memoryviewslice_assign_item_from_object(struct __pyx_memo
PyObject *__pyx_t_3 = NULL;
__Pyx_RefNannySetupContext("assign_item_from_object", 0);
- /* "View.MemoryView":972
+ /* "View.MemoryView":981
*
* cdef assign_item_from_object(self, char *itemp, object value):
* if self.to_dtype_func != NULL: # <<<<<<<<<<<<<<
@@ -42511,16 +44413,16 @@ static PyObject *__pyx_memoryviewslice_assign_item_from_object(struct __pyx_memo
__pyx_t_1 = ((__pyx_v_self->to_dtype_func != NULL) != 0);
if (__pyx_t_1) {
- /* "View.MemoryView":973
+ /* "View.MemoryView":982
* cdef assign_item_from_object(self, char *itemp, object value):
* if self.to_dtype_func != NULL:
* self.to_dtype_func(itemp, value) # <<<<<<<<<<<<<<
* else:
* memoryview.assign_item_from_object(self, itemp, value)
*/
- __pyx_t_2 = __pyx_v_self->to_dtype_func(__pyx_v_itemp, __pyx_v_value); if (unlikely(__pyx_t_2 == 0)) __PYX_ERR(2, 973, __pyx_L1_error)
+ __pyx_t_2 = __pyx_v_self->to_dtype_func(__pyx_v_itemp, __pyx_v_value); if (unlikely(__pyx_t_2 == ((int)0))) __PYX_ERR(2, 982, __pyx_L1_error)
- /* "View.MemoryView":972
+ /* "View.MemoryView":981
*
* cdef assign_item_from_object(self, char *itemp, object value):
* if self.to_dtype_func != NULL: # <<<<<<<<<<<<<<
@@ -42530,7 +44432,7 @@ static PyObject *__pyx_memoryviewslice_assign_item_from_object(struct __pyx_memo
goto __pyx_L3;
}
- /* "View.MemoryView":975
+ /* "View.MemoryView":984
* self.to_dtype_func(itemp, value)
* else:
* memoryview.assign_item_from_object(self, itemp, value) # <<<<<<<<<<<<<<
@@ -42538,13 +44440,13 @@ static PyObject *__pyx_memoryviewslice_assign_item_from_object(struct __pyx_memo
* @property
*/
/*else*/ {
- __pyx_t_3 = __pyx_memoryview_assign_item_from_object(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_itemp, __pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 975, __pyx_L1_error)
+ __pyx_t_3 = __pyx_memoryview_assign_item_from_object(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_itemp, __pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 984, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
}
__pyx_L3:;
- /* "View.MemoryView":971
+ /* "View.MemoryView":980
* return memoryview.convert_item_to_object(self, itemp)
*
* cdef assign_item_from_object(self, char *itemp, object value): # <<<<<<<<<<<<<<
@@ -42565,7 +44467,7 @@ static PyObject *__pyx_memoryviewslice_assign_item_from_object(struct __pyx_memo
return __pyx_r;
}
-/* "View.MemoryView":978
+/* "View.MemoryView":987
*
* @property
* def base(self): # <<<<<<<<<<<<<<
@@ -42591,7 +44493,7 @@ static PyObject *__pyx_pf_15View_dot_MemoryView_16_memoryviewslice_4base___get__
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__get__", 0);
- /* "View.MemoryView":979
+ /* "View.MemoryView":988
* @property
* def base(self):
* return self.from_object # <<<<<<<<<<<<<<
@@ -42603,7 +44505,7 @@ static PyObject *__pyx_pf_15View_dot_MemoryView_16_memoryviewslice_4base___get__
__pyx_r = __pyx_v_self->from_object;
goto __pyx_L0;
- /* "View.MemoryView":978
+ /* "View.MemoryView":987
*
* @property
* def base(self): # <<<<<<<<<<<<<<
@@ -42618,7 +44520,114 @@ static PyObject *__pyx_pf_15View_dot_MemoryView_16_memoryviewslice_4base___get__
return __pyx_r;
}
-/* "View.MemoryView":985
+/* "(tree fragment)":1
+ * def __reduce_cython__(self): # <<<<<<<<<<<<<<
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ * def __setstate_cython__(self, __pyx_state):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw___pyx_memoryviewslice_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw___pyx_memoryviewslice_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
+ __pyx_r = __pyx_pf___pyx_memoryviewslice___reduce_cython__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf___pyx_memoryviewslice___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("__reduce_cython__", 0);
+
+ /* "(tree fragment)":2
+ * def __reduce_cython__(self):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
+ * def __setstate_cython__(self, __pyx_state):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ */
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__59, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 2, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __PYX_ERR(2, 2, __pyx_L1_error)
+
+ /* "(tree fragment)":1
+ * def __reduce_cython__(self): # <<<<<<<<<<<<<<
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ * def __setstate_cython__(self, __pyx_state):
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("View.MemoryView._memoryviewslice.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "(tree fragment)":3
+ * def __reduce_cython__(self):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw___pyx_memoryviewslice_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
+static PyObject *__pyx_pw___pyx_memoryviewslice_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
+ __pyx_r = __pyx_pf___pyx_memoryviewslice_2__setstate_cython__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf___pyx_memoryviewslice_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("__setstate_cython__", 0);
+
+ /* "(tree fragment)":4
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ * def __setstate_cython__(self, __pyx_state):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
+ */
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__60, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __PYX_ERR(2, 4, __pyx_L1_error)
+
+ /* "(tree fragment)":3
+ * def __reduce_cython__(self):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("View.MemoryView._memoryviewslice.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "View.MemoryView":994
*
* @cname('__pyx_memoryview_fromslice')
* cdef memoryview_fromslice(__Pyx_memviewslice memviewslice, # <<<<<<<<<<<<<<
@@ -42643,7 +44652,7 @@ static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice __pyx_v_memviewsl
Py_ssize_t __pyx_t_9;
__Pyx_RefNannySetupContext("memoryview_fromslice", 0);
- /* "View.MemoryView":993
+ /* "View.MemoryView":1002
* cdef _memoryviewslice result
*
* if <PyObject *> memviewslice.memview == Py_None: # <<<<<<<<<<<<<<
@@ -42653,7 +44662,7 @@ static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice __pyx_v_memviewsl
__pyx_t_1 = ((((PyObject *)__pyx_v_memviewslice.memview) == Py_None) != 0);
if (__pyx_t_1) {
- /* "View.MemoryView":994
+ /* "View.MemoryView":1003
*
* if <PyObject *> memviewslice.memview == Py_None:
* return None # <<<<<<<<<<<<<<
@@ -42661,11 +44670,10 @@ static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice __pyx_v_memviewsl
*
*/
__Pyx_XDECREF(__pyx_r);
- __Pyx_INCREF(Py_None);
- __pyx_r = Py_None;
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
goto __pyx_L0;
- /* "View.MemoryView":993
+ /* "View.MemoryView":1002
* cdef _memoryviewslice result
*
* if <PyObject *> memviewslice.memview == Py_None: # <<<<<<<<<<<<<<
@@ -42674,16 +44682,16 @@ static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice __pyx_v_memviewsl
*/
}
- /* "View.MemoryView":999
+ /* "View.MemoryView":1008
*
*
* result = _memoryviewslice(None, 0, dtype_is_object) # <<<<<<<<<<<<<<
*
* result.from_slice = memviewslice
*/
- __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 999, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1008, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 999, __pyx_L1_error)
+ __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1008, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_INCREF(Py_None);
__Pyx_GIVEREF(Py_None);
@@ -42694,13 +44702,13 @@ static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice __pyx_v_memviewsl
__Pyx_GIVEREF(__pyx_t_2);
PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2);
__pyx_t_2 = 0;
- __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryviewslice_type), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 999, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryviewslice_type), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1008, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_v_result = ((struct __pyx_memoryviewslice_obj *)__pyx_t_2);
__pyx_t_2 = 0;
- /* "View.MemoryView":1001
+ /* "View.MemoryView":1010
* result = _memoryviewslice(None, 0, dtype_is_object)
*
* result.from_slice = memviewslice # <<<<<<<<<<<<<<
@@ -42709,7 +44717,7 @@ static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice __pyx_v_memviewsl
*/
__pyx_v_result->from_slice = __pyx_v_memviewslice;
- /* "View.MemoryView":1002
+ /* "View.MemoryView":1011
*
* result.from_slice = memviewslice
* __PYX_INC_MEMVIEW(&memviewslice, 1) # <<<<<<<<<<<<<<
@@ -42718,14 +44726,14 @@ static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice __pyx_v_memviewsl
*/
__PYX_INC_MEMVIEW((&__pyx_v_memviewslice), 1);
- /* "View.MemoryView":1004
+ /* "View.MemoryView":1013
* __PYX_INC_MEMVIEW(&memviewslice, 1)
*
* result.from_object = (<memoryview> memviewslice.memview).base # <<<<<<<<<<<<<<
* result.typeinfo = memviewslice.memview.typeinfo
*
*/
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_memviewslice.memview), __pyx_n_s_base); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1004, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_memviewslice.memview), __pyx_n_s_base); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1013, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_GIVEREF(__pyx_t_2);
__Pyx_GOTREF(__pyx_v_result->from_object);
@@ -42733,7 +44741,7 @@ static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice __pyx_v_memviewsl
__pyx_v_result->from_object = __pyx_t_2;
__pyx_t_2 = 0;
- /* "View.MemoryView":1005
+ /* "View.MemoryView":1014
*
* result.from_object = (<memoryview> memviewslice.memview).base
* result.typeinfo = memviewslice.memview.typeinfo # <<<<<<<<<<<<<<
@@ -42743,7 +44751,7 @@ static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice __pyx_v_memviewsl
__pyx_t_4 = __pyx_v_memviewslice.memview->typeinfo;
__pyx_v_result->__pyx_base.typeinfo = __pyx_t_4;
- /* "View.MemoryView":1007
+ /* "View.MemoryView":1016
* result.typeinfo = memviewslice.memview.typeinfo
*
* result.view = memviewslice.memview.view # <<<<<<<<<<<<<<
@@ -42753,7 +44761,7 @@ static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice __pyx_v_memviewsl
__pyx_t_5 = __pyx_v_memviewslice.memview->view;
__pyx_v_result->__pyx_base.view = __pyx_t_5;
- /* "View.MemoryView":1008
+ /* "View.MemoryView":1017
*
* result.view = memviewslice.memview.view
* result.view.buf = <void *> memviewslice.data # <<<<<<<<<<<<<<
@@ -42762,7 +44770,7 @@ static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice __pyx_v_memviewsl
*/
__pyx_v_result->__pyx_base.view.buf = ((void *)__pyx_v_memviewslice.data);
- /* "View.MemoryView":1009
+ /* "View.MemoryView":1018
* result.view = memviewslice.memview.view
* result.view.buf = <void *> memviewslice.data
* result.view.ndim = ndim # <<<<<<<<<<<<<<
@@ -42771,7 +44779,7 @@ static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice __pyx_v_memviewsl
*/
__pyx_v_result->__pyx_base.view.ndim = __pyx_v_ndim;
- /* "View.MemoryView":1010
+ /* "View.MemoryView":1019
* result.view.buf = <void *> memviewslice.data
* result.view.ndim = ndim
* (<__pyx_buffer *> &result.view).obj = Py_None # <<<<<<<<<<<<<<
@@ -42780,26 +44788,58 @@ static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice __pyx_v_memviewsl
*/
((Py_buffer *)(&__pyx_v_result->__pyx_base.view))->obj = Py_None;
- /* "View.MemoryView":1011
+ /* "View.MemoryView":1020
* result.view.ndim = ndim
* (<__pyx_buffer *> &result.view).obj = Py_None
* Py_INCREF(Py_None) # <<<<<<<<<<<<<<
*
- * result.flags = PyBUF_RECORDS
+ * if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE:
*/
Py_INCREF(Py_None);
- /* "View.MemoryView":1013
+ /* "View.MemoryView":1022
+ * Py_INCREF(Py_None)
+ *
+ * if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE: # <<<<<<<<<<<<<<
+ * result.flags = PyBUF_RECORDS
+ * else:
+ */
+ __pyx_t_1 = ((((struct __pyx_memoryview_obj *)__pyx_v_memviewslice.memview)->flags & PyBUF_WRITABLE) != 0);
+ if (__pyx_t_1) {
+
+ /* "View.MemoryView":1023
+ *
+ * if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE:
+ * result.flags = PyBUF_RECORDS # <<<<<<<<<<<<<<
+ * else:
+ * result.flags = PyBUF_RECORDS_RO
+ */
+ __pyx_v_result->__pyx_base.flags = PyBUF_RECORDS;
+
+ /* "View.MemoryView":1022
* Py_INCREF(Py_None)
*
- * result.flags = PyBUF_RECORDS # <<<<<<<<<<<<<<
+ * if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE: # <<<<<<<<<<<<<<
+ * result.flags = PyBUF_RECORDS
+ * else:
+ */
+ goto __pyx_L4;
+ }
+
+ /* "View.MemoryView":1025
+ * result.flags = PyBUF_RECORDS
+ * else:
+ * result.flags = PyBUF_RECORDS_RO # <<<<<<<<<<<<<<
*
* result.view.shape = <Py_ssize_t *> result.from_slice.shape
*/
- __pyx_v_result->__pyx_base.flags = PyBUF_RECORDS;
+ /*else*/ {
+ __pyx_v_result->__pyx_base.flags = PyBUF_RECORDS_RO;
+ }
+ __pyx_L4:;
- /* "View.MemoryView":1015
- * result.flags = PyBUF_RECORDS
+ /* "View.MemoryView":1027
+ * result.flags = PyBUF_RECORDS_RO
*
* result.view.shape = <Py_ssize_t *> result.from_slice.shape # <<<<<<<<<<<<<<
* result.view.strides = <Py_ssize_t *> result.from_slice.strides
@@ -42807,7 +44847,7 @@ static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice __pyx_v_memviewsl
*/
__pyx_v_result->__pyx_base.view.shape = ((Py_ssize_t *)__pyx_v_result->from_slice.shape);
- /* "View.MemoryView":1016
+ /* "View.MemoryView":1028
*
* result.view.shape = <Py_ssize_t *> result.from_slice.shape
* result.view.strides = <Py_ssize_t *> result.from_slice.strides # <<<<<<<<<<<<<<
@@ -42816,7 +44856,7 @@ static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice __pyx_v_memviewsl
*/
__pyx_v_result->__pyx_base.view.strides = ((Py_ssize_t *)__pyx_v_result->from_slice.strides);
- /* "View.MemoryView":1019
+ /* "View.MemoryView":1031
*
*
* result.view.suboffsets = NULL # <<<<<<<<<<<<<<
@@ -42825,7 +44865,7 @@ static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice __pyx_v_memviewsl
*/
__pyx_v_result->__pyx_base.view.suboffsets = NULL;
- /* "View.MemoryView":1020
+ /* "View.MemoryView":1032
*
* result.view.suboffsets = NULL
* for suboffset in result.from_slice.suboffsets[:ndim]: # <<<<<<<<<<<<<<
@@ -42837,7 +44877,7 @@ static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice __pyx_v_memviewsl
__pyx_t_6 = __pyx_t_8;
__pyx_v_suboffset = (__pyx_t_6[0]);
- /* "View.MemoryView":1021
+ /* "View.MemoryView":1033
* result.view.suboffsets = NULL
* for suboffset in result.from_slice.suboffsets[:ndim]:
* if suboffset >= 0: # <<<<<<<<<<<<<<
@@ -42847,7 +44887,7 @@ static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice __pyx_v_memviewsl
__pyx_t_1 = ((__pyx_v_suboffset >= 0) != 0);
if (__pyx_t_1) {
- /* "View.MemoryView":1022
+ /* "View.MemoryView":1034
* for suboffset in result.from_slice.suboffsets[:ndim]:
* if suboffset >= 0:
* result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets # <<<<<<<<<<<<<<
@@ -42856,16 +44896,16 @@ static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice __pyx_v_memviewsl
*/
__pyx_v_result->__pyx_base.view.suboffsets = ((Py_ssize_t *)__pyx_v_result->from_slice.suboffsets);
- /* "View.MemoryView":1023
+ /* "View.MemoryView":1035
* if suboffset >= 0:
* result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets
* break # <<<<<<<<<<<<<<
*
* result.view.len = result.view.itemsize
*/
- goto __pyx_L5_break;
+ goto __pyx_L6_break;
- /* "View.MemoryView":1021
+ /* "View.MemoryView":1033
* result.view.suboffsets = NULL
* for suboffset in result.from_slice.suboffsets[:ndim]:
* if suboffset >= 0: # <<<<<<<<<<<<<<
@@ -42874,9 +44914,9 @@ static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice __pyx_v_memviewsl
*/
}
}
- __pyx_L5_break:;
+ __pyx_L6_break:;
- /* "View.MemoryView":1025
+ /* "View.MemoryView":1037
* break
*
* result.view.len = result.view.itemsize # <<<<<<<<<<<<<<
@@ -42886,7 +44926,7 @@ static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice __pyx_v_memviewsl
__pyx_t_9 = __pyx_v_result->__pyx_base.view.itemsize;
__pyx_v_result->__pyx_base.view.len = __pyx_t_9;
- /* "View.MemoryView":1026
+ /* "View.MemoryView":1038
*
* result.view.len = result.view.itemsize
* for length in result.view.shape[:ndim]: # <<<<<<<<<<<<<<
@@ -42896,29 +44936,29 @@ static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice __pyx_v_memviewsl
__pyx_t_7 = (__pyx_v_result->__pyx_base.view.shape + __pyx_v_ndim);
for (__pyx_t_8 = __pyx_v_result->__pyx_base.view.shape; __pyx_t_8 < __pyx_t_7; __pyx_t_8++) {
__pyx_t_6 = __pyx_t_8;
- __pyx_t_2 = PyInt_FromSsize_t((__pyx_t_6[0])); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1026, __pyx_L1_error)
+ __pyx_t_2 = PyInt_FromSsize_t((__pyx_t_6[0])); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1038, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_XDECREF_SET(__pyx_v_length, __pyx_t_2);
__pyx_t_2 = 0;
- /* "View.MemoryView":1027
+ /* "View.MemoryView":1039
* result.view.len = result.view.itemsize
* for length in result.view.shape[:ndim]:
* result.view.len *= length # <<<<<<<<<<<<<<
*
* result.to_object_func = to_object_func
*/
- __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_result->__pyx_base.view.len); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1027, __pyx_L1_error)
+ __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_result->__pyx_base.view.len); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1039, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = PyNumber_InPlaceMultiply(__pyx_t_2, __pyx_v_length); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1027, __pyx_L1_error)
+ __pyx_t_3 = PyNumber_InPlaceMultiply(__pyx_t_2, __pyx_v_length); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1039, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(2, 1027, __pyx_L1_error)
+ __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(2, 1039, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_v_result->__pyx_base.view.len = __pyx_t_9;
}
- /* "View.MemoryView":1029
+ /* "View.MemoryView":1041
* result.view.len *= length
*
* result.to_object_func = to_object_func # <<<<<<<<<<<<<<
@@ -42927,7 +44967,7 @@ static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice __pyx_v_memviewsl
*/
__pyx_v_result->to_object_func = __pyx_v_to_object_func;
- /* "View.MemoryView":1030
+ /* "View.MemoryView":1042
*
* result.to_object_func = to_object_func
* result.to_dtype_func = to_dtype_func # <<<<<<<<<<<<<<
@@ -42936,7 +44976,7 @@ static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice __pyx_v_memviewsl
*/
__pyx_v_result->to_dtype_func = __pyx_v_to_dtype_func;
- /* "View.MemoryView":1032
+ /* "View.MemoryView":1044
* result.to_dtype_func = to_dtype_func
*
* return result # <<<<<<<<<<<<<<
@@ -42948,7 +44988,7 @@ static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice __pyx_v_memviewsl
__pyx_r = ((PyObject *)__pyx_v_result);
goto __pyx_L0;
- /* "View.MemoryView":985
+ /* "View.MemoryView":994
*
* @cname('__pyx_memoryview_fromslice')
* cdef memoryview_fromslice(__Pyx_memviewslice memviewslice, # <<<<<<<<<<<<<<
@@ -42970,7 +45010,7 @@ static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice __pyx_v_memviewsl
return __pyx_r;
}
-/* "View.MemoryView":1035
+/* "View.MemoryView":1047
*
* @cname('__pyx_memoryview_get_slice_from_memoryview')
* cdef __Pyx_memviewslice *get_slice_from_memview(memoryview memview, # <<<<<<<<<<<<<<
@@ -42987,7 +45027,7 @@ static __Pyx_memviewslice *__pyx_memoryview_get_slice_from_memoryview(struct __p
PyObject *__pyx_t_3 = NULL;
__Pyx_RefNannySetupContext("get_slice_from_memview", 0);
- /* "View.MemoryView":1038
+ /* "View.MemoryView":1050
* __Pyx_memviewslice *mslice):
* cdef _memoryviewslice obj
* if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<<
@@ -42998,20 +45038,20 @@ static __Pyx_memviewslice *__pyx_memoryview_get_slice_from_memoryview(struct __p
__pyx_t_2 = (__pyx_t_1 != 0);
if (__pyx_t_2) {
- /* "View.MemoryView":1039
+ /* "View.MemoryView":1051
* cdef _memoryviewslice obj
* if isinstance(memview, _memoryviewslice):
* obj = memview # <<<<<<<<<<<<<<
* return &obj.from_slice
* else:
*/
- if (!(likely(((((PyObject *)__pyx_v_memview)) == Py_None) || likely(__Pyx_TypeTest(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type))))) __PYX_ERR(2, 1039, __pyx_L1_error)
+ if (!(likely(((((PyObject *)__pyx_v_memview)) == Py_None) || likely(__Pyx_TypeTest(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type))))) __PYX_ERR(2, 1051, __pyx_L1_error)
__pyx_t_3 = ((PyObject *)__pyx_v_memview);
__Pyx_INCREF(__pyx_t_3);
__pyx_v_obj = ((struct __pyx_memoryviewslice_obj *)__pyx_t_3);
__pyx_t_3 = 0;
- /* "View.MemoryView":1040
+ /* "View.MemoryView":1052
* if isinstance(memview, _memoryviewslice):
* obj = memview
* return &obj.from_slice # <<<<<<<<<<<<<<
@@ -43021,7 +45061,7 @@ static __Pyx_memviewslice *__pyx_memoryview_get_slice_from_memoryview(struct __p
__pyx_r = (&__pyx_v_obj->from_slice);
goto __pyx_L0;
- /* "View.MemoryView":1038
+ /* "View.MemoryView":1050
* __Pyx_memviewslice *mslice):
* cdef _memoryviewslice obj
* if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<<
@@ -43030,7 +45070,7 @@ static __Pyx_memviewslice *__pyx_memoryview_get_slice_from_memoryview(struct __p
*/
}
- /* "View.MemoryView":1042
+ /* "View.MemoryView":1054
* return &obj.from_slice
* else:
* slice_copy(memview, mslice) # <<<<<<<<<<<<<<
@@ -43040,7 +45080,7 @@ static __Pyx_memviewslice *__pyx_memoryview_get_slice_from_memoryview(struct __p
/*else*/ {
__pyx_memoryview_slice_copy(__pyx_v_memview, __pyx_v_mslice);
- /* "View.MemoryView":1043
+ /* "View.MemoryView":1055
* else:
* slice_copy(memview, mslice)
* return mslice # <<<<<<<<<<<<<<
@@ -43051,7 +45091,7 @@ static __Pyx_memviewslice *__pyx_memoryview_get_slice_from_memoryview(struct __p
goto __pyx_L0;
}
- /* "View.MemoryView":1035
+ /* "View.MemoryView":1047
*
* @cname('__pyx_memoryview_get_slice_from_memoryview')
* cdef __Pyx_memviewslice *get_slice_from_memview(memoryview memview, # <<<<<<<<<<<<<<
@@ -43062,7 +45102,7 @@ static __Pyx_memviewslice *__pyx_memoryview_get_slice_from_memoryview(struct __p
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_3);
- __Pyx_WriteUnraisable("View.MemoryView.get_slice_from_memview", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0);
+ __Pyx_WriteUnraisable("View.MemoryView.get_slice_from_memview", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
__pyx_r = 0;
__pyx_L0:;
__Pyx_XDECREF((PyObject *)__pyx_v_obj);
@@ -43070,7 +45110,7 @@ static __Pyx_memviewslice *__pyx_memoryview_get_slice_from_memoryview(struct __p
return __pyx_r;
}
-/* "View.MemoryView":1046
+/* "View.MemoryView":1058
*
* @cname('__pyx_memoryview_slice_copy')
* cdef void slice_copy(memoryview memview, __Pyx_memviewslice *dst): # <<<<<<<<<<<<<<
@@ -43087,10 +45127,11 @@ static void __pyx_memoryview_slice_copy(struct __pyx_memoryview_obj *__pyx_v_mem
Py_ssize_t *__pyx_t_1;
int __pyx_t_2;
int __pyx_t_3;
- Py_ssize_t __pyx_t_4;
+ int __pyx_t_4;
+ Py_ssize_t __pyx_t_5;
__Pyx_RefNannySetupContext("slice_copy", 0);
- /* "View.MemoryView":1050
+ /* "View.MemoryView":1062
* cdef (Py_ssize_t*) shape, strides, suboffsets
*
* shape = memview.view.shape # <<<<<<<<<<<<<<
@@ -43100,7 +45141,7 @@ static void __pyx_memoryview_slice_copy(struct __pyx_memoryview_obj *__pyx_v_mem
__pyx_t_1 = __pyx_v_memview->view.shape;
__pyx_v_shape = __pyx_t_1;
- /* "View.MemoryView":1051
+ /* "View.MemoryView":1063
*
* shape = memview.view.shape
* strides = memview.view.strides # <<<<<<<<<<<<<<
@@ -43110,7 +45151,7 @@ static void __pyx_memoryview_slice_copy(struct __pyx_memoryview_obj *__pyx_v_mem
__pyx_t_1 = __pyx_v_memview->view.strides;
__pyx_v_strides = __pyx_t_1;
- /* "View.MemoryView":1052
+ /* "View.MemoryView":1064
* shape = memview.view.shape
* strides = memview.view.strides
* suboffsets = memview.view.suboffsets # <<<<<<<<<<<<<<
@@ -43120,7 +45161,7 @@ static void __pyx_memoryview_slice_copy(struct __pyx_memoryview_obj *__pyx_v_mem
__pyx_t_1 = __pyx_v_memview->view.suboffsets;
__pyx_v_suboffsets = __pyx_t_1;
- /* "View.MemoryView":1054
+ /* "View.MemoryView":1066
* suboffsets = memview.view.suboffsets
*
* dst.memview = <__pyx_memoryview *> memview # <<<<<<<<<<<<<<
@@ -43129,7 +45170,7 @@ static void __pyx_memoryview_slice_copy(struct __pyx_memoryview_obj *__pyx_v_mem
*/
__pyx_v_dst->memview = ((struct __pyx_memoryview_obj *)__pyx_v_memview);
- /* "View.MemoryView":1055
+ /* "View.MemoryView":1067
*
* dst.memview = <__pyx_memoryview *> memview
* dst.data = <char *> memview.view.buf # <<<<<<<<<<<<<<
@@ -43138,7 +45179,7 @@ static void __pyx_memoryview_slice_copy(struct __pyx_memoryview_obj *__pyx_v_mem
*/
__pyx_v_dst->data = ((char *)__pyx_v_memview->view.buf);
- /* "View.MemoryView":1057
+ /* "View.MemoryView":1069
* dst.data = <char *> memview.view.buf
*
* for dim in range(memview.view.ndim): # <<<<<<<<<<<<<<
@@ -43146,10 +45187,11 @@ static void __pyx_memoryview_slice_copy(struct __pyx_memoryview_obj *__pyx_v_mem
* dst.strides[dim] = strides[dim]
*/
__pyx_t_2 = __pyx_v_memview->view.ndim;
- for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
- __pyx_v_dim = __pyx_t_3;
+ __pyx_t_3 = __pyx_t_2;
+ for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
+ __pyx_v_dim = __pyx_t_4;
- /* "View.MemoryView":1058
+ /* "View.MemoryView":1070
*
* for dim in range(memview.view.ndim):
* dst.shape[dim] = shape[dim] # <<<<<<<<<<<<<<
@@ -43158,7 +45200,7 @@ static void __pyx_memoryview_slice_copy(struct __pyx_memoryview_obj *__pyx_v_mem
*/
(__pyx_v_dst->shape[__pyx_v_dim]) = (__pyx_v_shape[__pyx_v_dim]);
- /* "View.MemoryView":1059
+ /* "View.MemoryView":1071
* for dim in range(memview.view.ndim):
* dst.shape[dim] = shape[dim]
* dst.strides[dim] = strides[dim] # <<<<<<<<<<<<<<
@@ -43167,7 +45209,7 @@ static void __pyx_memoryview_slice_copy(struct __pyx_memoryview_obj *__pyx_v_mem
*/
(__pyx_v_dst->strides[__pyx_v_dim]) = (__pyx_v_strides[__pyx_v_dim]);
- /* "View.MemoryView":1060
+ /* "View.MemoryView":1072
* dst.shape[dim] = shape[dim]
* dst.strides[dim] = strides[dim]
* dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1 # <<<<<<<<<<<<<<
@@ -43175,14 +45217,14 @@ static void __pyx_memoryview_slice_copy(struct __pyx_memoryview_obj *__pyx_v_mem
* @cname('__pyx_memoryview_copy_object')
*/
if ((__pyx_v_suboffsets != 0)) {
- __pyx_t_4 = (__pyx_v_suboffsets[__pyx_v_dim]);
+ __pyx_t_5 = (__pyx_v_suboffsets[__pyx_v_dim]);
} else {
- __pyx_t_4 = -1L;
+ __pyx_t_5 = -1L;
}
- (__pyx_v_dst->suboffsets[__pyx_v_dim]) = __pyx_t_4;
+ (__pyx_v_dst->suboffsets[__pyx_v_dim]) = __pyx_t_5;
}
- /* "View.MemoryView":1046
+ /* "View.MemoryView":1058
*
* @cname('__pyx_memoryview_slice_copy')
* cdef void slice_copy(memoryview memview, __Pyx_memviewslice *dst): # <<<<<<<<<<<<<<
@@ -43194,7 +45236,7 @@ static void __pyx_memoryview_slice_copy(struct __pyx_memoryview_obj *__pyx_v_mem
__Pyx_RefNannyFinishContext();
}
-/* "View.MemoryView":1063
+/* "View.MemoryView":1075
*
* @cname('__pyx_memoryview_copy_object')
* cdef memoryview_copy(memoryview memview): # <<<<<<<<<<<<<<
@@ -43209,7 +45251,7 @@ static PyObject *__pyx_memoryview_copy_object(struct __pyx_memoryview_obj *__pyx
PyObject *__pyx_t_1 = NULL;
__Pyx_RefNannySetupContext("memoryview_copy", 0);
- /* "View.MemoryView":1066
+ /* "View.MemoryView":1078
* "Create a new memoryview object"
* cdef __Pyx_memviewslice memviewslice
* slice_copy(memview, &memviewslice) # <<<<<<<<<<<<<<
@@ -43218,7 +45260,7 @@ static PyObject *__pyx_memoryview_copy_object(struct __pyx_memoryview_obj *__pyx
*/
__pyx_memoryview_slice_copy(__pyx_v_memview, (&__pyx_v_memviewslice));
- /* "View.MemoryView":1067
+ /* "View.MemoryView":1079
* cdef __Pyx_memviewslice memviewslice
* slice_copy(memview, &memviewslice)
* return memoryview_copy_from_slice(memview, &memviewslice) # <<<<<<<<<<<<<<
@@ -43226,13 +45268,13 @@ static PyObject *__pyx_memoryview_copy_object(struct __pyx_memoryview_obj *__pyx
* @cname('__pyx_memoryview_copy_object_from_slice')
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __pyx_memoryview_copy_object_from_slice(__pyx_v_memview, (&__pyx_v_memviewslice)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1067, __pyx_L1_error)
+ __pyx_t_1 = __pyx_memoryview_copy_object_from_slice(__pyx_v_memview, (&__pyx_v_memviewslice)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1079, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "View.MemoryView":1063
+ /* "View.MemoryView":1075
*
* @cname('__pyx_memoryview_copy_object')
* cdef memoryview_copy(memoryview memview): # <<<<<<<<<<<<<<
@@ -43251,7 +45293,7 @@ static PyObject *__pyx_memoryview_copy_object(struct __pyx_memoryview_obj *__pyx
return __pyx_r;
}
-/* "View.MemoryView":1070
+/* "View.MemoryView":1082
*
* @cname('__pyx_memoryview_copy_object_from_slice')
* cdef memoryview_copy_from_slice(memoryview memview, __Pyx_memviewslice *memviewslice): # <<<<<<<<<<<<<<
@@ -43271,7 +45313,7 @@ static PyObject *__pyx_memoryview_copy_object_from_slice(struct __pyx_memoryview
PyObject *__pyx_t_5 = NULL;
__Pyx_RefNannySetupContext("memoryview_copy_from_slice", 0);
- /* "View.MemoryView":1077
+ /* "View.MemoryView":1089
* cdef int (*to_dtype_func)(char *, object) except 0
*
* if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<<
@@ -43282,7 +45324,7 @@ static PyObject *__pyx_memoryview_copy_object_from_slice(struct __pyx_memoryview
__pyx_t_2 = (__pyx_t_1 != 0);
if (__pyx_t_2) {
- /* "View.MemoryView":1078
+ /* "View.MemoryView":1090
*
* if isinstance(memview, _memoryviewslice):
* to_object_func = (<_memoryviewslice> memview).to_object_func # <<<<<<<<<<<<<<
@@ -43292,7 +45334,7 @@ static PyObject *__pyx_memoryview_copy_object_from_slice(struct __pyx_memoryview
__pyx_t_3 = ((struct __pyx_memoryviewslice_obj *)__pyx_v_memview)->to_object_func;
__pyx_v_to_object_func = __pyx_t_3;
- /* "View.MemoryView":1079
+ /* "View.MemoryView":1091
* if isinstance(memview, _memoryviewslice):
* to_object_func = (<_memoryviewslice> memview).to_object_func
* to_dtype_func = (<_memoryviewslice> memview).to_dtype_func # <<<<<<<<<<<<<<
@@ -43302,7 +45344,7 @@ static PyObject *__pyx_memoryview_copy_object_from_slice(struct __pyx_memoryview
__pyx_t_4 = ((struct __pyx_memoryviewslice_obj *)__pyx_v_memview)->to_dtype_func;
__pyx_v_to_dtype_func = __pyx_t_4;
- /* "View.MemoryView":1077
+ /* "View.MemoryView":1089
* cdef int (*to_dtype_func)(char *, object) except 0
*
* if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<<
@@ -43312,7 +45354,7 @@ static PyObject *__pyx_memoryview_copy_object_from_slice(struct __pyx_memoryview
goto __pyx_L3;
}
- /* "View.MemoryView":1081
+ /* "View.MemoryView":1093
* to_dtype_func = (<_memoryviewslice> memview).to_dtype_func
* else:
* to_object_func = NULL # <<<<<<<<<<<<<<
@@ -43322,7 +45364,7 @@ static PyObject *__pyx_memoryview_copy_object_from_slice(struct __pyx_memoryview
/*else*/ {
__pyx_v_to_object_func = NULL;
- /* "View.MemoryView":1082
+ /* "View.MemoryView":1094
* else:
* to_object_func = NULL
* to_dtype_func = NULL # <<<<<<<<<<<<<<
@@ -43333,7 +45375,7 @@ static PyObject *__pyx_memoryview_copy_object_from_slice(struct __pyx_memoryview
}
__pyx_L3:;
- /* "View.MemoryView":1084
+ /* "View.MemoryView":1096
* to_dtype_func = NULL
*
* return memoryview_fromslice(memviewslice[0], memview.view.ndim, # <<<<<<<<<<<<<<
@@ -43342,20 +45384,20 @@ static PyObject *__pyx_memoryview_copy_object_from_slice(struct __pyx_memoryview
*/
__Pyx_XDECREF(__pyx_r);
- /* "View.MemoryView":1086
+ /* "View.MemoryView":1098
* return memoryview_fromslice(memviewslice[0], memview.view.ndim,
* to_object_func, to_dtype_func,
* memview.dtype_is_object) # <<<<<<<<<<<<<<
*
*
*/
- __pyx_t_5 = __pyx_memoryview_fromslice((__pyx_v_memviewslice[0]), __pyx_v_memview->view.ndim, __pyx_v_to_object_func, __pyx_v_to_dtype_func, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1084, __pyx_L1_error)
+ __pyx_t_5 = __pyx_memoryview_fromslice((__pyx_v_memviewslice[0]), __pyx_v_memview->view.ndim, __pyx_v_to_object_func, __pyx_v_to_dtype_func, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1096, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__pyx_r = __pyx_t_5;
__pyx_t_5 = 0;
goto __pyx_L0;
- /* "View.MemoryView":1070
+ /* "View.MemoryView":1082
*
* @cname('__pyx_memoryview_copy_object_from_slice')
* cdef memoryview_copy_from_slice(memoryview memview, __Pyx_memviewslice *memviewslice): # <<<<<<<<<<<<<<
@@ -43374,7 +45416,7 @@ static PyObject *__pyx_memoryview_copy_object_from_slice(struct __pyx_memoryview
return __pyx_r;
}
-/* "View.MemoryView":1092
+/* "View.MemoryView":1104
*
*
* cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil: # <<<<<<<<<<<<<<
@@ -43386,7 +45428,7 @@ static Py_ssize_t abs_py_ssize_t(Py_ssize_t __pyx_v_arg) {
Py_ssize_t __pyx_r;
int __pyx_t_1;
- /* "View.MemoryView":1093
+ /* "View.MemoryView":1105
*
* cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil:
* if arg < 0: # <<<<<<<<<<<<<<
@@ -43396,7 +45438,7 @@ static Py_ssize_t abs_py_ssize_t(Py_ssize_t __pyx_v_arg) {
__pyx_t_1 = ((__pyx_v_arg < 0) != 0);
if (__pyx_t_1) {
- /* "View.MemoryView":1094
+ /* "View.MemoryView":1106
* cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil:
* if arg < 0:
* return -arg # <<<<<<<<<<<<<<
@@ -43406,7 +45448,7 @@ static Py_ssize_t abs_py_ssize_t(Py_ssize_t __pyx_v_arg) {
__pyx_r = (-__pyx_v_arg);
goto __pyx_L0;
- /* "View.MemoryView":1093
+ /* "View.MemoryView":1105
*
* cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil:
* if arg < 0: # <<<<<<<<<<<<<<
@@ -43415,7 +45457,7 @@ static Py_ssize_t abs_py_ssize_t(Py_ssize_t __pyx_v_arg) {
*/
}
- /* "View.MemoryView":1096
+ /* "View.MemoryView":1108
* return -arg
* else:
* return arg # <<<<<<<<<<<<<<
@@ -43427,7 +45469,7 @@ static Py_ssize_t abs_py_ssize_t(Py_ssize_t __pyx_v_arg) {
goto __pyx_L0;
}
- /* "View.MemoryView":1092
+ /* "View.MemoryView":1104
*
*
* cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil: # <<<<<<<<<<<<<<
@@ -43440,7 +45482,7 @@ static Py_ssize_t abs_py_ssize_t(Py_ssize_t __pyx_v_arg) {
return __pyx_r;
}
-/* "View.MemoryView":1099
+/* "View.MemoryView":1111
*
* @cname('__pyx_get_best_slice_order')
* cdef char get_best_order(__Pyx_memviewslice *mslice, int ndim) nogil: # <<<<<<<<<<<<<<
@@ -43456,8 +45498,9 @@ static char __pyx_get_best_slice_order(__Pyx_memviewslice *__pyx_v_mslice, int _
int __pyx_t_1;
int __pyx_t_2;
int __pyx_t_3;
+ int __pyx_t_4;
- /* "View.MemoryView":1104
+ /* "View.MemoryView":1116
* """
* cdef int i
* cdef Py_ssize_t c_stride = 0 # <<<<<<<<<<<<<<
@@ -43466,7 +45509,7 @@ static char __pyx_get_best_slice_order(__Pyx_memviewslice *__pyx_v_mslice, int _
*/
__pyx_v_c_stride = 0;
- /* "View.MemoryView":1105
+ /* "View.MemoryView":1117
* cdef int i
* cdef Py_ssize_t c_stride = 0
* cdef Py_ssize_t f_stride = 0 # <<<<<<<<<<<<<<
@@ -43475,17 +45518,17 @@ static char __pyx_get_best_slice_order(__Pyx_memviewslice *__pyx_v_mslice, int _
*/
__pyx_v_f_stride = 0;
- /* "View.MemoryView":1107
+ /* "View.MemoryView":1119
* cdef Py_ssize_t f_stride = 0
*
* for i in range(ndim - 1, -1, -1): # <<<<<<<<<<<<<<
* if mslice.shape[i] > 1:
* c_stride = mslice.strides[i]
*/
- for (__pyx_t_1 = (__pyx_v_ndim - 1); __pyx_t_1 > -1L; __pyx_t_1-=1) {
+ for (__pyx_t_1 = (__pyx_v_ndim - 1); __pyx_t_1 > -1; __pyx_t_1-=1) {
__pyx_v_i = __pyx_t_1;
- /* "View.MemoryView":1108
+ /* "View.MemoryView":1120
*
* for i in range(ndim - 1, -1, -1):
* if mslice.shape[i] > 1: # <<<<<<<<<<<<<<
@@ -43495,7 +45538,7 @@ static char __pyx_get_best_slice_order(__Pyx_memviewslice *__pyx_v_mslice, int _
__pyx_t_2 = (((__pyx_v_mslice->shape[__pyx_v_i]) > 1) != 0);
if (__pyx_t_2) {
- /* "View.MemoryView":1109
+ /* "View.MemoryView":1121
* for i in range(ndim - 1, -1, -1):
* if mslice.shape[i] > 1:
* c_stride = mslice.strides[i] # <<<<<<<<<<<<<<
@@ -43504,7 +45547,7 @@ static char __pyx_get_best_slice_order(__Pyx_memviewslice *__pyx_v_mslice, int _
*/
__pyx_v_c_stride = (__pyx_v_mslice->strides[__pyx_v_i]);
- /* "View.MemoryView":1110
+ /* "View.MemoryView":1122
* if mslice.shape[i] > 1:
* c_stride = mslice.strides[i]
* break # <<<<<<<<<<<<<<
@@ -43513,7 +45556,7 @@ static char __pyx_get_best_slice_order(__Pyx_memviewslice *__pyx_v_mslice, int _
*/
goto __pyx_L4_break;
- /* "View.MemoryView":1108
+ /* "View.MemoryView":1120
*
* for i in range(ndim - 1, -1, -1):
* if mslice.shape[i] > 1: # <<<<<<<<<<<<<<
@@ -43524,7 +45567,7 @@ static char __pyx_get_best_slice_order(__Pyx_memviewslice *__pyx_v_mslice, int _
}
__pyx_L4_break:;
- /* "View.MemoryView":1112
+ /* "View.MemoryView":1124
* break
*
* for i in range(ndim): # <<<<<<<<<<<<<<
@@ -43532,10 +45575,11 @@ static char __pyx_get_best_slice_order(__Pyx_memviewslice *__pyx_v_mslice, int _
* f_stride = mslice.strides[i]
*/
__pyx_t_1 = __pyx_v_ndim;
- for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_1; __pyx_t_3+=1) {
- __pyx_v_i = __pyx_t_3;
+ __pyx_t_3 = __pyx_t_1;
+ for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
+ __pyx_v_i = __pyx_t_4;
- /* "View.MemoryView":1113
+ /* "View.MemoryView":1125
*
* for i in range(ndim):
* if mslice.shape[i] > 1: # <<<<<<<<<<<<<<
@@ -43545,7 +45589,7 @@ static char __pyx_get_best_slice_order(__Pyx_memviewslice *__pyx_v_mslice, int _
__pyx_t_2 = (((__pyx_v_mslice->shape[__pyx_v_i]) > 1) != 0);
if (__pyx_t_2) {
- /* "View.MemoryView":1114
+ /* "View.MemoryView":1126
* for i in range(ndim):
* if mslice.shape[i] > 1:
* f_stride = mslice.strides[i] # <<<<<<<<<<<<<<
@@ -43554,7 +45598,7 @@ static char __pyx_get_best_slice_order(__Pyx_memviewslice *__pyx_v_mslice, int _
*/
__pyx_v_f_stride = (__pyx_v_mslice->strides[__pyx_v_i]);
- /* "View.MemoryView":1115
+ /* "View.MemoryView":1127
* if mslice.shape[i] > 1:
* f_stride = mslice.strides[i]
* break # <<<<<<<<<<<<<<
@@ -43563,7 +45607,7 @@ static char __pyx_get_best_slice_order(__Pyx_memviewslice *__pyx_v_mslice, int _
*/
goto __pyx_L7_break;
- /* "View.MemoryView":1113
+ /* "View.MemoryView":1125
*
* for i in range(ndim):
* if mslice.shape[i] > 1: # <<<<<<<<<<<<<<
@@ -43574,7 +45618,7 @@ static char __pyx_get_best_slice_order(__Pyx_memviewslice *__pyx_v_mslice, int _
}
__pyx_L7_break:;
- /* "View.MemoryView":1117
+ /* "View.MemoryView":1129
* break
*
* if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride): # <<<<<<<<<<<<<<
@@ -43584,7 +45628,7 @@ static char __pyx_get_best_slice_order(__Pyx_memviewslice *__pyx_v_mslice, int _
__pyx_t_2 = ((abs_py_ssize_t(__pyx_v_c_stride) <= abs_py_ssize_t(__pyx_v_f_stride)) != 0);
if (__pyx_t_2) {
- /* "View.MemoryView":1118
+ /* "View.MemoryView":1130
*
* if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride):
* return 'C' # <<<<<<<<<<<<<<
@@ -43594,7 +45638,7 @@ static char __pyx_get_best_slice_order(__Pyx_memviewslice *__pyx_v_mslice, int _
__pyx_r = 'C';
goto __pyx_L0;
- /* "View.MemoryView":1117
+ /* "View.MemoryView":1129
* break
*
* if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride): # <<<<<<<<<<<<<<
@@ -43603,7 +45647,7 @@ static char __pyx_get_best_slice_order(__Pyx_memviewslice *__pyx_v_mslice, int _
*/
}
- /* "View.MemoryView":1120
+ /* "View.MemoryView":1132
* return 'C'
* else:
* return 'F' # <<<<<<<<<<<<<<
@@ -43615,7 +45659,7 @@ static char __pyx_get_best_slice_order(__Pyx_memviewslice *__pyx_v_mslice, int _
goto __pyx_L0;
}
- /* "View.MemoryView":1099
+ /* "View.MemoryView":1111
*
* @cname('__pyx_get_best_slice_order')
* cdef char get_best_order(__Pyx_memviewslice *mslice, int ndim) nogil: # <<<<<<<<<<<<<<
@@ -43628,7 +45672,7 @@ static char __pyx_get_best_slice_order(__Pyx_memviewslice *__pyx_v_mslice, int _
return __pyx_r;
}
-/* "View.MemoryView":1123
+/* "View.MemoryView":1135
*
* @cython.cdivision(True)
* cdef void _copy_strided_to_strided(char *src_data, Py_ssize_t *src_strides, # <<<<<<<<<<<<<<
@@ -43647,8 +45691,9 @@ static void _copy_strided_to_strided(char *__pyx_v_src_data, Py_ssize_t *__pyx_v
int __pyx_t_3;
Py_ssize_t __pyx_t_4;
Py_ssize_t __pyx_t_5;
+ Py_ssize_t __pyx_t_6;
- /* "View.MemoryView":1130
+ /* "View.MemoryView":1142
*
* cdef Py_ssize_t i
* cdef Py_ssize_t src_extent = src_shape[0] # <<<<<<<<<<<<<<
@@ -43657,7 +45702,7 @@ static void _copy_strided_to_strided(char *__pyx_v_src_data, Py_ssize_t *__pyx_v
*/
__pyx_v_src_extent = (__pyx_v_src_shape[0]);
- /* "View.MemoryView":1131
+ /* "View.MemoryView":1143
* cdef Py_ssize_t i
* cdef Py_ssize_t src_extent = src_shape[0]
* cdef Py_ssize_t dst_extent = dst_shape[0] # <<<<<<<<<<<<<<
@@ -43666,7 +45711,7 @@ static void _copy_strided_to_strided(char *__pyx_v_src_data, Py_ssize_t *__pyx_v
*/
__pyx_v_dst_extent = (__pyx_v_dst_shape[0]);
- /* "View.MemoryView":1132
+ /* "View.MemoryView":1144
* cdef Py_ssize_t src_extent = src_shape[0]
* cdef Py_ssize_t dst_extent = dst_shape[0]
* cdef Py_ssize_t src_stride = src_strides[0] # <<<<<<<<<<<<<<
@@ -43675,7 +45720,7 @@ static void _copy_strided_to_strided(char *__pyx_v_src_data, Py_ssize_t *__pyx_v
*/
__pyx_v_src_stride = (__pyx_v_src_strides[0]);
- /* "View.MemoryView":1133
+ /* "View.MemoryView":1145
* cdef Py_ssize_t dst_extent = dst_shape[0]
* cdef Py_ssize_t src_stride = src_strides[0]
* cdef Py_ssize_t dst_stride = dst_strides[0] # <<<<<<<<<<<<<<
@@ -43684,7 +45729,7 @@ static void _copy_strided_to_strided(char *__pyx_v_src_data, Py_ssize_t *__pyx_v
*/
__pyx_v_dst_stride = (__pyx_v_dst_strides[0]);
- /* "View.MemoryView":1135
+ /* "View.MemoryView":1147
* cdef Py_ssize_t dst_stride = dst_strides[0]
*
* if ndim == 1: # <<<<<<<<<<<<<<
@@ -43694,7 +45739,7 @@ static void _copy_strided_to_strided(char *__pyx_v_src_data, Py_ssize_t *__pyx_v
__pyx_t_1 = ((__pyx_v_ndim == 1) != 0);
if (__pyx_t_1) {
- /* "View.MemoryView":1136
+ /* "View.MemoryView":1148
*
* if ndim == 1:
* if (src_stride > 0 and dst_stride > 0 and # <<<<<<<<<<<<<<
@@ -43714,7 +45759,7 @@ static void _copy_strided_to_strided(char *__pyx_v_src_data, Py_ssize_t *__pyx_v
goto __pyx_L5_bool_binop_done;
}
- /* "View.MemoryView":1137
+ /* "View.MemoryView":1149
* if ndim == 1:
* if (src_stride > 0 and dst_stride > 0 and
* <size_t> src_stride == itemsize == <size_t> dst_stride): # <<<<<<<<<<<<<<
@@ -43729,7 +45774,7 @@ static void _copy_strided_to_strided(char *__pyx_v_src_data, Py_ssize_t *__pyx_v
__pyx_t_1 = __pyx_t_3;
__pyx_L5_bool_binop_done:;
- /* "View.MemoryView":1136
+ /* "View.MemoryView":1148
*
* if ndim == 1:
* if (src_stride > 0 and dst_stride > 0 and # <<<<<<<<<<<<<<
@@ -43738,16 +45783,16 @@ static void _copy_strided_to_strided(char *__pyx_v_src_data, Py_ssize_t *__pyx_v
*/
if (__pyx_t_1) {
- /* "View.MemoryView":1138
+ /* "View.MemoryView":1150
* if (src_stride > 0 and dst_stride > 0 and
* <size_t> src_stride == itemsize == <size_t> dst_stride):
* memcpy(dst_data, src_data, itemsize * dst_extent) # <<<<<<<<<<<<<<
* else:
* for i in range(dst_extent):
*/
- memcpy(__pyx_v_dst_data, __pyx_v_src_data, (__pyx_v_itemsize * __pyx_v_dst_extent));
+ (void)(memcpy(__pyx_v_dst_data, __pyx_v_src_data, (__pyx_v_itemsize * __pyx_v_dst_extent)));
- /* "View.MemoryView":1136
+ /* "View.MemoryView":1148
*
* if ndim == 1:
* if (src_stride > 0 and dst_stride > 0 and # <<<<<<<<<<<<<<
@@ -43757,7 +45802,7 @@ static void _copy_strided_to_strided(char *__pyx_v_src_data, Py_ssize_t *__pyx_v
goto __pyx_L4;
}
- /* "View.MemoryView":1140
+ /* "View.MemoryView":1152
* memcpy(dst_data, src_data, itemsize * dst_extent)
* else:
* for i in range(dst_extent): # <<<<<<<<<<<<<<
@@ -43766,19 +45811,20 @@ static void _copy_strided_to_strided(char *__pyx_v_src_data, Py_ssize_t *__pyx_v
*/
/*else*/ {
__pyx_t_4 = __pyx_v_dst_extent;
- for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
- __pyx_v_i = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_4;
+ for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
+ __pyx_v_i = __pyx_t_6;
- /* "View.MemoryView":1141
+ /* "View.MemoryView":1153
* else:
* for i in range(dst_extent):
* memcpy(dst_data, src_data, itemsize) # <<<<<<<<<<<<<<
* src_data += src_stride
* dst_data += dst_stride
*/
- memcpy(__pyx_v_dst_data, __pyx_v_src_data, __pyx_v_itemsize);
+ (void)(memcpy(__pyx_v_dst_data, __pyx_v_src_data, __pyx_v_itemsize));
- /* "View.MemoryView":1142
+ /* "View.MemoryView":1154
* for i in range(dst_extent):
* memcpy(dst_data, src_data, itemsize)
* src_data += src_stride # <<<<<<<<<<<<<<
@@ -43787,7 +45833,7 @@ static void _copy_strided_to_strided(char *__pyx_v_src_data, Py_ssize_t *__pyx_v
*/
__pyx_v_src_data = (__pyx_v_src_data + __pyx_v_src_stride);
- /* "View.MemoryView":1143
+ /* "View.MemoryView":1155
* memcpy(dst_data, src_data, itemsize)
* src_data += src_stride
* dst_data += dst_stride # <<<<<<<<<<<<<<
@@ -43799,7 +45845,7 @@ static void _copy_strided_to_strided(char *__pyx_v_src_data, Py_ssize_t *__pyx_v
}
__pyx_L4:;
- /* "View.MemoryView":1135
+ /* "View.MemoryView":1147
* cdef Py_ssize_t dst_stride = dst_strides[0]
*
* if ndim == 1: # <<<<<<<<<<<<<<
@@ -43809,7 +45855,7 @@ static void _copy_strided_to_strided(char *__pyx_v_src_data, Py_ssize_t *__pyx_v
goto __pyx_L3;
}
- /* "View.MemoryView":1145
+ /* "View.MemoryView":1157
* dst_data += dst_stride
* else:
* for i in range(dst_extent): # <<<<<<<<<<<<<<
@@ -43818,10 +45864,11 @@ static void _copy_strided_to_strided(char *__pyx_v_src_data, Py_ssize_t *__pyx_v
*/
/*else*/ {
__pyx_t_4 = __pyx_v_dst_extent;
- for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
- __pyx_v_i = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_4;
+ for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
+ __pyx_v_i = __pyx_t_6;
- /* "View.MemoryView":1146
+ /* "View.MemoryView":1158
* else:
* for i in range(dst_extent):
* _copy_strided_to_strided(src_data, src_strides + 1, # <<<<<<<<<<<<<<
@@ -43830,7 +45877,7 @@ static void _copy_strided_to_strided(char *__pyx_v_src_data, Py_ssize_t *__pyx_v
*/
_copy_strided_to_strided(__pyx_v_src_data, (__pyx_v_src_strides + 1), __pyx_v_dst_data, (__pyx_v_dst_strides + 1), (__pyx_v_src_shape + 1), (__pyx_v_dst_shape + 1), (__pyx_v_ndim - 1), __pyx_v_itemsize);
- /* "View.MemoryView":1150
+ /* "View.MemoryView":1162
* src_shape + 1, dst_shape + 1,
* ndim - 1, itemsize)
* src_data += src_stride # <<<<<<<<<<<<<<
@@ -43839,7 +45886,7 @@ static void _copy_strided_to_strided(char *__pyx_v_src_data, Py_ssize_t *__pyx_v
*/
__pyx_v_src_data = (__pyx_v_src_data + __pyx_v_src_stride);
- /* "View.MemoryView":1151
+ /* "View.MemoryView":1163
* ndim - 1, itemsize)
* src_data += src_stride
* dst_data += dst_stride # <<<<<<<<<<<<<<
@@ -43851,7 +45898,7 @@ static void _copy_strided_to_strided(char *__pyx_v_src_data, Py_ssize_t *__pyx_v
}
__pyx_L3:;
- /* "View.MemoryView":1123
+ /* "View.MemoryView":1135
*
* @cython.cdivision(True)
* cdef void _copy_strided_to_strided(char *src_data, Py_ssize_t *src_strides, # <<<<<<<<<<<<<<
@@ -43862,7 +45909,7 @@ static void _copy_strided_to_strided(char *__pyx_v_src_data, Py_ssize_t *__pyx_v
/* function exit code */
}
-/* "View.MemoryView":1153
+/* "View.MemoryView":1165
* dst_data += dst_stride
*
* cdef void copy_strided_to_strided(__Pyx_memviewslice *src, # <<<<<<<<<<<<<<
@@ -43872,7 +45919,7 @@ static void _copy_strided_to_strided(char *__pyx_v_src_data, Py_ssize_t *__pyx_v
static void copy_strided_to_strided(__Pyx_memviewslice *__pyx_v_src, __Pyx_memviewslice *__pyx_v_dst, int __pyx_v_ndim, size_t __pyx_v_itemsize) {
- /* "View.MemoryView":1156
+ /* "View.MemoryView":1168
* __Pyx_memviewslice *dst,
* int ndim, size_t itemsize) nogil:
* _copy_strided_to_strided(src.data, src.strides, dst.data, dst.strides, # <<<<<<<<<<<<<<
@@ -43881,7 +45928,7 @@ static void copy_strided_to_strided(__Pyx_memviewslice *__pyx_v_src, __Pyx_memvi
*/
_copy_strided_to_strided(__pyx_v_src->data, __pyx_v_src->strides, __pyx_v_dst->data, __pyx_v_dst->strides, __pyx_v_src->shape, __pyx_v_dst->shape, __pyx_v_ndim, __pyx_v_itemsize);
- /* "View.MemoryView":1153
+ /* "View.MemoryView":1165
* dst_data += dst_stride
*
* cdef void copy_strided_to_strided(__Pyx_memviewslice *src, # <<<<<<<<<<<<<<
@@ -43892,7 +45939,7 @@ static void copy_strided_to_strided(__Pyx_memviewslice *__pyx_v_src, __Pyx_memvi
/* function exit code */
}
-/* "View.MemoryView":1160
+/* "View.MemoryView":1172
*
* @cname('__pyx_memoryview_slice_get_size')
* cdef Py_ssize_t slice_get_size(__Pyx_memviewslice *src, int ndim) nogil: # <<<<<<<<<<<<<<
@@ -43907,8 +45954,9 @@ static Py_ssize_t __pyx_memoryview_slice_get_size(__Pyx_memviewslice *__pyx_v_sr
Py_ssize_t __pyx_t_1;
int __pyx_t_2;
int __pyx_t_3;
+ int __pyx_t_4;
- /* "View.MemoryView":1163
+ /* "View.MemoryView":1175
* "Return the size of the memory occupied by the slice in number of bytes"
* cdef int i
* cdef Py_ssize_t size = src.memview.view.itemsize # <<<<<<<<<<<<<<
@@ -43918,7 +45966,7 @@ static Py_ssize_t __pyx_memoryview_slice_get_size(__Pyx_memviewslice *__pyx_v_sr
__pyx_t_1 = __pyx_v_src->memview->view.itemsize;
__pyx_v_size = __pyx_t_1;
- /* "View.MemoryView":1165
+ /* "View.MemoryView":1177
* cdef Py_ssize_t size = src.memview.view.itemsize
*
* for i in range(ndim): # <<<<<<<<<<<<<<
@@ -43926,10 +45974,11 @@ static Py_ssize_t __pyx_memoryview_slice_get_size(__Pyx_memviewslice *__pyx_v_sr
*
*/
__pyx_t_2 = __pyx_v_ndim;
- for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
- __pyx_v_i = __pyx_t_3;
+ __pyx_t_3 = __pyx_t_2;
+ for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
+ __pyx_v_i = __pyx_t_4;
- /* "View.MemoryView":1166
+ /* "View.MemoryView":1178
*
* for i in range(ndim):
* size *= src.shape[i] # <<<<<<<<<<<<<<
@@ -43939,7 +45988,7 @@ static Py_ssize_t __pyx_memoryview_slice_get_size(__Pyx_memviewslice *__pyx_v_sr
__pyx_v_size = (__pyx_v_size * (__pyx_v_src->shape[__pyx_v_i]));
}
- /* "View.MemoryView":1168
+ /* "View.MemoryView":1180
* size *= src.shape[i]
*
* return size # <<<<<<<<<<<<<<
@@ -43949,7 +45998,7 @@ static Py_ssize_t __pyx_memoryview_slice_get_size(__Pyx_memviewslice *__pyx_v_sr
__pyx_r = __pyx_v_size;
goto __pyx_L0;
- /* "View.MemoryView":1160
+ /* "View.MemoryView":1172
*
* @cname('__pyx_memoryview_slice_get_size')
* cdef Py_ssize_t slice_get_size(__Pyx_memviewslice *src, int ndim) nogil: # <<<<<<<<<<<<<<
@@ -43962,7 +46011,7 @@ static Py_ssize_t __pyx_memoryview_slice_get_size(__Pyx_memviewslice *__pyx_v_sr
return __pyx_r;
}
-/* "View.MemoryView":1171
+/* "View.MemoryView":1183
*
* @cname('__pyx_fill_contig_strides_array')
* cdef Py_ssize_t fill_contig_strides_array( # <<<<<<<<<<<<<<
@@ -43976,8 +46025,9 @@ static Py_ssize_t __pyx_fill_contig_strides_array(Py_ssize_t *__pyx_v_shape, Py_
int __pyx_t_1;
int __pyx_t_2;
int __pyx_t_3;
+ int __pyx_t_4;
- /* "View.MemoryView":1180
+ /* "View.MemoryView":1192
* cdef int idx
*
* if order == 'F': # <<<<<<<<<<<<<<
@@ -43987,7 +46037,7 @@ static Py_ssize_t __pyx_fill_contig_strides_array(Py_ssize_t *__pyx_v_shape, Py_
__pyx_t_1 = ((__pyx_v_order == 'F') != 0);
if (__pyx_t_1) {
- /* "View.MemoryView":1181
+ /* "View.MemoryView":1193
*
* if order == 'F':
* for idx in range(ndim): # <<<<<<<<<<<<<<
@@ -43995,10 +46045,11 @@ static Py_ssize_t __pyx_fill_contig_strides_array(Py_ssize_t *__pyx_v_shape, Py_
* stride = stride * shape[idx]
*/
__pyx_t_2 = __pyx_v_ndim;
- for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
- __pyx_v_idx = __pyx_t_3;
+ __pyx_t_3 = __pyx_t_2;
+ for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
+ __pyx_v_idx = __pyx_t_4;
- /* "View.MemoryView":1182
+ /* "View.MemoryView":1194
* if order == 'F':
* for idx in range(ndim):
* strides[idx] = stride # <<<<<<<<<<<<<<
@@ -44007,7 +46058,7 @@ static Py_ssize_t __pyx_fill_contig_strides_array(Py_ssize_t *__pyx_v_shape, Py_
*/
(__pyx_v_strides[__pyx_v_idx]) = __pyx_v_stride;
- /* "View.MemoryView":1183
+ /* "View.MemoryView":1195
* for idx in range(ndim):
* strides[idx] = stride
* stride = stride * shape[idx] # <<<<<<<<<<<<<<
@@ -44017,7 +46068,7 @@ static Py_ssize_t __pyx_fill_contig_strides_array(Py_ssize_t *__pyx_v_shape, Py_
__pyx_v_stride = (__pyx_v_stride * (__pyx_v_shape[__pyx_v_idx]));
}
- /* "View.MemoryView":1180
+ /* "View.MemoryView":1192
* cdef int idx
*
* if order == 'F': # <<<<<<<<<<<<<<
@@ -44027,7 +46078,7 @@ static Py_ssize_t __pyx_fill_contig_strides_array(Py_ssize_t *__pyx_v_shape, Py_
goto __pyx_L3;
}
- /* "View.MemoryView":1185
+ /* "View.MemoryView":1197
* stride = stride * shape[idx]
* else:
* for idx in range(ndim - 1, -1, -1): # <<<<<<<<<<<<<<
@@ -44035,10 +46086,10 @@ static Py_ssize_t __pyx_fill_contig_strides_array(Py_ssize_t *__pyx_v_shape, Py_
* stride = stride * shape[idx]
*/
/*else*/ {
- for (__pyx_t_2 = (__pyx_v_ndim - 1); __pyx_t_2 > -1L; __pyx_t_2-=1) {
+ for (__pyx_t_2 = (__pyx_v_ndim - 1); __pyx_t_2 > -1; __pyx_t_2-=1) {
__pyx_v_idx = __pyx_t_2;
- /* "View.MemoryView":1186
+ /* "View.MemoryView":1198
* else:
* for idx in range(ndim - 1, -1, -1):
* strides[idx] = stride # <<<<<<<<<<<<<<
@@ -44047,7 +46098,7 @@ static Py_ssize_t __pyx_fill_contig_strides_array(Py_ssize_t *__pyx_v_shape, Py_
*/
(__pyx_v_strides[__pyx_v_idx]) = __pyx_v_stride;
- /* "View.MemoryView":1187
+ /* "View.MemoryView":1199
* for idx in range(ndim - 1, -1, -1):
* strides[idx] = stride
* stride = stride * shape[idx] # <<<<<<<<<<<<<<
@@ -44059,7 +46110,7 @@ static Py_ssize_t __pyx_fill_contig_strides_array(Py_ssize_t *__pyx_v_shape, Py_
}
__pyx_L3:;
- /* "View.MemoryView":1189
+ /* "View.MemoryView":1201
* stride = stride * shape[idx]
*
* return stride # <<<<<<<<<<<<<<
@@ -44069,7 +46120,7 @@ static Py_ssize_t __pyx_fill_contig_strides_array(Py_ssize_t *__pyx_v_shape, Py_
__pyx_r = __pyx_v_stride;
goto __pyx_L0;
- /* "View.MemoryView":1171
+ /* "View.MemoryView":1183
*
* @cname('__pyx_fill_contig_strides_array')
* cdef Py_ssize_t fill_contig_strides_array( # <<<<<<<<<<<<<<
@@ -44082,7 +46133,7 @@ static Py_ssize_t __pyx_fill_contig_strides_array(Py_ssize_t *__pyx_v_shape, Py_
return __pyx_r;
}
-/* "View.MemoryView":1192
+/* "View.MemoryView":1204
*
* @cname('__pyx_memoryview_copy_data_to_temp')
* cdef void *copy_data_to_temp(__Pyx_memviewslice *src, # <<<<<<<<<<<<<<
@@ -44101,8 +46152,9 @@ static void *__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice *__pyx_v_src,
int __pyx_t_3;
struct __pyx_memoryview_obj *__pyx_t_4;
int __pyx_t_5;
+ int __pyx_t_6;
- /* "View.MemoryView":1203
+ /* "View.MemoryView":1215
* cdef void *result
*
* cdef size_t itemsize = src.memview.view.itemsize # <<<<<<<<<<<<<<
@@ -44112,7 +46164,7 @@ static void *__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice *__pyx_v_src,
__pyx_t_1 = __pyx_v_src->memview->view.itemsize;
__pyx_v_itemsize = __pyx_t_1;
- /* "View.MemoryView":1204
+ /* "View.MemoryView":1216
*
* cdef size_t itemsize = src.memview.view.itemsize
* cdef size_t size = slice_get_size(src, ndim) # <<<<<<<<<<<<<<
@@ -44121,7 +46173,7 @@ static void *__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice *__pyx_v_src,
*/
__pyx_v_size = __pyx_memoryview_slice_get_size(__pyx_v_src, __pyx_v_ndim);
- /* "View.MemoryView":1206
+ /* "View.MemoryView":1218
* cdef size_t size = slice_get_size(src, ndim)
*
* result = malloc(size) # <<<<<<<<<<<<<<
@@ -44130,7 +46182,7 @@ static void *__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice *__pyx_v_src,
*/
__pyx_v_result = malloc(__pyx_v_size);
- /* "View.MemoryView":1207
+ /* "View.MemoryView":1219
*
* result = malloc(size)
* if not result: # <<<<<<<<<<<<<<
@@ -44140,16 +46192,16 @@ static void *__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice *__pyx_v_src,
__pyx_t_2 = ((!(__pyx_v_result != 0)) != 0);
if (__pyx_t_2) {
- /* "View.MemoryView":1208
+ /* "View.MemoryView":1220
* result = malloc(size)
* if not result:
* _err(MemoryError, NULL) # <<<<<<<<<<<<<<
*
*
*/
- __pyx_t_3 = __pyx_memoryview_err(__pyx_builtin_MemoryError, NULL); if (unlikely(__pyx_t_3 == -1)) __PYX_ERR(2, 1208, __pyx_L1_error)
+ __pyx_t_3 = __pyx_memoryview_err(__pyx_builtin_MemoryError, NULL); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(2, 1220, __pyx_L1_error)
- /* "View.MemoryView":1207
+ /* "View.MemoryView":1219
*
* result = malloc(size)
* if not result: # <<<<<<<<<<<<<<
@@ -44158,7 +46210,7 @@ static void *__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice *__pyx_v_src,
*/
}
- /* "View.MemoryView":1211
+ /* "View.MemoryView":1223
*
*
* tmpslice.data = <char *> result # <<<<<<<<<<<<<<
@@ -44167,7 +46219,7 @@ static void *__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice *__pyx_v_src,
*/
__pyx_v_tmpslice->data = ((char *)__pyx_v_result);
- /* "View.MemoryView":1212
+ /* "View.MemoryView":1224
*
* tmpslice.data = <char *> result
* tmpslice.memview = src.memview # <<<<<<<<<<<<<<
@@ -44177,7 +46229,7 @@ static void *__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice *__pyx_v_src,
__pyx_t_4 = __pyx_v_src->memview;
__pyx_v_tmpslice->memview = __pyx_t_4;
- /* "View.MemoryView":1213
+ /* "View.MemoryView":1225
* tmpslice.data = <char *> result
* tmpslice.memview = src.memview
* for i in range(ndim): # <<<<<<<<<<<<<<
@@ -44185,10 +46237,11 @@ static void *__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice *__pyx_v_src,
* tmpslice.suboffsets[i] = -1
*/
__pyx_t_3 = __pyx_v_ndim;
- for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_3; __pyx_t_5+=1) {
- __pyx_v_i = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_3;
+ for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
+ __pyx_v_i = __pyx_t_6;
- /* "View.MemoryView":1214
+ /* "View.MemoryView":1226
* tmpslice.memview = src.memview
* for i in range(ndim):
* tmpslice.shape[i] = src.shape[i] # <<<<<<<<<<<<<<
@@ -44197,7 +46250,7 @@ static void *__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice *__pyx_v_src,
*/
(__pyx_v_tmpslice->shape[__pyx_v_i]) = (__pyx_v_src->shape[__pyx_v_i]);
- /* "View.MemoryView":1215
+ /* "View.MemoryView":1227
* for i in range(ndim):
* tmpslice.shape[i] = src.shape[i]
* tmpslice.suboffsets[i] = -1 # <<<<<<<<<<<<<<
@@ -44207,16 +46260,16 @@ static void *__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice *__pyx_v_src,
(__pyx_v_tmpslice->suboffsets[__pyx_v_i]) = -1L;
}
- /* "View.MemoryView":1217
+ /* "View.MemoryView":1229
* tmpslice.suboffsets[i] = -1
*
* fill_contig_strides_array(&tmpslice.shape[0], &tmpslice.strides[0], itemsize, # <<<<<<<<<<<<<<
* ndim, order)
*
*/
- __pyx_fill_contig_strides_array((&(__pyx_v_tmpslice->shape[0])), (&(__pyx_v_tmpslice->strides[0])), __pyx_v_itemsize, __pyx_v_ndim, __pyx_v_order);
+ (void)(__pyx_fill_contig_strides_array((&(__pyx_v_tmpslice->shape[0])), (&(__pyx_v_tmpslice->strides[0])), __pyx_v_itemsize, __pyx_v_ndim, __pyx_v_order));
- /* "View.MemoryView":1221
+ /* "View.MemoryView":1233
*
*
* for i in range(ndim): # <<<<<<<<<<<<<<
@@ -44224,10 +46277,11 @@ static void *__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice *__pyx_v_src,
* tmpslice.strides[i] = 0
*/
__pyx_t_3 = __pyx_v_ndim;
- for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_3; __pyx_t_5+=1) {
- __pyx_v_i = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_3;
+ for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
+ __pyx_v_i = __pyx_t_6;
- /* "View.MemoryView":1222
+ /* "View.MemoryView":1234
*
* for i in range(ndim):
* if tmpslice.shape[i] == 1: # <<<<<<<<<<<<<<
@@ -44237,7 +46291,7 @@ static void *__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice *__pyx_v_src,
__pyx_t_2 = (((__pyx_v_tmpslice->shape[__pyx_v_i]) == 1) != 0);
if (__pyx_t_2) {
- /* "View.MemoryView":1223
+ /* "View.MemoryView":1235
* for i in range(ndim):
* if tmpslice.shape[i] == 1:
* tmpslice.strides[i] = 0 # <<<<<<<<<<<<<<
@@ -44246,7 +46300,7 @@ static void *__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice *__pyx_v_src,
*/
(__pyx_v_tmpslice->strides[__pyx_v_i]) = 0;
- /* "View.MemoryView":1222
+ /* "View.MemoryView":1234
*
* for i in range(ndim):
* if tmpslice.shape[i] == 1: # <<<<<<<<<<<<<<
@@ -44256,7 +46310,7 @@ static void *__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice *__pyx_v_src,
}
}
- /* "View.MemoryView":1225
+ /* "View.MemoryView":1237
* tmpslice.strides[i] = 0
*
* if slice_is_contig(src[0], order, ndim): # <<<<<<<<<<<<<<
@@ -44266,16 +46320,16 @@ static void *__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice *__pyx_v_src,
__pyx_t_2 = (__pyx_memviewslice_is_contig((__pyx_v_src[0]), __pyx_v_order, __pyx_v_ndim) != 0);
if (__pyx_t_2) {
- /* "View.MemoryView":1226
+ /* "View.MemoryView":1238
*
* if slice_is_contig(src[0], order, ndim):
* memcpy(result, src.data, size) # <<<<<<<<<<<<<<
* else:
* copy_strided_to_strided(src, tmpslice, ndim, itemsize)
*/
- memcpy(__pyx_v_result, __pyx_v_src->data, __pyx_v_size);
+ (void)(memcpy(__pyx_v_result, __pyx_v_src->data, __pyx_v_size));
- /* "View.MemoryView":1225
+ /* "View.MemoryView":1237
* tmpslice.strides[i] = 0
*
* if slice_is_contig(src[0], order, ndim): # <<<<<<<<<<<<<<
@@ -44285,7 +46339,7 @@ static void *__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice *__pyx_v_src,
goto __pyx_L9;
}
- /* "View.MemoryView":1228
+ /* "View.MemoryView":1240
* memcpy(result, src.data, size)
* else:
* copy_strided_to_strided(src, tmpslice, ndim, itemsize) # <<<<<<<<<<<<<<
@@ -44297,7 +46351,7 @@ static void *__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice *__pyx_v_src,
}
__pyx_L9:;
- /* "View.MemoryView":1230
+ /* "View.MemoryView":1242
* copy_strided_to_strided(src, tmpslice, ndim, itemsize)
*
* return result # <<<<<<<<<<<<<<
@@ -44307,7 +46361,7 @@ static void *__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice *__pyx_v_src,
__pyx_r = __pyx_v_result;
goto __pyx_L0;
- /* "View.MemoryView":1192
+ /* "View.MemoryView":1204
*
* @cname('__pyx_memoryview_copy_data_to_temp')
* cdef void *copy_data_to_temp(__Pyx_memviewslice *src, # <<<<<<<<<<<<<<
@@ -44319,11 +46373,11 @@ static void *__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice *__pyx_v_src,
__pyx_L1_error:;
{
#ifdef WITH_THREAD
- PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();
+ PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
#endif
__Pyx_AddTraceback("View.MemoryView.copy_data_to_temp", __pyx_clineno, __pyx_lineno, __pyx_filename);
#ifdef WITH_THREAD
- PyGILState_Release(__pyx_gilstate_save);
+ __Pyx_PyGILState_Release(__pyx_gilstate_save);
#endif
}
__pyx_r = NULL;
@@ -44331,7 +46385,7 @@ static void *__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice *__pyx_v_src,
return __pyx_r;
}
-/* "View.MemoryView":1235
+/* "View.MemoryView":1247
*
* @cname('__pyx_memoryview_err_extents')
* cdef int _err_extents(int i, Py_ssize_t extent1, # <<<<<<<<<<<<<<
@@ -44347,24 +46401,24 @@ static int __pyx_memoryview_err_extents(int __pyx_v_i, Py_ssize_t __pyx_v_extent
PyObject *__pyx_t_3 = NULL;
PyObject *__pyx_t_4 = NULL;
#ifdef WITH_THREAD
- PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();
+ PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
#endif
__Pyx_RefNannySetupContext("_err_extents", 0);
- /* "View.MemoryView":1238
+ /* "View.MemoryView":1250
* Py_ssize_t extent2) except -1 with gil:
* raise ValueError("got differing extents in dimension %d (got %d and %d)" %
* (i, extent1, extent2)) # <<<<<<<<<<<<<<
*
* @cname('__pyx_memoryview_err_dim')
*/
- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1238, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1250, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_extent1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1238, __pyx_L1_error)
+ __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_extent1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1250, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_extent2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1238, __pyx_L1_error)
+ __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_extent2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1250, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1238, __pyx_L1_error)
+ __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1250, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_GIVEREF(__pyx_t_1);
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
@@ -44376,29 +46430,24 @@ static int __pyx_memoryview_err_extents(int __pyx_v_i, Py_ssize_t __pyx_v_extent
__pyx_t_2 = 0;
__pyx_t_3 = 0;
- /* "View.MemoryView":1237
+ /* "View.MemoryView":1249
* cdef int _err_extents(int i, Py_ssize_t extent1,
* Py_ssize_t extent2) except -1 with gil:
* raise ValueError("got differing extents in dimension %d (got %d and %d)" % # <<<<<<<<<<<<<<
* (i, extent1, extent2))
*
*/
- __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_got_differing_extents_in_dimensi, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1237, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_got_differing_extents_in_dimensi, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1249, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1237, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1249, __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(2, 1237, __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(2, 1237, __pyx_L1_error)
+ __Pyx_Raise(__pyx_t_4, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __PYX_ERR(2, 1249, __pyx_L1_error)
- /* "View.MemoryView":1235
+ /* "View.MemoryView":1247
*
* @cname('__pyx_memoryview_err_extents')
* cdef int _err_extents(int i, Py_ssize_t extent1, # <<<<<<<<<<<<<<
@@ -44416,12 +46465,12 @@ static int __pyx_memoryview_err_extents(int __pyx_v_i, Py_ssize_t __pyx_v_extent
__pyx_r = -1;
__Pyx_RefNannyFinishContext();
#ifdef WITH_THREAD
- PyGILState_Release(__pyx_gilstate_save);
+ __Pyx_PyGILState_Release(__pyx_gilstate_save);
#endif
return __pyx_r;
}
-/* "View.MemoryView":1241
+/* "View.MemoryView":1253
*
* @cname('__pyx_memoryview_err_dim')
* cdef int _err_dim(object error, char *msg, int dim) except -1 with gil: # <<<<<<<<<<<<<<
@@ -44438,23 +46487,23 @@ static int __pyx_memoryview_err_dim(PyObject *__pyx_v_error, char *__pyx_v_msg,
PyObject *__pyx_t_4 = NULL;
PyObject *__pyx_t_5 = NULL;
#ifdef WITH_THREAD
- PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();
+ PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
#endif
__Pyx_RefNannySetupContext("_err_dim", 0);
__Pyx_INCREF(__pyx_v_error);
- /* "View.MemoryView":1242
+ /* "View.MemoryView":1254
* @cname('__pyx_memoryview_err_dim')
* cdef int _err_dim(object error, char *msg, int dim) except -1 with gil:
* raise error(msg.decode('ascii') % dim) # <<<<<<<<<<<<<<
*
* @cname('__pyx_memoryview_err')
*/
- __pyx_t_2 = __Pyx_decode_c_string(__pyx_v_msg, 0, strlen(__pyx_v_msg), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1242, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_decode_c_string(__pyx_v_msg, 0, strlen(__pyx_v_msg), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1254, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_dim); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1242, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_dim); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1254, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyUnicode_Format(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1242, __pyx_L1_error)
+ __pyx_t_4 = PyUnicode_Format(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1254, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
@@ -44470,14 +46519,14 @@ static int __pyx_memoryview_err_dim(PyObject *__pyx_v_error, char *__pyx_v_msg,
}
}
if (!__pyx_t_2) {
- __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1242, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1254, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_GOTREF(__pyx_t_1);
} else {
#if CYTHON_FAST_PYCALL
if (PyFunction_Check(__pyx_t_3)) {
PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_4};
- __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1242, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1254, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
@@ -44486,20 +46535,20 @@ static int __pyx_memoryview_err_dim(PyObject *__pyx_v_error, char *__pyx_v_msg,
#if CYTHON_FAST_PYCCALL
if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_4};
- __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1242, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1254, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
} else
#endif
{
- __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1242, __pyx_L1_error)
+ __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1254, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = NULL;
__Pyx_GIVEREF(__pyx_t_4);
PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_4);
__pyx_t_4 = 0;
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1242, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1254, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
}
@@ -44507,9 +46556,9 @@ static int __pyx_memoryview_err_dim(PyObject *__pyx_v_error, char *__pyx_v_msg,
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_Raise(__pyx_t_1, 0, 0, 0);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __PYX_ERR(2, 1242, __pyx_L1_error)
+ __PYX_ERR(2, 1254, __pyx_L1_error)
- /* "View.MemoryView":1241
+ /* "View.MemoryView":1253
*
* @cname('__pyx_memoryview_err_dim')
* cdef int _err_dim(object error, char *msg, int dim) except -1 with gil: # <<<<<<<<<<<<<<
@@ -44529,12 +46578,12 @@ static int __pyx_memoryview_err_dim(PyObject *__pyx_v_error, char *__pyx_v_msg,
__Pyx_XDECREF(__pyx_v_error);
__Pyx_RefNannyFinishContext();
#ifdef WITH_THREAD
- PyGILState_Release(__pyx_gilstate_save);
+ __Pyx_PyGILState_Release(__pyx_gilstate_save);
#endif
return __pyx_r;
}
-/* "View.MemoryView":1245
+/* "View.MemoryView":1257
*
* @cname('__pyx_memoryview_err')
* cdef int _err(object error, char *msg) except -1 with gil: # <<<<<<<<<<<<<<
@@ -44552,12 +46601,12 @@ static int __pyx_memoryview_err(PyObject *__pyx_v_error, char *__pyx_v_msg) {
PyObject *__pyx_t_5 = NULL;
PyObject *__pyx_t_6 = NULL;
#ifdef WITH_THREAD
- PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();
+ PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
#endif
__Pyx_RefNannySetupContext("_err", 0);
__Pyx_INCREF(__pyx_v_error);
- /* "View.MemoryView":1246
+ /* "View.MemoryView":1258
* @cname('__pyx_memoryview_err')
* cdef int _err(object error, char *msg) except -1 with gil:
* if msg != NULL: # <<<<<<<<<<<<<<
@@ -44565,16 +46614,16 @@ static int __pyx_memoryview_err(PyObject *__pyx_v_error, char *__pyx_v_msg) {
* else:
*/
__pyx_t_1 = ((__pyx_v_msg != NULL) != 0);
- if (__pyx_t_1) {
+ if (unlikely(__pyx_t_1)) {
- /* "View.MemoryView":1247
+ /* "View.MemoryView":1259
* cdef int _err(object error, char *msg) except -1 with gil:
* if msg != NULL:
* raise error(msg.decode('ascii')) # <<<<<<<<<<<<<<
* else:
* raise error
*/
- __pyx_t_3 = __Pyx_decode_c_string(__pyx_v_msg, 0, strlen(__pyx_v_msg), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1247, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_decode_c_string(__pyx_v_msg, 0, strlen(__pyx_v_msg), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1259, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_INCREF(__pyx_v_error);
__pyx_t_4 = __pyx_v_error; __pyx_t_5 = NULL;
@@ -44588,14 +46637,14 @@ static int __pyx_memoryview_err(PyObject *__pyx_v_error, char *__pyx_v_msg) {
}
}
if (!__pyx_t_5) {
- __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1247, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1259, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_GOTREF(__pyx_t_2);
} else {
#if CYTHON_FAST_PYCALL
if (PyFunction_Check(__pyx_t_4)) {
PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_3};
- __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1247, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1259, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
@@ -44604,20 +46653,20 @@ static int __pyx_memoryview_err(PyObject *__pyx_v_error, char *__pyx_v_msg) {
#if CYTHON_FAST_PYCCALL
if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_3};
- __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1247, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1259, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
} else
#endif
{
- __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1247, __pyx_L1_error)
+ __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1259, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
__Pyx_GIVEREF(__pyx_t_3);
PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_3);
__pyx_t_3 = 0;
- __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1247, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1259, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
}
@@ -44625,9 +46674,9 @@ static int __pyx_memoryview_err(PyObject *__pyx_v_error, char *__pyx_v_msg) {
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __PYX_ERR(2, 1247, __pyx_L1_error)
+ __PYX_ERR(2, 1259, __pyx_L1_error)
- /* "View.MemoryView":1246
+ /* "View.MemoryView":1258
* @cname('__pyx_memoryview_err')
* cdef int _err(object error, char *msg) except -1 with gil:
* if msg != NULL: # <<<<<<<<<<<<<<
@@ -44636,7 +46685,7 @@ static int __pyx_memoryview_err(PyObject *__pyx_v_error, char *__pyx_v_msg) {
*/
}
- /* "View.MemoryView":1249
+ /* "View.MemoryView":1261
* raise error(msg.decode('ascii'))
* else:
* raise error # <<<<<<<<<<<<<<
@@ -44645,10 +46694,10 @@ static int __pyx_memoryview_err(PyObject *__pyx_v_error, char *__pyx_v_msg) {
*/
/*else*/ {
__Pyx_Raise(__pyx_v_error, 0, 0, 0);
- __PYX_ERR(2, 1249, __pyx_L1_error)
+ __PYX_ERR(2, 1261, __pyx_L1_error)
}
- /* "View.MemoryView":1245
+ /* "View.MemoryView":1257
*
* @cname('__pyx_memoryview_err')
* cdef int _err(object error, char *msg) except -1 with gil: # <<<<<<<<<<<<<<
@@ -44668,12 +46717,12 @@ static int __pyx_memoryview_err(PyObject *__pyx_v_error, char *__pyx_v_msg) {
__Pyx_XDECREF(__pyx_v_error);
__Pyx_RefNannyFinishContext();
#ifdef WITH_THREAD
- PyGILState_Release(__pyx_gilstate_save);
+ __Pyx_PyGILState_Release(__pyx_gilstate_save);
#endif
return __pyx_r;
}
-/* "View.MemoryView":1252
+/* "View.MemoryView":1264
*
* @cname('__pyx_memoryview_copy_contents')
* cdef int memoryview_copy_contents(__Pyx_memviewslice src, # <<<<<<<<<<<<<<
@@ -44696,10 +46745,11 @@ static int __pyx_memoryview_copy_contents(__Pyx_memviewslice __pyx_v_src, __Pyx_
int __pyx_t_3;
int __pyx_t_4;
int __pyx_t_5;
- void *__pyx_t_6;
- int __pyx_t_7;
+ int __pyx_t_6;
+ void *__pyx_t_7;
+ int __pyx_t_8;
- /* "View.MemoryView":1260
+ /* "View.MemoryView":1272
* Check for overlapping memory and verify the shapes.
* """
* cdef void *tmpdata = NULL # <<<<<<<<<<<<<<
@@ -44708,7 +46758,7 @@ static int __pyx_memoryview_copy_contents(__Pyx_memviewslice __pyx_v_src, __Pyx_
*/
__pyx_v_tmpdata = NULL;
- /* "View.MemoryView":1261
+ /* "View.MemoryView":1273
* """
* cdef void *tmpdata = NULL
* cdef size_t itemsize = src.memview.view.itemsize # <<<<<<<<<<<<<<
@@ -44718,7 +46768,7 @@ static int __pyx_memoryview_copy_contents(__Pyx_memviewslice __pyx_v_src, __Pyx_
__pyx_t_1 = __pyx_v_src.memview->view.itemsize;
__pyx_v_itemsize = __pyx_t_1;
- /* "View.MemoryView":1263
+ /* "View.MemoryView":1275
* cdef size_t itemsize = src.memview.view.itemsize
* cdef int i
* cdef char order = get_best_order(&src, src_ndim) # <<<<<<<<<<<<<<
@@ -44727,7 +46777,7 @@ static int __pyx_memoryview_copy_contents(__Pyx_memviewslice __pyx_v_src, __Pyx_
*/
__pyx_v_order = __pyx_get_best_slice_order((&__pyx_v_src), __pyx_v_src_ndim);
- /* "View.MemoryView":1264
+ /* "View.MemoryView":1276
* cdef int i
* cdef char order = get_best_order(&src, src_ndim)
* cdef bint broadcasting = False # <<<<<<<<<<<<<<
@@ -44736,7 +46786,7 @@ static int __pyx_memoryview_copy_contents(__Pyx_memviewslice __pyx_v_src, __Pyx_
*/
__pyx_v_broadcasting = 0;
- /* "View.MemoryView":1265
+ /* "View.MemoryView":1277
* cdef char order = get_best_order(&src, src_ndim)
* cdef bint broadcasting = False
* cdef bint direct_copy = False # <<<<<<<<<<<<<<
@@ -44745,7 +46795,7 @@ static int __pyx_memoryview_copy_contents(__Pyx_memviewslice __pyx_v_src, __Pyx_
*/
__pyx_v_direct_copy = 0;
- /* "View.MemoryView":1268
+ /* "View.MemoryView":1280
* cdef __Pyx_memviewslice tmp
*
* if src_ndim < dst_ndim: # <<<<<<<<<<<<<<
@@ -44755,7 +46805,7 @@ static int __pyx_memoryview_copy_contents(__Pyx_memviewslice __pyx_v_src, __Pyx_
__pyx_t_2 = ((__pyx_v_src_ndim < __pyx_v_dst_ndim) != 0);
if (__pyx_t_2) {
- /* "View.MemoryView":1269
+ /* "View.MemoryView":1281
*
* if src_ndim < dst_ndim:
* broadcast_leading(&src, src_ndim, dst_ndim) # <<<<<<<<<<<<<<
@@ -44764,7 +46814,7 @@ static int __pyx_memoryview_copy_contents(__Pyx_memviewslice __pyx_v_src, __Pyx_
*/
__pyx_memoryview_broadcast_leading((&__pyx_v_src), __pyx_v_src_ndim, __pyx_v_dst_ndim);
- /* "View.MemoryView":1268
+ /* "View.MemoryView":1280
* cdef __Pyx_memviewslice tmp
*
* if src_ndim < dst_ndim: # <<<<<<<<<<<<<<
@@ -44774,7 +46824,7 @@ static int __pyx_memoryview_copy_contents(__Pyx_memviewslice __pyx_v_src, __Pyx_
goto __pyx_L3;
}
- /* "View.MemoryView":1270
+ /* "View.MemoryView":1282
* if src_ndim < dst_ndim:
* broadcast_leading(&src, src_ndim, dst_ndim)
* elif dst_ndim < src_ndim: # <<<<<<<<<<<<<<
@@ -44784,7 +46834,7 @@ static int __pyx_memoryview_copy_contents(__Pyx_memviewslice __pyx_v_src, __Pyx_
__pyx_t_2 = ((__pyx_v_dst_ndim < __pyx_v_src_ndim) != 0);
if (__pyx_t_2) {
- /* "View.MemoryView":1271
+ /* "View.MemoryView":1283
* broadcast_leading(&src, src_ndim, dst_ndim)
* elif dst_ndim < src_ndim:
* broadcast_leading(&dst, dst_ndim, src_ndim) # <<<<<<<<<<<<<<
@@ -44793,7 +46843,7 @@ static int __pyx_memoryview_copy_contents(__Pyx_memviewslice __pyx_v_src, __Pyx_
*/
__pyx_memoryview_broadcast_leading((&__pyx_v_dst), __pyx_v_dst_ndim, __pyx_v_src_ndim);
- /* "View.MemoryView":1270
+ /* "View.MemoryView":1282
* if src_ndim < dst_ndim:
* broadcast_leading(&src, src_ndim, dst_ndim)
* elif dst_ndim < src_ndim: # <<<<<<<<<<<<<<
@@ -44803,7 +46853,7 @@ static int __pyx_memoryview_copy_contents(__Pyx_memviewslice __pyx_v_src, __Pyx_
}
__pyx_L3:;
- /* "View.MemoryView":1273
+ /* "View.MemoryView":1285
* broadcast_leading(&dst, dst_ndim, src_ndim)
*
* cdef int ndim = max(src_ndim, dst_ndim) # <<<<<<<<<<<<<<
@@ -44819,7 +46869,7 @@ static int __pyx_memoryview_copy_contents(__Pyx_memviewslice __pyx_v_src, __Pyx_
}
__pyx_v_ndim = __pyx_t_5;
- /* "View.MemoryView":1275
+ /* "View.MemoryView":1287
* cdef int ndim = max(src_ndim, dst_ndim)
*
* for i in range(ndim): # <<<<<<<<<<<<<<
@@ -44827,10 +46877,11 @@ static int __pyx_memoryview_copy_contents(__Pyx_memviewslice __pyx_v_src, __Pyx_
* if src.shape[i] == 1:
*/
__pyx_t_5 = __pyx_v_ndim;
- for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_5; __pyx_t_3+=1) {
- __pyx_v_i = __pyx_t_3;
+ __pyx_t_3 = __pyx_t_5;
+ for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
+ __pyx_v_i = __pyx_t_4;
- /* "View.MemoryView":1276
+ /* "View.MemoryView":1288
*
* for i in range(ndim):
* if src.shape[i] != dst.shape[i]: # <<<<<<<<<<<<<<
@@ -44840,7 +46891,7 @@ static int __pyx_memoryview_copy_contents(__Pyx_memviewslice __pyx_v_src, __Pyx_
__pyx_t_2 = (((__pyx_v_src.shape[__pyx_v_i]) != (__pyx_v_dst.shape[__pyx_v_i])) != 0);
if (__pyx_t_2) {
- /* "View.MemoryView":1277
+ /* "View.MemoryView":1289
* for i in range(ndim):
* if src.shape[i] != dst.shape[i]:
* if src.shape[i] == 1: # <<<<<<<<<<<<<<
@@ -44850,7 +46901,7 @@ static int __pyx_memoryview_copy_contents(__Pyx_memviewslice __pyx_v_src, __Pyx_
__pyx_t_2 = (((__pyx_v_src.shape[__pyx_v_i]) == 1) != 0);
if (__pyx_t_2) {
- /* "View.MemoryView":1278
+ /* "View.MemoryView":1290
* if src.shape[i] != dst.shape[i]:
* if src.shape[i] == 1:
* broadcasting = True # <<<<<<<<<<<<<<
@@ -44859,7 +46910,7 @@ static int __pyx_memoryview_copy_contents(__Pyx_memviewslice __pyx_v_src, __Pyx_
*/
__pyx_v_broadcasting = 1;
- /* "View.MemoryView":1279
+ /* "View.MemoryView":1291
* if src.shape[i] == 1:
* broadcasting = True
* src.strides[i] = 0 # <<<<<<<<<<<<<<
@@ -44868,7 +46919,7 @@ static int __pyx_memoryview_copy_contents(__Pyx_memviewslice __pyx_v_src, __Pyx_
*/
(__pyx_v_src.strides[__pyx_v_i]) = 0;
- /* "View.MemoryView":1277
+ /* "View.MemoryView":1289
* for i in range(ndim):
* if src.shape[i] != dst.shape[i]:
* if src.shape[i] == 1: # <<<<<<<<<<<<<<
@@ -44878,7 +46929,7 @@ static int __pyx_memoryview_copy_contents(__Pyx_memviewslice __pyx_v_src, __Pyx_
goto __pyx_L7;
}
- /* "View.MemoryView":1281
+ /* "View.MemoryView":1293
* src.strides[i] = 0
* else:
* _err_extents(i, dst.shape[i], src.shape[i]) # <<<<<<<<<<<<<<
@@ -44886,11 +46937,11 @@ static int __pyx_memoryview_copy_contents(__Pyx_memviewslice __pyx_v_src, __Pyx_
* if src.suboffsets[i] >= 0:
*/
/*else*/ {
- __pyx_t_4 = __pyx_memoryview_err_extents(__pyx_v_i, (__pyx_v_dst.shape[__pyx_v_i]), (__pyx_v_src.shape[__pyx_v_i])); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(2, 1281, __pyx_L1_error)
+ __pyx_t_6 = __pyx_memoryview_err_extents(__pyx_v_i, (__pyx_v_dst.shape[__pyx_v_i]), (__pyx_v_src.shape[__pyx_v_i])); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(2, 1293, __pyx_L1_error)
}
__pyx_L7:;
- /* "View.MemoryView":1276
+ /* "View.MemoryView":1288
*
* for i in range(ndim):
* if src.shape[i] != dst.shape[i]: # <<<<<<<<<<<<<<
@@ -44899,7 +46950,7 @@ static int __pyx_memoryview_copy_contents(__Pyx_memviewslice __pyx_v_src, __Pyx_
*/
}
- /* "View.MemoryView":1283
+ /* "View.MemoryView":1295
* _err_extents(i, dst.shape[i], src.shape[i])
*
* if src.suboffsets[i] >= 0: # <<<<<<<<<<<<<<
@@ -44909,16 +46960,16 @@ static int __pyx_memoryview_copy_contents(__Pyx_memviewslice __pyx_v_src, __Pyx_
__pyx_t_2 = (((__pyx_v_src.suboffsets[__pyx_v_i]) >= 0) != 0);
if (__pyx_t_2) {
- /* "View.MemoryView":1284
+ /* "View.MemoryView":1296
*
* if src.suboffsets[i] >= 0:
* _err_dim(ValueError, "Dimension %d is not direct", i) # <<<<<<<<<<<<<<
*
* if slices_overlap(&src, &dst, ndim, itemsize):
*/
- __pyx_t_4 = __pyx_memoryview_err_dim(__pyx_builtin_ValueError, ((char *)"Dimension %d is not direct"), __pyx_v_i); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(2, 1284, __pyx_L1_error)
+ __pyx_t_6 = __pyx_memoryview_err_dim(__pyx_builtin_ValueError, ((char *)"Dimension %d is not direct"), __pyx_v_i); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(2, 1296, __pyx_L1_error)
- /* "View.MemoryView":1283
+ /* "View.MemoryView":1295
* _err_extents(i, dst.shape[i], src.shape[i])
*
* if src.suboffsets[i] >= 0: # <<<<<<<<<<<<<<
@@ -44928,7 +46979,7 @@ static int __pyx_memoryview_copy_contents(__Pyx_memviewslice __pyx_v_src, __Pyx_
}
}
- /* "View.MemoryView":1286
+ /* "View.MemoryView":1298
* _err_dim(ValueError, "Dimension %d is not direct", i)
*
* if slices_overlap(&src, &dst, ndim, itemsize): # <<<<<<<<<<<<<<
@@ -44938,7 +46989,7 @@ static int __pyx_memoryview_copy_contents(__Pyx_memviewslice __pyx_v_src, __Pyx_
__pyx_t_2 = (__pyx_slices_overlap((&__pyx_v_src), (&__pyx_v_dst), __pyx_v_ndim, __pyx_v_itemsize) != 0);
if (__pyx_t_2) {
- /* "View.MemoryView":1288
+ /* "View.MemoryView":1300
* if slices_overlap(&src, &dst, ndim, itemsize):
*
* if not slice_is_contig(src, order, ndim): # <<<<<<<<<<<<<<
@@ -44948,7 +46999,7 @@ static int __pyx_memoryview_copy_contents(__Pyx_memviewslice __pyx_v_src, __Pyx_
__pyx_t_2 = ((!(__pyx_memviewslice_is_contig(__pyx_v_src, __pyx_v_order, __pyx_v_ndim) != 0)) != 0);
if (__pyx_t_2) {
- /* "View.MemoryView":1289
+ /* "View.MemoryView":1301
*
* if not slice_is_contig(src, order, ndim):
* order = get_best_order(&dst, ndim) # <<<<<<<<<<<<<<
@@ -44957,7 +47008,7 @@ static int __pyx_memoryview_copy_contents(__Pyx_memviewslice __pyx_v_src, __Pyx_
*/
__pyx_v_order = __pyx_get_best_slice_order((&__pyx_v_dst), __pyx_v_ndim);
- /* "View.MemoryView":1288
+ /* "View.MemoryView":1300
* if slices_overlap(&src, &dst, ndim, itemsize):
*
* if not slice_is_contig(src, order, ndim): # <<<<<<<<<<<<<<
@@ -44966,17 +47017,17 @@ static int __pyx_memoryview_copy_contents(__Pyx_memviewslice __pyx_v_src, __Pyx_
*/
}
- /* "View.MemoryView":1291
+ /* "View.MemoryView":1303
* order = get_best_order(&dst, ndim)
*
* tmpdata = copy_data_to_temp(&src, &tmp, order, ndim) # <<<<<<<<<<<<<<
* src = tmp
*
*/
- __pyx_t_6 = __pyx_memoryview_copy_data_to_temp((&__pyx_v_src), (&__pyx_v_tmp), __pyx_v_order, __pyx_v_ndim); if (unlikely(__pyx_t_6 == NULL)) __PYX_ERR(2, 1291, __pyx_L1_error)
- __pyx_v_tmpdata = __pyx_t_6;
+ __pyx_t_7 = __pyx_memoryview_copy_data_to_temp((&__pyx_v_src), (&__pyx_v_tmp), __pyx_v_order, __pyx_v_ndim); if (unlikely(__pyx_t_7 == ((void *)NULL))) __PYX_ERR(2, 1303, __pyx_L1_error)
+ __pyx_v_tmpdata = __pyx_t_7;
- /* "View.MemoryView":1292
+ /* "View.MemoryView":1304
*
* tmpdata = copy_data_to_temp(&src, &tmp, order, ndim)
* src = tmp # <<<<<<<<<<<<<<
@@ -44985,7 +47036,7 @@ static int __pyx_memoryview_copy_contents(__Pyx_memviewslice __pyx_v_src, __Pyx_
*/
__pyx_v_src = __pyx_v_tmp;
- /* "View.MemoryView":1286
+ /* "View.MemoryView":1298
* _err_dim(ValueError, "Dimension %d is not direct", i)
*
* if slices_overlap(&src, &dst, ndim, itemsize): # <<<<<<<<<<<<<<
@@ -44994,7 +47045,7 @@ static int __pyx_memoryview_copy_contents(__Pyx_memviewslice __pyx_v_src, __Pyx_
*/
}
- /* "View.MemoryView":1294
+ /* "View.MemoryView":1306
* src = tmp
*
* if not broadcasting: # <<<<<<<<<<<<<<
@@ -45004,7 +47055,7 @@ static int __pyx_memoryview_copy_contents(__Pyx_memviewslice __pyx_v_src, __Pyx_
__pyx_t_2 = ((!(__pyx_v_broadcasting != 0)) != 0);
if (__pyx_t_2) {
- /* "View.MemoryView":1297
+ /* "View.MemoryView":1309
*
*
* if slice_is_contig(src, 'C', ndim): # <<<<<<<<<<<<<<
@@ -45014,7 +47065,7 @@ static int __pyx_memoryview_copy_contents(__Pyx_memviewslice __pyx_v_src, __Pyx_
__pyx_t_2 = (__pyx_memviewslice_is_contig(__pyx_v_src, 'C', __pyx_v_ndim) != 0);
if (__pyx_t_2) {
- /* "View.MemoryView":1298
+ /* "View.MemoryView":1310
*
* if slice_is_contig(src, 'C', ndim):
* direct_copy = slice_is_contig(dst, 'C', ndim) # <<<<<<<<<<<<<<
@@ -45023,7 +47074,7 @@ static int __pyx_memoryview_copy_contents(__Pyx_memviewslice __pyx_v_src, __Pyx_
*/
__pyx_v_direct_copy = __pyx_memviewslice_is_contig(__pyx_v_dst, 'C', __pyx_v_ndim);
- /* "View.MemoryView":1297
+ /* "View.MemoryView":1309
*
*
* if slice_is_contig(src, 'C', ndim): # <<<<<<<<<<<<<<
@@ -45033,7 +47084,7 @@ static int __pyx_memoryview_copy_contents(__Pyx_memviewslice __pyx_v_src, __Pyx_
goto __pyx_L12;
}
- /* "View.MemoryView":1299
+ /* "View.MemoryView":1311
* if slice_is_contig(src, 'C', ndim):
* direct_copy = slice_is_contig(dst, 'C', ndim)
* elif slice_is_contig(src, 'F', ndim): # <<<<<<<<<<<<<<
@@ -45043,7 +47094,7 @@ static int __pyx_memoryview_copy_contents(__Pyx_memviewslice __pyx_v_src, __Pyx_
__pyx_t_2 = (__pyx_memviewslice_is_contig(__pyx_v_src, 'F', __pyx_v_ndim) != 0);
if (__pyx_t_2) {
- /* "View.MemoryView":1300
+ /* "View.MemoryView":1312
* direct_copy = slice_is_contig(dst, 'C', ndim)
* elif slice_is_contig(src, 'F', ndim):
* direct_copy = slice_is_contig(dst, 'F', ndim) # <<<<<<<<<<<<<<
@@ -45052,7 +47103,7 @@ static int __pyx_memoryview_copy_contents(__Pyx_memviewslice __pyx_v_src, __Pyx_
*/
__pyx_v_direct_copy = __pyx_memviewslice_is_contig(__pyx_v_dst, 'F', __pyx_v_ndim);
- /* "View.MemoryView":1299
+ /* "View.MemoryView":1311
* if slice_is_contig(src, 'C', ndim):
* direct_copy = slice_is_contig(dst, 'C', ndim)
* elif slice_is_contig(src, 'F', ndim): # <<<<<<<<<<<<<<
@@ -45062,7 +47113,7 @@ static int __pyx_memoryview_copy_contents(__Pyx_memviewslice __pyx_v_src, __Pyx_
}
__pyx_L12:;
- /* "View.MemoryView":1302
+ /* "View.MemoryView":1314
* direct_copy = slice_is_contig(dst, 'F', ndim)
*
* if direct_copy: # <<<<<<<<<<<<<<
@@ -45072,7 +47123,7 @@ static int __pyx_memoryview_copy_contents(__Pyx_memviewslice __pyx_v_src, __Pyx_
__pyx_t_2 = (__pyx_v_direct_copy != 0);
if (__pyx_t_2) {
- /* "View.MemoryView":1304
+ /* "View.MemoryView":1316
* if direct_copy:
*
* refcount_copying(&dst, dtype_is_object, ndim, False) # <<<<<<<<<<<<<<
@@ -45081,16 +47132,16 @@ static int __pyx_memoryview_copy_contents(__Pyx_memviewslice __pyx_v_src, __Pyx_
*/
__pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 0);
- /* "View.MemoryView":1305
+ /* "View.MemoryView":1317
*
* refcount_copying(&dst, dtype_is_object, ndim, False)
* memcpy(dst.data, src.data, slice_get_size(&src, ndim)) # <<<<<<<<<<<<<<
* refcount_copying(&dst, dtype_is_object, ndim, True)
* free(tmpdata)
*/
- memcpy(__pyx_v_dst.data, __pyx_v_src.data, __pyx_memoryview_slice_get_size((&__pyx_v_src), __pyx_v_ndim));
+ (void)(memcpy(__pyx_v_dst.data, __pyx_v_src.data, __pyx_memoryview_slice_get_size((&__pyx_v_src), __pyx_v_ndim)));
- /* "View.MemoryView":1306
+ /* "View.MemoryView":1318
* refcount_copying(&dst, dtype_is_object, ndim, False)
* memcpy(dst.data, src.data, slice_get_size(&src, ndim))
* refcount_copying(&dst, dtype_is_object, ndim, True) # <<<<<<<<<<<<<<
@@ -45099,7 +47150,7 @@ static int __pyx_memoryview_copy_contents(__Pyx_memviewslice __pyx_v_src, __Pyx_
*/
__pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 1);
- /* "View.MemoryView":1307
+ /* "View.MemoryView":1319
* memcpy(dst.data, src.data, slice_get_size(&src, ndim))
* refcount_copying(&dst, dtype_is_object, ndim, True)
* free(tmpdata) # <<<<<<<<<<<<<<
@@ -45108,7 +47159,7 @@ static int __pyx_memoryview_copy_contents(__Pyx_memviewslice __pyx_v_src, __Pyx_
*/
free(__pyx_v_tmpdata);
- /* "View.MemoryView":1308
+ /* "View.MemoryView":1320
* refcount_copying(&dst, dtype_is_object, ndim, True)
* free(tmpdata)
* return 0 # <<<<<<<<<<<<<<
@@ -45118,7 +47169,7 @@ static int __pyx_memoryview_copy_contents(__Pyx_memviewslice __pyx_v_src, __Pyx_
__pyx_r = 0;
goto __pyx_L0;
- /* "View.MemoryView":1302
+ /* "View.MemoryView":1314
* direct_copy = slice_is_contig(dst, 'F', ndim)
*
* if direct_copy: # <<<<<<<<<<<<<<
@@ -45127,7 +47178,7 @@ static int __pyx_memoryview_copy_contents(__Pyx_memviewslice __pyx_v_src, __Pyx_
*/
}
- /* "View.MemoryView":1294
+ /* "View.MemoryView":1306
* src = tmp
*
* if not broadcasting: # <<<<<<<<<<<<<<
@@ -45136,7 +47187,7 @@ static int __pyx_memoryview_copy_contents(__Pyx_memviewslice __pyx_v_src, __Pyx_
*/
}
- /* "View.MemoryView":1310
+ /* "View.MemoryView":1322
* return 0
*
* if order == 'F' == get_best_order(&dst, ndim): # <<<<<<<<<<<<<<
@@ -45147,28 +47198,28 @@ static int __pyx_memoryview_copy_contents(__Pyx_memviewslice __pyx_v_src, __Pyx_
if (__pyx_t_2) {
__pyx_t_2 = ('F' == __pyx_get_best_slice_order((&__pyx_v_dst), __pyx_v_ndim));
}
- __pyx_t_7 = (__pyx_t_2 != 0);
- if (__pyx_t_7) {
+ __pyx_t_8 = (__pyx_t_2 != 0);
+ if (__pyx_t_8) {
- /* "View.MemoryView":1313
+ /* "View.MemoryView":1325
*
*
* transpose_memslice(&src) # <<<<<<<<<<<<<<
* transpose_memslice(&dst)
*
*/
- __pyx_t_5 = __pyx_memslice_transpose((&__pyx_v_src)); if (unlikely(__pyx_t_5 == 0)) __PYX_ERR(2, 1313, __pyx_L1_error)
+ __pyx_t_5 = __pyx_memslice_transpose((&__pyx_v_src)); if (unlikely(__pyx_t_5 == ((int)0))) __PYX_ERR(2, 1325, __pyx_L1_error)
- /* "View.MemoryView":1314
+ /* "View.MemoryView":1326
*
* transpose_memslice(&src)
* transpose_memslice(&dst) # <<<<<<<<<<<<<<
*
* refcount_copying(&dst, dtype_is_object, ndim, False)
*/
- __pyx_t_5 = __pyx_memslice_transpose((&__pyx_v_dst)); if (unlikely(__pyx_t_5 == 0)) __PYX_ERR(2, 1314, __pyx_L1_error)
+ __pyx_t_5 = __pyx_memslice_transpose((&__pyx_v_dst)); if (unlikely(__pyx_t_5 == ((int)0))) __PYX_ERR(2, 1326, __pyx_L1_error)
- /* "View.MemoryView":1310
+ /* "View.MemoryView":1322
* return 0
*
* if order == 'F' == get_best_order(&dst, ndim): # <<<<<<<<<<<<<<
@@ -45177,7 +47228,7 @@ static int __pyx_memoryview_copy_contents(__Pyx_memviewslice __pyx_v_src, __Pyx_
*/
}
- /* "View.MemoryView":1316
+ /* "View.MemoryView":1328
* transpose_memslice(&dst)
*
* refcount_copying(&dst, dtype_is_object, ndim, False) # <<<<<<<<<<<<<<
@@ -45186,7 +47237,7 @@ static int __pyx_memoryview_copy_contents(__Pyx_memviewslice __pyx_v_src, __Pyx_
*/
__pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 0);
- /* "View.MemoryView":1317
+ /* "View.MemoryView":1329
*
* refcount_copying(&dst, dtype_is_object, ndim, False)
* copy_strided_to_strided(&src, &dst, ndim, itemsize) # <<<<<<<<<<<<<<
@@ -45195,7 +47246,7 @@ static int __pyx_memoryview_copy_contents(__Pyx_memviewslice __pyx_v_src, __Pyx_
*/
copy_strided_to_strided((&__pyx_v_src), (&__pyx_v_dst), __pyx_v_ndim, __pyx_v_itemsize);
- /* "View.MemoryView":1318
+ /* "View.MemoryView":1330
* refcount_copying(&dst, dtype_is_object, ndim, False)
* copy_strided_to_strided(&src, &dst, ndim, itemsize)
* refcount_copying(&dst, dtype_is_object, ndim, True) # <<<<<<<<<<<<<<
@@ -45204,7 +47255,7 @@ static int __pyx_memoryview_copy_contents(__Pyx_memviewslice __pyx_v_src, __Pyx_
*/
__pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 1);
- /* "View.MemoryView":1320
+ /* "View.MemoryView":1332
* refcount_copying(&dst, dtype_is_object, ndim, True)
*
* free(tmpdata) # <<<<<<<<<<<<<<
@@ -45213,7 +47264,7 @@ static int __pyx_memoryview_copy_contents(__Pyx_memviewslice __pyx_v_src, __Pyx_
*/
free(__pyx_v_tmpdata);
- /* "View.MemoryView":1321
+ /* "View.MemoryView":1333
*
* free(tmpdata)
* return 0 # <<<<<<<<<<<<<<
@@ -45223,7 +47274,7 @@ static int __pyx_memoryview_copy_contents(__Pyx_memviewslice __pyx_v_src, __Pyx_
__pyx_r = 0;
goto __pyx_L0;
- /* "View.MemoryView":1252
+ /* "View.MemoryView":1264
*
* @cname('__pyx_memoryview_copy_contents')
* cdef int memoryview_copy_contents(__Pyx_memviewslice src, # <<<<<<<<<<<<<<
@@ -45235,11 +47286,11 @@ static int __pyx_memoryview_copy_contents(__Pyx_memviewslice __pyx_v_src, __Pyx_
__pyx_L1_error:;
{
#ifdef WITH_THREAD
- PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();
+ PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
#endif
__Pyx_AddTraceback("View.MemoryView.memoryview_copy_contents", __pyx_clineno, __pyx_lineno, __pyx_filename);
#ifdef WITH_THREAD
- PyGILState_Release(__pyx_gilstate_save);
+ __Pyx_PyGILState_Release(__pyx_gilstate_save);
#endif
}
__pyx_r = -1;
@@ -45247,7 +47298,7 @@ static int __pyx_memoryview_copy_contents(__Pyx_memviewslice __pyx_v_src, __Pyx_
return __pyx_r;
}
-/* "View.MemoryView":1324
+/* "View.MemoryView":1336
*
* @cname('__pyx_memoryview_broadcast_leading')
* cdef void broadcast_leading(__Pyx_memviewslice *mslice, # <<<<<<<<<<<<<<
@@ -45260,8 +47311,9 @@ static void __pyx_memoryview_broadcast_leading(__Pyx_memviewslice *__pyx_v_mslic
int __pyx_v_offset;
int __pyx_t_1;
int __pyx_t_2;
+ int __pyx_t_3;
- /* "View.MemoryView":1328
+ /* "View.MemoryView":1340
* int ndim_other) nogil:
* cdef int i
* cdef int offset = ndim_other - ndim # <<<<<<<<<<<<<<
@@ -45270,17 +47322,17 @@ static void __pyx_memoryview_broadcast_leading(__Pyx_memviewslice *__pyx_v_mslic
*/
__pyx_v_offset = (__pyx_v_ndim_other - __pyx_v_ndim);
- /* "View.MemoryView":1330
+ /* "View.MemoryView":1342
* cdef int offset = ndim_other - ndim
*
* for i in range(ndim - 1, -1, -1): # <<<<<<<<<<<<<<
* mslice.shape[i + offset] = mslice.shape[i]
* mslice.strides[i + offset] = mslice.strides[i]
*/
- for (__pyx_t_1 = (__pyx_v_ndim - 1); __pyx_t_1 > -1L; __pyx_t_1-=1) {
+ for (__pyx_t_1 = (__pyx_v_ndim - 1); __pyx_t_1 > -1; __pyx_t_1-=1) {
__pyx_v_i = __pyx_t_1;
- /* "View.MemoryView":1331
+ /* "View.MemoryView":1343
*
* for i in range(ndim - 1, -1, -1):
* mslice.shape[i + offset] = mslice.shape[i] # <<<<<<<<<<<<<<
@@ -45289,7 +47341,7 @@ static void __pyx_memoryview_broadcast_leading(__Pyx_memviewslice *__pyx_v_mslic
*/
(__pyx_v_mslice->shape[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->shape[__pyx_v_i]);
- /* "View.MemoryView":1332
+ /* "View.MemoryView":1344
* for i in range(ndim - 1, -1, -1):
* mslice.shape[i + offset] = mslice.shape[i]
* mslice.strides[i + offset] = mslice.strides[i] # <<<<<<<<<<<<<<
@@ -45298,7 +47350,7 @@ static void __pyx_memoryview_broadcast_leading(__Pyx_memviewslice *__pyx_v_mslic
*/
(__pyx_v_mslice->strides[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->strides[__pyx_v_i]);
- /* "View.MemoryView":1333
+ /* "View.MemoryView":1345
* mslice.shape[i + offset] = mslice.shape[i]
* mslice.strides[i + offset] = mslice.strides[i]
* mslice.suboffsets[i + offset] = mslice.suboffsets[i] # <<<<<<<<<<<<<<
@@ -45308,7 +47360,7 @@ static void __pyx_memoryview_broadcast_leading(__Pyx_memviewslice *__pyx_v_mslic
(__pyx_v_mslice->suboffsets[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->suboffsets[__pyx_v_i]);
}
- /* "View.MemoryView":1335
+ /* "View.MemoryView":1347
* mslice.suboffsets[i + offset] = mslice.suboffsets[i]
*
* for i in range(offset): # <<<<<<<<<<<<<<
@@ -45316,10 +47368,11 @@ static void __pyx_memoryview_broadcast_leading(__Pyx_memviewslice *__pyx_v_mslic
* mslice.strides[i] = mslice.strides[0]
*/
__pyx_t_1 = __pyx_v_offset;
- for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
- __pyx_v_i = __pyx_t_2;
+ __pyx_t_2 = __pyx_t_1;
+ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
+ __pyx_v_i = __pyx_t_3;
- /* "View.MemoryView":1336
+ /* "View.MemoryView":1348
*
* for i in range(offset):
* mslice.shape[i] = 1 # <<<<<<<<<<<<<<
@@ -45328,7 +47381,7 @@ static void __pyx_memoryview_broadcast_leading(__Pyx_memviewslice *__pyx_v_mslic
*/
(__pyx_v_mslice->shape[__pyx_v_i]) = 1;
- /* "View.MemoryView":1337
+ /* "View.MemoryView":1349
* for i in range(offset):
* mslice.shape[i] = 1
* mslice.strides[i] = mslice.strides[0] # <<<<<<<<<<<<<<
@@ -45337,7 +47390,7 @@ static void __pyx_memoryview_broadcast_leading(__Pyx_memviewslice *__pyx_v_mslic
*/
(__pyx_v_mslice->strides[__pyx_v_i]) = (__pyx_v_mslice->strides[0]);
- /* "View.MemoryView":1338
+ /* "View.MemoryView":1350
* mslice.shape[i] = 1
* mslice.strides[i] = mslice.strides[0]
* mslice.suboffsets[i] = -1 # <<<<<<<<<<<<<<
@@ -45347,7 +47400,7 @@ static void __pyx_memoryview_broadcast_leading(__Pyx_memviewslice *__pyx_v_mslic
(__pyx_v_mslice->suboffsets[__pyx_v_i]) = -1L;
}
- /* "View.MemoryView":1324
+ /* "View.MemoryView":1336
*
* @cname('__pyx_memoryview_broadcast_leading')
* cdef void broadcast_leading(__Pyx_memviewslice *mslice, # <<<<<<<<<<<<<<
@@ -45358,7 +47411,7 @@ static void __pyx_memoryview_broadcast_leading(__Pyx_memviewslice *__pyx_v_mslic
/* function exit code */
}
-/* "View.MemoryView":1346
+/* "View.MemoryView":1358
*
* @cname('__pyx_memoryview_refcount_copying')
* cdef void refcount_copying(__Pyx_memviewslice *dst, bint dtype_is_object, # <<<<<<<<<<<<<<
@@ -45369,7 +47422,7 @@ static void __pyx_memoryview_broadcast_leading(__Pyx_memviewslice *__pyx_v_mslic
static void __pyx_memoryview_refcount_copying(__Pyx_memviewslice *__pyx_v_dst, int __pyx_v_dtype_is_object, int __pyx_v_ndim, int __pyx_v_inc) {
int __pyx_t_1;
- /* "View.MemoryView":1350
+ /* "View.MemoryView":1362
*
*
* if dtype_is_object: # <<<<<<<<<<<<<<
@@ -45379,7 +47432,7 @@ static void __pyx_memoryview_refcount_copying(__Pyx_memviewslice *__pyx_v_dst, i
__pyx_t_1 = (__pyx_v_dtype_is_object != 0);
if (__pyx_t_1) {
- /* "View.MemoryView":1351
+ /* "View.MemoryView":1363
*
* if dtype_is_object:
* refcount_objects_in_slice_with_gil(dst.data, dst.shape, # <<<<<<<<<<<<<<
@@ -45388,7 +47441,7 @@ static void __pyx_memoryview_refcount_copying(__Pyx_memviewslice *__pyx_v_dst, i
*/
__pyx_memoryview_refcount_objects_in_slice_with_gil(__pyx_v_dst->data, __pyx_v_dst->shape, __pyx_v_dst->strides, __pyx_v_ndim, __pyx_v_inc);
- /* "View.MemoryView":1350
+ /* "View.MemoryView":1362
*
*
* if dtype_is_object: # <<<<<<<<<<<<<<
@@ -45397,7 +47450,7 @@ static void __pyx_memoryview_refcount_copying(__Pyx_memviewslice *__pyx_v_dst, i
*/
}
- /* "View.MemoryView":1346
+ /* "View.MemoryView":1358
*
* @cname('__pyx_memoryview_refcount_copying')
* cdef void refcount_copying(__Pyx_memviewslice *dst, bint dtype_is_object, # <<<<<<<<<<<<<<
@@ -45408,7 +47461,7 @@ static void __pyx_memoryview_refcount_copying(__Pyx_memviewslice *__pyx_v_dst, i
/* function exit code */
}
-/* "View.MemoryView":1355
+/* "View.MemoryView":1367
*
* @cname('__pyx_memoryview_refcount_objects_in_slice_with_gil')
* cdef void refcount_objects_in_slice_with_gil(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<<
@@ -45419,11 +47472,11 @@ static void __pyx_memoryview_refcount_copying(__Pyx_memviewslice *__pyx_v_dst, i
static void __pyx_memoryview_refcount_objects_in_slice_with_gil(char *__pyx_v_data, Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, int __pyx_v_ndim, int __pyx_v_inc) {
__Pyx_RefNannyDeclarations
#ifdef WITH_THREAD
- PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();
+ PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
#endif
__Pyx_RefNannySetupContext("refcount_objects_in_slice_with_gil", 0);
- /* "View.MemoryView":1358
+ /* "View.MemoryView":1370
* Py_ssize_t *strides, int ndim,
* bint inc) with gil:
* refcount_objects_in_slice(data, shape, strides, ndim, inc) # <<<<<<<<<<<<<<
@@ -45432,7 +47485,7 @@ static void __pyx_memoryview_refcount_objects_in_slice_with_gil(char *__pyx_v_da
*/
__pyx_memoryview_refcount_objects_in_slice(__pyx_v_data, __pyx_v_shape, __pyx_v_strides, __pyx_v_ndim, __pyx_v_inc);
- /* "View.MemoryView":1355
+ /* "View.MemoryView":1367
*
* @cname('__pyx_memoryview_refcount_objects_in_slice_with_gil')
* cdef void refcount_objects_in_slice_with_gil(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<<
@@ -45443,11 +47496,11 @@ static void __pyx_memoryview_refcount_objects_in_slice_with_gil(char *__pyx_v_da
/* function exit code */
__Pyx_RefNannyFinishContext();
#ifdef WITH_THREAD
- PyGILState_Release(__pyx_gilstate_save);
+ __Pyx_PyGILState_Release(__pyx_gilstate_save);
#endif
}
-/* "View.MemoryView":1361
+/* "View.MemoryView":1373
*
* @cname('__pyx_memoryview_refcount_objects_in_slice')
* cdef void refcount_objects_in_slice(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<<
@@ -45460,10 +47513,11 @@ static void __pyx_memoryview_refcount_objects_in_slice(char *__pyx_v_data, Py_ss
__Pyx_RefNannyDeclarations
Py_ssize_t __pyx_t_1;
Py_ssize_t __pyx_t_2;
- int __pyx_t_3;
+ Py_ssize_t __pyx_t_3;
+ int __pyx_t_4;
__Pyx_RefNannySetupContext("refcount_objects_in_slice", 0);
- /* "View.MemoryView":1365
+ /* "View.MemoryView":1377
* cdef Py_ssize_t i
*
* for i in range(shape[0]): # <<<<<<<<<<<<<<
@@ -45471,30 +47525,31 @@ static void __pyx_memoryview_refcount_objects_in_slice(char *__pyx_v_data, Py_ss
* if inc:
*/
__pyx_t_1 = (__pyx_v_shape[0]);
- for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
- __pyx_v_i = __pyx_t_2;
+ __pyx_t_2 = __pyx_t_1;
+ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
+ __pyx_v_i = __pyx_t_3;
- /* "View.MemoryView":1366
+ /* "View.MemoryView":1378
*
* for i in range(shape[0]):
* if ndim == 1: # <<<<<<<<<<<<<<
* if inc:
* Py_INCREF((<PyObject **> data)[0])
*/
- __pyx_t_3 = ((__pyx_v_ndim == 1) != 0);
- if (__pyx_t_3) {
+ __pyx_t_4 = ((__pyx_v_ndim == 1) != 0);
+ if (__pyx_t_4) {
- /* "View.MemoryView":1367
+ /* "View.MemoryView":1379
* for i in range(shape[0]):
* if ndim == 1:
* if inc: # <<<<<<<<<<<<<<
* Py_INCREF((<PyObject **> data)[0])
* else:
*/
- __pyx_t_3 = (__pyx_v_inc != 0);
- if (__pyx_t_3) {
+ __pyx_t_4 = (__pyx_v_inc != 0);
+ if (__pyx_t_4) {
- /* "View.MemoryView":1368
+ /* "View.MemoryView":1380
* if ndim == 1:
* if inc:
* Py_INCREF((<PyObject **> data)[0]) # <<<<<<<<<<<<<<
@@ -45503,7 +47558,7 @@ static void __pyx_memoryview_refcount_objects_in_slice(char *__pyx_v_data, Py_ss
*/
Py_INCREF((((PyObject **)__pyx_v_data)[0]));
- /* "View.MemoryView":1367
+ /* "View.MemoryView":1379
* for i in range(shape[0]):
* if ndim == 1:
* if inc: # <<<<<<<<<<<<<<
@@ -45513,7 +47568,7 @@ static void __pyx_memoryview_refcount_objects_in_slice(char *__pyx_v_data, Py_ss
goto __pyx_L6;
}
- /* "View.MemoryView":1370
+ /* "View.MemoryView":1382
* Py_INCREF((<PyObject **> data)[0])
* else:
* Py_DECREF((<PyObject **> data)[0]) # <<<<<<<<<<<<<<
@@ -45525,7 +47580,7 @@ static void __pyx_memoryview_refcount_objects_in_slice(char *__pyx_v_data, Py_ss
}
__pyx_L6:;
- /* "View.MemoryView":1366
+ /* "View.MemoryView":1378
*
* for i in range(shape[0]):
* if ndim == 1: # <<<<<<<<<<<<<<
@@ -45535,7 +47590,7 @@ static void __pyx_memoryview_refcount_objects_in_slice(char *__pyx_v_data, Py_ss
goto __pyx_L5;
}
- /* "View.MemoryView":1372
+ /* "View.MemoryView":1384
* Py_DECREF((<PyObject **> data)[0])
* else:
* refcount_objects_in_slice(data, shape + 1, strides + 1, # <<<<<<<<<<<<<<
@@ -45544,7 +47599,7 @@ static void __pyx_memoryview_refcount_objects_in_slice(char *__pyx_v_data, Py_ss
*/
/*else*/ {
- /* "View.MemoryView":1373
+ /* "View.MemoryView":1385
* else:
* refcount_objects_in_slice(data, shape + 1, strides + 1,
* ndim - 1, inc) # <<<<<<<<<<<<<<
@@ -45555,7 +47610,7 @@ static void __pyx_memoryview_refcount_objects_in_slice(char *__pyx_v_data, Py_ss
}
__pyx_L5:;
- /* "View.MemoryView":1375
+ /* "View.MemoryView":1387
* ndim - 1, inc)
*
* data += strides[0] # <<<<<<<<<<<<<<
@@ -45565,7 +47620,7 @@ static void __pyx_memoryview_refcount_objects_in_slice(char *__pyx_v_data, Py_ss
__pyx_v_data = (__pyx_v_data + (__pyx_v_strides[0]));
}
- /* "View.MemoryView":1361
+ /* "View.MemoryView":1373
*
* @cname('__pyx_memoryview_refcount_objects_in_slice')
* cdef void refcount_objects_in_slice(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<<
@@ -45577,7 +47632,7 @@ static void __pyx_memoryview_refcount_objects_in_slice(char *__pyx_v_data, Py_ss
__Pyx_RefNannyFinishContext();
}
-/* "View.MemoryView":1381
+/* "View.MemoryView":1393
*
* @cname('__pyx_memoryview_slice_assign_scalar')
* cdef void slice_assign_scalar(__Pyx_memviewslice *dst, int ndim, # <<<<<<<<<<<<<<
@@ -45587,7 +47642,7 @@ static void __pyx_memoryview_refcount_objects_in_slice(char *__pyx_v_data, Py_ss
static void __pyx_memoryview_slice_assign_scalar(__Pyx_memviewslice *__pyx_v_dst, int __pyx_v_ndim, size_t __pyx_v_itemsize, void *__pyx_v_item, int __pyx_v_dtype_is_object) {
- /* "View.MemoryView":1384
+ /* "View.MemoryView":1396
* size_t itemsize, void *item,
* bint dtype_is_object) nogil:
* refcount_copying(dst, dtype_is_object, ndim, False) # <<<<<<<<<<<<<<
@@ -45596,7 +47651,7 @@ static void __pyx_memoryview_slice_assign_scalar(__Pyx_memviewslice *__pyx_v_dst
*/
__pyx_memoryview_refcount_copying(__pyx_v_dst, __pyx_v_dtype_is_object, __pyx_v_ndim, 0);
- /* "View.MemoryView":1385
+ /* "View.MemoryView":1397
* bint dtype_is_object) nogil:
* refcount_copying(dst, dtype_is_object, ndim, False)
* _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim, # <<<<<<<<<<<<<<
@@ -45605,7 +47660,7 @@ static void __pyx_memoryview_slice_assign_scalar(__Pyx_memviewslice *__pyx_v_dst
*/
__pyx_memoryview__slice_assign_scalar(__pyx_v_dst->data, __pyx_v_dst->shape, __pyx_v_dst->strides, __pyx_v_ndim, __pyx_v_itemsize, __pyx_v_item);
- /* "View.MemoryView":1387
+ /* "View.MemoryView":1399
* _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim,
* itemsize, item)
* refcount_copying(dst, dtype_is_object, ndim, True) # <<<<<<<<<<<<<<
@@ -45614,7 +47669,7 @@ static void __pyx_memoryview_slice_assign_scalar(__Pyx_memviewslice *__pyx_v_dst
*/
__pyx_memoryview_refcount_copying(__pyx_v_dst, __pyx_v_dtype_is_object, __pyx_v_ndim, 1);
- /* "View.MemoryView":1381
+ /* "View.MemoryView":1393
*
* @cname('__pyx_memoryview_slice_assign_scalar')
* cdef void slice_assign_scalar(__Pyx_memviewslice *dst, int ndim, # <<<<<<<<<<<<<<
@@ -45625,7 +47680,7 @@ static void __pyx_memoryview_slice_assign_scalar(__Pyx_memviewslice *__pyx_v_dst
/* function exit code */
}
-/* "View.MemoryView":1391
+/* "View.MemoryView":1403
*
* @cname('__pyx_memoryview__slice_assign_scalar')
* cdef void _slice_assign_scalar(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<<
@@ -45640,8 +47695,9 @@ static void __pyx_memoryview__slice_assign_scalar(char *__pyx_v_data, Py_ssize_t
int __pyx_t_1;
Py_ssize_t __pyx_t_2;
Py_ssize_t __pyx_t_3;
+ Py_ssize_t __pyx_t_4;
- /* "View.MemoryView":1395
+ /* "View.MemoryView":1407
* size_t itemsize, void *item) nogil:
* cdef Py_ssize_t i
* cdef Py_ssize_t stride = strides[0] # <<<<<<<<<<<<<<
@@ -45650,7 +47706,7 @@ static void __pyx_memoryview__slice_assign_scalar(char *__pyx_v_data, Py_ssize_t
*/
__pyx_v_stride = (__pyx_v_strides[0]);
- /* "View.MemoryView":1396
+ /* "View.MemoryView":1408
* cdef Py_ssize_t i
* cdef Py_ssize_t stride = strides[0]
* cdef Py_ssize_t extent = shape[0] # <<<<<<<<<<<<<<
@@ -45659,7 +47715,7 @@ static void __pyx_memoryview__slice_assign_scalar(char *__pyx_v_data, Py_ssize_t
*/
__pyx_v_extent = (__pyx_v_shape[0]);
- /* "View.MemoryView":1398
+ /* "View.MemoryView":1410
* cdef Py_ssize_t extent = shape[0]
*
* if ndim == 1: # <<<<<<<<<<<<<<
@@ -45669,7 +47725,7 @@ static void __pyx_memoryview__slice_assign_scalar(char *__pyx_v_data, Py_ssize_t
__pyx_t_1 = ((__pyx_v_ndim == 1) != 0);
if (__pyx_t_1) {
- /* "View.MemoryView":1399
+ /* "View.MemoryView":1411
*
* if ndim == 1:
* for i in range(extent): # <<<<<<<<<<<<<<
@@ -45677,19 +47733,20 @@ static void __pyx_memoryview__slice_assign_scalar(char *__pyx_v_data, Py_ssize_t
* data += stride
*/
__pyx_t_2 = __pyx_v_extent;
- for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
- __pyx_v_i = __pyx_t_3;
+ __pyx_t_3 = __pyx_t_2;
+ for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
+ __pyx_v_i = __pyx_t_4;
- /* "View.MemoryView":1400
+ /* "View.MemoryView":1412
* if ndim == 1:
* for i in range(extent):
* memcpy(data, item, itemsize) # <<<<<<<<<<<<<<
* data += stride
* else:
*/
- memcpy(__pyx_v_data, __pyx_v_item, __pyx_v_itemsize);
+ (void)(memcpy(__pyx_v_data, __pyx_v_item, __pyx_v_itemsize));
- /* "View.MemoryView":1401
+ /* "View.MemoryView":1413
* for i in range(extent):
* memcpy(data, item, itemsize)
* data += stride # <<<<<<<<<<<<<<
@@ -45699,7 +47756,7 @@ static void __pyx_memoryview__slice_assign_scalar(char *__pyx_v_data, Py_ssize_t
__pyx_v_data = (__pyx_v_data + __pyx_v_stride);
}
- /* "View.MemoryView":1398
+ /* "View.MemoryView":1410
* cdef Py_ssize_t extent = shape[0]
*
* if ndim == 1: # <<<<<<<<<<<<<<
@@ -45709,7 +47766,7 @@ static void __pyx_memoryview__slice_assign_scalar(char *__pyx_v_data, Py_ssize_t
goto __pyx_L3;
}
- /* "View.MemoryView":1403
+ /* "View.MemoryView":1415
* data += stride
* else:
* for i in range(extent): # <<<<<<<<<<<<<<
@@ -45718,10 +47775,11 @@ static void __pyx_memoryview__slice_assign_scalar(char *__pyx_v_data, Py_ssize_t
*/
/*else*/ {
__pyx_t_2 = __pyx_v_extent;
- for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
- __pyx_v_i = __pyx_t_3;
+ __pyx_t_3 = __pyx_t_2;
+ for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
+ __pyx_v_i = __pyx_t_4;
- /* "View.MemoryView":1404
+ /* "View.MemoryView":1416
* else:
* for i in range(extent):
* _slice_assign_scalar(data, shape + 1, strides + 1, # <<<<<<<<<<<<<<
@@ -45730,7 +47788,7 @@ static void __pyx_memoryview__slice_assign_scalar(char *__pyx_v_data, Py_ssize_t
*/
__pyx_memoryview__slice_assign_scalar(__pyx_v_data, (__pyx_v_shape + 1), (__pyx_v_strides + 1), (__pyx_v_ndim - 1), __pyx_v_itemsize, __pyx_v_item);
- /* "View.MemoryView":1406
+ /* "View.MemoryView":1418
* _slice_assign_scalar(data, shape + 1, strides + 1,
* ndim - 1, itemsize, item)
* data += stride # <<<<<<<<<<<<<<
@@ -45742,7 +47800,7 @@ static void __pyx_memoryview__slice_assign_scalar(char *__pyx_v_data, Py_ssize_t
}
__pyx_L3:;
- /* "View.MemoryView":1391
+ /* "View.MemoryView":1403
*
* @cname('__pyx_memoryview__slice_assign_scalar')
* cdef void _slice_assign_scalar(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<<
@@ -45752,6 +47810,484 @@ static void __pyx_memoryview__slice_assign_scalar(char *__pyx_v_data, Py_ssize_t
/* function exit code */
}
+
+/* "(tree fragment)":1
+ * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
+ * if __pyx_checksum != 0xb068931:
+ * from pickle import PickleError as __pyx_PickleError
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_15View_dot_MemoryView_1__pyx_unpickle_Enum(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_15View_dot_MemoryView_1__pyx_unpickle_Enum = {"__pyx_unpickle_Enum", (PyCFunction)__pyx_pw_15View_dot_MemoryView_1__pyx_unpickle_Enum, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_15View_dot_MemoryView_1__pyx_unpickle_Enum(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v___pyx_type = 0;
+ long __pyx_v___pyx_checksum;
+ PyObject *__pyx_v___pyx_state = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__pyx_unpickle_Enum (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
+ PyObject* values[3] = {0,0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Enum", 1, 3, 3, 1); __PYX_ERR(2, 1, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 2:
+ if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Enum", 1, 3, 3, 2); __PYX_ERR(2, 1, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_Enum") < 0)) __PYX_ERR(2, 1, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ }
+ __pyx_v___pyx_type = values[0];
+ __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(2, 1, __pyx_L3_error)
+ __pyx_v___pyx_state = values[2];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Enum", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("View.MemoryView.__pyx_unpickle_Enum", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
+ PyObject *__pyx_v___pyx_PickleError = NULL;
+ PyObject *__pyx_v___pyx_result = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ int __pyx_t_1;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ int __pyx_t_7;
+ __Pyx_RefNannySetupContext("__pyx_unpickle_Enum", 0);
+
+ /* "(tree fragment)":2
+ * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state):
+ * if __pyx_checksum != 0xb068931: # <<<<<<<<<<<<<<
+ * from pickle import PickleError as __pyx_PickleError
+ * raise __pyx_PickleError("Incompatible checksums (%s vs 0xb068931 = (name))" % __pyx_checksum)
+ */
+ __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xb068931) != 0);
+ if (__pyx_t_1) {
+
+ /* "(tree fragment)":3
+ * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state):
+ * if __pyx_checksum != 0xb068931:
+ * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
+ * raise __pyx_PickleError("Incompatible checksums (%s vs 0xb068931 = (name))" % __pyx_checksum)
+ * __pyx_result = Enum.__new__(__pyx_type)
+ */
+ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_INCREF(__pyx_n_s_PickleError);
+ __Pyx_GIVEREF(__pyx_n_s_PickleError);
+ PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
+ __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 3, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_2);
+ __pyx_v___pyx_PickleError = __pyx_t_2;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+ /* "(tree fragment)":4
+ * if __pyx_checksum != 0xb068931:
+ * from pickle import PickleError as __pyx_PickleError
+ * raise __pyx_PickleError("Incompatible checksums (%s vs 0xb068931 = (name))" % __pyx_checksum) # <<<<<<<<<<<<<<
+ * __pyx_result = Enum.__new__(__pyx_type)
+ * if __pyx_state is not None:
+ */
+ __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 4, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xb0, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 4, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_INCREF(__pyx_v___pyx_PickleError);
+ __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_5) {
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
+ __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
+ __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 4, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
+ __pyx_t_4 = 0;
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __PYX_ERR(2, 4, __pyx_L1_error)
+
+ /* "(tree fragment)":2
+ * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state):
+ * if __pyx_checksum != 0xb068931: # <<<<<<<<<<<<<<
+ * from pickle import PickleError as __pyx_PickleError
+ * raise __pyx_PickleError("Incompatible checksums (%s vs 0xb068931 = (name))" % __pyx_checksum)
+ */
+ }
+
+ /* "(tree fragment)":5
+ * from pickle import PickleError as __pyx_PickleError
+ * raise __pyx_PickleError("Incompatible checksums (%s vs 0xb068931 = (name))" % __pyx_checksum)
+ * __pyx_result = Enum.__new__(__pyx_type) # <<<<<<<<<<<<<<
+ * if __pyx_state is not None:
+ * __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_MemviewEnum_type), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_6 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_6) {
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v___pyx_type};
+ __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v___pyx_type};
+ __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ } else
+ #endif
+ {
+ __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 5, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __pyx_t_6 = NULL;
+ __Pyx_INCREF(__pyx_v___pyx_type);
+ __Pyx_GIVEREF(__pyx_v___pyx_type);
+ PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v___pyx_type);
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_v___pyx_result = __pyx_t_3;
+ __pyx_t_3 = 0;
+
+ /* "(tree fragment)":6
+ * raise __pyx_PickleError("Incompatible checksums (%s vs 0xb068931 = (name))" % __pyx_checksum)
+ * __pyx_result = Enum.__new__(__pyx_type)
+ * if __pyx_state is not None: # <<<<<<<<<<<<<<
+ * __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
+ * return __pyx_result
+ */
+ __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
+ __pyx_t_7 = (__pyx_t_1 != 0);
+ if (__pyx_t_7) {
+
+ /* "(tree fragment)":7
+ * __pyx_result = Enum.__new__(__pyx_type)
+ * if __pyx_state is not None:
+ * __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
+ * return __pyx_result
+ * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
+ */
+ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 7, __pyx_L1_error)
+ __pyx_t_3 = __pyx_unpickle_Enum__set_state(((struct __pyx_MemviewEnum_obj *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 7, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+ /* "(tree fragment)":6
+ * raise __pyx_PickleError("Incompatible checksums (%s vs 0xb068931 = (name))" % __pyx_checksum)
+ * __pyx_result = Enum.__new__(__pyx_type)
+ * if __pyx_state is not None: # <<<<<<<<<<<<<<
+ * __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
+ * return __pyx_result
+ */
+ }
+
+ /* "(tree fragment)":8
+ * if __pyx_state is not None:
+ * __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
+ * return __pyx_result # <<<<<<<<<<<<<<
+ * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
+ * __pyx_result.name = __pyx_state[0]
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v___pyx_result);
+ __pyx_r = __pyx_v___pyx_result;
+ goto __pyx_L0;
+
+ /* "(tree fragment)":1
+ * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
+ * if __pyx_checksum != 0xb068931:
+ * from pickle import PickleError as __pyx_PickleError
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_AddTraceback("View.MemoryView.__pyx_unpickle_Enum", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v___pyx_PickleError);
+ __Pyx_XDECREF(__pyx_v___pyx_result);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "(tree fragment)":9
+ * __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
+ * return __pyx_result
+ * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
+ * __pyx_result.name = __pyx_state[0]
+ * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
+ */
+
+static PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ int __pyx_t_2;
+ Py_ssize_t __pyx_t_3;
+ int __pyx_t_4;
+ int __pyx_t_5;
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *__pyx_t_7 = NULL;
+ PyObject *__pyx_t_8 = NULL;
+ PyObject *__pyx_t_9 = NULL;
+ __Pyx_RefNannySetupContext("__pyx_unpickle_Enum__set_state", 0);
+
+ /* "(tree fragment)":10
+ * return __pyx_result
+ * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
+ * __pyx_result.name = __pyx_state[0] # <<<<<<<<<<<<<<
+ * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
+ * __pyx_result.__dict__.update(__pyx_state[1])
+ */
+ if (unlikely(__pyx_v___pyx_state == Py_None)) {
+ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
+ __PYX_ERR(2, 10, __pyx_L1_error)
+ }
+ __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_1);
+ __Pyx_GOTREF(__pyx_v___pyx_result->name);
+ __Pyx_DECREF(__pyx_v___pyx_result->name);
+ __pyx_v___pyx_result->name = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "(tree fragment)":11
+ * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
+ * __pyx_result.name = __pyx_state[0]
+ * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
+ * __pyx_result.__dict__.update(__pyx_state[1])
+ */
+ if (unlikely(__pyx_v___pyx_state == Py_None)) {
+ PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
+ __PYX_ERR(2, 11, __pyx_L1_error)
+ }
+ __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(2, 11, __pyx_L1_error)
+ __pyx_t_4 = ((__pyx_t_3 > 1) != 0);
+ if (__pyx_t_4) {
+ } else {
+ __pyx_t_2 = __pyx_t_4;
+ goto __pyx_L4_bool_binop_done;
+ }
+ __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 11, __pyx_L1_error)
+ __pyx_t_5 = (__pyx_t_4 != 0);
+ __pyx_t_2 = __pyx_t_5;
+ __pyx_L4_bool_binop_done:;
+ if (__pyx_t_2) {
+
+ /* "(tree fragment)":12
+ * __pyx_result.name = __pyx_state[0]
+ * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
+ * __pyx_result.__dict__.update(__pyx_state[1]) # <<<<<<<<<<<<<<
+ */
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 12, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 12, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ if (unlikely(__pyx_v___pyx_state == Py_None)) {
+ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
+ __PYX_ERR(2, 12, __pyx_L1_error)
+ }
+ __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 12, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_8 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
+ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
+ if (likely(__pyx_t_8)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
+ __Pyx_INCREF(__pyx_t_8);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_7, function);
+ }
+ }
+ if (!__pyx_t_8) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_7)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_6};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_6};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 12, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL;
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_6);
+ __pyx_t_6 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "(tree fragment)":11
+ * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
+ * __pyx_result.name = __pyx_state[0]
+ * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
+ * __pyx_result.__dict__.update(__pyx_state[1])
+ */
+ }
+
+ /* "(tree fragment)":9
+ * __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
+ * return __pyx_result
+ * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
+ * __pyx_result.name = __pyx_state[0]
+ * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_XDECREF(__pyx_t_8);
+ __Pyx_XDECREF(__pyx_t_9);
+ __Pyx_AddTraceback("View.MemoryView.__pyx_unpickle_Enum__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = 0;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
static struct __pyx_vtabstruct_array __pyx_vtable_array;
static PyObject *__pyx_tp_new_array(PyTypeObject *t, PyObject *a, PyObject *k) {
@@ -45776,8 +48312,8 @@ static PyObject *__pyx_tp_new_array(PyTypeObject *t, PyObject *a, PyObject *k) {
static void __pyx_tp_dealloc_array(PyObject *o) {
struct __pyx_array_obj *p = (struct __pyx_array_obj *)o;
- #if PY_VERSION_HEX >= 0x030400a1
- if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
+ #if CYTHON_USE_TP_FINALIZE
+ if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
if (PyObject_CallFinalizerFromDealloc(o)) return;
}
#endif
@@ -45813,7 +48349,7 @@ static int __pyx_mp_ass_subscript_array(PyObject *o, PyObject *i, PyObject *v) {
}
static PyObject *__pyx_tp_getattro_array(PyObject *o, PyObject *n) {
- PyObject *v = PyObject_GenericGetAttr(o, n);
+ PyObject *v = __Pyx_PyObject_GenericGetAttr(o, n);
if (!v && PyErr_ExceptionMatches(PyExc_AttributeError)) {
PyErr_Clear();
v = __pyx_array___getattr__(o, n);
@@ -45827,6 +48363,8 @@ static PyObject *__pyx_getprop___pyx_array_memview(PyObject *o, CYTHON_UNUSED vo
static PyMethodDef __pyx_methods_array[] = {
{"__getattr__", (PyCFunction)__pyx_array___getattr__, METH_O|METH_COEXIST, 0},
+ {"__reduce_cython__", (PyCFunction)__pyx_pw___pyx_array_1__reduce_cython__, METH_NOARGS, 0},
+ {"__setstate_cython__", (PyCFunction)__pyx_pw___pyx_array_3__setstate_cython__, METH_O, 0},
{0, 0, 0, 0}
};
@@ -45836,7 +48374,7 @@ static struct PyGetSetDef __pyx_getsets_array[] = {
};
static PySequenceMethods __pyx_tp_as_sequence_array = {
- 0, /*sq_length*/
+ __pyx_array___len__, /*sq_length*/
0, /*sq_concat*/
0, /*sq_repeat*/
__pyx_sq_item_array, /*sq_item*/
@@ -45849,7 +48387,7 @@ static PySequenceMethods __pyx_tp_as_sequence_array = {
};
static PyMappingMethods __pyx_tp_as_mapping_array = {
- 0, /*mp_length*/
+ __pyx_array___len__, /*mp_length*/
__pyx_array___getitem__, /*mp_subscript*/
__pyx_mp_ass_subscript_array, /*mp_ass_subscript*/
};
@@ -45945,8 +48483,8 @@ static PyObject *__pyx_tp_new_Enum(PyTypeObject *t, CYTHON_UNUSED PyObject *a, C
static void __pyx_tp_dealloc_Enum(PyObject *o) {
struct __pyx_MemviewEnum_obj *p = (struct __pyx_MemviewEnum_obj *)o;
- #if PY_VERSION_HEX >= 0x030400a1
- if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
+ #if CYTHON_USE_TP_FINALIZE
+ if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
if (PyObject_CallFinalizerFromDealloc(o)) return;
}
#endif
@@ -45974,6 +48512,8 @@ static int __pyx_tp_clear_Enum(PyObject *o) {
}
static PyMethodDef __pyx_methods_Enum[] = {
+ {"__reduce_cython__", (PyCFunction)__pyx_pw___pyx_MemviewEnum_1__reduce_cython__, METH_NOARGS, 0},
+ {"__setstate_cython__", (PyCFunction)__pyx_pw___pyx_MemviewEnum_3__setstate_cython__, METH_O, 0},
{0, 0, 0, 0}
};
@@ -46060,8 +48600,8 @@ static PyObject *__pyx_tp_new_memoryview(PyTypeObject *t, PyObject *a, PyObject
static void __pyx_tp_dealloc_memoryview(PyObject *o) {
struct __pyx_memoryview_obj *p = (struct __pyx_memoryview_obj *)o;
- #if PY_VERSION_HEX >= 0x030400a1
- if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
+ #if CYTHON_USE_TP_FINALIZE
+ if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
if (PyObject_CallFinalizerFromDealloc(o)) return;
}
#endif
@@ -46173,6 +48713,8 @@ static PyMethodDef __pyx_methods_memoryview[] = {
{"is_f_contig", (PyCFunction)__pyx_memoryview_is_f_contig, METH_NOARGS, 0},
{"copy", (PyCFunction)__pyx_memoryview_copy, METH_NOARGS, 0},
{"copy_fortran", (PyCFunction)__pyx_memoryview_copy_fortran, METH_NOARGS, 0},
+ {"__reduce_cython__", (PyCFunction)__pyx_pw___pyx_memoryview_1__reduce_cython__, METH_NOARGS, 0},
+ {"__setstate_cython__", (PyCFunction)__pyx_pw___pyx_memoryview_3__setstate_cython__, METH_O, 0},
{0, 0, 0, 0}
};
@@ -46297,8 +48839,8 @@ static PyObject *__pyx_tp_new__memoryviewslice(PyTypeObject *t, PyObject *a, PyO
static void __pyx_tp_dealloc__memoryviewslice(PyObject *o) {
struct __pyx_memoryviewslice_obj *p = (struct __pyx_memoryviewslice_obj *)o;
- #if PY_VERSION_HEX >= 0x030400a1
- if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
+ #if CYTHON_USE_TP_FINALIZE
+ if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
if (PyObject_CallFinalizerFromDealloc(o)) return;
}
#endif
@@ -46342,6 +48884,8 @@ static PyObject *__pyx_getprop___pyx_memoryviewslice_base(PyObject *o, CYTHON_UN
}
static PyMethodDef __pyx_methods__memoryviewslice[] = {
+ {"__reduce_cython__", (PyCFunction)__pyx_pw___pyx_memoryviewslice_1__reduce_cython__, METH_NOARGS, 0},
+ {"__setstate_cython__", (PyCFunction)__pyx_pw___pyx_memoryviewslice_3__setstate_cython__, METH_O, 0},
{0, 0, 0, 0}
};
@@ -46421,17 +48965,31 @@ static PyMethodDef __pyx_methods[] = {
};
#if PY_MAJOR_VERSION >= 3
+#if CYTHON_PEP489_MULTI_PHASE_INIT
+static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
+static int __pyx_pymod_exec_chistogramnd_lut(PyObject* module); /*proto*/
+static PyModuleDef_Slot __pyx_moduledef_slots[] = {
+ {Py_mod_create, (void*)__pyx_pymod_create},
+ {Py_mod_exec, (void*)__pyx_pymod_exec_chistogramnd_lut},
+ {0, NULL}
+};
+#endif
+
static struct PyModuleDef __pyx_moduledef = {
- #if PY_VERSION_HEX < 0x03020000
- { PyObject_HEAD_INIT(NULL) NULL, 0, NULL },
- #else
PyModuleDef_HEAD_INIT,
- #endif
"chistogramnd_lut",
0, /* m_doc */
+ #if CYTHON_PEP489_MULTI_PHASE_INIT
+ 0, /* m_size */
+ #else
-1, /* m_size */
+ #endif
__pyx_methods /* m_methods */,
+ #if CYTHON_PEP489_MULTI_PHASE_INIT
+ __pyx_moduledef_slots, /* m_slots */
+ #else
NULL, /* m_reload */
+ #endif
NULL, /* m_traverse */
NULL, /* m_clear */
NULL /* m_free */
@@ -46442,19 +49000,21 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = {
{&__pyx_kp_s_15_05_2016, __pyx_k_15_05_2016, sizeof(__pyx_k_15_05_2016), 0, 0, 1, 0},
{&__pyx_n_s_ASCII, __pyx_k_ASCII, sizeof(__pyx_k_ASCII), 0, 0, 1, 1},
{&__pyx_kp_s_At_least_one_of_the_following_pa, __pyx_k_At_least_one_of_the_following_pa, sizeof(__pyx_k_At_least_one_of_the_following_pa), 0, 0, 1, 0},
- {&__pyx_n_s_AttributeError, __pyx_k_AttributeError, sizeof(__pyx_k_AttributeError), 0, 0, 1, 1},
{&__pyx_kp_s_Buffer_view_does_not_expose_stri, __pyx_k_Buffer_view_does_not_expose_stri, sizeof(__pyx_k_Buffer_view_does_not_expose_stri), 0, 0, 1, 0},
{&__pyx_kp_s_Can_only_create_a_buffer_that_is, __pyx_k_Can_only_create_a_buffer_that_is, sizeof(__pyx_k_Can_only_create_a_buffer_that_is), 0, 0, 1, 0},
+ {&__pyx_kp_s_Cannot_assign_to_read_only_memor, __pyx_k_Cannot_assign_to_read_only_memor, sizeof(__pyx_k_Cannot_assign_to_read_only_memor), 0, 0, 1, 0},
+ {&__pyx_kp_s_Cannot_create_writable_memory_vi, __pyx_k_Cannot_create_writable_memory_vi, sizeof(__pyx_k_Cannot_create_writable_memory_vi), 0, 0, 1, 0},
{&__pyx_kp_s_Cannot_index_with_type_s, __pyx_k_Cannot_index_with_type_s, sizeof(__pyx_k_Cannot_index_with_type_s), 0, 0, 1, 0},
{&__pyx_kp_s_Case_not_supported_weights_0_and, __pyx_k_Case_not_supported_weights_0_and, sizeof(__pyx_k_Case_not_supported_weights_0_and), 0, 0, 1, 0},
{&__pyx_kp_s_D_Naudet, __pyx_k_D_Naudet, sizeof(__pyx_k_D_Naudet), 0, 0, 1, 0},
{&__pyx_n_s_Ellipsis, __pyx_k_Ellipsis, sizeof(__pyx_k_Ellipsis), 0, 0, 1, 1},
{&__pyx_kp_s_Empty_shape_tuple_for_cython_arr, __pyx_k_Empty_shape_tuple_for_cython_arr, sizeof(__pyx_k_Empty_shape_tuple_for_cython_arr), 0, 0, 1, 0},
- {&__pyx_kp_s_Expected_at_least_d_arguments, __pyx_k_Expected_at_least_d_arguments, sizeof(__pyx_k_Expected_at_least_d_arguments), 0, 0, 1, 0},
+ {&__pyx_kp_s_Expected_at_least_d_argument_s_g, __pyx_k_Expected_at_least_d_argument_s_g, sizeof(__pyx_k_Expected_at_least_d_argument_s_g), 0, 0, 1, 0},
{&__pyx_kp_u_Format_string_allocated_too_shor, __pyx_k_Format_string_allocated_too_shor, sizeof(__pyx_k_Format_string_allocated_too_shor), 0, 1, 0, 0},
{&__pyx_kp_u_Format_string_allocated_too_shor_2, __pyx_k_Format_string_allocated_too_shor_2, sizeof(__pyx_k_Format_string_allocated_too_shor_2), 0, 1, 0, 0},
{&__pyx_kp_s_Function_call_with_ambiguous_arg, __pyx_k_Function_call_with_ambiguous_arg, sizeof(__pyx_k_Function_call_with_ambiguous_arg), 0, 0, 1, 0},
{&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1},
+ {&__pyx_kp_s_Incompatible_checksums_s_vs_0xb0, __pyx_k_Incompatible_checksums_s_vs_0xb0, sizeof(__pyx_k_Incompatible_checksums_s_vs_0xb0), 0, 0, 1, 0},
{&__pyx_n_s_IndexError, __pyx_k_IndexError, sizeof(__pyx_k_IndexError), 0, 0, 1, 1},
{&__pyx_kp_s_Indirect_dimensions_not_supporte, __pyx_k_Indirect_dimensions_not_supporte, sizeof(__pyx_k_Indirect_dimensions_not_supporte), 0, 0, 1, 0},
{&__pyx_kp_s_Invalid_mode_expected_c_or_fortr, __pyx_k_Invalid_mode_expected_c_or_fortr, sizeof(__pyx_k_Invalid_mode_expected_c_or_fortr), 0, 0, 1, 0},
@@ -46468,6 +49028,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = {
{&__pyx_kp_u_Non_native_byte_order_not_suppor, __pyx_k_Non_native_byte_order_not_suppor, sizeof(__pyx_k_Non_native_byte_order_not_suppor), 0, 1, 0, 0},
{&__pyx_n_b_O, __pyx_k_O, sizeof(__pyx_k_O), 0, 0, 0, 1},
{&__pyx_kp_s_Out_of_bounds_on_buffer_access_a, __pyx_k_Out_of_bounds_on_buffer_access_a, sizeof(__pyx_k_Out_of_bounds_on_buffer_access_a), 0, 0, 1, 0},
+ {&__pyx_n_s_PickleError, __pyx_k_PickleError, sizeof(__pyx_k_PickleError), 0, 0, 1, 1},
{&__pyx_kp_s_Provided_dtype_and_weighted_hist, __pyx_k_Provided_dtype_and_weighted_hist, sizeof(__pyx_k_Provided_dtype_and_weighted_hist), 0, 0, 1, 0},
{&__pyx_kp_s_Provided_histo_array_doesn_t_hav, __pyx_k_Provided_histo_array_doesn_t_hav, sizeof(__pyx_k_Provided_histo_array_doesn_t_hav), 0, 0, 1, 0},
{&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1},
@@ -46479,6 +49040,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = {
{&__pyx_kp_s_Type_not_supported_sample_0, __pyx_k_Type_not_supported_sample_0, sizeof(__pyx_k_Type_not_supported_sample_0), 0, 0, 1, 0},
{&__pyx_kp_s_Unable_to_convert_item_to_object, __pyx_k_Unable_to_convert_item_to_object, sizeof(__pyx_k_Unable_to_convert_item_to_object), 0, 0, 1, 0},
{&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
+ {&__pyx_n_s_View_MemoryView, __pyx_k_View_MemoryView, sizeof(__pyx_k_View_MemoryView), 0, 0, 1, 1},
{&__pyx_kp_s__21, __pyx_k__21, sizeof(__pyx_k__21), 0, 0, 1, 0},
{&__pyx_kp_s__23, __pyx_k__23, sizeof(__pyx_k__23), 0, 0, 1, 0},
{&__pyx_n_s_allocate_buffer, __pyx_k_allocate_buffer, sizeof(__pyx_k_allocate_buffer), 0, 0, 1, 1},
@@ -46494,10 +49056,12 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = {
{&__pyx_n_s_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 0, 1, 1},
{&__pyx_n_u_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 1, 0, 1},
{&__pyx_n_s_class, __pyx_k_class, sizeof(__pyx_k_class), 0, 0, 1, 1},
+ {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
{&__pyx_kp_s_contiguous_and_direct, __pyx_k_contiguous_and_direct, sizeof(__pyx_k_contiguous_and_direct), 0, 0, 1, 0},
{&__pyx_kp_s_contiguous_and_indirect, __pyx_k_contiguous_and_indirect, sizeof(__pyx_k_contiguous_and_indirect), 0, 0, 1, 0},
{&__pyx_n_s_date, __pyx_k_date, sizeof(__pyx_k_date), 0, 0, 1, 1},
{&__pyx_n_s_defaults, __pyx_k_defaults, sizeof(__pyx_k_defaults), 0, 0, 1, 1},
+ {&__pyx_n_s_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1},
{&__pyx_n_s_dim_edges, __pyx_k_dim_edges, sizeof(__pyx_k_dim_edges), 0, 0, 1, 1},
{&__pyx_n_s_double, __pyx_k_double, sizeof(__pyx_k_double), 0, 0, 1, 1},
{&__pyx_n_s_dtype, __pyx_k_dtype, sizeof(__pyx_k_dtype), 0, 0, 1, 1},
@@ -46553,6 +49117,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = {
{&__pyx_n_u_fortran, __pyx_k_fortran, sizeof(__pyx_k_fortran), 0, 1, 0, 1},
{&__pyx_n_s_g_max, __pyx_k_g_max, sizeof(__pyx_k_g_max), 0, 0, 1, 1},
{&__pyx_n_s_g_min, __pyx_k_g_min, sizeof(__pyx_k_g_min), 0, 0, 1, 1},
+ {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},
{&__pyx_kp_s_got_differing_extents_in_dimensi, __pyx_k_got_differing_extents_in_dimensi, sizeof(__pyx_k_got_differing_extents_in_dimensi), 0, 0, 1, 0},
{&__pyx_n_s_h_c, __pyx_k_h_c, sizeof(__pyx_k_h_c), 0, 0, 1, 1},
{&__pyx_n_s_h_lut_c, __pyx_k_h_lut_c, sizeof(__pyx_k_h_lut_c), 0, 0, 1, 1},
@@ -46640,12 +49205,13 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = {
{&__pyx_n_s_n_elem, __pyx_k_n_elem, sizeof(__pyx_k_n_elem), 0, 0, 1, 1},
{&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
{&__pyx_n_s_name_2, __pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 0, 1, 1},
- {&__pyx_n_s_ndarray, __pyx_k_ndarray, sizeof(__pyx_k_ndarray), 0, 0, 1, 1},
{&__pyx_kp_u_ndarray_is_not_C_contiguous, __pyx_k_ndarray_is_not_C_contiguous, sizeof(__pyx_k_ndarray_is_not_C_contiguous), 0, 1, 0, 0},
{&__pyx_kp_u_ndarray_is_not_Fortran_contiguou, __pyx_k_ndarray_is_not_Fortran_contiguou, sizeof(__pyx_k_ndarray_is_not_Fortran_contiguou), 0, 1, 0, 0},
{&__pyx_n_s_ndim, __pyx_k_ndim, sizeof(__pyx_k_ndim), 0, 0, 1, 1},
{&__pyx_n_s_ndmin, __pyx_k_ndmin, sizeof(__pyx_k_ndmin), 0, 0, 1, 1},
+ {&__pyx_n_s_new, __pyx_k_new, sizeof(__pyx_k_new), 0, 0, 1, 1},
{&__pyx_n_s_newbyteorder, __pyx_k_newbyteorder, sizeof(__pyx_k_newbyteorder), 0, 0, 1, 1},
+ {&__pyx_kp_s_no_default___reduce___due_to_non, __pyx_k_no_default___reduce___due_to_non, sizeof(__pyx_k_no_default___reduce___due_to_non), 0, 0, 1, 0},
{&__pyx_n_s_np, __pyx_k_np, sizeof(__pyx_k_np), 0, 0, 1, 1},
{&__pyx_n_s_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 0, 0, 1, 1},
{&__pyx_kp_s_numpy_core_multiarray_failed_to, __pyx_k_numpy_core_multiarray_failed_to, sizeof(__pyx_k_numpy_core_multiarray_failed_to), 0, 0, 1, 0},
@@ -46655,22 +49221,36 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = {
{&__pyx_n_s_o_weighted_histo, __pyx_k_o_weighted_histo, sizeof(__pyx_k_o_weighted_histo), 0, 0, 1, 1},
{&__pyx_n_s_obj, __pyx_k_obj, sizeof(__pyx_k_obj), 0, 0, 1, 1},
{&__pyx_n_s_pack, __pyx_k_pack, sizeof(__pyx_k_pack), 0, 0, 1, 1},
+ {&__pyx_n_s_pickle, __pyx_k_pickle, sizeof(__pyx_k_pickle), 0, 0, 1, 1},
{&__pyx_n_s_print, __pyx_k_print, sizeof(__pyx_k_print), 0, 0, 1, 1},
{&__pyx_n_s_prod, __pyx_k_prod, sizeof(__pyx_k_prod), 0, 0, 1, 1},
+ {&__pyx_n_s_pyx_PickleError, __pyx_k_pyx_PickleError, sizeof(__pyx_k_pyx_PickleError), 0, 0, 1, 1},
+ {&__pyx_n_s_pyx_checksum, __pyx_k_pyx_checksum, sizeof(__pyx_k_pyx_checksum), 0, 0, 1, 1},
{&__pyx_n_s_pyx_getbuffer, __pyx_k_pyx_getbuffer, sizeof(__pyx_k_pyx_getbuffer), 0, 0, 1, 1},
+ {&__pyx_n_s_pyx_result, __pyx_k_pyx_result, sizeof(__pyx_k_pyx_result), 0, 0, 1, 1},
+ {&__pyx_n_s_pyx_state, __pyx_k_pyx_state, sizeof(__pyx_k_pyx_state), 0, 0, 1, 1},
+ {&__pyx_n_s_pyx_type, __pyx_k_pyx_type, sizeof(__pyx_k_pyx_type), 0, 0, 1, 1},
+ {&__pyx_n_s_pyx_unpickle_Enum, __pyx_k_pyx_unpickle_Enum, sizeof(__pyx_k_pyx_unpickle_Enum), 0, 0, 1, 1},
{&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},
{&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
{&__pyx_n_s_rc, __pyx_k_rc, sizeof(__pyx_k_rc), 0, 0, 1, 1},
+ {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1},
+ {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1},
+ {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1},
{&__pyx_n_s_reshape, __pyx_k_reshape, sizeof(__pyx_k_reshape), 0, 0, 1, 1},
{&__pyx_n_s_rng_max, __pyx_k_rng_max, sizeof(__pyx_k_rng_max), 0, 0, 1, 1},
{&__pyx_n_s_rng_min, __pyx_k_rng_min, sizeof(__pyx_k_rng_min), 0, 0, 1, 1},
+ {&__pyx_n_s_s, __pyx_k_s, sizeof(__pyx_k_s), 0, 0, 1, 1},
{&__pyx_n_s_s_shape, __pyx_k_s_shape, sizeof(__pyx_k_s_shape), 0, 0, 1, 1},
{&__pyx_n_s_sample, __pyx_k_sample, sizeof(__pyx_k_sample), 0, 0, 1, 1},
{&__pyx_n_s_sample_c, __pyx_k_sample_c, sizeof(__pyx_k_sample_c), 0, 0, 1, 1},
{&__pyx_n_s_sample_type, __pyx_k_sample_type, sizeof(__pyx_k_sample_type), 0, 0, 1, 1},
+ {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1},
+ {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1},
{&__pyx_n_s_shape, __pyx_k_shape, sizeof(__pyx_k_shape), 0, 0, 1, 1},
{&__pyx_n_s_signatures, __pyx_k_signatures, sizeof(__pyx_k_signatures), 0, 0, 1, 1},
{&__pyx_n_s_silx_math_chistogramnd_lut, __pyx_k_silx_math_chistogramnd_lut, sizeof(__pyx_k_silx_math_chistogramnd_lut), 0, 0, 1, 1},
+ {&__pyx_kp_s_silx_math_chistogramnd_lut_pyx, __pyx_k_silx_math_chistogramnd_lut_pyx, sizeof(__pyx_k_silx_math_chistogramnd_lut_pyx), 0, 0, 1, 0},
{&__pyx_n_s_size, __pyx_k_size, sizeof(__pyx_k_size), 0, 0, 1, 1},
{&__pyx_n_s_split, __pyx_k_split, sizeof(__pyx_k_split), 0, 0, 1, 1},
{&__pyx_n_s_start, __pyx_k_start, sizeof(__pyx_k_start), 0, 0, 1, 1},
@@ -46679,6 +49259,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = {
{&__pyx_kp_s_strided_and_direct, __pyx_k_strided_and_direct, sizeof(__pyx_k_strided_and_direct), 0, 0, 1, 0},
{&__pyx_kp_s_strided_and_direct_or_indirect, __pyx_k_strided_and_direct_or_indirect, sizeof(__pyx_k_strided_and_direct_or_indirect), 0, 0, 1, 0},
{&__pyx_kp_s_strided_and_indirect, __pyx_k_strided_and_indirect, sizeof(__pyx_k_strided_and_indirect), 0, 0, 1, 0},
+ {&__pyx_kp_s_stringsource, __pyx_k_stringsource, sizeof(__pyx_k_stringsource), 0, 0, 1, 0},
{&__pyx_n_s_strip, __pyx_k_strip, sizeof(__pyx_k_strip), 0, 0, 1, 1},
{&__pyx_n_s_struct, __pyx_k_struct, sizeof(__pyx_k_struct), 0, 0, 1, 1},
{&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
@@ -46690,7 +49271,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = {
{&__pyx_kp_s_unable_to_allocate_shape_and_str, __pyx_k_unable_to_allocate_shape_and_str, sizeof(__pyx_k_unable_to_allocate_shape_and_str), 0, 0, 1, 0},
{&__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_k_unknown_dtype_code_in_numpy_pxd, sizeof(__pyx_k_unknown_dtype_code_in_numpy_pxd), 0, 1, 0, 0},
{&__pyx_n_s_unpack, __pyx_k_unpack, sizeof(__pyx_k_unpack), 0, 0, 1, 1},
- {&__pyx_kp_s_users_kieffer_workspace_400_rel, __pyx_k_users_kieffer_workspace_400_rel, sizeof(__pyx_k_users_kieffer_workspace_400_rel), 0, 0, 1, 0},
+ {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1},
{&__pyx_n_s_w_c, __pyx_k_w_c, sizeof(__pyx_k_w_c), 0, 0, 1, 1},
{&__pyx_n_s_w_dtype, __pyx_k_w_dtype, sizeof(__pyx_k_w_dtype), 0, 0, 1, 1},
{&__pyx_n_s_w_h_c, __pyx_k_w_h_c, sizeof(__pyx_k_w_h_c), 0, 0, 1, 1},
@@ -46699,22 +49280,19 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = {
{&__pyx_n_s_weighted_histo, __pyx_k_weighted_histo, sizeof(__pyx_k_weighted_histo), 0, 0, 1, 1},
{&__pyx_n_s_weights, __pyx_k_weights, sizeof(__pyx_k_weights), 0, 0, 1, 1},
{&__pyx_n_s_zeros, __pyx_k_zeros, sizeof(__pyx_k_zeros), 0, 0, 1, 1},
- {&__pyx_n_s_zip, __pyx_k_zip, sizeof(__pyx_k_zip), 0, 0, 1, 1},
{0, 0, 0, 0, 0, 0, 0}
};
static int __Pyx_InitCachedBuiltins(void) {
__pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 118, __pyx_L1_error)
__pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 185, __pyx_L1_error)
__pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 195, __pyx_L1_error)
- __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(0, 332, __pyx_L1_error)
- __pyx_builtin_AttributeError = __Pyx_GetBuiltinName(__pyx_n_s_AttributeError); if (!__pyx_builtin_AttributeError) __PYX_ERR(0, 332, __pyx_L1_error)
- __pyx_builtin_zip = __Pyx_GetBuiltinName(__pyx_n_s_zip); if (!__pyx_builtin_zip) __PYX_ERR(0, 332, __pyx_L1_error)
- __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(1, 799, __pyx_L1_error)
- __pyx_builtin_MemoryError = __Pyx_GetBuiltinName(__pyx_n_s_MemoryError); if (!__pyx_builtin_MemoryError) __PYX_ERR(2, 146, __pyx_L1_error)
- __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(2, 149, __pyx_L1_error)
- __pyx_builtin_Ellipsis = __Pyx_GetBuiltinName(__pyx_n_s_Ellipsis); if (!__pyx_builtin_Ellipsis) __PYX_ERR(2, 396, __pyx_L1_error)
- __pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_n_s_id); if (!__pyx_builtin_id) __PYX_ERR(2, 599, __pyx_L1_error)
- __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) __PYX_ERR(2, 818, __pyx_L1_error)
+ __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(1, 810, __pyx_L1_error)
+ __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(1, 1000, __pyx_L1_error)
+ __pyx_builtin_MemoryError = __Pyx_GetBuiltinName(__pyx_n_s_MemoryError); if (!__pyx_builtin_MemoryError) __PYX_ERR(2, 147, __pyx_L1_error)
+ __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(2, 150, __pyx_L1_error)
+ __pyx_builtin_Ellipsis = __Pyx_GetBuiltinName(__pyx_n_s_Ellipsis); if (!__pyx_builtin_Ellipsis) __PYX_ERR(2, 399, __pyx_L1_error)
+ __pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_n_s_id); if (!__pyx_builtin_id) __PYX_ERR(2, 608, __pyx_L1_error)
+ __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) __PYX_ERR(2, 827, __pyx_L1_error)
return 0;
__pyx_L1_error:;
return -1;
@@ -46949,7 +49527,7 @@ static int __Pyx_InitCachedConstants(void) {
* @cython.cdivision(True)
* def _histogramnd_from_lut_fused(weights_t[:] i_weights, # <<<<<<<<<<<<<<
* lut_t[:] i_lut,
- * np.uint32_t[:] o_histo,
+ * cnumpy.uint32_t[:] o_histo,
*/
__pyx_tuple__22 = PyTuple_Pack(1, __pyx_kp_s__21); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__22);
@@ -46984,248 +49562,327 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GOTREF(__pyx_tuple__30);
__Pyx_GIVEREF(__pyx_tuple__30);
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":218
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":229
* if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
* and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):
* raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<<
*
* if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
*/
- __pyx_tuple__31 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_C_contiguous); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(1, 218, __pyx_L1_error)
+ __pyx_tuple__31 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_C_contiguous); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(1, 229, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__31);
__Pyx_GIVEREF(__pyx_tuple__31);
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":222
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":233
* if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
* and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)):
* raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<<
*
* info.buf = PyArray_DATA(self)
*/
- __pyx_tuple__32 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_Fortran_contiguou); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(1, 222, __pyx_L1_error)
+ __pyx_tuple__32 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_Fortran_contiguou); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(1, 233, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__32);
__Pyx_GIVEREF(__pyx_tuple__32);
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":259
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":263
* if ((descr.byteorder == c'>' and little_endian) or
* (descr.byteorder == c'<' and not little_endian)):
* raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<<
* if t == NPY_BYTE: f = "b"
* elif t == NPY_UBYTE: f = "B"
*/
- __pyx_tuple__33 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(1, 259, __pyx_L1_error)
+ __pyx_tuple__33 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(1, 263, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__33);
__Pyx_GIVEREF(__pyx_tuple__33);
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":799
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":810
*
* 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_tuple__34 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(1, 799, __pyx_L1_error)
+ __pyx_tuple__34 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(1, 810, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__34);
__Pyx_GIVEREF(__pyx_tuple__34);
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":803
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":814
* if ((child.byteorder == c'>' and little_endian) or
* (child.byteorder == c'<' and not little_endian)):
* raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<<
* # One could encode it in the format string and have Cython
* # complain instead, BUT: < and > in format strings also imply
*/
- __pyx_tuple__35 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__35)) __PYX_ERR(1, 803, __pyx_L1_error)
+ __pyx_tuple__35 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__35)) __PYX_ERR(1, 814, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__35);
__Pyx_GIVEREF(__pyx_tuple__35);
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":823
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":834
* t = child.type_num
* if end - f < 5:
* raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<<
*
* # Until ticket #99 is fixed, use integers to avoid warnings
*/
- __pyx_tuple__36 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor_2); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(1, 823, __pyx_L1_error)
+ __pyx_tuple__36 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor_2); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(1, 834, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__36);
__Pyx_GIVEREF(__pyx_tuple__36);
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":989
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":1000
* _import_array()
* except Exception:
* raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<<
*
* cdef inline int import_umath() except -1:
*/
- __pyx_tuple__37 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_multiarray_failed_to); if (unlikely(!__pyx_tuple__37)) __PYX_ERR(1, 989, __pyx_L1_error)
+ __pyx_tuple__37 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_multiarray_failed_to); if (unlikely(!__pyx_tuple__37)) __PYX_ERR(1, 1000, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__37);
__Pyx_GIVEREF(__pyx_tuple__37);
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":995
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":1006
* _import_umath()
* except Exception:
* raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<<
*
* cdef inline int import_ufunc() except -1:
*/
- __pyx_tuple__38 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(1, 995, __pyx_L1_error)
+ __pyx_tuple__38 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(1, 1006, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__38);
__Pyx_GIVEREF(__pyx_tuple__38);
- /* "../../../../../usr/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":1001
+ /* "../../.local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":1012
* _import_umath()
* except Exception:
* raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<<
*/
- __pyx_tuple__39 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__39)) __PYX_ERR(1, 1001, __pyx_L1_error)
+ __pyx_tuple__39 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__39)) __PYX_ERR(1, 1012, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__39);
__Pyx_GIVEREF(__pyx_tuple__39);
- /* "View.MemoryView":131
+ /* "View.MemoryView":132
*
* if not self.ndim:
* raise ValueError("Empty shape tuple for cython.array") # <<<<<<<<<<<<<<
*
* if itemsize <= 0:
*/
- __pyx_tuple__40 = PyTuple_Pack(1, __pyx_kp_s_Empty_shape_tuple_for_cython_arr); if (unlikely(!__pyx_tuple__40)) __PYX_ERR(2, 131, __pyx_L1_error)
+ __pyx_tuple__40 = PyTuple_Pack(1, __pyx_kp_s_Empty_shape_tuple_for_cython_arr); if (unlikely(!__pyx_tuple__40)) __PYX_ERR(2, 132, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__40);
__Pyx_GIVEREF(__pyx_tuple__40);
- /* "View.MemoryView":134
+ /* "View.MemoryView":135
*
* if itemsize <= 0:
* raise ValueError("itemsize <= 0 for cython.array") # <<<<<<<<<<<<<<
*
* if not isinstance(format, bytes):
*/
- __pyx_tuple__41 = PyTuple_Pack(1, __pyx_kp_s_itemsize_0_for_cython_array); if (unlikely(!__pyx_tuple__41)) __PYX_ERR(2, 134, __pyx_L1_error)
+ __pyx_tuple__41 = PyTuple_Pack(1, __pyx_kp_s_itemsize_0_for_cython_array); if (unlikely(!__pyx_tuple__41)) __PYX_ERR(2, 135, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__41);
__Pyx_GIVEREF(__pyx_tuple__41);
- /* "View.MemoryView":137
+ /* "View.MemoryView":138
*
* if not isinstance(format, bytes):
* format = format.encode('ASCII') # <<<<<<<<<<<<<<
* self._format = format # keep a reference to the byte string
* self.format = self._format
*/
- __pyx_tuple__42 = PyTuple_Pack(1, __pyx_n_s_ASCII); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(2, 137, __pyx_L1_error)
+ __pyx_tuple__42 = PyTuple_Pack(1, __pyx_n_s_ASCII); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(2, 138, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__42);
__Pyx_GIVEREF(__pyx_tuple__42);
- /* "View.MemoryView":146
+ /* "View.MemoryView":147
*
* if not self._shape:
* raise MemoryError("unable to allocate shape and strides.") # <<<<<<<<<<<<<<
*
*
*/
- __pyx_tuple__43 = PyTuple_Pack(1, __pyx_kp_s_unable_to_allocate_shape_and_str); if (unlikely(!__pyx_tuple__43)) __PYX_ERR(2, 146, __pyx_L1_error)
+ __pyx_tuple__43 = PyTuple_Pack(1, __pyx_kp_s_unable_to_allocate_shape_and_str); if (unlikely(!__pyx_tuple__43)) __PYX_ERR(2, 147, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__43);
__Pyx_GIVEREF(__pyx_tuple__43);
- /* "View.MemoryView":174
+ /* "View.MemoryView":175
* self.data = <char *>malloc(self.len)
* if not self.data:
* raise MemoryError("unable to allocate array data.") # <<<<<<<<<<<<<<
*
* if self.dtype_is_object:
*/
- __pyx_tuple__44 = PyTuple_Pack(1, __pyx_kp_s_unable_to_allocate_array_data); if (unlikely(!__pyx_tuple__44)) __PYX_ERR(2, 174, __pyx_L1_error)
+ __pyx_tuple__44 = PyTuple_Pack(1, __pyx_kp_s_unable_to_allocate_array_data); if (unlikely(!__pyx_tuple__44)) __PYX_ERR(2, 175, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__44);
__Pyx_GIVEREF(__pyx_tuple__44);
- /* "View.MemoryView":190
+ /* "View.MemoryView":191
* bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
* if not (flags & bufmode):
* raise ValueError("Can only create a buffer that is contiguous in memory.") # <<<<<<<<<<<<<<
* info.buf = self.data
* info.len = self.len
*/
- __pyx_tuple__45 = PyTuple_Pack(1, __pyx_kp_s_Can_only_create_a_buffer_that_is); if (unlikely(!__pyx_tuple__45)) __PYX_ERR(2, 190, __pyx_L1_error)
+ __pyx_tuple__45 = PyTuple_Pack(1, __pyx_kp_s_Can_only_create_a_buffer_that_is); if (unlikely(!__pyx_tuple__45)) __PYX_ERR(2, 191, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__45);
__Pyx_GIVEREF(__pyx_tuple__45);
- /* "View.MemoryView":484
+ /* "(tree fragment)":2
+ * def __reduce_cython__(self):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
+ * def __setstate_cython__(self, __pyx_state):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ */
+ __pyx_tuple__46 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__46)) __PYX_ERR(2, 2, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__46);
+ __Pyx_GIVEREF(__pyx_tuple__46);
+
+ /* "(tree fragment)":4
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ * def __setstate_cython__(self, __pyx_state):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
+ */
+ __pyx_tuple__47 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__47)) __PYX_ERR(2, 4, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__47);
+ __Pyx_GIVEREF(__pyx_tuple__47);
+
+ /* "View.MemoryView":413
+ * def __setitem__(memoryview self, object index, object value):
+ * if self.view.readonly:
+ * raise TypeError("Cannot assign to read-only memoryview") # <<<<<<<<<<<<<<
+ *
+ * have_slices, index = _unellipsify(index, self.view.ndim)
+ */
+ __pyx_tuple__48 = PyTuple_Pack(1, __pyx_kp_s_Cannot_assign_to_read_only_memor); if (unlikely(!__pyx_tuple__48)) __PYX_ERR(2, 413, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__48);
+ __Pyx_GIVEREF(__pyx_tuple__48);
+
+ /* "View.MemoryView":490
* result = struct.unpack(self.view.format, bytesitem)
* except struct.error:
* raise ValueError("Unable to convert item to object") # <<<<<<<<<<<<<<
* else:
* if len(self.view.format) == 1:
*/
- __pyx_tuple__46 = PyTuple_Pack(1, __pyx_kp_s_Unable_to_convert_item_to_object); if (unlikely(!__pyx_tuple__46)) __PYX_ERR(2, 484, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__46);
- __Pyx_GIVEREF(__pyx_tuple__46);
+ __pyx_tuple__49 = PyTuple_Pack(1, __pyx_kp_s_Unable_to_convert_item_to_object); if (unlikely(!__pyx_tuple__49)) __PYX_ERR(2, 490, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__49);
+ __Pyx_GIVEREF(__pyx_tuple__49);
+
+ /* "View.MemoryView":515
+ * def __getbuffer__(self, Py_buffer *info, int flags):
+ * if flags & PyBUF_WRITABLE and self.view.readonly:
+ * raise ValueError("Cannot create writable memory view from read-only memoryview") # <<<<<<<<<<<<<<
+ *
+ * if flags & PyBUF_STRIDES:
+ */
+ __pyx_tuple__50 = PyTuple_Pack(1, __pyx_kp_s_Cannot_create_writable_memory_vi); if (unlikely(!__pyx_tuple__50)) __PYX_ERR(2, 515, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__50);
+ __Pyx_GIVEREF(__pyx_tuple__50);
- /* "View.MemoryView":556
+ /* "View.MemoryView":565
* if self.view.strides == NULL:
*
* raise ValueError("Buffer view does not expose strides") # <<<<<<<<<<<<<<
*
* return tuple([stride for stride in self.view.strides[:self.view.ndim]])
*/
- __pyx_tuple__47 = PyTuple_Pack(1, __pyx_kp_s_Buffer_view_does_not_expose_stri); if (unlikely(!__pyx_tuple__47)) __PYX_ERR(2, 556, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__47);
- __Pyx_GIVEREF(__pyx_tuple__47);
+ __pyx_tuple__51 = PyTuple_Pack(1, __pyx_kp_s_Buffer_view_does_not_expose_stri); if (unlikely(!__pyx_tuple__51)) __PYX_ERR(2, 565, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__51);
+ __Pyx_GIVEREF(__pyx_tuple__51);
- /* "View.MemoryView":563
+ /* "View.MemoryView":572
* def suboffsets(self):
* if self.view.suboffsets == NULL:
* return (-1,) * self.view.ndim # <<<<<<<<<<<<<<
*
* return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]])
*/
- __pyx_tuple__48 = PyTuple_New(1); if (unlikely(!__pyx_tuple__48)) __PYX_ERR(2, 563, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__48);
+ __pyx_tuple__52 = PyTuple_New(1); if (unlikely(!__pyx_tuple__52)) __PYX_ERR(2, 572, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__52);
__Pyx_INCREF(__pyx_int_neg_1);
__Pyx_GIVEREF(__pyx_int_neg_1);
- PyTuple_SET_ITEM(__pyx_tuple__48, 0, __pyx_int_neg_1);
- __Pyx_GIVEREF(__pyx_tuple__48);
+ PyTuple_SET_ITEM(__pyx_tuple__52, 0, __pyx_int_neg_1);
+ __Pyx_GIVEREF(__pyx_tuple__52);
- /* "View.MemoryView":668
+ /* "(tree fragment)":2
+ * def __reduce_cython__(self):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
+ * def __setstate_cython__(self, __pyx_state):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ */
+ __pyx_tuple__53 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__53)) __PYX_ERR(2, 2, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__53);
+ __Pyx_GIVEREF(__pyx_tuple__53);
+
+ /* "(tree fragment)":4
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ * def __setstate_cython__(self, __pyx_state):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
+ */
+ __pyx_tuple__54 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__54)) __PYX_ERR(2, 4, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__54);
+ __Pyx_GIVEREF(__pyx_tuple__54);
+
+ /* "View.MemoryView":677
* if item is Ellipsis:
* if not seen_ellipsis:
* result.extend([slice(None)] * (ndim - len(tup) + 1)) # <<<<<<<<<<<<<<
* seen_ellipsis = True
* else:
*/
- __pyx_slice__49 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__49)) __PYX_ERR(2, 668, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_slice__49);
- __Pyx_GIVEREF(__pyx_slice__49);
+ __pyx_slice__55 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__55)) __PYX_ERR(2, 677, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_slice__55);
+ __Pyx_GIVEREF(__pyx_slice__55);
- /* "View.MemoryView":671
+ /* "View.MemoryView":680
* seen_ellipsis = True
* else:
* result.append(slice(None)) # <<<<<<<<<<<<<<
* have_slices = True
* else:
*/
- __pyx_slice__50 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__50)) __PYX_ERR(2, 671, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_slice__50);
- __Pyx_GIVEREF(__pyx_slice__50);
+ __pyx_slice__56 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__56)) __PYX_ERR(2, 680, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_slice__56);
+ __Pyx_GIVEREF(__pyx_slice__56);
- /* "View.MemoryView":682
+ /* "View.MemoryView":691
* nslices = ndim - len(result)
* if nslices:
* result.extend([slice(None)] * nslices) # <<<<<<<<<<<<<<
*
* return have_slices or nslices, tuple(result)
*/
- __pyx_slice__51 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__51)) __PYX_ERR(2, 682, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_slice__51);
- __Pyx_GIVEREF(__pyx_slice__51);
+ __pyx_slice__57 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__57)) __PYX_ERR(2, 691, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_slice__57);
+ __Pyx_GIVEREF(__pyx_slice__57);
- /* "View.MemoryView":689
+ /* "View.MemoryView":698
* for suboffset in suboffsets[:ndim]:
* if suboffset >= 0:
* raise ValueError("Indirect dimensions not supported") # <<<<<<<<<<<<<<
*
*
*/
- __pyx_tuple__52 = PyTuple_Pack(1, __pyx_kp_s_Indirect_dimensions_not_supporte); if (unlikely(!__pyx_tuple__52)) __PYX_ERR(2, 689, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__52);
- __Pyx_GIVEREF(__pyx_tuple__52);
+ __pyx_tuple__58 = PyTuple_Pack(1, __pyx_kp_s_Indirect_dimensions_not_supporte); if (unlikely(!__pyx_tuple__58)) __PYX_ERR(2, 698, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__58);
+ __Pyx_GIVEREF(__pyx_tuple__58);
+
+ /* "(tree fragment)":2
+ * def __reduce_cython__(self):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
+ * def __setstate_cython__(self, __pyx_state):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ */
+ __pyx_tuple__59 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__59)) __PYX_ERR(2, 2, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__59);
+ __Pyx_GIVEREF(__pyx_tuple__59);
+
+ /* "(tree fragment)":4
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ * def __setstate_cython__(self, __pyx_state):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
+ */
+ __pyx_tuple__60 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__60)) __PYX_ERR(2, 4, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__60);
+ __Pyx_GIVEREF(__pyx_tuple__60);
/* "silx/math/chistogramnd_lut.pyx":58
*
@@ -47234,10 +49891,10 @@ static int __Pyx_InitCachedConstants(void) {
* histo_range,
* n_bins,
*/
- __pyx_tuple__53 = PyTuple_Pack(26, __pyx_n_s_sample, __pyx_n_s_histo_range, __pyx_n_s_n_bins, __pyx_n_s_last_bin_closed, __pyx_n_s_s_shape, __pyx_n_s_n_dims, __pyx_n_s_i_histo_range, __pyx_n_s_err_histo_range, __pyx_n_s_sample_type, __pyx_n_s_n_elem, __pyx_n_s_lut_dtype, __pyx_n_s_lut, __pyx_n_s_histo, __pyx_n_s_dtype, __pyx_n_s_sample_c, __pyx_n_s_histo_range_c, __pyx_n_s_n_bins_c, __pyx_n_s_lut_c, __pyx_n_s_histo_c, __pyx_n_s_rc, __pyx_n_s_ex, __pyx_n_s_edges, __pyx_n_s_i_dim, __pyx_n_s_dim_edges, __pyx_n_s_rng_min, __pyx_n_s_rng_max); if (unlikely(!__pyx_tuple__53)) __PYX_ERR(0, 58, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__53);
- __Pyx_GIVEREF(__pyx_tuple__53);
- __pyx_codeobj__54 = (PyObject*)__Pyx_PyCode_New(4, 0, 26, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__53, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_users_kieffer_workspace_400_rel, __pyx_n_s_histogramnd_get_lut, 58, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__54)) __PYX_ERR(0, 58, __pyx_L1_error)
+ __pyx_tuple__61 = PyTuple_Pack(26, __pyx_n_s_sample, __pyx_n_s_histo_range, __pyx_n_s_n_bins, __pyx_n_s_last_bin_closed, __pyx_n_s_s_shape, __pyx_n_s_n_dims, __pyx_n_s_i_histo_range, __pyx_n_s_err_histo_range, __pyx_n_s_sample_type, __pyx_n_s_n_elem, __pyx_n_s_lut_dtype, __pyx_n_s_lut, __pyx_n_s_histo, __pyx_n_s_dtype, __pyx_n_s_sample_c, __pyx_n_s_histo_range_c, __pyx_n_s_n_bins_c, __pyx_n_s_lut_c, __pyx_n_s_histo_c, __pyx_n_s_rc, __pyx_n_s_ex, __pyx_n_s_edges, __pyx_n_s_i_dim, __pyx_n_s_dim_edges, __pyx_n_s_rng_min, __pyx_n_s_rng_max); if (unlikely(!__pyx_tuple__61)) __PYX_ERR(0, 58, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__61);
+ __Pyx_GIVEREF(__pyx_tuple__61);
+ __pyx_codeobj__62 = (PyObject*)__Pyx_PyCode_New(4, 0, 26, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__61, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_silx_math_chistogramnd_lut_pyx, __pyx_n_s_histogramnd_get_lut, 58, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__62)) __PYX_ERR(0, 58, __pyx_L1_error)
/* "silx/math/chistogramnd_lut.pyx":211
*
@@ -47246,22 +49903,22 @@ static int __Pyx_InitCachedConstants(void) {
* histo_lut,
* histo=None,
*/
- __pyx_tuple__55 = PyTuple_Pack(17, __pyx_n_s_weights, __pyx_n_s_histo_lut, __pyx_n_s_histo, __pyx_n_s_weighted_histo, __pyx_n_s_shape, __pyx_n_s_dtype, __pyx_n_s_weight_min, __pyx_n_s_weight_max, __pyx_n_s_w_dtype, __pyx_n_s_w_c, __pyx_n_s_h_c, __pyx_n_s_w_h_c, __pyx_n_s_h_lut_c, __pyx_n_s_rc, __pyx_n_s_filt_min_weights, __pyx_n_s_filt_max_weights, __pyx_n_s_ex); if (unlikely(!__pyx_tuple__55)) __PYX_ERR(0, 211, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__55);
- __Pyx_GIVEREF(__pyx_tuple__55);
- __pyx_codeobj__56 = (PyObject*)__Pyx_PyCode_New(8, 0, 17, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__55, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_users_kieffer_workspace_400_rel, __pyx_n_s_histogramnd_from_lut, 211, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__56)) __PYX_ERR(0, 211, __pyx_L1_error)
+ __pyx_tuple__63 = PyTuple_Pack(17, __pyx_n_s_weights, __pyx_n_s_histo_lut, __pyx_n_s_histo, __pyx_n_s_weighted_histo, __pyx_n_s_shape, __pyx_n_s_dtype, __pyx_n_s_weight_min, __pyx_n_s_weight_max, __pyx_n_s_w_dtype, __pyx_n_s_w_c, __pyx_n_s_h_c, __pyx_n_s_w_h_c, __pyx_n_s_h_lut_c, __pyx_n_s_rc, __pyx_n_s_filt_min_weights, __pyx_n_s_filt_max_weights, __pyx_n_s_ex); if (unlikely(!__pyx_tuple__63)) __PYX_ERR(0, 211, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__63);
+ __Pyx_GIVEREF(__pyx_tuple__63);
+ __pyx_codeobj__64 = (PyObject*)__Pyx_PyCode_New(8, 0, 17, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__63, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_silx_math_chistogramnd_lut_pyx, __pyx_n_s_histogramnd_from_lut, 211, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__64)) __PYX_ERR(0, 211, __pyx_L1_error)
/* "silx/math/chistogramnd_lut.pyx":332
* @cython.nonecheck(False)
* @cython.cdivision(True)
* def _histogramnd_from_lut_fused(weights_t[:] i_weights, # <<<<<<<<<<<<<<
* lut_t[:] i_lut,
- * np.uint32_t[:] o_histo,
+ * cnumpy.uint32_t[:] o_histo,
*/
- __pyx_tuple__57 = PyTuple_Pack(10, __pyx_n_s_i_weights, __pyx_n_s_i_lut, __pyx_n_s_o_histo, __pyx_n_s_o_weighted_histo, __pyx_n_s_i_n_elems, __pyx_n_s_i_filt_min_weights, __pyx_n_s_i_weight_min, __pyx_n_s_i_filt_max_weights, __pyx_n_s_i_weight_max, __pyx_n_s_i); if (unlikely(!__pyx_tuple__57)) __PYX_ERR(0, 332, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__57);
- __Pyx_GIVEREF(__pyx_tuple__57);
- __pyx_codeobj__58 = (PyObject*)__Pyx_PyCode_New(9, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__57, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_users_kieffer_workspace_400_rel, __pyx_n_s_histogramnd_from_lut_fused, 332, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__58)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __pyx_tuple__65 = PyTuple_Pack(10, __pyx_n_s_i_weights, __pyx_n_s_i_lut, __pyx_n_s_o_histo, __pyx_n_s_o_weighted_histo, __pyx_n_s_i_n_elems, __pyx_n_s_i_filt_min_weights, __pyx_n_s_i_weight_min, __pyx_n_s_i_filt_max_weights, __pyx_n_s_i_weight_max, __pyx_n_s_i); if (unlikely(!__pyx_tuple__65)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__65);
+ __Pyx_GIVEREF(__pyx_tuple__65);
+ __pyx_codeobj__66 = (PyObject*)__Pyx_PyCode_New(9, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__65, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_silx_math_chistogramnd_lut_pyx, __pyx_n_s_histogramnd_from_lut_fused, 332, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__66)) __PYX_ERR(0, 332, __pyx_L1_error)
/* "silx/math/chistogramnd_lut.pyx":361
* @cython.nonecheck(False)
@@ -47270,65 +49927,75 @@ static int __Pyx_InitCachedConstants(void) {
* int i_n_dims,
* int i_n_elems,
*/
- __pyx_tuple__59 = PyTuple_Pack(17, __pyx_n_s_i_sample, __pyx_n_s_i_n_dims, __pyx_n_s_i_n_elems, __pyx_n_s_i_histo_range, __pyx_n_s_i_n_bins, __pyx_n_s_o_lut, __pyx_n_s_o_histo, __pyx_n_s_last_bin_closed, __pyx_n_s_i, __pyx_n_s_elem_idx, __pyx_n_s_max_idx, __pyx_n_s_lut_idx, __pyx_n_s_bin_idx, __pyx_n_s_elem_coord, __pyx_n_s_g_min, __pyx_n_s_g_max, __pyx_n_s_bins_range); if (unlikely(!__pyx_tuple__59)) __PYX_ERR(0, 361, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__59);
- __Pyx_GIVEREF(__pyx_tuple__59);
- __pyx_codeobj__60 = (PyObject*)__Pyx_PyCode_New(8, 0, 17, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__59, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_users_kieffer_workspace_400_rel, __pyx_n_s_histogramnd_get_lut_fused, 361, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__60)) __PYX_ERR(0, 361, __pyx_L1_error)
+ __pyx_tuple__67 = PyTuple_Pack(17, __pyx_n_s_i_sample, __pyx_n_s_i_n_dims, __pyx_n_s_i_n_elems, __pyx_n_s_i_histo_range, __pyx_n_s_i_n_bins, __pyx_n_s_o_lut, __pyx_n_s_o_histo, __pyx_n_s_last_bin_closed, __pyx_n_s_i, __pyx_n_s_elem_idx, __pyx_n_s_max_idx, __pyx_n_s_lut_idx, __pyx_n_s_bin_idx, __pyx_n_s_elem_coord, __pyx_n_s_g_min, __pyx_n_s_g_max, __pyx_n_s_bins_range); if (unlikely(!__pyx_tuple__67)) __PYX_ERR(0, 361, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__67);
+ __Pyx_GIVEREF(__pyx_tuple__67);
+ __pyx_codeobj__68 = (PyObject*)__Pyx_PyCode_New(8, 0, 17, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__67, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_silx_math_chistogramnd_lut_pyx, __pyx_n_s_histogramnd_get_lut_fused, 361, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__68)) __PYX_ERR(0, 361, __pyx_L1_error)
- /* "View.MemoryView":282
+ /* "View.MemoryView":285
* return self.name
*
* cdef generic = Enum("<strided and direct or indirect>") # <<<<<<<<<<<<<<
* cdef strided = Enum("<strided and direct>") # default
* cdef indirect = Enum("<strided and indirect>")
*/
- __pyx_tuple__61 = PyTuple_Pack(1, __pyx_kp_s_strided_and_direct_or_indirect); if (unlikely(!__pyx_tuple__61)) __PYX_ERR(2, 282, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__61);
- __Pyx_GIVEREF(__pyx_tuple__61);
+ __pyx_tuple__69 = PyTuple_Pack(1, __pyx_kp_s_strided_and_direct_or_indirect); if (unlikely(!__pyx_tuple__69)) __PYX_ERR(2, 285, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__69);
+ __Pyx_GIVEREF(__pyx_tuple__69);
- /* "View.MemoryView":283
+ /* "View.MemoryView":286
*
* cdef generic = Enum("<strided and direct or indirect>")
* cdef strided = Enum("<strided and direct>") # default # <<<<<<<<<<<<<<
* cdef indirect = Enum("<strided and indirect>")
*
*/
- __pyx_tuple__62 = PyTuple_Pack(1, __pyx_kp_s_strided_and_direct); if (unlikely(!__pyx_tuple__62)) __PYX_ERR(2, 283, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__62);
- __Pyx_GIVEREF(__pyx_tuple__62);
+ __pyx_tuple__70 = PyTuple_Pack(1, __pyx_kp_s_strided_and_direct); if (unlikely(!__pyx_tuple__70)) __PYX_ERR(2, 286, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__70);
+ __Pyx_GIVEREF(__pyx_tuple__70);
- /* "View.MemoryView":284
+ /* "View.MemoryView":287
* cdef generic = Enum("<strided and direct or indirect>")
* cdef strided = Enum("<strided and direct>") # default
* cdef indirect = Enum("<strided and indirect>") # <<<<<<<<<<<<<<
*
*
*/
- __pyx_tuple__63 = PyTuple_Pack(1, __pyx_kp_s_strided_and_indirect); if (unlikely(!__pyx_tuple__63)) __PYX_ERR(2, 284, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__63);
- __Pyx_GIVEREF(__pyx_tuple__63);
+ __pyx_tuple__71 = PyTuple_Pack(1, __pyx_kp_s_strided_and_indirect); if (unlikely(!__pyx_tuple__71)) __PYX_ERR(2, 287, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__71);
+ __Pyx_GIVEREF(__pyx_tuple__71);
- /* "View.MemoryView":287
+ /* "View.MemoryView":290
*
*
* cdef contiguous = Enum("<contiguous and direct>") # <<<<<<<<<<<<<<
* cdef indirect_contiguous = Enum("<contiguous and indirect>")
*
*/
- __pyx_tuple__64 = PyTuple_Pack(1, __pyx_kp_s_contiguous_and_direct); if (unlikely(!__pyx_tuple__64)) __PYX_ERR(2, 287, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__64);
- __Pyx_GIVEREF(__pyx_tuple__64);
+ __pyx_tuple__72 = PyTuple_Pack(1, __pyx_kp_s_contiguous_and_direct); if (unlikely(!__pyx_tuple__72)) __PYX_ERR(2, 290, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__72);
+ __Pyx_GIVEREF(__pyx_tuple__72);
- /* "View.MemoryView":288
+ /* "View.MemoryView":291
*
* cdef contiguous = Enum("<contiguous and direct>")
* cdef indirect_contiguous = Enum("<contiguous and indirect>") # <<<<<<<<<<<<<<
*
*
*/
- __pyx_tuple__65 = PyTuple_Pack(1, __pyx_kp_s_contiguous_and_indirect); if (unlikely(!__pyx_tuple__65)) __PYX_ERR(2, 288, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__65);
- __Pyx_GIVEREF(__pyx_tuple__65);
+ __pyx_tuple__73 = PyTuple_Pack(1, __pyx_kp_s_contiguous_and_indirect); if (unlikely(!__pyx_tuple__73)) __PYX_ERR(2, 291, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__73);
+ __Pyx_GIVEREF(__pyx_tuple__73);
+
+ /* "(tree fragment)":1
+ * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
+ * if __pyx_checksum != 0xb068931:
+ * from pickle import PickleError as __pyx_PickleError
+ */
+ __pyx_tuple__74 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__74)) __PYX_ERR(2, 1, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__74);
+ __Pyx_GIVEREF(__pyx_tuple__74);
+ __pyx_codeobj__75 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__74, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Enum, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__75)) __PYX_ERR(2, 1, __pyx_L1_error)
__Pyx_RefNannyFinishContext();
return 0;
__pyx_L1_error:;
@@ -47341,7 +50008,10 @@ static int __Pyx_InitGlobals(void) {
__pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
__pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error)
__pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_int_8 = PyInt_FromLong(8); if (unlikely(!__pyx_int_8)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_int_9 = PyInt_FromLong(9); if (unlikely(!__pyx_int_9)) __PYX_ERR(0, 1, __pyx_L1_error)
__pyx_int_32768 = PyInt_FromLong(32768L); if (unlikely(!__pyx_int_32768)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_int_184977713 = PyInt_FromLong(184977713L); if (unlikely(!__pyx_int_184977713)) __PYX_ERR(0, 1, __pyx_L1_error)
__pyx_int_2147483648 = PyInt_FromString((char *)"2147483648", 0, 0); if (unlikely(!__pyx_int_2147483648)) __PYX_ERR(0, 1, __pyx_L1_error)
__pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(0, 1, __pyx_L1_error)
return 0;
@@ -47349,12 +50019,208 @@ static int __Pyx_InitGlobals(void) {
return -1;
}
+static int __Pyx_modinit_global_init_code(void); /*proto*/
+static int __Pyx_modinit_variable_export_code(void); /*proto*/
+static int __Pyx_modinit_function_export_code(void); /*proto*/
+static int __Pyx_modinit_type_init_code(void); /*proto*/
+static int __Pyx_modinit_type_import_code(void); /*proto*/
+static int __Pyx_modinit_variable_import_code(void); /*proto*/
+static int __Pyx_modinit_function_import_code(void); /*proto*/
+
+static int __Pyx_modinit_global_init_code(void) {
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
+ /*--- Global init code ---*/
+ generic = Py_None; Py_INCREF(Py_None);
+ strided = Py_None; Py_INCREF(Py_None);
+ indirect = Py_None; Py_INCREF(Py_None);
+ contiguous = Py_None; Py_INCREF(Py_None);
+ indirect_contiguous = Py_None; Py_INCREF(Py_None);
+ __Pyx_RefNannyFinishContext();
+ return 0;
+}
+
+static int __Pyx_modinit_variable_export_code(void) {
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
+ /*--- Variable export code ---*/
+ __Pyx_RefNannyFinishContext();
+ return 0;
+}
+
+static int __Pyx_modinit_function_export_code(void) {
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
+ /*--- Function export code ---*/
+ __Pyx_RefNannyFinishContext();
+ return 0;
+}
+
+static int __Pyx_modinit_type_init_code(void) {
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
+ /*--- Type init code ---*/
+ __pyx_vtabptr_array = &__pyx_vtable_array;
+ __pyx_vtable_array.get_memview = (PyObject *(*)(struct __pyx_array_obj *))__pyx_array_get_memview;
+ if (PyType_Ready(&__pyx_type___pyx_array) < 0) __PYX_ERR(2, 104, __pyx_L1_error)
+ __pyx_type___pyx_array.tp_print = 0;
+ if (__Pyx_SetVtable(__pyx_type___pyx_array.tp_dict, __pyx_vtabptr_array) < 0) __PYX_ERR(2, 104, __pyx_L1_error)
+ if (__Pyx_setup_reduce((PyObject*)&__pyx_type___pyx_array) < 0) __PYX_ERR(2, 104, __pyx_L1_error)
+ __pyx_array_type = &__pyx_type___pyx_array;
+ if (PyType_Ready(&__pyx_type___pyx_MemviewEnum) < 0) __PYX_ERR(2, 278, __pyx_L1_error)
+ __pyx_type___pyx_MemviewEnum.tp_print = 0;
+ if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_MemviewEnum.tp_dictoffset && __pyx_type___pyx_MemviewEnum.tp_getattro == PyObject_GenericGetAttr)) {
+ __pyx_type___pyx_MemviewEnum.tp_getattro = __Pyx_PyObject_GenericGetAttr;
+ }
+ if (__Pyx_setup_reduce((PyObject*)&__pyx_type___pyx_MemviewEnum) < 0) __PYX_ERR(2, 278, __pyx_L1_error)
+ __pyx_MemviewEnum_type = &__pyx_type___pyx_MemviewEnum;
+ __pyx_vtabptr_memoryview = &__pyx_vtable_memoryview;
+ __pyx_vtable_memoryview.get_item_pointer = (char *(*)(struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_get_item_pointer;
+ __pyx_vtable_memoryview.is_slice = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_is_slice;
+ __pyx_vtable_memoryview.setitem_slice_assignment = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *, PyObject *))__pyx_memoryview_setitem_slice_assignment;
+ __pyx_vtable_memoryview.setitem_slice_assign_scalar = (PyObject *(*)(struct __pyx_memoryview_obj *, struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_setitem_slice_assign_scalar;
+ __pyx_vtable_memoryview.setitem_indexed = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *, PyObject *))__pyx_memoryview_setitem_indexed;
+ __pyx_vtable_memoryview.convert_item_to_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *))__pyx_memoryview_convert_item_to_object;
+ __pyx_vtable_memoryview.assign_item_from_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *, PyObject *))__pyx_memoryview_assign_item_from_object;
+ if (PyType_Ready(&__pyx_type___pyx_memoryview) < 0) __PYX_ERR(2, 329, __pyx_L1_error)
+ __pyx_type___pyx_memoryview.tp_print = 0;
+ if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_memoryview.tp_dictoffset && __pyx_type___pyx_memoryview.tp_getattro == PyObject_GenericGetAttr)) {
+ __pyx_type___pyx_memoryview.tp_getattro = __Pyx_PyObject_GenericGetAttr;
+ }
+ if (__Pyx_SetVtable(__pyx_type___pyx_memoryview.tp_dict, __pyx_vtabptr_memoryview) < 0) __PYX_ERR(2, 329, __pyx_L1_error)
+ if (__Pyx_setup_reduce((PyObject*)&__pyx_type___pyx_memoryview) < 0) __PYX_ERR(2, 329, __pyx_L1_error)
+ __pyx_memoryview_type = &__pyx_type___pyx_memoryview;
+ __pyx_vtabptr__memoryviewslice = &__pyx_vtable__memoryviewslice;
+ __pyx_vtable__memoryviewslice.__pyx_base = *__pyx_vtabptr_memoryview;
+ __pyx_vtable__memoryviewslice.__pyx_base.convert_item_to_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *))__pyx_memoryviewslice_convert_item_to_object;
+ __pyx_vtable__memoryviewslice.__pyx_base.assign_item_from_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *, PyObject *))__pyx_memoryviewslice_assign_item_from_object;
+ __pyx_type___pyx_memoryviewslice.tp_base = __pyx_memoryview_type;
+ if (PyType_Ready(&__pyx_type___pyx_memoryviewslice) < 0) __PYX_ERR(2, 960, __pyx_L1_error)
+ __pyx_type___pyx_memoryviewslice.tp_print = 0;
+ if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_memoryviewslice.tp_dictoffset && __pyx_type___pyx_memoryviewslice.tp_getattro == PyObject_GenericGetAttr)) {
+ __pyx_type___pyx_memoryviewslice.tp_getattro = __Pyx_PyObject_GenericGetAttr;
+ }
+ if (__Pyx_SetVtable(__pyx_type___pyx_memoryviewslice.tp_dict, __pyx_vtabptr__memoryviewslice) < 0) __PYX_ERR(2, 960, __pyx_L1_error)
+ if (__Pyx_setup_reduce((PyObject*)&__pyx_type___pyx_memoryviewslice) < 0) __PYX_ERR(2, 960, __pyx_L1_error)
+ __pyx_memoryviewslice_type = &__pyx_type___pyx_memoryviewslice;
+ __Pyx_RefNannyFinishContext();
+ return 0;
+ __pyx_L1_error:;
+ __Pyx_RefNannyFinishContext();
+ return -1;
+}
+
+static int __Pyx_modinit_type_import_code(void) {
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
+ /*--- Type import code ---*/
+ __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "type",
+ #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
+ sizeof(PyTypeObject),
+ #else
+ sizeof(PyHeapTypeObject),
+ #endif
+ 0); if (unlikely(!__pyx_ptype_7cpython_4type_type)) __PYX_ERR(3, 9, __pyx_L1_error)
+ __pyx_ptype_5numpy_dtype = __Pyx_ImportType("numpy", "dtype", sizeof(PyArray_Descr), 0); if (unlikely(!__pyx_ptype_5numpy_dtype)) __PYX_ERR(1, 164, __pyx_L1_error)
+ __pyx_ptype_5numpy_flatiter = __Pyx_ImportType("numpy", "flatiter", sizeof(PyArrayIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_flatiter)) __PYX_ERR(1, 186, __pyx_L1_error)
+ __pyx_ptype_5numpy_broadcast = __Pyx_ImportType("numpy", "broadcast", sizeof(PyArrayMultiIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_broadcast)) __PYX_ERR(1, 190, __pyx_L1_error)
+ __pyx_ptype_5numpy_ndarray = __Pyx_ImportType("numpy", "ndarray", sizeof(PyArrayObject), 0); if (unlikely(!__pyx_ptype_5numpy_ndarray)) __PYX_ERR(1, 199, __pyx_L1_error)
+ __pyx_ptype_5numpy_ufunc = __Pyx_ImportType("numpy", "ufunc", sizeof(PyUFuncObject), 0); if (unlikely(!__pyx_ptype_5numpy_ufunc)) __PYX_ERR(1, 872, __pyx_L1_error)
+ __Pyx_RefNannyFinishContext();
+ return 0;
+ __pyx_L1_error:;
+ __Pyx_RefNannyFinishContext();
+ return -1;
+}
+
+static int __Pyx_modinit_variable_import_code(void) {
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
+ /*--- Variable import code ---*/
+ __Pyx_RefNannyFinishContext();
+ return 0;
+}
+
+static int __Pyx_modinit_function_import_code(void) {
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
+ /*--- Function import code ---*/
+ __Pyx_RefNannyFinishContext();
+ return 0;
+}
+
+
+#if PY_MAJOR_VERSION < 3
+#ifdef CYTHON_NO_PYINIT_EXPORT
+#define __Pyx_PyMODINIT_FUNC void
+#else
+#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
+#endif
+#else
+#ifdef CYTHON_NO_PYINIT_EXPORT
+#define __Pyx_PyMODINIT_FUNC PyObject *
+#else
+#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
+#endif
+#endif
+#ifndef CYTHON_SMALL_CODE
+#if defined(__clang__)
+ #define CYTHON_SMALL_CODE
+#elif defined(__GNUC__) && (!(defined(__cplusplus)) || (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 4)))
+ #define CYTHON_SMALL_CODE __attribute__((optimize("Os")))
+#else
+ #define CYTHON_SMALL_CODE
+#endif
+#endif
+
+
#if PY_MAJOR_VERSION < 3
-PyMODINIT_FUNC initchistogramnd_lut(void); /*proto*/
-PyMODINIT_FUNC initchistogramnd_lut(void)
+__Pyx_PyMODINIT_FUNC initchistogramnd_lut(void) CYTHON_SMALL_CODE; /*proto*/
+__Pyx_PyMODINIT_FUNC initchistogramnd_lut(void)
#else
-PyMODINIT_FUNC PyInit_chistogramnd_lut(void); /*proto*/
-PyMODINIT_FUNC PyInit_chistogramnd_lut(void)
+__Pyx_PyMODINIT_FUNC PyInit_chistogramnd_lut(void) CYTHON_SMALL_CODE; /*proto*/
+__Pyx_PyMODINIT_FUNC PyInit_chistogramnd_lut(void)
+#if CYTHON_PEP489_MULTI_PHASE_INIT
+{
+ return PyModuleDef_Init(&__pyx_moduledef);
+}
+static int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name) {
+ PyObject *value = PyObject_GetAttrString(spec, from_name);
+ int result = 0;
+ if (likely(value)) {
+ result = PyDict_SetItemString(moddict, to_name, value);
+ Py_DECREF(value);
+ } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
+ PyErr_Clear();
+ } else {
+ result = -1;
+ }
+ return result;
+}
+static PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) {
+ PyObject *module = NULL, *moddict, *modname;
+ if (__pyx_m)
+ return __Pyx_NewRef(__pyx_m);
+ modname = PyObject_GetAttrString(spec, "name");
+ if (unlikely(!modname)) goto bad;
+ module = PyModule_NewObject(modname);
+ Py_DECREF(modname);
+ if (unlikely(!module)) goto bad;
+ moddict = PyModule_GetDict(module);
+ if (unlikely(!moddict)) goto bad;
+ if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__") < 0)) goto bad;
+ if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__") < 0)) goto bad;
+ if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__") < 0)) goto bad;
+ if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__") < 0)) goto bad;
+ return module;
+bad:
+ Py_XDECREF(module);
+ return NULL;
+}
+
+
+static int __pyx_pymod_exec_chistogramnd_lut(PyObject *__pyx_pyinit_module)
+#endif
#endif
{
PyObject *__pyx_t_1 = NULL;
@@ -47364,16 +50230,21 @@ PyMODINIT_FUNC PyInit_chistogramnd_lut(void)
PyObject *__pyx_t_5 = NULL;
static PyThread_type_lock __pyx_t_6[8];
__Pyx_RefNannyDeclarations
- #if CYTHON_REFNANNY
- __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
- if (!__Pyx_RefNanny) {
- PyErr_Clear();
- __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
- if (!__Pyx_RefNanny)
- Py_FatalError("failed to import 'refnanny' module");
- }
+ #if CYTHON_PEP489_MULTI_PHASE_INIT
+ if (__pyx_m && __pyx_m == __pyx_pyinit_module) return 0;
+ #elif PY_MAJOR_VERSION >= 3
+ if (__pyx_m) return __Pyx_NewRef(__pyx_m);
#endif
- __Pyx_RefNannySetupContext("PyMODINIT_FUNC PyInit_chistogramnd_lut(void)", 0);
+ #if CYTHON_REFNANNY
+__Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
+if (!__Pyx_RefNanny) {
+ PyErr_Clear();
+ __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
+ if (!__Pyx_RefNanny)
+ Py_FatalError("failed to import 'refnanny' module");
+}
+#endif
+ __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_chistogramnd_lut(void)", 0);
if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
__pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
__pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
@@ -47390,6 +50261,9 @@ PyMODINIT_FUNC PyInit_chistogramnd_lut(void)
#ifdef __Pyx_Generator_USED
if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
#endif
+ #ifdef __Pyx_AsyncGen_USED
+ if (__pyx_AsyncGen_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+ #endif
#ifdef __Pyx_StopAsyncIteration_USED
if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
#endif
@@ -47401,15 +50275,21 @@ PyMODINIT_FUNC PyInit_chistogramnd_lut(void)
#endif
#endif
/*--- Module creation code ---*/
+ #if CYTHON_PEP489_MULTI_PHASE_INIT
+ __pyx_m = __pyx_pyinit_module;
+ Py_INCREF(__pyx_m);
+ #else
#if PY_MAJOR_VERSION < 3
__pyx_m = Py_InitModule4("chistogramnd_lut", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
#else
__pyx_m = PyModule_Create(&__pyx_moduledef);
#endif
if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
+ #endif
__pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
Py_INCREF(__pyx_d);
__pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
#if CYTHON_COMPILING_IN_PYPY
Py_INCREF(__pyx_b);
#endif
@@ -47434,60 +50314,14 @@ PyMODINIT_FUNC PyInit_chistogramnd_lut(void)
if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
/*--- Constants init code ---*/
if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
- /*--- Global init code ---*/
- generic = Py_None; Py_INCREF(Py_None);
- strided = Py_None; Py_INCREF(Py_None);
- indirect = Py_None; Py_INCREF(Py_None);
- contiguous = Py_None; Py_INCREF(Py_None);
- indirect_contiguous = Py_None; Py_INCREF(Py_None);
- /*--- Variable export code ---*/
- /*--- Function export code ---*/
- /*--- Type init code ---*/
- __pyx_vtabptr_array = &__pyx_vtable_array;
- __pyx_vtable_array.get_memview = (PyObject *(*)(struct __pyx_array_obj *))__pyx_array_get_memview;
- if (PyType_Ready(&__pyx_type___pyx_array) < 0) __PYX_ERR(2, 103, __pyx_L1_error)
- __pyx_type___pyx_array.tp_print = 0;
- if (__Pyx_SetVtable(__pyx_type___pyx_array.tp_dict, __pyx_vtabptr_array) < 0) __PYX_ERR(2, 103, __pyx_L1_error)
- __pyx_array_type = &__pyx_type___pyx_array;
- if (PyType_Ready(&__pyx_type___pyx_MemviewEnum) < 0) __PYX_ERR(2, 275, __pyx_L1_error)
- __pyx_type___pyx_MemviewEnum.tp_print = 0;
- __pyx_MemviewEnum_type = &__pyx_type___pyx_MemviewEnum;
- __pyx_vtabptr_memoryview = &__pyx_vtable_memoryview;
- __pyx_vtable_memoryview.get_item_pointer = (char *(*)(struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_get_item_pointer;
- __pyx_vtable_memoryview.is_slice = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_is_slice;
- __pyx_vtable_memoryview.setitem_slice_assignment = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *, PyObject *))__pyx_memoryview_setitem_slice_assignment;
- __pyx_vtable_memoryview.setitem_slice_assign_scalar = (PyObject *(*)(struct __pyx_memoryview_obj *, struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_setitem_slice_assign_scalar;
- __pyx_vtable_memoryview.setitem_indexed = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *, PyObject *))__pyx_memoryview_setitem_indexed;
- __pyx_vtable_memoryview.convert_item_to_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *))__pyx_memoryview_convert_item_to_object;
- __pyx_vtable_memoryview.assign_item_from_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *, PyObject *))__pyx_memoryview_assign_item_from_object;
- if (PyType_Ready(&__pyx_type___pyx_memoryview) < 0) __PYX_ERR(2, 326, __pyx_L1_error)
- __pyx_type___pyx_memoryview.tp_print = 0;
- if (__Pyx_SetVtable(__pyx_type___pyx_memoryview.tp_dict, __pyx_vtabptr_memoryview) < 0) __PYX_ERR(2, 326, __pyx_L1_error)
- __pyx_memoryview_type = &__pyx_type___pyx_memoryview;
- __pyx_vtabptr__memoryviewslice = &__pyx_vtable__memoryviewslice;
- __pyx_vtable__memoryviewslice.__pyx_base = *__pyx_vtabptr_memoryview;
- __pyx_vtable__memoryviewslice.__pyx_base.convert_item_to_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *))__pyx_memoryviewslice_convert_item_to_object;
- __pyx_vtable__memoryviewslice.__pyx_base.assign_item_from_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *, PyObject *))__pyx_memoryviewslice_assign_item_from_object;
- __pyx_type___pyx_memoryviewslice.tp_base = __pyx_memoryview_type;
- if (PyType_Ready(&__pyx_type___pyx_memoryviewslice) < 0) __PYX_ERR(2, 951, __pyx_L1_error)
- __pyx_type___pyx_memoryviewslice.tp_print = 0;
- if (__Pyx_SetVtable(__pyx_type___pyx_memoryviewslice.tp_dict, __pyx_vtabptr__memoryviewslice) < 0) __PYX_ERR(2, 951, __pyx_L1_error)
- __pyx_memoryviewslice_type = &__pyx_type___pyx_memoryviewslice;
- /*--- Type import code ---*/
- __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "type",
- #if CYTHON_COMPILING_IN_PYPY
- sizeof(PyTypeObject),
- #else
- sizeof(PyHeapTypeObject),
- #endif
- 0); if (unlikely(!__pyx_ptype_7cpython_4type_type)) __PYX_ERR(3, 9, __pyx_L1_error)
- __pyx_ptype_5numpy_dtype = __Pyx_ImportType("numpy", "dtype", sizeof(PyArray_Descr), 0); if (unlikely(!__pyx_ptype_5numpy_dtype)) __PYX_ERR(1, 155, __pyx_L1_error)
- __pyx_ptype_5numpy_flatiter = __Pyx_ImportType("numpy", "flatiter", sizeof(PyArrayIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_flatiter)) __PYX_ERR(1, 168, __pyx_L1_error)
- __pyx_ptype_5numpy_broadcast = __Pyx_ImportType("numpy", "broadcast", sizeof(PyArrayMultiIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_broadcast)) __PYX_ERR(1, 172, __pyx_L1_error)
- __pyx_ptype_5numpy_ndarray = __Pyx_ImportType("numpy", "ndarray", sizeof(PyArrayObject), 0); if (unlikely(!__pyx_ptype_5numpy_ndarray)) __PYX_ERR(1, 181, __pyx_L1_error)
- __pyx_ptype_5numpy_ufunc = __Pyx_ImportType("numpy", "ufunc", sizeof(PyUFuncObject), 0); if (unlikely(!__pyx_ptype_5numpy_ufunc)) __PYX_ERR(1, 861, __pyx_L1_error)
- /*--- Variable import code ---*/
- /*--- Function import code ---*/
+ /*--- Global type/function init code ---*/
+ (void)__Pyx_modinit_global_init_code();
+ (void)__Pyx_modinit_variable_export_code();
+ (void)__Pyx_modinit_function_export_code();
+ if (unlikely(__Pyx_modinit_type_init_code() != 0)) goto __pyx_L1_error;
+ if (unlikely(__Pyx_modinit_type_import_code() != 0)) goto __pyx_L1_error;
+ (void)__Pyx_modinit_variable_import_code();
+ (void)__Pyx_modinit_function_import_code();
/*--- Execution code ---*/
#if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
@@ -47527,7 +50361,7 @@ PyMODINIT_FUNC PyInit_chistogramnd_lut(void)
if (PyDict_SetItem(__pyx_d, __pyx_n_s_date, __pyx_kp_s_15_05_2016) < 0) __PYX_ERR(0, 27, __pyx_L1_error)
/* "silx/math/chistogramnd_lut.pyx":32
- * cimport numpy as np # noqa
+ * cimport numpy as cnumpy # noqa
* cimport cython
* import numpy as np # <<<<<<<<<<<<<<
*
@@ -47567,251 +50401,251 @@ PyMODINIT_FUNC PyInit_chistogramnd_lut(void)
* @cython.cdivision(True)
* def _histogramnd_from_lut_fused(weights_t[:] i_weights, # <<<<<<<<<<<<<<
* lut_t[:] i_lut,
- * np.uint32_t[:] o_histo,
+ * cnumpy.uint32_t[:] o_histo,
*/
- __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyDict_NewPresized(48); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_0_0_0__pyx_mdef_4silx_4math_16chistogramnd_lut_9_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__58)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_0_0_0__pyx_mdef_4silx_4math_16chistogramnd_lut_9_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__66)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_empty_tuple);
if (PyDict_SetItem(__pyx_t_1, __pyx_kp_s_float64_t_int64_t_float64_t, __pyx_t_2) < 0) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_0_0_1__pyx_mdef_4silx_4math_16chistogramnd_lut_11_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__58)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_0_0_1__pyx_mdef_4silx_4math_16chistogramnd_lut_11_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__66)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_empty_tuple);
if (PyDict_SetItem(__pyx_t_1, __pyx_kp_s_float64_t_int64_t_float32_t, __pyx_t_2) < 0) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_0_0_2__pyx_mdef_4silx_4math_16chistogramnd_lut_13_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__58)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_0_0_2__pyx_mdef_4silx_4math_16chistogramnd_lut_13_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__66)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_empty_tuple);
if (PyDict_SetItem(__pyx_t_1, __pyx_kp_s_float64_t_int64_t_int32_t, __pyx_t_2) < 0) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_0_0_3__pyx_mdef_4silx_4math_16chistogramnd_lut_15_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__58)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_0_0_3__pyx_mdef_4silx_4math_16chistogramnd_lut_15_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__66)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_empty_tuple);
if (PyDict_SetItem(__pyx_t_1, __pyx_kp_s_float64_t_int64_t_int64_t, __pyx_t_2) < 0) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_0_1_0__pyx_mdef_4silx_4math_16chistogramnd_lut_17_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__58)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_0_1_0__pyx_mdef_4silx_4math_16chistogramnd_lut_17_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__66)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_empty_tuple);
if (PyDict_SetItem(__pyx_t_1, __pyx_kp_s_float64_t_int32_t_float64_t, __pyx_t_2) < 0) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_0_1_1__pyx_mdef_4silx_4math_16chistogramnd_lut_19_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__58)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_0_1_1__pyx_mdef_4silx_4math_16chistogramnd_lut_19_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__66)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_empty_tuple);
if (PyDict_SetItem(__pyx_t_1, __pyx_kp_s_float64_t_int32_t_float32_t, __pyx_t_2) < 0) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_0_1_2__pyx_mdef_4silx_4math_16chistogramnd_lut_21_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__58)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_0_1_2__pyx_mdef_4silx_4math_16chistogramnd_lut_21_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__66)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_empty_tuple);
if (PyDict_SetItem(__pyx_t_1, __pyx_kp_s_float64_t_int32_t_int32_t, __pyx_t_2) < 0) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_0_1_3__pyx_mdef_4silx_4math_16chistogramnd_lut_23_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__58)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_0_1_3__pyx_mdef_4silx_4math_16chistogramnd_lut_23_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__66)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_empty_tuple);
if (PyDict_SetItem(__pyx_t_1, __pyx_kp_s_float64_t_int32_t_int64_t, __pyx_t_2) < 0) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_0_2_0__pyx_mdef_4silx_4math_16chistogramnd_lut_25_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__58)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_0_2_0__pyx_mdef_4silx_4math_16chistogramnd_lut_25_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__66)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_empty_tuple);
if (PyDict_SetItem(__pyx_t_1, __pyx_kp_s_float64_t_int16_t_float64_t, __pyx_t_2) < 0) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_0_2_1__pyx_mdef_4silx_4math_16chistogramnd_lut_27_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__58)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_0_2_1__pyx_mdef_4silx_4math_16chistogramnd_lut_27_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__66)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_empty_tuple);
if (PyDict_SetItem(__pyx_t_1, __pyx_kp_s_float64_t_int16_t_float32_t, __pyx_t_2) < 0) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_0_2_2__pyx_mdef_4silx_4math_16chistogramnd_lut_29_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__58)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_0_2_2__pyx_mdef_4silx_4math_16chistogramnd_lut_29_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__66)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_empty_tuple);
if (PyDict_SetItem(__pyx_t_1, __pyx_kp_s_float64_t_int16_t_int32_t, __pyx_t_2) < 0) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_0_2_3__pyx_mdef_4silx_4math_16chistogramnd_lut_31_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__58)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_0_2_3__pyx_mdef_4silx_4math_16chistogramnd_lut_31_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__66)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_empty_tuple);
if (PyDict_SetItem(__pyx_t_1, __pyx_kp_s_float64_t_int16_t_int64_t, __pyx_t_2) < 0) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_1_0_0__pyx_mdef_4silx_4math_16chistogramnd_lut_33_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__58)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_1_0_0__pyx_mdef_4silx_4math_16chistogramnd_lut_33_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__66)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_empty_tuple);
if (PyDict_SetItem(__pyx_t_1, __pyx_kp_s_float32_t_int64_t_float64_t, __pyx_t_2) < 0) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_1_0_1__pyx_mdef_4silx_4math_16chistogramnd_lut_35_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__58)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_1_0_1__pyx_mdef_4silx_4math_16chistogramnd_lut_35_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__66)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_empty_tuple);
if (PyDict_SetItem(__pyx_t_1, __pyx_kp_s_float32_t_int64_t_float32_t, __pyx_t_2) < 0) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_1_0_2__pyx_mdef_4silx_4math_16chistogramnd_lut_37_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__58)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_1_0_2__pyx_mdef_4silx_4math_16chistogramnd_lut_37_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__66)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_empty_tuple);
if (PyDict_SetItem(__pyx_t_1, __pyx_kp_s_float32_t_int64_t_int32_t, __pyx_t_2) < 0) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_1_0_3__pyx_mdef_4silx_4math_16chistogramnd_lut_39_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__58)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_1_0_3__pyx_mdef_4silx_4math_16chistogramnd_lut_39_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__66)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_empty_tuple);
if (PyDict_SetItem(__pyx_t_1, __pyx_kp_s_float32_t_int64_t_int64_t, __pyx_t_2) < 0) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_1_1_0__pyx_mdef_4silx_4math_16chistogramnd_lut_41_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__58)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_1_1_0__pyx_mdef_4silx_4math_16chistogramnd_lut_41_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__66)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_empty_tuple);
if (PyDict_SetItem(__pyx_t_1, __pyx_kp_s_float32_t_int32_t_float64_t, __pyx_t_2) < 0) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_1_1_1__pyx_mdef_4silx_4math_16chistogramnd_lut_43_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__58)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_1_1_1__pyx_mdef_4silx_4math_16chistogramnd_lut_43_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__66)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_empty_tuple);
if (PyDict_SetItem(__pyx_t_1, __pyx_kp_s_float32_t_int32_t_float32_t, __pyx_t_2) < 0) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_1_1_2__pyx_mdef_4silx_4math_16chistogramnd_lut_45_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__58)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_1_1_2__pyx_mdef_4silx_4math_16chistogramnd_lut_45_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__66)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_empty_tuple);
if (PyDict_SetItem(__pyx_t_1, __pyx_kp_s_float32_t_int32_t_int32_t, __pyx_t_2) < 0) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_1_1_3__pyx_mdef_4silx_4math_16chistogramnd_lut_47_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__58)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_1_1_3__pyx_mdef_4silx_4math_16chistogramnd_lut_47_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__66)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_empty_tuple);
if (PyDict_SetItem(__pyx_t_1, __pyx_kp_s_float32_t_int32_t_int64_t, __pyx_t_2) < 0) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_1_2_0__pyx_mdef_4silx_4math_16chistogramnd_lut_49_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__58)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_1_2_0__pyx_mdef_4silx_4math_16chistogramnd_lut_49_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__66)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_empty_tuple);
if (PyDict_SetItem(__pyx_t_1, __pyx_kp_s_float32_t_int16_t_float64_t, __pyx_t_2) < 0) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_1_2_1__pyx_mdef_4silx_4math_16chistogramnd_lut_51_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__58)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_1_2_1__pyx_mdef_4silx_4math_16chistogramnd_lut_51_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__66)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_empty_tuple);
if (PyDict_SetItem(__pyx_t_1, __pyx_kp_s_float32_t_int16_t_float32_t, __pyx_t_2) < 0) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_1_2_2__pyx_mdef_4silx_4math_16chistogramnd_lut_53_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__58)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_1_2_2__pyx_mdef_4silx_4math_16chistogramnd_lut_53_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__66)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_empty_tuple);
if (PyDict_SetItem(__pyx_t_1, __pyx_kp_s_float32_t_int16_t_int32_t, __pyx_t_2) < 0) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_1_2_3__pyx_mdef_4silx_4math_16chistogramnd_lut_55_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__58)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_1_2_3__pyx_mdef_4silx_4math_16chistogramnd_lut_55_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__66)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_empty_tuple);
if (PyDict_SetItem(__pyx_t_1, __pyx_kp_s_float32_t_int16_t_int64_t, __pyx_t_2) < 0) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_2_0_0__pyx_mdef_4silx_4math_16chistogramnd_lut_57_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__58)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_2_0_0__pyx_mdef_4silx_4math_16chistogramnd_lut_57_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__66)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_empty_tuple);
if (PyDict_SetItem(__pyx_t_1, __pyx_kp_s_int32_t_int64_t_float64_t, __pyx_t_2) < 0) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_2_0_1__pyx_mdef_4silx_4math_16chistogramnd_lut_59_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__58)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_2_0_1__pyx_mdef_4silx_4math_16chistogramnd_lut_59_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__66)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_empty_tuple);
if (PyDict_SetItem(__pyx_t_1, __pyx_kp_s_int32_t_int64_t_float32_t, __pyx_t_2) < 0) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_2_0_2__pyx_mdef_4silx_4math_16chistogramnd_lut_61_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__58)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_2_0_2__pyx_mdef_4silx_4math_16chistogramnd_lut_61_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__66)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_empty_tuple);
if (PyDict_SetItem(__pyx_t_1, __pyx_kp_s_int32_t_int64_t_int32_t, __pyx_t_2) < 0) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_2_0_3__pyx_mdef_4silx_4math_16chistogramnd_lut_63_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__58)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_2_0_3__pyx_mdef_4silx_4math_16chistogramnd_lut_63_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__66)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_empty_tuple);
if (PyDict_SetItem(__pyx_t_1, __pyx_kp_s_int32_t_int64_t_int64_t, __pyx_t_2) < 0) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_2_1_0__pyx_mdef_4silx_4math_16chistogramnd_lut_65_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__58)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_2_1_0__pyx_mdef_4silx_4math_16chistogramnd_lut_65_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__66)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_empty_tuple);
if (PyDict_SetItem(__pyx_t_1, __pyx_kp_s_int32_t_int32_t_float64_t, __pyx_t_2) < 0) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_2_1_1__pyx_mdef_4silx_4math_16chistogramnd_lut_67_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__58)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_2_1_1__pyx_mdef_4silx_4math_16chistogramnd_lut_67_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__66)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_empty_tuple);
if (PyDict_SetItem(__pyx_t_1, __pyx_kp_s_int32_t_int32_t_float32_t, __pyx_t_2) < 0) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_2_1_2__pyx_mdef_4silx_4math_16chistogramnd_lut_69_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__58)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_2_1_2__pyx_mdef_4silx_4math_16chistogramnd_lut_69_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__66)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_empty_tuple);
if (PyDict_SetItem(__pyx_t_1, __pyx_kp_s_int32_t_int32_t_int32_t, __pyx_t_2) < 0) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_2_1_3__pyx_mdef_4silx_4math_16chistogramnd_lut_71_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__58)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_2_1_3__pyx_mdef_4silx_4math_16chistogramnd_lut_71_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__66)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_empty_tuple);
if (PyDict_SetItem(__pyx_t_1, __pyx_kp_s_int32_t_int32_t_int64_t, __pyx_t_2) < 0) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_2_2_0__pyx_mdef_4silx_4math_16chistogramnd_lut_73_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__58)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_2_2_0__pyx_mdef_4silx_4math_16chistogramnd_lut_73_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__66)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_empty_tuple);
if (PyDict_SetItem(__pyx_t_1, __pyx_kp_s_int32_t_int16_t_float64_t, __pyx_t_2) < 0) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_2_2_1__pyx_mdef_4silx_4math_16chistogramnd_lut_75_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__58)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_2_2_1__pyx_mdef_4silx_4math_16chistogramnd_lut_75_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__66)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_empty_tuple);
if (PyDict_SetItem(__pyx_t_1, __pyx_kp_s_int32_t_int16_t_float32_t, __pyx_t_2) < 0) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_2_2_2__pyx_mdef_4silx_4math_16chistogramnd_lut_77_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__58)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_2_2_2__pyx_mdef_4silx_4math_16chistogramnd_lut_77_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__66)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_empty_tuple);
if (PyDict_SetItem(__pyx_t_1, __pyx_kp_s_int32_t_int16_t_int32_t, __pyx_t_2) < 0) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_2_2_3__pyx_mdef_4silx_4math_16chistogramnd_lut_79_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__58)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_2_2_3__pyx_mdef_4silx_4math_16chistogramnd_lut_79_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__66)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_empty_tuple);
if (PyDict_SetItem(__pyx_t_1, __pyx_kp_s_int32_t_int16_t_int64_t, __pyx_t_2) < 0) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_3_0_0__pyx_mdef_4silx_4math_16chistogramnd_lut_81_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__58)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_3_0_0__pyx_mdef_4silx_4math_16chistogramnd_lut_81_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__66)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_empty_tuple);
if (PyDict_SetItem(__pyx_t_1, __pyx_kp_s_int64_t_int64_t_float64_t, __pyx_t_2) < 0) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_3_0_1__pyx_mdef_4silx_4math_16chistogramnd_lut_83_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__58)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_3_0_1__pyx_mdef_4silx_4math_16chistogramnd_lut_83_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__66)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_empty_tuple);
if (PyDict_SetItem(__pyx_t_1, __pyx_kp_s_int64_t_int64_t_float32_t, __pyx_t_2) < 0) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_3_0_2__pyx_mdef_4silx_4math_16chistogramnd_lut_85_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__58)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_3_0_2__pyx_mdef_4silx_4math_16chistogramnd_lut_85_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__66)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_empty_tuple);
if (PyDict_SetItem(__pyx_t_1, __pyx_kp_s_int64_t_int64_t_int32_t, __pyx_t_2) < 0) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_3_0_3__pyx_mdef_4silx_4math_16chistogramnd_lut_87_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__58)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_3_0_3__pyx_mdef_4silx_4math_16chistogramnd_lut_87_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__66)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_empty_tuple);
if (PyDict_SetItem(__pyx_t_1, __pyx_kp_s_int64_t_int64_t_int64_t, __pyx_t_2) < 0) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_3_1_0__pyx_mdef_4silx_4math_16chistogramnd_lut_89_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__58)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_3_1_0__pyx_mdef_4silx_4math_16chistogramnd_lut_89_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__66)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_empty_tuple);
if (PyDict_SetItem(__pyx_t_1, __pyx_kp_s_int64_t_int32_t_float64_t, __pyx_t_2) < 0) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_3_1_1__pyx_mdef_4silx_4math_16chistogramnd_lut_91_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__58)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_3_1_1__pyx_mdef_4silx_4math_16chistogramnd_lut_91_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__66)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_empty_tuple);
if (PyDict_SetItem(__pyx_t_1, __pyx_kp_s_int64_t_int32_t_float32_t, __pyx_t_2) < 0) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_3_1_2__pyx_mdef_4silx_4math_16chistogramnd_lut_93_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__58)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_3_1_2__pyx_mdef_4silx_4math_16chistogramnd_lut_93_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__66)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_empty_tuple);
if (PyDict_SetItem(__pyx_t_1, __pyx_kp_s_int64_t_int32_t_int32_t, __pyx_t_2) < 0) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_3_1_3__pyx_mdef_4silx_4math_16chistogramnd_lut_95_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__58)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_3_1_3__pyx_mdef_4silx_4math_16chistogramnd_lut_95_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__66)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_empty_tuple);
if (PyDict_SetItem(__pyx_t_1, __pyx_kp_s_int64_t_int32_t_int64_t, __pyx_t_2) < 0) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_3_2_0__pyx_mdef_4silx_4math_16chistogramnd_lut_97_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__58)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_3_2_0__pyx_mdef_4silx_4math_16chistogramnd_lut_97_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__66)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_empty_tuple);
if (PyDict_SetItem(__pyx_t_1, __pyx_kp_s_int64_t_int16_t_float64_t, __pyx_t_2) < 0) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_3_2_1__pyx_mdef_4silx_4math_16chistogramnd_lut_99_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__58)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_3_2_1__pyx_mdef_4silx_4math_16chistogramnd_lut_99_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__66)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_empty_tuple);
if (PyDict_SetItem(__pyx_t_1, __pyx_kp_s_int64_t_int16_t_float32_t, __pyx_t_2) < 0) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_3_2_2__pyx_mdef_4silx_4math_16chistogramnd_lut_101_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__58)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_3_2_2__pyx_mdef_4silx_4math_16chistogramnd_lut_101_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__66)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_empty_tuple);
if (PyDict_SetItem(__pyx_t_1, __pyx_kp_s_int64_t_int16_t_int32_t, __pyx_t_2) < 0) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_3_2_3__pyx_mdef_4silx_4math_16chistogramnd_lut_103_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__58)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_fuse_3_2_3__pyx_mdef_4silx_4math_16chistogramnd_lut_103_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__66)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_empty_tuple);
if (PyDict_SetItem(__pyx_t_1, __pyx_kp_s_int64_t_int16_t_int64_t, __pyx_t_2) < 0) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_mdef_4silx_4math_16chistogramnd_lut_5_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__58)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __pyx_t_2 = __pyx_FusedFunction_NewEx(&__pyx_mdef_4silx_4math_16chistogramnd_lut_5_histogramnd_from_lut_fused, 0, __pyx_n_s_histogramnd_from_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__66)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_empty_tuple);
((__pyx_FusedFunctionObject *) __pyx_t_2)->__signatures__ = __pyx_t_1;
@@ -47826,69 +50660,69 @@ PyMODINIT_FUNC PyInit_chistogramnd_lut(void)
* int i_n_dims,
* int i_n_elems,
*/
- __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 361, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyDict_NewPresized(12); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 361, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = __pyx_FusedFunction_NewEx(&__pyx_fuse_0_0__pyx_mdef_4silx_4math_16chistogramnd_lut_107_histogramnd_get_lut_fused, 0, __pyx_n_s_histogramnd_get_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__60)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 361, __pyx_L1_error)
+ __pyx_t_4 = __pyx_FusedFunction_NewEx(&__pyx_fuse_0_0__pyx_mdef_4silx_4math_16chistogramnd_lut_107_histogramnd_get_lut_fused, 0, __pyx_n_s_histogramnd_get_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__68)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 361, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_empty_tuple);
if (PyDict_SetItem(__pyx_t_3, __pyx_kp_s_float64_t_int64_t, __pyx_t_4) < 0) __PYX_ERR(0, 361, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = __pyx_FusedFunction_NewEx(&__pyx_fuse_0_1__pyx_mdef_4silx_4math_16chistogramnd_lut_109_histogramnd_get_lut_fused, 0, __pyx_n_s_histogramnd_get_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__60)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 361, __pyx_L1_error)
+ __pyx_t_4 = __pyx_FusedFunction_NewEx(&__pyx_fuse_0_1__pyx_mdef_4silx_4math_16chistogramnd_lut_109_histogramnd_get_lut_fused, 0, __pyx_n_s_histogramnd_get_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__68)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 361, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_empty_tuple);
if (PyDict_SetItem(__pyx_t_3, __pyx_kp_s_float64_t_int32_t, __pyx_t_4) < 0) __PYX_ERR(0, 361, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = __pyx_FusedFunction_NewEx(&__pyx_fuse_0_2__pyx_mdef_4silx_4math_16chistogramnd_lut_111_histogramnd_get_lut_fused, 0, __pyx_n_s_histogramnd_get_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__60)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 361, __pyx_L1_error)
+ __pyx_t_4 = __pyx_FusedFunction_NewEx(&__pyx_fuse_0_2__pyx_mdef_4silx_4math_16chistogramnd_lut_111_histogramnd_get_lut_fused, 0, __pyx_n_s_histogramnd_get_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__68)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 361, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_empty_tuple);
if (PyDict_SetItem(__pyx_t_3, __pyx_kp_s_float64_t_int16_t, __pyx_t_4) < 0) __PYX_ERR(0, 361, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = __pyx_FusedFunction_NewEx(&__pyx_fuse_1_0__pyx_mdef_4silx_4math_16chistogramnd_lut_113_histogramnd_get_lut_fused, 0, __pyx_n_s_histogramnd_get_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__60)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 361, __pyx_L1_error)
+ __pyx_t_4 = __pyx_FusedFunction_NewEx(&__pyx_fuse_1_0__pyx_mdef_4silx_4math_16chistogramnd_lut_113_histogramnd_get_lut_fused, 0, __pyx_n_s_histogramnd_get_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__68)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 361, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_empty_tuple);
if (PyDict_SetItem(__pyx_t_3, __pyx_kp_s_float32_t_int64_t, __pyx_t_4) < 0) __PYX_ERR(0, 361, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = __pyx_FusedFunction_NewEx(&__pyx_fuse_1_1__pyx_mdef_4silx_4math_16chistogramnd_lut_115_histogramnd_get_lut_fused, 0, __pyx_n_s_histogramnd_get_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__60)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 361, __pyx_L1_error)
+ __pyx_t_4 = __pyx_FusedFunction_NewEx(&__pyx_fuse_1_1__pyx_mdef_4silx_4math_16chistogramnd_lut_115_histogramnd_get_lut_fused, 0, __pyx_n_s_histogramnd_get_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__68)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 361, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_empty_tuple);
if (PyDict_SetItem(__pyx_t_3, __pyx_kp_s_float32_t_int32_t, __pyx_t_4) < 0) __PYX_ERR(0, 361, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = __pyx_FusedFunction_NewEx(&__pyx_fuse_1_2__pyx_mdef_4silx_4math_16chistogramnd_lut_117_histogramnd_get_lut_fused, 0, __pyx_n_s_histogramnd_get_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__60)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 361, __pyx_L1_error)
+ __pyx_t_4 = __pyx_FusedFunction_NewEx(&__pyx_fuse_1_2__pyx_mdef_4silx_4math_16chistogramnd_lut_117_histogramnd_get_lut_fused, 0, __pyx_n_s_histogramnd_get_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__68)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 361, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_empty_tuple);
if (PyDict_SetItem(__pyx_t_3, __pyx_kp_s_float32_t_int16_t, __pyx_t_4) < 0) __PYX_ERR(0, 361, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = __pyx_FusedFunction_NewEx(&__pyx_fuse_2_0__pyx_mdef_4silx_4math_16chistogramnd_lut_119_histogramnd_get_lut_fused, 0, __pyx_n_s_histogramnd_get_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__60)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 361, __pyx_L1_error)
+ __pyx_t_4 = __pyx_FusedFunction_NewEx(&__pyx_fuse_2_0__pyx_mdef_4silx_4math_16chistogramnd_lut_119_histogramnd_get_lut_fused, 0, __pyx_n_s_histogramnd_get_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__68)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 361, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_empty_tuple);
if (PyDict_SetItem(__pyx_t_3, __pyx_kp_s_int32_t_int64_t, __pyx_t_4) < 0) __PYX_ERR(0, 361, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = __pyx_FusedFunction_NewEx(&__pyx_fuse_2_1__pyx_mdef_4silx_4math_16chistogramnd_lut_121_histogramnd_get_lut_fused, 0, __pyx_n_s_histogramnd_get_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__60)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 361, __pyx_L1_error)
+ __pyx_t_4 = __pyx_FusedFunction_NewEx(&__pyx_fuse_2_1__pyx_mdef_4silx_4math_16chistogramnd_lut_121_histogramnd_get_lut_fused, 0, __pyx_n_s_histogramnd_get_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__68)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 361, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_empty_tuple);
if (PyDict_SetItem(__pyx_t_3, __pyx_kp_s_int32_t_int32_t, __pyx_t_4) < 0) __PYX_ERR(0, 361, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = __pyx_FusedFunction_NewEx(&__pyx_fuse_2_2__pyx_mdef_4silx_4math_16chistogramnd_lut_123_histogramnd_get_lut_fused, 0, __pyx_n_s_histogramnd_get_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__60)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 361, __pyx_L1_error)
+ __pyx_t_4 = __pyx_FusedFunction_NewEx(&__pyx_fuse_2_2__pyx_mdef_4silx_4math_16chistogramnd_lut_123_histogramnd_get_lut_fused, 0, __pyx_n_s_histogramnd_get_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__68)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 361, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_empty_tuple);
if (PyDict_SetItem(__pyx_t_3, __pyx_kp_s_int32_t_int16_t, __pyx_t_4) < 0) __PYX_ERR(0, 361, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = __pyx_FusedFunction_NewEx(&__pyx_fuse_3_0__pyx_mdef_4silx_4math_16chistogramnd_lut_125_histogramnd_get_lut_fused, 0, __pyx_n_s_histogramnd_get_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__60)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 361, __pyx_L1_error)
+ __pyx_t_4 = __pyx_FusedFunction_NewEx(&__pyx_fuse_3_0__pyx_mdef_4silx_4math_16chistogramnd_lut_125_histogramnd_get_lut_fused, 0, __pyx_n_s_histogramnd_get_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__68)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 361, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_empty_tuple);
if (PyDict_SetItem(__pyx_t_3, __pyx_kp_s_int64_t_int64_t, __pyx_t_4) < 0) __PYX_ERR(0, 361, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = __pyx_FusedFunction_NewEx(&__pyx_fuse_3_1__pyx_mdef_4silx_4math_16chistogramnd_lut_127_histogramnd_get_lut_fused, 0, __pyx_n_s_histogramnd_get_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__60)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 361, __pyx_L1_error)
+ __pyx_t_4 = __pyx_FusedFunction_NewEx(&__pyx_fuse_3_1__pyx_mdef_4silx_4math_16chistogramnd_lut_127_histogramnd_get_lut_fused, 0, __pyx_n_s_histogramnd_get_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__68)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 361, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_empty_tuple);
if (PyDict_SetItem(__pyx_t_3, __pyx_kp_s_int64_t_int32_t, __pyx_t_4) < 0) __PYX_ERR(0, 361, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = __pyx_FusedFunction_NewEx(&__pyx_fuse_3_2__pyx_mdef_4silx_4math_16chistogramnd_lut_129_histogramnd_get_lut_fused, 0, __pyx_n_s_histogramnd_get_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__60)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 361, __pyx_L1_error)
+ __pyx_t_4 = __pyx_FusedFunction_NewEx(&__pyx_fuse_3_2__pyx_mdef_4silx_4math_16chistogramnd_lut_129_histogramnd_get_lut_fused, 0, __pyx_n_s_histogramnd_get_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__68)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 361, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_empty_tuple);
if (PyDict_SetItem(__pyx_t_3, __pyx_kp_s_int64_t_int16_t, __pyx_t_4) < 0) __PYX_ERR(0, 361, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = __pyx_FusedFunction_NewEx(&__pyx_mdef_4silx_4math_16chistogramnd_lut_7_histogramnd_get_lut_fused, 0, __pyx_n_s_histogramnd_get_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__60)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 361, __pyx_L1_error)
+ __pyx_t_4 = __pyx_FusedFunction_NewEx(&__pyx_mdef_4silx_4math_16chistogramnd_lut_7_histogramnd_get_lut_fused, 0, __pyx_n_s_histogramnd_get_lut_fused, NULL, __pyx_n_s_silx_math_chistogramnd_lut, __pyx_d, ((PyObject *)__pyx_codeobj__68)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 361, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_empty_tuple);
((__pyx_FusedFunctionObject *) __pyx_t_4)->__signatures__ = __pyx_t_3;
@@ -47899,97 +50733,97 @@ PyMODINIT_FUNC PyInit_chistogramnd_lut(void)
/* "silx/math/chistogramnd_lut.pyx":1
* # coding: utf-8 # <<<<<<<<<<<<<<
* # /[inserted by cython to avoid comment start]*##########################################################################
- * # Copyright (C) 2016-2017 European Synchrotron Radiation Facility
+ * # Copyright (C) 2016-2018 European Synchrotron Radiation Facility
*/
- __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_5) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- /* "View.MemoryView":207
+ /* "View.MemoryView":208
* info.obj = self
*
* __pyx_getbuffer = capsule(<void *> &__pyx_array_getbuffer, "getbuffer(obj, view, flags)") # <<<<<<<<<<<<<<
*
* def __dealloc__(array self):
*/
- __pyx_t_5 = __pyx_capsule_create(((void *)(&__pyx_array_getbuffer)), ((char *)"getbuffer(obj, view, flags)")); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 207, __pyx_L1_error)
+ __pyx_t_5 = __pyx_capsule_create(((void *)(&__pyx_array_getbuffer)), ((char *)"getbuffer(obj, view, flags)")); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 208, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
- if (PyDict_SetItem(__pyx_array_type->tp_dict, __pyx_n_s_pyx_getbuffer, __pyx_t_5) < 0) __PYX_ERR(2, 207, __pyx_L1_error)
+ if (PyDict_SetItem((PyObject *)__pyx_array_type->tp_dict, __pyx_n_s_pyx_getbuffer, __pyx_t_5) < 0) __PYX_ERR(2, 208, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
PyType_Modified(__pyx_array_type);
- /* "View.MemoryView":282
+ /* "View.MemoryView":285
* return self.name
*
* cdef generic = Enum("<strided and direct or indirect>") # <<<<<<<<<<<<<<
* cdef strided = Enum("<strided and direct>") # default
* cdef indirect = Enum("<strided and indirect>")
*/
- __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__61, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 282, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__69, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 285, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_XGOTREF(generic);
__Pyx_DECREF_SET(generic, __pyx_t_5);
__Pyx_GIVEREF(__pyx_t_5);
__pyx_t_5 = 0;
- /* "View.MemoryView":283
+ /* "View.MemoryView":286
*
* cdef generic = Enum("<strided and direct or indirect>")
* cdef strided = Enum("<strided and direct>") # default # <<<<<<<<<<<<<<
* cdef indirect = Enum("<strided and indirect>")
*
*/
- __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__62, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 283, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__70, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 286, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_XGOTREF(strided);
__Pyx_DECREF_SET(strided, __pyx_t_5);
__Pyx_GIVEREF(__pyx_t_5);
__pyx_t_5 = 0;
- /* "View.MemoryView":284
+ /* "View.MemoryView":287
* cdef generic = Enum("<strided and direct or indirect>")
* cdef strided = Enum("<strided and direct>") # default
* cdef indirect = Enum("<strided and indirect>") # <<<<<<<<<<<<<<
*
*
*/
- __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__63, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 284, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__71, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 287, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_XGOTREF(indirect);
__Pyx_DECREF_SET(indirect, __pyx_t_5);
__Pyx_GIVEREF(__pyx_t_5);
__pyx_t_5 = 0;
- /* "View.MemoryView":287
+ /* "View.MemoryView":290
*
*
* cdef contiguous = Enum("<contiguous and direct>") # <<<<<<<<<<<<<<
* cdef indirect_contiguous = Enum("<contiguous and indirect>")
*
*/
- __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__64, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 287, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__72, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 290, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_XGOTREF(contiguous);
__Pyx_DECREF_SET(contiguous, __pyx_t_5);
__Pyx_GIVEREF(__pyx_t_5);
__pyx_t_5 = 0;
- /* "View.MemoryView":288
+ /* "View.MemoryView":291
*
* cdef contiguous = Enum("<contiguous and direct>")
* cdef indirect_contiguous = Enum("<contiguous and indirect>") # <<<<<<<<<<<<<<
*
*
*/
- __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__65, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 288, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__73, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 291, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_XGOTREF(indirect_contiguous);
__Pyx_DECREF_SET(indirect_contiguous, __pyx_t_5);
__Pyx_GIVEREF(__pyx_t_5);
__pyx_t_5 = 0;
- /* "View.MemoryView":312
+ /* "View.MemoryView":315
*
* DEF THREAD_LOCKS_PREALLOCATED = 8
* cdef int __pyx_memoryview_thread_locks_used = 0 # <<<<<<<<<<<<<<
@@ -47998,7 +50832,7 @@ PyMODINIT_FUNC PyInit_chistogramnd_lut(void)
*/
__pyx_memoryview_thread_locks_used = 0;
- /* "View.MemoryView":313
+ /* "View.MemoryView":316
* DEF THREAD_LOCKS_PREALLOCATED = 8
* cdef int __pyx_memoryview_thread_locks_used = 0
* cdef PyThread_type_lock[THREAD_LOCKS_PREALLOCATED] __pyx_memoryview_thread_locks = [ # <<<<<<<<<<<<<<
@@ -48015,38 +50849,48 @@ PyMODINIT_FUNC PyInit_chistogramnd_lut(void)
__pyx_t_6[7] = PyThread_allocate_lock();
memcpy(&(__pyx_memoryview_thread_locks[0]), __pyx_t_6, sizeof(__pyx_memoryview_thread_locks[0]) * (8));
- /* "View.MemoryView":535
+ /* "View.MemoryView":544
* info.obj = self
*
* __pyx_getbuffer = capsule(<void *> &__pyx_memoryview_getbuffer, "getbuffer(obj, view, flags)") # <<<<<<<<<<<<<<
*
*
*/
- __pyx_t_5 = __pyx_capsule_create(((void *)(&__pyx_memoryview_getbuffer)), ((char *)"getbuffer(obj, view, flags)")); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 535, __pyx_L1_error)
+ __pyx_t_5 = __pyx_capsule_create(((void *)(&__pyx_memoryview_getbuffer)), ((char *)"getbuffer(obj, view, flags)")); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 544, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
- if (PyDict_SetItem(__pyx_memoryview_type->tp_dict, __pyx_n_s_pyx_getbuffer, __pyx_t_5) < 0) __PYX_ERR(2, 535, __pyx_L1_error)
+ if (PyDict_SetItem((PyObject *)__pyx_memoryview_type->tp_dict, __pyx_n_s_pyx_getbuffer, __pyx_t_5) < 0) __PYX_ERR(2, 544, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
PyType_Modified(__pyx_memoryview_type);
- /* "View.MemoryView":981
+ /* "View.MemoryView":990
* return self.from_object
*
* __pyx_getbuffer = capsule(<void *> &__pyx_memoryview_getbuffer, "getbuffer(obj, view, flags)") # <<<<<<<<<<<<<<
*
*
*/
- __pyx_t_5 = __pyx_capsule_create(((void *)(&__pyx_memoryview_getbuffer)), ((char *)"getbuffer(obj, view, flags)")); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 981, __pyx_L1_error)
+ __pyx_t_5 = __pyx_capsule_create(((void *)(&__pyx_memoryview_getbuffer)), ((char *)"getbuffer(obj, view, flags)")); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 990, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
- if (PyDict_SetItem(__pyx_memoryviewslice_type->tp_dict, __pyx_n_s_pyx_getbuffer, __pyx_t_5) < 0) __PYX_ERR(2, 981, __pyx_L1_error)
+ if (PyDict_SetItem((PyObject *)__pyx_memoryviewslice_type->tp_dict, __pyx_n_s_pyx_getbuffer, __pyx_t_5) < 0) __PYX_ERR(2, 990, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
PyType_Modified(__pyx_memoryviewslice_type);
- /* "View.MemoryView":1391
- *
- * @cname('__pyx_memoryview__slice_assign_scalar')
- * cdef void _slice_assign_scalar(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<<
- * Py_ssize_t *strides, int ndim,
- * size_t itemsize, void *item) nogil:
+ /* "(tree fragment)":1
+ * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
+ * if __pyx_checksum != 0xb068931:
+ * from pickle import PickleError as __pyx_PickleError
+ */
+ __pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_15View_dot_MemoryView_1__pyx_unpickle_Enum, NULL, __pyx_n_s_View_MemoryView); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Enum, __pyx_t_5) < 0) __PYX_ERR(2, 1, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "(tree fragment)":9
+ * __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
+ * return __pyx_result
+ * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
+ * __pyx_result.name = __pyx_state[0]
+ * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
*/
/*--- Wrapped vars code ---*/
@@ -48060,7 +50904,7 @@ PyMODINIT_FUNC PyInit_chistogramnd_lut(void)
__Pyx_XDECREF(__pyx_t_5);
if (__pyx_m) {
if (__pyx_d) {
- __Pyx_AddTraceback("init silx.math.chistogramnd_lut", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("init silx.math.chistogramnd_lut", 0, __pyx_lineno, __pyx_filename);
}
Py_DECREF(__pyx_m); __pyx_m = 0;
} else if (!PyErr_Occurred()) {
@@ -48068,10 +50912,12 @@ PyMODINIT_FUNC PyInit_chistogramnd_lut(void)
}
__pyx_L0:;
__Pyx_RefNannyFinishContext();
- #if PY_MAJOR_VERSION < 3
- return;
- #else
+ #if CYTHON_PEP489_MULTI_PHASE_INIT
+ return (__pyx_m != NULL) ? 0 : -1;
+ #elif PY_MAJOR_VERSION >= 3
return __pyx_m;
+ #else
+ return;
#endif
}
@@ -48093,6 +50939,20 @@ end:
}
#endif
+/* PyObjectGetAttrStr */
+#if CYTHON_USE_TYPE_SLOTS
+static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
+ PyTypeObject* tp = Py_TYPE(obj);
+ if (likely(tp->tp_getattro))
+ return tp->tp_getattro(obj, attr_name);
+#if PY_MAJOR_VERSION < 3
+ if (likely(tp->tp_getattr))
+ return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
+#endif
+ return PyObject_GetAttr(obj, attr_name);
+}
+#endif
+
/* GetBuiltinName */
static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
@@ -48250,7 +51110,7 @@ bad:
}
/* GetItemInt */
-static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
+static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
PyObject *r;
if (!j) return NULL;
r = PyObject_GetItem(o, j);
@@ -48261,9 +51121,12 @@ static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_
CYTHON_NCP_UNUSED int wraparound,
CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
- if (wraparound & unlikely(i < 0)) i += PyList_GET_SIZE(o);
- if ((!boundscheck) || likely((0 <= i) & (i < PyList_GET_SIZE(o)))) {
- PyObject *r = PyList_GET_ITEM(o, i);
+ Py_ssize_t wrapped_i = i;
+ if (wraparound & unlikely(i < 0)) {
+ wrapped_i += PyList_GET_SIZE(o);
+ }
+ if ((!boundscheck) || likely((0 <= wrapped_i) & (wrapped_i < PyList_GET_SIZE(o)))) {
+ PyObject *r = PyList_GET_ITEM(o, wrapped_i);
Py_INCREF(r);
return r;
}
@@ -48276,9 +51139,12 @@ static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize
CYTHON_NCP_UNUSED int wraparound,
CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
- if (wraparound & unlikely(i < 0)) i += PyTuple_GET_SIZE(o);
- if ((!boundscheck) || likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) {
- PyObject *r = PyTuple_GET_ITEM(o, i);
+ Py_ssize_t wrapped_i = i;
+ if (wraparound & unlikely(i < 0)) {
+ wrapped_i += PyTuple_GET_SIZE(o);
+ }
+ if ((!boundscheck) || likely((0 <= wrapped_i) & (wrapped_i < PyTuple_GET_SIZE(o)))) {
+ PyObject *r = PyTuple_GET_ITEM(o, wrapped_i);
Py_INCREF(r);
return r;
}
@@ -48334,10 +51200,19 @@ static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) {
PyObject *result;
#if !CYTHON_AVOID_BORROWED_REFS
+#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1
+ result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash);
+ if (likely(result)) {
+ Py_INCREF(result);
+ } else if (unlikely(PyErr_Occurred())) {
+ result = NULL;
+ } else {
+#else
result = PyDict_GetItem(__pyx_d, name);
if (likely(result)) {
Py_INCREF(result);
} else {
+#endif
#else
result = PyObject_GetItem(__pyx_d, name);
if (!result) {
@@ -48349,30 +51224,35 @@ static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) {
}
/* PyCFunctionFastCall */
- #if CYTHON_FAST_PYCCALL
+ #if CYTHON_FAST_PYCCALL
static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {
PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
PyCFunction meth = PyCFunction_GET_FUNCTION(func);
PyObject *self = PyCFunction_GET_SELF(func);
+ int flags = PyCFunction_GET_FLAGS(func);
assert(PyCFunction_Check(func));
- assert(METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST)));
+ assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS)));
assert(nargs >= 0);
assert(nargs == 0 || args != NULL);
/* _PyCFunction_FastCallDict() must not be called with an exception set,
because it may clear it (directly or indirectly) and so the
caller loses its exception */
assert(!PyErr_Occurred());
- return (*((__Pyx_PyCFunctionFast)meth)) (self, args, nargs, NULL);
+ if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) {
+ return (*((__Pyx_PyCFunctionFastWithKeywords)meth)) (self, args, nargs, NULL);
+ } else {
+ return (*((__Pyx_PyCFunctionFast)meth)) (self, args, nargs);
+ }
}
-#endif // CYTHON_FAST_PYCCALL
+#endif
/* PyFunctionFastCall */
- #if CYTHON_FAST_PYCALL
+ #if CYTHON_FAST_PYCALL
#include "frameobject.h"
static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
PyObject *globals) {
PyFrameObject *f;
- PyThreadState *tstate = PyThreadState_GET();
+ PyThreadState *tstate = __Pyx_PyThreadState_Current;
PyObject **fastlocals;
Py_ssize_t i;
PyObject *result;
@@ -48483,11 +51363,11 @@ done:
Py_LeaveRecursiveCall();
return result;
}
-#endif // CPython < 3.6
-#endif // CYTHON_FAST_PYCALL
+#endif
+#endif
/* PyObjectCall */
- #if CYTHON_COMPILING_IN_CPYTHON
+ #if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
PyObject *result;
ternaryfunc call = func->ob_type->tp_call;
@@ -48507,7 +51387,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg
#endif
/* PyObjectCallMethO */
- #if CYTHON_COMPILING_IN_CPYTHON
+ #if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
PyObject *self, *result;
PyCFunction cfunc;
@@ -48527,7 +51407,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject
#endif
/* PyObjectCallOneArg */
- #if CYTHON_COMPILING_IN_CPYTHON
+ #if CYTHON_COMPILING_IN_CPYTHON
static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
PyObject *result;
PyObject *args = PyTuple_New(1);
@@ -48544,11 +51424,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObjec
return __Pyx_PyFunction_FastCall(func, &arg, 1);
}
#endif
-#ifdef __Pyx_CyFunction_USED
- if (likely(PyCFunction_Check(func) || PyObject_TypeCheck(func, __pyx_CyFunctionType))) {
-#else
if (likely(PyCFunction_Check(func))) {
-#endif
if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
return __Pyx_PyObject_CallMethO(func, arg);
#if CYTHON_FAST_PYCCALL
@@ -48603,31 +51479,37 @@ static PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED
a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
break;
}
+ CYTHON_FALLTHROUGH;
case 2:
if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
break;
}
+ CYTHON_FALLTHROUGH;
case -3:
if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
break;
}
+ CYTHON_FALLTHROUGH;
case 3:
if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
break;
}
+ CYTHON_FALLTHROUGH;
case -4:
if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
break;
}
+ CYTHON_FALLTHROUGH;
case 4:
if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
break;
}
+ CYTHON_FALLTHROUGH;
#if PyLong_SHIFT < 30 && PyLong_SHIFT != 15
default: return PyLong_Type.tp_richcompare(op1, op2, Py_EQ);
#else
@@ -48795,11 +51677,7 @@ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject
"raise: exception class must be a subclass of BaseException");
goto bad;
}
-#if PY_VERSION_HEX >= 0x03030000
if (cause) {
-#else
- if (cause && cause != Py_None) {
-#endif
PyObject *fixed_cause;
if (cause == Py_None) {
fixed_cause = NULL;
@@ -48827,7 +51705,7 @@ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject
PyErr_Restore(tmp_type, tmp_value, tb);
Py_XDECREF(tmp_tb);
#else
- PyThreadState *tstate = PyThreadState_GET();
+ PyThreadState *tstate = __Pyx_PyThreadState_Current;
PyObject* tmp_tb = tstate->curexc_traceback;
if (tb != tmp_tb) {
Py_INCREF(tb);
@@ -48843,23 +51721,38 @@ bad:
#endif
/* SaveResetException */
- #if CYTHON_FAST_THREAD_STATE
+ #if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
+ #if PY_VERSION_HEX >= 0x030700A2
+ *type = tstate->exc_state.exc_type;
+ *value = tstate->exc_state.exc_value;
+ *tb = tstate->exc_state.exc_traceback;
+ #else
*type = tstate->exc_type;
*value = tstate->exc_value;
*tb = tstate->exc_traceback;
+ #endif
Py_XINCREF(*type);
Py_XINCREF(*value);
Py_XINCREF(*tb);
}
static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
PyObject *tmp_type, *tmp_value, *tmp_tb;
+ #if PY_VERSION_HEX >= 0x030700A2
+ tmp_type = tstate->exc_state.exc_type;
+ tmp_value = tstate->exc_state.exc_value;
+ tmp_tb = tstate->exc_state.exc_traceback;
+ tstate->exc_state.exc_type = type;
+ tstate->exc_state.exc_value = value;
+ tstate->exc_state.exc_traceback = tb;
+ #else
tmp_type = tstate->exc_type;
tmp_value = tstate->exc_value;
tmp_tb = tstate->exc_traceback;
tstate->exc_type = type;
tstate->exc_value = value;
tstate->exc_traceback = tb;
+ #endif
Py_XDECREF(tmp_type);
Py_XDECREF(tmp_value);
Py_XDECREF(tmp_tb);
@@ -48867,17 +51760,32 @@ static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject
#endif
/* PyErrExceptionMatches */
- #if CYTHON_FAST_THREAD_STATE
+ #if CYTHON_FAST_THREAD_STATE
+static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
+ Py_ssize_t i, n;
+ n = PyTuple_GET_SIZE(tuple);
+#if PY_MAJOR_VERSION >= 3
+ for (i=0; i<n; i++) {
+ if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
+ }
+#endif
+ for (i=0; i<n; i++) {
+ if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
+ }
+ return 0;
+}
static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
PyObject *exc_type = tstate->curexc_type;
if (exc_type == err) return 1;
if (unlikely(!exc_type)) return 0;
- return PyErr_GivenExceptionMatches(exc_type, err);
+ if (unlikely(PyTuple_Check(err)))
+ return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
+ return __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
}
#endif
/* GetException */
- #if CYTHON_FAST_THREAD_STATE
+ #if CYTHON_FAST_THREAD_STATE
static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
#else
static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) {
@@ -48914,12 +51822,21 @@ static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
*value = local_value;
*tb = local_tb;
#if CYTHON_FAST_THREAD_STATE
+ #if PY_VERSION_HEX >= 0x030700A2
+ tmp_type = tstate->exc_state.exc_type;
+ tmp_value = tstate->exc_state.exc_value;
+ tmp_tb = tstate->exc_state.exc_traceback;
+ tstate->exc_state.exc_type = local_type;
+ tstate->exc_state.exc_value = local_value;
+ tstate->exc_state.exc_traceback = local_tb;
+ #else
tmp_type = tstate->exc_type;
tmp_value = tstate->exc_value;
tmp_tb = tstate->exc_traceback;
tstate->exc_type = local_type;
tstate->exc_value = local_value;
tstate->exc_traceback = local_tb;
+ #endif
Py_XDECREF(tmp_type);
Py_XDECREF(tmp_value);
Py_XDECREF(tmp_tb);
@@ -48938,7 +51855,7 @@ bad:
}
/* PyIntBinop */
- #if !CYTHON_COMPILING_IN_PYPY
+ #if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) {
#if PY_MAJOR_VERSION < 3
if (likely(PyInt_CheckExact(op1))) {
@@ -48976,6 +51893,7 @@ static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED
goto long_long;
#endif
}
+ CYTHON_FALLTHROUGH;
case 2:
if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
@@ -48986,6 +51904,7 @@ static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED
goto long_long;
#endif
}
+ CYTHON_FALLTHROUGH;
case -3:
if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
@@ -48996,6 +51915,7 @@ static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED
goto long_long;
#endif
}
+ CYTHON_FALLTHROUGH;
case 3:
if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
@@ -49006,6 +51926,7 @@ static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED
goto long_long;
#endif
}
+ CYTHON_FALLTHROUGH;
case -4:
if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
@@ -49016,6 +51937,7 @@ static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED
goto long_long;
#endif
}
+ CYTHON_FALLTHROUGH;
case 4:
if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
@@ -49026,6 +51948,7 @@ static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED
goto long_long;
#endif
}
+ CYTHON_FALLTHROUGH;
default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
}
}
@@ -49053,8 +51976,37 @@ static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED
}
#endif
+/* ObjectGetItem */
+ #if CYTHON_USE_TYPE_SLOTS
+static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject* index) {
+ PyObject *runerr;
+ Py_ssize_t key_value;
+ PySequenceMethods *m = Py_TYPE(obj)->tp_as_sequence;
+ if (unlikely(!(m && m->sq_item))) {
+ PyErr_Format(PyExc_TypeError, "'%.200s' object is not subscriptable", Py_TYPE(obj)->tp_name);
+ return NULL;
+ }
+ key_value = __Pyx_PyIndex_AsSsize_t(index);
+ if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) {
+ return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1);
+ }
+ if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) {
+ PyErr_Clear();
+ PyErr_Format(PyExc_IndexError, "cannot fit '%.200s' into an index-sized integer", Py_TYPE(index)->tp_name);
+ }
+ return NULL;
+}
+static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key) {
+ PyMappingMethods *m = Py_TYPE(obj)->tp_as_mapping;
+ if (likely(m && m->mp_subscript)) {
+ return m->mp_subscript(obj, key);
+ }
+ return __Pyx_PyObject_GetIndex(obj, key);
+}
+#endif
+
/* SliceObject */
- static CYTHON_INLINE int __Pyx_PyObject_SetSlice(PyObject* obj, PyObject* value,
+ static CYTHON_INLINE int __Pyx_PyObject_SetSlice(PyObject* obj, PyObject* value,
Py_ssize_t cstart, Py_ssize_t cstop,
PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice,
int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) {
@@ -49152,7 +52104,7 @@ bad:
}
/* SetItemInt */
- static CYTHON_INLINE int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) {
+ static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) {
int r;
if (!j) return -1;
r = PyObject_SetItem(o, j, v);
@@ -49199,82 +52151,27 @@ static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObje
return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v);
}
-/* Import */
- static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
- PyObject *empty_list = 0;
- PyObject *module = 0;
- PyObject *global_dict = 0;
- PyObject *empty_dict = 0;
- PyObject *list;
- #if PY_VERSION_HEX < 0x03030000
- PyObject *py_import;
- py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
- if (!py_import)
- goto bad;
- #endif
- if (from_list)
- list = from_list;
- else {
- empty_list = PyList_New(0);
- if (!empty_list)
- goto bad;
- list = empty_list;
- }
- global_dict = PyModule_GetDict(__pyx_m);
- if (!global_dict)
- goto bad;
- empty_dict = PyDict_New();
- if (!empty_dict)
- goto bad;
- {
- #if PY_MAJOR_VERSION >= 3
- if (level == -1) {
- if (strchr(__Pyx_MODULE_NAME, '.')) {
- #if PY_VERSION_HEX < 0x03030000
- PyObject *py_level = PyInt_FromLong(1);
- if (!py_level)
- goto bad;
- module = PyObject_CallFunctionObjArgs(py_import,
- name, global_dict, empty_dict, list, py_level, NULL);
- Py_DECREF(py_level);
- #else
- module = PyImport_ImportModuleLevelObject(
- name, global_dict, empty_dict, list, 1);
- #endif
- if (!module) {
- if (!PyErr_ExceptionMatches(PyExc_ImportError))
- goto bad;
- PyErr_Clear();
- }
- }
- level = 0;
- }
- #endif
- if (!module) {
- #if PY_VERSION_HEX < 0x03030000
- PyObject *py_level = PyInt_FromLong(level);
- if (!py_level)
- goto bad;
- module = PyObject_CallFunctionObjArgs(py_import,
- name, global_dict, empty_dict, list, py_level, NULL);
- Py_DECREF(py_level);
- #else
- module = PyImport_ImportModuleLevelObject(
- name, global_dict, empty_dict, list, level);
- #endif
+/* DictGetItem */
+ #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
+static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) {
+ PyObject *value;
+ value = PyDict_GetItemWithError(d, key);
+ if (unlikely(!value)) {
+ if (!PyErr_Occurred()) {
+ PyObject* args = PyTuple_Pack(1, key);
+ if (likely(args))
+ PyErr_SetObject(PyExc_KeyError, args);
+ Py_XDECREF(args);
}
+ return NULL;
}
-bad:
- #if PY_VERSION_HEX < 0x03030000
- Py_XDECREF(py_import);
- #endif
- Py_XDECREF(empty_list);
- Py_XDECREF(empty_dict);
- return module;
+ Py_INCREF(value);
+ return value;
}
+#endif
/* UnicodeAsUCS4 */
- static CYTHON_INLINE Py_UCS4 __Pyx_PyUnicode_AsPy_UCS4(PyObject* x) {
+ static CYTHON_INLINE Py_UCS4 __Pyx_PyUnicode_AsPy_UCS4(PyObject* x) {
Py_ssize_t length;
#if CYTHON_PEP393_ENABLED
length = PyUnicode_GET_LENGTH(x);
@@ -49305,7 +52202,7 @@ bad:
}
/* object_ord */
- static long __Pyx__PyObject_Ord(PyObject* c) {
+ static long __Pyx__PyObject_Ord(PyObject* c) {
Py_ssize_t size;
if (PyBytes_Check(c)) {
size = PyBytes_GET_SIZE(c);
@@ -49334,12 +52231,12 @@ bad:
}
/* IterFinish */
- static CYTHON_INLINE int __Pyx_IterFinish(void) {
+ static CYTHON_INLINE int __Pyx_IterFinish(void) {
#if CYTHON_FAST_THREAD_STATE
- PyThreadState *tstate = PyThreadState_GET();
+ PyThreadState *tstate = __Pyx_PyThreadState_Current;
PyObject* exc_type = tstate->curexc_type;
if (unlikely(exc_type)) {
- if (likely(exc_type == PyExc_StopIteration) || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) {
PyObject *exc_value, *exc_tb;
exc_value = tstate->curexc_value;
exc_tb = tstate->curexc_traceback;
@@ -49369,7 +52266,7 @@ bad:
}
/* PyObjectCallNoArg */
- #if CYTHON_COMPILING_IN_CPYTHON
+ #if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
#if CYTHON_FAST_PYCALL
if (PyFunction_Check(func)) {
@@ -49377,7 +52274,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
}
#endif
#ifdef __Pyx_CyFunction_USED
- if (likely(PyCFunction_Check(func) || PyObject_TypeCheck(func, __pyx_CyFunctionType))) {
+ if (likely(PyCFunction_Check(func) || __Pyx_TypeCheck(func, __pyx_CyFunctionType))) {
#else
if (likely(PyCFunction_Check(func))) {
#endif
@@ -49390,7 +52287,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
#endif
/* PyObjectCallMethod0 */
- static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) {
+ static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) {
PyObject *method, *result = NULL;
method = __Pyx_PyObject_GetAttrStr(obj, method_name);
if (unlikely(!method)) goto bad;
@@ -49412,20 +52309,20 @@ bad:
}
/* RaiseNeedMoreValuesToUnpack */
- static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
+ static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
PyErr_Format(PyExc_ValueError,
"need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
index, (index == 1) ? "" : "s");
}
/* RaiseTooManyValuesToUnpack */
- static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
+ static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
PyErr_Format(PyExc_ValueError,
"too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
}
/* UnpackItemEndCheck */
- static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
+ static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
if (unlikely(retval)) {
Py_DECREF(retval);
__Pyx_RaiseTooManyValuesError(expected);
@@ -49437,12 +52334,12 @@ bad:
}
/* RaiseNoneIterError */
- static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) {
+ static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
}
/* UnpackTupleError */
- static void __Pyx_UnpackTupleError(PyObject *t, Py_ssize_t index) {
+ static void __Pyx_UnpackTupleError(PyObject *t, Py_ssize_t index) {
if (t == Py_None) {
__Pyx_RaiseNoneNotIterableError();
} else if (PyTuple_GET_SIZE(t) < index) {
@@ -49453,41 +52350,46 @@ bad:
}
/* UnpackTuple2 */
- static CYTHON_INLINE int __Pyx_unpack_tuple2(PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2,
- int is_tuple, int has_known_size, int decref_tuple) {
- Py_ssize_t index;
- PyObject *value1 = NULL, *value2 = NULL, *iter = NULL;
- if (!is_tuple && unlikely(!PyTuple_Check(tuple))) {
- iternextfunc iternext;
- iter = PyObject_GetIter(tuple);
- if (unlikely(!iter)) goto bad;
- if (decref_tuple) { Py_DECREF(tuple); tuple = NULL; }
- iternext = Py_TYPE(iter)->tp_iternext;
- value1 = iternext(iter); if (unlikely(!value1)) { index = 0; goto unpacking_failed; }
- value2 = iternext(iter); if (unlikely(!value2)) { index = 1; goto unpacking_failed; }
- if (!has_known_size && unlikely(__Pyx_IternextUnpackEndCheck(iternext(iter), 2))) goto bad;
- Py_DECREF(iter);
- } else {
- if (!has_known_size && unlikely(PyTuple_GET_SIZE(tuple) != 2)) {
- __Pyx_UnpackTupleError(tuple, 2);
- goto bad;
- }
+ static CYTHON_INLINE int __Pyx_unpack_tuple2_exact(
+ PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2, int decref_tuple) {
+ PyObject *value1 = NULL, *value2 = NULL;
#if CYTHON_COMPILING_IN_PYPY
- value1 = PySequence_ITEM(tuple, 0);
- if (unlikely(!value1)) goto bad;
- value2 = PySequence_ITEM(tuple, 1);
- if (unlikely(!value2)) goto bad;
+ value1 = PySequence_ITEM(tuple, 0); if (unlikely(!value1)) goto bad;
+ value2 = PySequence_ITEM(tuple, 1); if (unlikely(!value2)) goto bad;
#else
- value1 = PyTuple_GET_ITEM(tuple, 0);
- value2 = PyTuple_GET_ITEM(tuple, 1);
- Py_INCREF(value1);
- Py_INCREF(value2);
+ value1 = PyTuple_GET_ITEM(tuple, 0); Py_INCREF(value1);
+ value2 = PyTuple_GET_ITEM(tuple, 1); Py_INCREF(value2);
#endif
- if (decref_tuple) { Py_DECREF(tuple); }
+ if (decref_tuple) {
+ Py_DECREF(tuple);
}
*pvalue1 = value1;
*pvalue2 = value2;
return 0;
+#if CYTHON_COMPILING_IN_PYPY
+bad:
+ Py_XDECREF(value1);
+ Py_XDECREF(value2);
+ if (decref_tuple) { Py_XDECREF(tuple); }
+ return -1;
+#endif
+}
+static int __Pyx_unpack_tuple2_generic(PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2,
+ int has_known_size, int decref_tuple) {
+ Py_ssize_t index;
+ PyObject *value1 = NULL, *value2 = NULL, *iter = NULL;
+ iternextfunc iternext;
+ iter = PyObject_GetIter(tuple);
+ if (unlikely(!iter)) goto bad;
+ if (decref_tuple) { Py_DECREF(tuple); tuple = NULL; }
+ iternext = Py_TYPE(iter)->tp_iternext;
+ value1 = iternext(iter); if (unlikely(!value1)) { index = 0; goto unpacking_failed; }
+ value2 = iternext(iter); if (unlikely(!value2)) { index = 1; goto unpacking_failed; }
+ if (!has_known_size && unlikely(__Pyx_IternextUnpackEndCheck(iternext(iter), 2))) goto bad;
+ Py_DECREF(iter);
+ *pvalue1 = value1;
+ *pvalue2 = value2;
+ return 0;
unpacking_failed:
if (!has_known_size && __Pyx_IterFinish() == 0)
__Pyx_RaiseNeedMoreValuesError(index);
@@ -49500,17 +52402,34 @@ bad:
}
/* dict_iter */
- static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* iterable, int is_dict, PyObject* method_name,
+ static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* iterable, int is_dict, PyObject* method_name,
Py_ssize_t* p_orig_length, int* p_source_is_dict) {
is_dict = is_dict || likely(PyDict_CheckExact(iterable));
*p_source_is_dict = is_dict;
-#if !CYTHON_COMPILING_IN_PYPY
if (is_dict) {
+#if !CYTHON_COMPILING_IN_PYPY
*p_orig_length = PyDict_Size(iterable);
Py_INCREF(iterable);
return iterable;
- }
+#elif PY_MAJOR_VERSION >= 3
+ static PyObject *py_items = NULL, *py_keys = NULL, *py_values = NULL;
+ PyObject **pp = NULL;
+ if (method_name) {
+ const char *name = PyUnicode_AsUTF8(method_name);
+ if (strcmp(name, "iteritems") == 0) pp = &py_items;
+ else if (strcmp(name, "iterkeys") == 0) pp = &py_keys;
+ else if (strcmp(name, "itervalues") == 0) pp = &py_values;
+ if (pp) {
+ if (!*pp) {
+ *pp = PyUnicode_FromString(name + 4);
+ if (!*pp)
+ return NULL;
+ }
+ method_name = *pp;
+ }
+ }
#endif
+ }
*p_orig_length = 0;
if (method_name) {
PyObject* iter;
@@ -49595,558 +52514,8 @@ static CYTHON_INLINE int __Pyx_dict_iter_next(
return 1;
}
-/* BufferFormatCheck */
- static CYTHON_INLINE int __Pyx_IsLittleEndian(void) {
- unsigned int n = 1;
- return *(unsigned char*)(&n) != 0;
-}
-static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx,
- __Pyx_BufFmt_StackElem* stack,
- __Pyx_TypeInfo* type) {
- stack[0].field = &ctx->root;
- stack[0].parent_offset = 0;
- ctx->root.type = type;
- ctx->root.name = "buffer dtype";
- ctx->root.offset = 0;
- ctx->head = stack;
- ctx->head->field = &ctx->root;
- ctx->fmt_offset = 0;
- ctx->head->parent_offset = 0;
- ctx->new_packmode = '@';
- ctx->enc_packmode = '@';
- ctx->new_count = 1;
- ctx->enc_count = 0;
- ctx->enc_type = 0;
- ctx->is_complex = 0;
- ctx->is_valid_array = 0;
- ctx->struct_alignment = 0;
- while (type->typegroup == 'S') {
- ++ctx->head;
- ctx->head->field = type->fields;
- ctx->head->parent_offset = 0;
- type = type->fields->type;
- }
-}
-static int __Pyx_BufFmt_ParseNumber(const char** ts) {
- int count;
- const char* t = *ts;
- if (*t < '0' || *t > '9') {
- return -1;
- } else {
- count = *t++ - '0';
- while (*t >= '0' && *t < '9') {
- count *= 10;
- count += *t++ - '0';
- }
- }
- *ts = t;
- return count;
-}
-static int __Pyx_BufFmt_ExpectNumber(const char **ts) {
- int number = __Pyx_BufFmt_ParseNumber(ts);
- if (number == -1)
- PyErr_Format(PyExc_ValueError,\
- "Does not understand character buffer dtype format string ('%c')", **ts);
- return number;
-}
-static void __Pyx_BufFmt_RaiseUnexpectedChar(char ch) {
- PyErr_Format(PyExc_ValueError,
- "Unexpected format string character: '%c'", ch);
-}
-static const char* __Pyx_BufFmt_DescribeTypeChar(char ch, int is_complex) {
- switch (ch) {
- case 'c': return "'char'";
- case 'b': return "'signed char'";
- case 'B': return "'unsigned char'";
- case 'h': return "'short'";
- case 'H': return "'unsigned short'";
- case 'i': return "'int'";
- case 'I': return "'unsigned int'";
- case 'l': return "'long'";
- case 'L': return "'unsigned long'";
- case 'q': return "'long long'";
- case 'Q': return "'unsigned long long'";
- case 'f': return (is_complex ? "'complex float'" : "'float'");
- case 'd': return (is_complex ? "'complex double'" : "'double'");
- case 'g': return (is_complex ? "'complex long double'" : "'long double'");
- case 'T': return "a struct";
- case 'O': return "Python object";
- case 'P': return "a pointer";
- case 's': case 'p': return "a string";
- case 0: return "end";
- default: return "unparseable format string";
- }
-}
-static size_t __Pyx_BufFmt_TypeCharToStandardSize(char ch, int is_complex) {
- switch (ch) {
- case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
- case 'h': case 'H': return 2;
- case 'i': case 'I': case 'l': case 'L': return 4;
- case 'q': case 'Q': return 8;
- case 'f': return (is_complex ? 8 : 4);
- case 'd': return (is_complex ? 16 : 8);
- case 'g': {
- PyErr_SetString(PyExc_ValueError, "Python does not define a standard format string size for long double ('g')..");
- return 0;
- }
- case 'O': case 'P': return sizeof(void*);
- default:
- __Pyx_BufFmt_RaiseUnexpectedChar(ch);
- return 0;
- }
-}
-static size_t __Pyx_BufFmt_TypeCharToNativeSize(char ch, int is_complex) {
- switch (ch) {
- case 'c': case 'b': case 'B': case 's': case 'p': return 1;
- case 'h': case 'H': return sizeof(short);
- case 'i': case 'I': return sizeof(int);
- case 'l': case 'L': return sizeof(long);
- #ifdef HAVE_LONG_LONG
- case 'q': case 'Q': return sizeof(PY_LONG_LONG);
- #endif
- case 'f': return sizeof(float) * (is_complex ? 2 : 1);
- case 'd': return sizeof(double) * (is_complex ? 2 : 1);
- case 'g': return sizeof(long double) * (is_complex ? 2 : 1);
- case 'O': case 'P': return sizeof(void*);
- default: {
- __Pyx_BufFmt_RaiseUnexpectedChar(ch);
- return 0;
- }
- }
-}
-typedef struct { char c; short x; } __Pyx_st_short;
-typedef struct { char c; int x; } __Pyx_st_int;
-typedef struct { char c; long x; } __Pyx_st_long;
-typedef struct { char c; float x; } __Pyx_st_float;
-typedef struct { char c; double x; } __Pyx_st_double;
-typedef struct { char c; long double x; } __Pyx_st_longdouble;
-typedef struct { char c; void *x; } __Pyx_st_void_p;
-#ifdef HAVE_LONG_LONG
-typedef struct { char c; PY_LONG_LONG x; } __Pyx_st_longlong;
-#endif
-static size_t __Pyx_BufFmt_TypeCharToAlignment(char ch, CYTHON_UNUSED int is_complex) {
- switch (ch) {
- case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
- case 'h': case 'H': return sizeof(__Pyx_st_short) - sizeof(short);
- case 'i': case 'I': return sizeof(__Pyx_st_int) - sizeof(int);
- case 'l': case 'L': return sizeof(__Pyx_st_long) - sizeof(long);
-#ifdef HAVE_LONG_LONG
- case 'q': case 'Q': return sizeof(__Pyx_st_longlong) - sizeof(PY_LONG_LONG);
-#endif
- case 'f': return sizeof(__Pyx_st_float) - sizeof(float);
- case 'd': return sizeof(__Pyx_st_double) - sizeof(double);
- case 'g': return sizeof(__Pyx_st_longdouble) - sizeof(long double);
- case 'P': case 'O': return sizeof(__Pyx_st_void_p) - sizeof(void*);
- default:
- __Pyx_BufFmt_RaiseUnexpectedChar(ch);
- return 0;
- }
-}
-/* These are for computing the padding at the end of the struct to align
- on the first member of the struct. This will probably the same as above,
- but we don't have any guarantees.
- */
-typedef struct { short x; char c; } __Pyx_pad_short;
-typedef struct { int x; char c; } __Pyx_pad_int;
-typedef struct { long x; char c; } __Pyx_pad_long;
-typedef struct { float x; char c; } __Pyx_pad_float;
-typedef struct { double x; char c; } __Pyx_pad_double;
-typedef struct { long double x; char c; } __Pyx_pad_longdouble;
-typedef struct { void *x; char c; } __Pyx_pad_void_p;
-#ifdef HAVE_LONG_LONG
-typedef struct { PY_LONG_LONG x; char c; } __Pyx_pad_longlong;
-#endif
-static size_t __Pyx_BufFmt_TypeCharToPadding(char ch, CYTHON_UNUSED int is_complex) {
- switch (ch) {
- case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
- case 'h': case 'H': return sizeof(__Pyx_pad_short) - sizeof(short);
- case 'i': case 'I': return sizeof(__Pyx_pad_int) - sizeof(int);
- case 'l': case 'L': return sizeof(__Pyx_pad_long) - sizeof(long);
-#ifdef HAVE_LONG_LONG
- case 'q': case 'Q': return sizeof(__Pyx_pad_longlong) - sizeof(PY_LONG_LONG);
-#endif
- case 'f': return sizeof(__Pyx_pad_float) - sizeof(float);
- case 'd': return sizeof(__Pyx_pad_double) - sizeof(double);
- case 'g': return sizeof(__Pyx_pad_longdouble) - sizeof(long double);
- case 'P': case 'O': return sizeof(__Pyx_pad_void_p) - sizeof(void*);
- default:
- __Pyx_BufFmt_RaiseUnexpectedChar(ch);
- return 0;
- }
-}
-static char __Pyx_BufFmt_TypeCharToGroup(char ch, int is_complex) {
- switch (ch) {
- case 'c':
- return 'H';
- case 'b': case 'h': case 'i':
- case 'l': case 'q': case 's': case 'p':
- return 'I';
- case 'B': case 'H': case 'I': case 'L': case 'Q':
- return 'U';
- case 'f': case 'd': case 'g':
- return (is_complex ? 'C' : 'R');
- case 'O':
- return 'O';
- case 'P':
- return 'P';
- default: {
- __Pyx_BufFmt_RaiseUnexpectedChar(ch);
- return 0;
- }
- }
-}
-static void __Pyx_BufFmt_RaiseExpected(__Pyx_BufFmt_Context* ctx) {
- if (ctx->head == NULL || ctx->head->field == &ctx->root) {
- const char* expected;
- const char* quote;
- if (ctx->head == NULL) {
- expected = "end";
- quote = "";
- } else {
- expected = ctx->head->field->type->name;
- quote = "'";
- }
- PyErr_Format(PyExc_ValueError,
- "Buffer dtype mismatch, expected %s%s%s but got %s",
- quote, expected, quote,
- __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex));
- } else {
- __Pyx_StructField* field = ctx->head->field;
- __Pyx_StructField* parent = (ctx->head - 1)->field;
- PyErr_Format(PyExc_ValueError,
- "Buffer dtype mismatch, expected '%s' but got %s in '%s.%s'",
- field->type->name, __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex),
- parent->type->name, field->name);
- }
-}
-static int __Pyx_BufFmt_ProcessTypeChunk(__Pyx_BufFmt_Context* ctx) {
- char group;
- size_t size, offset, arraysize = 1;
- if (ctx->enc_type == 0) return 0;
- if (ctx->head->field->type->arraysize[0]) {
- int i, ndim = 0;
- if (ctx->enc_type == 's' || ctx->enc_type == 'p') {
- ctx->is_valid_array = ctx->head->field->type->ndim == 1;
- ndim = 1;
- if (ctx->enc_count != ctx->head->field->type->arraysize[0]) {
- PyErr_Format(PyExc_ValueError,
- "Expected a dimension of size %zu, got %zu",
- ctx->head->field->type->arraysize[0], ctx->enc_count);
- return -1;
- }
- }
- if (!ctx->is_valid_array) {
- PyErr_Format(PyExc_ValueError, "Expected %d dimensions, got %d",
- ctx->head->field->type->ndim, ndim);
- return -1;
- }
- for (i = 0; i < ctx->head->field->type->ndim; i++) {
- arraysize *= ctx->head->field->type->arraysize[i];
- }
- ctx->is_valid_array = 0;
- ctx->enc_count = 1;
- }
- group = __Pyx_BufFmt_TypeCharToGroup(ctx->enc_type, ctx->is_complex);
- do {
- __Pyx_StructField* field = ctx->head->field;
- __Pyx_TypeInfo* type = field->type;
- if (ctx->enc_packmode == '@' || ctx->enc_packmode == '^') {
- size = __Pyx_BufFmt_TypeCharToNativeSize(ctx->enc_type, ctx->is_complex);
- } else {
- size = __Pyx_BufFmt_TypeCharToStandardSize(ctx->enc_type, ctx->is_complex);
- }
- if (ctx->enc_packmode == '@') {
- size_t align_at = __Pyx_BufFmt_TypeCharToAlignment(ctx->enc_type, ctx->is_complex);
- size_t align_mod_offset;
- if (align_at == 0) return -1;
- align_mod_offset = ctx->fmt_offset % align_at;
- if (align_mod_offset > 0) ctx->fmt_offset += align_at - align_mod_offset;
- if (ctx->struct_alignment == 0)
- ctx->struct_alignment = __Pyx_BufFmt_TypeCharToPadding(ctx->enc_type,
- ctx->is_complex);
- }
- if (type->size != size || type->typegroup != group) {
- if (type->typegroup == 'C' && type->fields != NULL) {
- size_t parent_offset = ctx->head->parent_offset + field->offset;
- ++ctx->head;
- ctx->head->field = type->fields;
- ctx->head->parent_offset = parent_offset;
- continue;
- }
- if ((type->typegroup == 'H' || group == 'H') && type->size == size) {
- } else {
- __Pyx_BufFmt_RaiseExpected(ctx);
- return -1;
- }
- }
- offset = ctx->head->parent_offset + field->offset;
- if (ctx->fmt_offset != offset) {
- PyErr_Format(PyExc_ValueError,
- "Buffer dtype mismatch; next field is at offset %" CYTHON_FORMAT_SSIZE_T "d but %" CYTHON_FORMAT_SSIZE_T "d expected",
- (Py_ssize_t)ctx->fmt_offset, (Py_ssize_t)offset);
- return -1;
- }
- ctx->fmt_offset += size;
- if (arraysize)
- ctx->fmt_offset += (arraysize - 1) * size;
- --ctx->enc_count;
- while (1) {
- if (field == &ctx->root) {
- ctx->head = NULL;
- if (ctx->enc_count != 0) {
- __Pyx_BufFmt_RaiseExpected(ctx);
- return -1;
- }
- break;
- }
- ctx->head->field = ++field;
- if (field->type == NULL) {
- --ctx->head;
- field = ctx->head->field;
- continue;
- } else if (field->type->typegroup == 'S') {
- size_t parent_offset = ctx->head->parent_offset + field->offset;
- if (field->type->fields->type == NULL) continue;
- field = field->type->fields;
- ++ctx->head;
- ctx->head->field = field;
- ctx->head->parent_offset = parent_offset;
- break;
- } else {
- break;
- }
- }
- } while (ctx->enc_count);
- ctx->enc_type = 0;
- ctx->is_complex = 0;
- return 0;
-}
-static CYTHON_INLINE PyObject *
-__pyx_buffmt_parse_array(__Pyx_BufFmt_Context* ctx, const char** tsp)
-{
- const char *ts = *tsp;
- int i = 0, number;
- int ndim = ctx->head->field->type->ndim;
-;
- ++ts;
- if (ctx->new_count != 1) {
- PyErr_SetString(PyExc_ValueError,
- "Cannot handle repeated arrays in format string");
- return NULL;
- }
- if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
- while (*ts && *ts != ')') {
- switch (*ts) {
- case ' ': case '\f': case '\r': case '\n': case '\t': case '\v': continue;
- default: break;
- }
- number = __Pyx_BufFmt_ExpectNumber(&ts);
- if (number == -1) return NULL;
- if (i < ndim && (size_t) number != ctx->head->field->type->arraysize[i])
- return PyErr_Format(PyExc_ValueError,
- "Expected a dimension of size %zu, got %d",
- ctx->head->field->type->arraysize[i], number);
- if (*ts != ',' && *ts != ')')
- return PyErr_Format(PyExc_ValueError,
- "Expected a comma in format string, got '%c'", *ts);
- if (*ts == ',') ts++;
- i++;
- }
- if (i != ndim)
- return PyErr_Format(PyExc_ValueError, "Expected %d dimension(s), got %d",
- ctx->head->field->type->ndim, i);
- if (!*ts) {
- PyErr_SetString(PyExc_ValueError,
- "Unexpected end of format string, expected ')'");
- return NULL;
- }
- ctx->is_valid_array = 1;
- ctx->new_count = 1;
- *tsp = ++ts;
- return Py_None;
-}
-static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts) {
- int got_Z = 0;
- while (1) {
- switch(*ts) {
- case 0:
- if (ctx->enc_type != 0 && ctx->head == NULL) {
- __Pyx_BufFmt_RaiseExpected(ctx);
- return NULL;
- }
- if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
- if (ctx->head != NULL) {
- __Pyx_BufFmt_RaiseExpected(ctx);
- return NULL;
- }
- return ts;
- case ' ':
- case '\r':
- case '\n':
- ++ts;
- break;
- case '<':
- if (!__Pyx_IsLittleEndian()) {
- PyErr_SetString(PyExc_ValueError, "Little-endian buffer not supported on big-endian compiler");
- return NULL;
- }
- ctx->new_packmode = '=';
- ++ts;
- break;
- case '>':
- case '!':
- if (__Pyx_IsLittleEndian()) {
- PyErr_SetString(PyExc_ValueError, "Big-endian buffer not supported on little-endian compiler");
- return NULL;
- }
- ctx->new_packmode = '=';
- ++ts;
- break;
- case '=':
- case '@':
- case '^':
- ctx->new_packmode = *ts++;
- break;
- case 'T':
- {
- const char* ts_after_sub;
- size_t i, struct_count = ctx->new_count;
- size_t struct_alignment = ctx->struct_alignment;
- ctx->new_count = 1;
- ++ts;
- if (*ts != '{') {
- PyErr_SetString(PyExc_ValueError, "Buffer acquisition: Expected '{' after 'T'");
- return NULL;
- }
- if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
- ctx->enc_type = 0;
- ctx->enc_count = 0;
- ctx->struct_alignment = 0;
- ++ts;
- ts_after_sub = ts;
- for (i = 0; i != struct_count; ++i) {
- ts_after_sub = __Pyx_BufFmt_CheckString(ctx, ts);
- if (!ts_after_sub) return NULL;
- }
- ts = ts_after_sub;
- if (struct_alignment) ctx->struct_alignment = struct_alignment;
- }
- break;
- case '}':
- {
- size_t alignment = ctx->struct_alignment;
- ++ts;
- if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
- ctx->enc_type = 0;
- if (alignment && ctx->fmt_offset % alignment) {
- ctx->fmt_offset += alignment - (ctx->fmt_offset % alignment);
- }
- }
- return ts;
- case 'x':
- if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
- ctx->fmt_offset += ctx->new_count;
- ctx->new_count = 1;
- ctx->enc_count = 0;
- ctx->enc_type = 0;
- ctx->enc_packmode = ctx->new_packmode;
- ++ts;
- break;
- case 'Z':
- got_Z = 1;
- ++ts;
- if (*ts != 'f' && *ts != 'd' && *ts != 'g') {
- __Pyx_BufFmt_RaiseUnexpectedChar('Z');
- return NULL;
- }
- case 'c': case 'b': case 'B': case 'h': case 'H': case 'i': case 'I':
- case 'l': case 'L': case 'q': case 'Q':
- case 'f': case 'd': case 'g':
- case 'O': case 'p':
- if (ctx->enc_type == *ts && got_Z == ctx->is_complex &&
- ctx->enc_packmode == ctx->new_packmode) {
- ctx->enc_count += ctx->new_count;
- ctx->new_count = 1;
- got_Z = 0;
- ++ts;
- break;
- }
- case 's':
- if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
- ctx->enc_count = ctx->new_count;
- ctx->enc_packmode = ctx->new_packmode;
- ctx->enc_type = *ts;
- ctx->is_complex = got_Z;
- ++ts;
- ctx->new_count = 1;
- got_Z = 0;
- break;
- case ':':
- ++ts;
- while(*ts != ':') ++ts;
- ++ts;
- break;
- case '(':
- if (!__pyx_buffmt_parse_array(ctx, &ts)) return NULL;
- break;
- default:
- {
- int number = __Pyx_BufFmt_ExpectNumber(&ts);
- if (number == -1) return NULL;
- ctx->new_count = (size_t)number;
- }
- }
- }
-}
-static CYTHON_INLINE void __Pyx_ZeroBuffer(Py_buffer* buf) {
- buf->buf = NULL;
- buf->obj = NULL;
- buf->strides = __Pyx_zeros;
- buf->shape = __Pyx_zeros;
- buf->suboffsets = __Pyx_minusones;
-}
-static CYTHON_INLINE int __Pyx_GetBufferAndValidate(
- Py_buffer* buf, PyObject* obj, __Pyx_TypeInfo* dtype, int flags,
- int nd, int cast, __Pyx_BufFmt_StackElem* stack)
-{
- if (obj == Py_None || obj == NULL) {
- __Pyx_ZeroBuffer(buf);
- return 0;
- }
- buf->buf = NULL;
- if (__Pyx_GetBuffer(obj, buf, flags) == -1) goto fail;
- if (buf->ndim != nd) {
- PyErr_Format(PyExc_ValueError,
- "Buffer has wrong number of dimensions (expected %d, got %d)",
- nd, buf->ndim);
- goto fail;
- }
- if (!cast) {
- __Pyx_BufFmt_Context ctx;
- __Pyx_BufFmt_Init(&ctx, stack, dtype);
- if (!__Pyx_BufFmt_CheckString(&ctx, buf->format)) goto fail;
- }
- if ((unsigned)buf->itemsize != dtype->size) {
- PyErr_Format(PyExc_ValueError,
- "Item size of buffer (%" CYTHON_FORMAT_SSIZE_T "d byte%s) does not match size of '%s' (%" CYTHON_FORMAT_SSIZE_T "d byte%s)",
- buf->itemsize, (buf->itemsize > 1) ? "s" : "",
- dtype->name, (Py_ssize_t)dtype->size, (dtype->size > 1) ? "s" : "");
- goto fail;
- }
- if (buf->suboffsets == NULL) buf->suboffsets = __Pyx_minusones;
- return 0;
-fail:;
- __Pyx_ZeroBuffer(buf);
- return -1;
-}
-static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info) {
- if (info->buf == NULL) return;
- if (info->suboffsets == __Pyx_minusones) info->suboffsets = NULL;
- __Pyx_ReleaseBuffer(info);
-}
-
/* MemviewSliceInit */
- static int
+ static int
__Pyx_init_memviewslice(struct __pyx_memoryview_obj *memview,
int ndim,
__Pyx_memviewslice *memviewslice,
@@ -50199,7 +52568,10 @@ no_fail:
__Pyx_RefNannyFinishContext();
return retval;
}
-static CYTHON_INLINE void __pyx_fatalerror(const char *fmt, ...) {
+#ifndef Py_NO_RETURN
+#define Py_NO_RETURN
+#endif
+static void __pyx_fatalerror(const char *fmt, ...) Py_NO_RETURN {
va_list vargs;
char msg[200];
#ifdef HAVE_STDARG_PROTOTYPES
@@ -50208,8 +52580,8 @@ static CYTHON_INLINE void __pyx_fatalerror(const char *fmt, ...) {
va_start(vargs);
#endif
vsnprintf(msg, 200, fmt, vargs);
- Py_FatalError(msg);
va_end(vargs);
+ Py_FatalError(msg);
}
static CYTHON_INLINE int
__pyx_add_acquisition_count_locked(__pyx_atomic_int *acquisition_count,
@@ -50281,12 +52653,12 @@ static CYTHON_INLINE void __Pyx_XDEC_MEMVIEW(__Pyx_memviewslice *memslice,
}
/* ExtTypeTest */
- static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
+ static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
if (unlikely(!type)) {
PyErr_SetString(PyExc_SystemError, "Missing type object");
return 0;
}
- if (likely(PyObject_TypeCheck(obj, type)))
+ if (likely(__Pyx_TypeCheck(obj, type)))
return 1;
PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s",
Py_TYPE(obj)->tp_name, type->tp_name);
@@ -50294,34 +52666,28 @@ static CYTHON_INLINE void __Pyx_XDEC_MEMVIEW(__Pyx_memviewslice *memslice,
}
/* ArgTypeTest */
- static void __Pyx_RaiseArgumentTypeInvalid(const char* name, PyObject *obj, PyTypeObject *type) {
- PyErr_Format(PyExc_TypeError,
- "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)",
- name, type->tp_name, Py_TYPE(obj)->tp_name);
-}
-static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
- const char *name, int exact)
+ static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact)
{
if (unlikely(!type)) {
PyErr_SetString(PyExc_SystemError, "Missing type object");
return 0;
}
- if (none_allowed && obj == Py_None) return 1;
else if (exact) {
- if (likely(Py_TYPE(obj) == type)) return 1;
#if PY_MAJOR_VERSION == 2
- else if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
+ if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
#endif
}
else {
- if (likely(PyObject_TypeCheck(obj, type))) return 1;
+ if (likely(__Pyx_TypeCheck(obj, type))) return 1;
}
- __Pyx_RaiseArgumentTypeInvalid(name, obj, type);
+ PyErr_Format(PyExc_TypeError,
+ "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)",
+ name, type->tp_name, Py_TYPE(obj)->tp_name);
return 0;
}
/* BytesEquals */
- static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
+ static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
#if CYTHON_COMPILING_IN_PYPY
return PyObject_RichCompareBool(s1, s2, equals);
#else
@@ -50339,7 +52705,16 @@ static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, in
} else if (length == 1) {
return (equals == Py_EQ);
} else {
- int result = memcmp(ps1, ps2, (size_t)length);
+ int result;
+#if CYTHON_USE_UNICODE_INTERNALS
+ Py_hash_t hash1, hash2;
+ hash1 = ((PyBytesObject*)s1)->ob_shash;
+ hash2 = ((PyBytesObject*)s2)->ob_shash;
+ if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
+ return (equals == Py_NE);
+ }
+#endif
+ result = memcmp(ps1, ps2, (size_t)length);
return (equals == Py_EQ) ? (result == 0) : (result != 0);
}
} else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
@@ -50359,7 +52734,7 @@ static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, in
}
/* UnicodeEquals */
- static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
+ static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
#if CYTHON_COMPILING_IN_PYPY
return PyObject_RichCompareBool(s1, s2, equals);
#else
@@ -50399,6 +52774,21 @@ static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, in
if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
goto return_ne;
}
+#if CYTHON_USE_UNICODE_INTERNALS
+ {
+ Py_hash_t hash1, hash2;
+ #if CYTHON_PEP393_ENABLED
+ hash1 = ((PyASCIIObject*)s1)->hash;
+ hash2 = ((PyASCIIObject*)s2)->hash;
+ #else
+ hash1 = ((PyUnicodeObject*)s1)->hash;
+ hash2 = ((PyUnicodeObject*)s2)->hash;
+ #endif
+ if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
+ goto return_ne;
+ }
+ }
+#endif
kind = __Pyx_PyUnicode_KIND(s1);
if (kind != __Pyx_PyUnicode_KIND(s2)) {
goto return_ne;
@@ -50443,7 +52833,7 @@ return_ne:
}
/* None */
- static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t a, Py_ssize_t b) {
+ static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t a, Py_ssize_t b) {
Py_ssize_t q = a / b;
Py_ssize_t r = a - q*b;
q -= ((r != 0) & ((r ^ b) < 0));
@@ -50451,8 +52841,8 @@ return_ne:
}
/* GetAttr */
- static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) {
-#if CYTHON_COMPILING_IN_CPYTHON
+ static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) {
+#if CYTHON_USE_TYPE_SLOTS
#if PY_MAJOR_VERSION >= 3
if (likely(PyUnicode_Check(n)))
#else
@@ -50464,7 +52854,7 @@ return_ne:
}
/* decode_c_string */
- static CYTHON_INLINE PyObject* __Pyx_decode_c_string(
+ 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)) {
@@ -50496,16 +52886,40 @@ return_ne:
}
}
+/* GetAttr3 */
+ static PyObject *__Pyx_GetAttr3Default(PyObject *d) {
+ __Pyx_PyThreadState_declare
+ __Pyx_PyThreadState_assign
+ if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
+ return NULL;
+ __Pyx_PyErr_Clear();
+ Py_INCREF(d);
+ return d;
+}
+static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) {
+ PyObject *r = __Pyx_GetAttr(o, n);
+ return (likely(r)) ? r : __Pyx_GetAttr3Default(d);
+}
+
/* SwapException */
- #if CYTHON_FAST_THREAD_STATE
+ #if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
PyObject *tmp_type, *tmp_value, *tmp_tb;
+ #if PY_VERSION_HEX >= 0x030700A2
+ tmp_type = tstate->exc_state.exc_type;
+ tmp_value = tstate->exc_state.exc_value;
+ tmp_tb = tstate->exc_state.exc_traceback;
+ tstate->exc_state.exc_type = *type;
+ tstate->exc_state.exc_value = *value;
+ tstate->exc_state.exc_traceback = *tb;
+ #else
tmp_type = tstate->exc_type;
tmp_value = tstate->exc_value;
tmp_tb = tstate->exc_traceback;
tstate->exc_type = *type;
tstate->exc_value = *value;
tstate->exc_traceback = *tb;
+ #endif
*type = tmp_type;
*value = tmp_value;
*tb = tmp_tb;
@@ -50521,13 +52935,150 @@ static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value,
}
#endif
+/* Import */
+ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
+ PyObject *empty_list = 0;
+ PyObject *module = 0;
+ PyObject *global_dict = 0;
+ PyObject *empty_dict = 0;
+ PyObject *list;
+ #if PY_MAJOR_VERSION < 3
+ PyObject *py_import;
+ py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
+ if (!py_import)
+ goto bad;
+ #endif
+ if (from_list)
+ list = from_list;
+ else {
+ empty_list = PyList_New(0);
+ if (!empty_list)
+ goto bad;
+ list = empty_list;
+ }
+ global_dict = PyModule_GetDict(__pyx_m);
+ if (!global_dict)
+ goto bad;
+ empty_dict = PyDict_New();
+ if (!empty_dict)
+ goto bad;
+ {
+ #if PY_MAJOR_VERSION >= 3
+ if (level == -1) {
+ if (strchr(__Pyx_MODULE_NAME, '.')) {
+ module = PyImport_ImportModuleLevelObject(
+ name, global_dict, empty_dict, list, 1);
+ if (!module) {
+ if (!PyErr_ExceptionMatches(PyExc_ImportError))
+ goto bad;
+ PyErr_Clear();
+ }
+ }
+ level = 0;
+ }
+ #endif
+ if (!module) {
+ #if PY_MAJOR_VERSION < 3
+ PyObject *py_level = PyInt_FromLong(level);
+ if (!py_level)
+ goto bad;
+ module = PyObject_CallFunctionObjArgs(py_import,
+ name, global_dict, empty_dict, list, py_level, NULL);
+ Py_DECREF(py_level);
+ #else
+ module = PyImport_ImportModuleLevelObject(
+ name, global_dict, empty_dict, list, level);
+ #endif
+ }
+ }
+bad:
+ #if PY_MAJOR_VERSION < 3
+ Py_XDECREF(py_import);
+ #endif
+ Py_XDECREF(empty_list);
+ Py_XDECREF(empty_dict);
+ return module;
+}
+
+/* FastTypeChecks */
+ #if CYTHON_COMPILING_IN_CPYTHON
+static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
+ while (a) {
+ a = a->tp_base;
+ if (a == b)
+ return 1;
+ }
+ return b == &PyBaseObject_Type;
+}
+static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
+ PyObject *mro;
+ if (a == b) return 1;
+ mro = a->tp_mro;
+ if (likely(mro)) {
+ Py_ssize_t i, n;
+ n = PyTuple_GET_SIZE(mro);
+ for (i = 0; i < n; i++) {
+ if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
+ return 1;
+ }
+ return 0;
+ }
+ return __Pyx_InBases(a, b);
+}
+#if PY_MAJOR_VERSION == 2
+static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
+ PyObject *exception, *value, *tb;
+ int res;
+ __Pyx_PyThreadState_declare
+ __Pyx_PyThreadState_assign
+ __Pyx_ErrFetch(&exception, &value, &tb);
+ res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
+ if (unlikely(res == -1)) {
+ PyErr_WriteUnraisable(err);
+ res = 0;
+ }
+ if (!res) {
+ res = PyObject_IsSubclass(err, exc_type2);
+ if (unlikely(res == -1)) {
+ PyErr_WriteUnraisable(err);
+ res = 0;
+ }
+ }
+ __Pyx_ErrRestore(exception, value, tb);
+ return res;
+}
+#else
+static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
+ int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0;
+ if (!res) {
+ res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
+ }
+ return res;
+}
+#endif
+static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
+ if (likely(err == exc_type)) return 1;
+ if (likely(PyExceptionClass_Check(err))) {
+ return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
+ }
+ return PyErr_GivenExceptionMatches(err, exc_type);
+}
+static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
+ if (likely(err == exc_type1 || err == exc_type2)) return 1;
+ if (likely(PyExceptionClass_Check(err))) {
+ return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
+ }
+ return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
+}
+#endif
+
/* None */
- static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) {
+ static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) {
PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname);
}
/* None */
- static CYTHON_INLINE long __Pyx_div_long(long a, long b) {
+ static CYTHON_INLINE long __Pyx_div_long(long a, long b) {
long q = a / b;
long r = a - q*b;
q -= ((r != 0) & ((r ^ b) < 0));
@@ -50535,7 +53086,7 @@ static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value,
}
/* WriteUnraisableException */
- static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno,
+ static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno,
CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename,
int full_traceback, CYTHON_UNUSED int nogil) {
PyObject *old_exc, *old_val, *old_tb;
@@ -50576,8 +53127,90 @@ static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value,
#endif
}
+/* ImportFrom */
+ static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
+ PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
+ if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
+ PyErr_Format(PyExc_ImportError,
+ #if PY_MAJOR_VERSION < 3
+ "cannot import name %.230s", PyString_AS_STRING(name));
+ #else
+ "cannot import name %S", name);
+ #endif
+ }
+ return value;
+}
+
+/* HasAttr */
+ static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) {
+ PyObject *r;
+ if (unlikely(!__Pyx_PyBaseString_Check(n))) {
+ PyErr_SetString(PyExc_TypeError,
+ "hasattr(): attribute name must be string");
+ return -1;
+ }
+ r = __Pyx_GetAttr(o, n);
+ if (unlikely(!r)) {
+ PyErr_Clear();
+ return 0;
+ } else {
+ Py_DECREF(r);
+ return 1;
+ }
+}
+
+/* PyObject_GenericGetAttrNoDict */
+ #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
+static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) {
+ PyErr_Format(PyExc_AttributeError,
+#if PY_MAJOR_VERSION >= 3
+ "'%.50s' object has no attribute '%U'",
+ tp->tp_name, attr_name);
+#else
+ "'%.50s' object has no attribute '%.400s'",
+ tp->tp_name, PyString_AS_STRING(attr_name));
+#endif
+ return NULL;
+}
+static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) {
+ PyObject *descr;
+ PyTypeObject *tp = Py_TYPE(obj);
+ if (unlikely(!PyString_Check(attr_name))) {
+ return PyObject_GenericGetAttr(obj, attr_name);
+ }
+ assert(!tp->tp_dictoffset);
+ descr = _PyType_Lookup(tp, attr_name);
+ if (unlikely(!descr)) {
+ return __Pyx_RaiseGenericGetAttributeError(tp, attr_name);
+ }
+ Py_INCREF(descr);
+ #if PY_MAJOR_VERSION < 3
+ if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS)))
+ #endif
+ {
+ descrgetfunc f = Py_TYPE(descr)->tp_descr_get;
+ if (unlikely(f)) {
+ PyObject *res = f(descr, obj, (PyObject *)tp);
+ Py_DECREF(descr);
+ return res;
+ }
+ }
+ return descr;
+}
+#endif
+
+/* PyObject_GenericGetAttr */
+ #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
+static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) {
+ if (unlikely(Py_TYPE(obj)->tp_dictoffset)) {
+ return PyObject_GenericGetAttr(obj, attr_name);
+ }
+ return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name);
+}
+#endif
+
/* SetVTable */
- static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
+ static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
#if PY_VERSION_HEX >= 0x02070000
PyObject *ob = PyCapsule_New(vtable, 0, 0);
#else
@@ -50594,8 +53227,84 @@ bad:
return -1;
}
+/* SetupReduce */
+ static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {
+ int ret;
+ PyObject *name_attr;
+ name_attr = __Pyx_PyObject_GetAttrStr(meth, __pyx_n_s_name_2);
+ if (likely(name_attr)) {
+ ret = PyObject_RichCompareBool(name_attr, name, Py_EQ);
+ } else {
+ ret = -1;
+ }
+ if (unlikely(ret < 0)) {
+ PyErr_Clear();
+ ret = 0;
+ }
+ Py_XDECREF(name_attr);
+ return ret;
+}
+static int __Pyx_setup_reduce(PyObject* type_obj) {
+ int ret = 0;
+ PyObject *object_reduce = NULL;
+ PyObject *object_reduce_ex = NULL;
+ PyObject *reduce = NULL;
+ PyObject *reduce_ex = NULL;
+ PyObject *reduce_cython = NULL;
+ PyObject *setstate = NULL;
+ PyObject *setstate_cython = NULL;
+#if CYTHON_USE_PYTYPE_LOOKUP
+ if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto GOOD;
+#else
+ if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto GOOD;
+#endif
+#if CYTHON_USE_PYTYPE_LOOKUP
+ object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD;
+#else
+ object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD;
+#endif
+ reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto BAD;
+ if (reduce_ex == object_reduce_ex) {
+#if CYTHON_USE_PYTYPE_LOOKUP
+ object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD;
+#else
+ object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD;
+#endif
+ reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto BAD;
+ if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) {
+ reduce_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_cython); if (unlikely(!reduce_cython)) goto BAD;
+ ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto BAD;
+ ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto BAD;
+ setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate);
+ if (!setstate) PyErr_Clear();
+ if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) {
+ setstate_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate_cython); if (unlikely(!setstate_cython)) goto BAD;
+ ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto BAD;
+ ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto BAD;
+ }
+ PyType_Modified((PyTypeObject*)type_obj);
+ }
+ }
+ goto GOOD;
+BAD:
+ if (!PyErr_Occurred())
+ PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name);
+ ret = -1;
+GOOD:
+#if !CYTHON_USE_PYTYPE_LOOKUP
+ Py_XDECREF(object_reduce);
+ Py_XDECREF(object_reduce_ex);
+#endif
+ Py_XDECREF(reduce);
+ Py_XDECREF(reduce_ex);
+ Py_XDECREF(reduce_cython);
+ Py_XDECREF(setstate);
+ Py_XDECREF(setstate_cython);
+ return ret;
+}
+
/* FetchCommonType */
- static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
+ static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
PyObject* fake_module;
PyTypeObject* cached_type = NULL;
fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI);
@@ -50634,7 +53343,8 @@ bad:
}
/* CythonFunction */
- static PyObject *
+ #include <structmember.h>
+static PyObject *
__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure)
{
if (unlikely(op->func_doc == NULL)) {
@@ -50916,7 +53626,7 @@ static PyGetSetDef __pyx_CyFunction_getsets[] = {
{0, 0, 0, 0, 0}
};
static PyMemberDef __pyx_CyFunction_members[] = {
- {(char *) "__module__", T_OBJECT, offsetof(__pyx_CyFunctionObject, func.m_module), PY_WRITE_RESTRICTED, 0},
+ {(char *) "__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), PY_WRITE_RESTRICTED, 0},
{0, 0, 0, 0, 0}
};
static PyObject *
@@ -50994,14 +53704,18 @@ __Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
}
return 0;
}
-static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m)
+static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m)
{
- PyObject_GC_UnTrack(m);
if (__Pyx_CyFunction_weakreflist(m) != NULL)
PyObject_ClearWeakRefs((PyObject *) m);
__Pyx_CyFunction_clear(m);
PyObject_GC_Del(m);
}
+static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m)
+{
+ PyObject_GC_UnTrack(m);
+ __Pyx__CyFunction_dealloc(m);
+}
static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg)
{
Py_VISIT(m->func_closure);
@@ -51076,10 +53790,16 @@ static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, Py
if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
size = PyTuple_GET_SIZE(arg);
if (likely(size == 1)) {
- PyObject *result, *arg0 = PySequence_ITEM(arg, 0);
- if (unlikely(!arg0)) return NULL;
+ PyObject *result, *arg0;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ arg0 = PyTuple_GET_ITEM(arg, 0);
+ #else
+ arg0 = PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL;
+ #endif
result = (*meth)(self, arg0);
+ #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
Py_DECREF(arg0);
+ #endif
return result;
}
PyErr_Format(PyExc_TypeError,
@@ -51186,7 +53906,7 @@ static PyTypeObject __pyx_CyFunctionType_type = {
};
static int __pyx_CyFunction_init(void) {
__pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type);
- if (__pyx_CyFunctionType == NULL) {
+ if (unlikely(__pyx_CyFunctionType == NULL)) {
return -1;
}
return 0;
@@ -51194,7 +53914,7 @@ static int __pyx_CyFunction_init(void) {
static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) {
__pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
m->defaults = PyObject_Malloc(size);
- if (!m->defaults)
+ if (unlikely(!m->defaults))
return PyErr_NoMemory();
memset(m->defaults, 0, size);
m->defaults_pyobjects = pyobjects;
@@ -51217,7 +53937,7 @@ static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, Py
}
/* FusedFunction */
- static PyObject *
+ static PyObject *
__pyx_FusedFunction_New(PyTypeObject *type, PyMethodDef *ml, int flags,
PyObject *qualname, PyObject *self,
PyObject *module, PyObject *globals,
@@ -51233,9 +53953,14 @@ __pyx_FusedFunction_New(PyTypeObject *type, PyMethodDef *ml, int flags,
fusedfunc->self = NULL;
return (PyObject *) fusedfunc;
}
-static void __pyx_FusedFunction_dealloc(__pyx_FusedFunctionObject *self) {
- __pyx_FusedFunction_clear(self);
- __pyx_FusedFunctionType->tp_free((PyObject *) self);
+static void
+__pyx_FusedFunction_dealloc(__pyx_FusedFunctionObject *self)
+{
+ PyObject_GC_UnTrack(self);
+ Py_CLEAR(self->self);
+ Py_CLEAR(self->type);
+ Py_CLEAR(self->__signatures__);
+ __Pyx__CyFunction_dealloc((__pyx_CyFunctionObject *) self);
}
static int
__pyx_FusedFunction_traverse(__pyx_FusedFunctionObject *self,
@@ -51541,8 +54266,48 @@ static int __pyx_FusedFunction_init(void) {
return 0;
}
+/* CLineInTraceback */
+ #ifndef CYTHON_CLINE_IN_TRACEBACK
+static int __Pyx_CLineForTraceback(CYTHON_UNUSED PyThreadState *tstate, int c_line) {
+ PyObject *use_cline;
+ PyObject *ptype, *pvalue, *ptraceback;
+#if CYTHON_COMPILING_IN_CPYTHON
+ PyObject **cython_runtime_dict;
+#endif
+ if (unlikely(!__pyx_cython_runtime)) {
+ return c_line;
+ }
+ __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
+#if CYTHON_COMPILING_IN_CPYTHON
+ cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
+ if (likely(cython_runtime_dict)) {
+ use_cline = __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback);
+ } else
+#endif
+ {
+ PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
+ if (use_cline_obj) {
+ use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
+ Py_DECREF(use_cline_obj);
+ } else {
+ PyErr_Clear();
+ use_cline = NULL;
+ }
+ }
+ if (!use_cline) {
+ c_line = 0;
+ PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
+ }
+ else if (PyObject_Not(use_cline) != 0) {
+ c_line = 0;
+ }
+ __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
+ return c_line;
+}
+#endif
+
/* CodeObjectCache */
- static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
+ static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
int start = 0, mid = 0, end = count - 1;
if (end >= 0 && code_line > entries[end].code_line) {
return count;
@@ -51622,7 +54387,7 @@ static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
}
/* AddTraceback */
- #include "compile.h"
+ #include "compile.h"
#include "frameobject.h"
#include "traceback.h"
static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
@@ -51681,18 +54446,22 @@ static void __Pyx_AddTraceback(const char *funcname, int c_line,
int py_line, const char *filename) {
PyCodeObject *py_code = 0;
PyFrameObject *py_frame = 0;
- py_code = __pyx_find_code_object(c_line ? c_line : py_line);
+ PyThreadState *tstate = __Pyx_PyThreadState_Current;
+ if (c_line) {
+ c_line = __Pyx_CLineForTraceback(tstate, c_line);
+ }
+ py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
if (!py_code) {
py_code = __Pyx_CreateCodeObjectForTraceback(
funcname, c_line, py_line, filename);
if (!py_code) goto bad;
- __pyx_insert_code_object(c_line ? c_line : py_line, py_code);
+ __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
}
py_frame = PyFrame_New(
- PyThreadState_GET(), /*PyThreadState *tstate,*/
- py_code, /*PyCodeObject *code,*/
- __pyx_d, /*PyObject *globals,*/
- 0 /*PyObject *locals*/
+ tstate, /*PyThreadState *tstate,*/
+ py_code, /*PyCodeObject *code,*/
+ __pyx_d, /*PyObject *globals,*/
+ 0 /*PyObject *locals*/
);
if (!py_frame) goto bad;
__Pyx_PyFrame_SetLineNumber(py_frame, py_line);
@@ -51705,9 +54474,9 @@ bad:
#if PY_MAJOR_VERSION < 3
static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags) {
if (PyObject_CheckBuffer(obj)) return PyObject_GetBuffer(obj, view, flags);
- if (PyObject_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) return __pyx_pw_5numpy_7ndarray_1__getbuffer__(obj, view, flags);
- if (PyObject_TypeCheck(obj, __pyx_array_type)) return __pyx_array_getbuffer(obj, view, flags);
- if (PyObject_TypeCheck(obj, __pyx_memoryview_type)) return __pyx_memoryview_getbuffer(obj, view, flags);
+ if (__Pyx_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) return __pyx_pw_5numpy_7ndarray_1__getbuffer__(obj, view, flags);
+ if (__Pyx_TypeCheck(obj, __pyx_array_type)) return __pyx_array_getbuffer(obj, view, flags);
+ if (__Pyx_TypeCheck(obj, __pyx_memoryview_type)) return __pyx_memoryview_getbuffer(obj, view, flags);
PyErr_Format(PyExc_TypeError, "'%.200s' does not have the buffer interface", Py_TYPE(obj)->tp_name);
return -1;
}
@@ -51718,17 +54487,17 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) {
PyBuffer_Release(view);
return;
}
- if (PyObject_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) { __pyx_pw_5numpy_7ndarray_3__releasebuffer__(obj, view); return; }
- Py_DECREF(obj);
+ if ((0)) {}
+ else if (__Pyx_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) __pyx_pw_5numpy_7ndarray_3__releasebuffer__(obj, view);
view->obj = NULL;
+ Py_DECREF(obj);
}
#endif
- /* MemviewSliceIsContig */
- static int
-__pyx_memviewslice_is_contig(const __Pyx_memviewslice mvs,
- char order, int ndim)
+ /* MemviewSliceIsContig */
+ static int
+__pyx_memviewslice_is_contig(const __Pyx_memviewslice mvs, char order, int ndim)
{
int i, index, step, start;
Py_ssize_t itemsize = mvs.memview->view.itemsize;
@@ -51749,7 +54518,7 @@ __pyx_memviewslice_is_contig(const __Pyx_memviewslice mvs,
}
/* OverlappingSlices */
- static void
+ static void
__pyx_get_array_memory_extents(__Pyx_memviewslice *slice,
void **out_start, void **out_end,
int ndim, size_t itemsize)
@@ -51785,7 +54554,7 @@ __pyx_slices_overlap(__Pyx_memviewslice *slice1,
}
/* Capsule */
- static CYTHON_INLINE PyObject *
+ static CYTHON_INLINE PyObject *
__pyx_capsule_create(void *p, CYTHON_UNUSED const char *sig)
{
PyObject *cobj;
@@ -51797,8 +54566,521 @@ __pyx_capsule_create(void *p, CYTHON_UNUSED const char *sig)
return cobj;
}
+/* IsLittleEndian */
+ static CYTHON_INLINE int __Pyx_Is_Little_Endian(void)
+{
+ union {
+ uint32_t u32;
+ uint8_t u8[4];
+ } S;
+ S.u32 = 0x01020304;
+ return S.u8[0] == 4;
+}
+
+/* BufferFormatCheck */
+ static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx,
+ __Pyx_BufFmt_StackElem* stack,
+ __Pyx_TypeInfo* type) {
+ stack[0].field = &ctx->root;
+ stack[0].parent_offset = 0;
+ ctx->root.type = type;
+ ctx->root.name = "buffer dtype";
+ ctx->root.offset = 0;
+ ctx->head = stack;
+ ctx->head->field = &ctx->root;
+ ctx->fmt_offset = 0;
+ ctx->head->parent_offset = 0;
+ ctx->new_packmode = '@';
+ ctx->enc_packmode = '@';
+ ctx->new_count = 1;
+ ctx->enc_count = 0;
+ ctx->enc_type = 0;
+ ctx->is_complex = 0;
+ ctx->is_valid_array = 0;
+ ctx->struct_alignment = 0;
+ while (type->typegroup == 'S') {
+ ++ctx->head;
+ ctx->head->field = type->fields;
+ ctx->head->parent_offset = 0;
+ type = type->fields->type;
+ }
+}
+static int __Pyx_BufFmt_ParseNumber(const char** ts) {
+ int count;
+ const char* t = *ts;
+ if (*t < '0' || *t > '9') {
+ return -1;
+ } else {
+ count = *t++ - '0';
+ while (*t >= '0' && *t < '9') {
+ count *= 10;
+ count += *t++ - '0';
+ }
+ }
+ *ts = t;
+ return count;
+}
+static int __Pyx_BufFmt_ExpectNumber(const char **ts) {
+ int number = __Pyx_BufFmt_ParseNumber(ts);
+ if (number == -1)
+ PyErr_Format(PyExc_ValueError,\
+ "Does not understand character buffer dtype format string ('%c')", **ts);
+ return number;
+}
+static void __Pyx_BufFmt_RaiseUnexpectedChar(char ch) {
+ PyErr_Format(PyExc_ValueError,
+ "Unexpected format string character: '%c'", ch);
+}
+static const char* __Pyx_BufFmt_DescribeTypeChar(char ch, int is_complex) {
+ switch (ch) {
+ case 'c': return "'char'";
+ case 'b': return "'signed char'";
+ case 'B': return "'unsigned char'";
+ case 'h': return "'short'";
+ case 'H': return "'unsigned short'";
+ case 'i': return "'int'";
+ case 'I': return "'unsigned int'";
+ case 'l': return "'long'";
+ case 'L': return "'unsigned long'";
+ case 'q': return "'long long'";
+ case 'Q': return "'unsigned long long'";
+ case 'f': return (is_complex ? "'complex float'" : "'float'");
+ case 'd': return (is_complex ? "'complex double'" : "'double'");
+ case 'g': return (is_complex ? "'complex long double'" : "'long double'");
+ case 'T': return "a struct";
+ case 'O': return "Python object";
+ case 'P': return "a pointer";
+ case 's': case 'p': return "a string";
+ case 0: return "end";
+ default: return "unparseable format string";
+ }
+}
+static size_t __Pyx_BufFmt_TypeCharToStandardSize(char ch, int is_complex) {
+ switch (ch) {
+ case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
+ case 'h': case 'H': return 2;
+ case 'i': case 'I': case 'l': case 'L': return 4;
+ case 'q': case 'Q': return 8;
+ case 'f': return (is_complex ? 8 : 4);
+ case 'd': return (is_complex ? 16 : 8);
+ case 'g': {
+ PyErr_SetString(PyExc_ValueError, "Python does not define a standard format string size for long double ('g')..");
+ return 0;
+ }
+ case 'O': case 'P': return sizeof(void*);
+ default:
+ __Pyx_BufFmt_RaiseUnexpectedChar(ch);
+ return 0;
+ }
+}
+static size_t __Pyx_BufFmt_TypeCharToNativeSize(char ch, int is_complex) {
+ switch (ch) {
+ case 'c': case 'b': case 'B': case 's': case 'p': return 1;
+ case 'h': case 'H': return sizeof(short);
+ case 'i': case 'I': return sizeof(int);
+ case 'l': case 'L': return sizeof(long);
+ #ifdef HAVE_LONG_LONG
+ case 'q': case 'Q': return sizeof(PY_LONG_LONG);
+ #endif
+ case 'f': return sizeof(float) * (is_complex ? 2 : 1);
+ case 'd': return sizeof(double) * (is_complex ? 2 : 1);
+ case 'g': return sizeof(long double) * (is_complex ? 2 : 1);
+ case 'O': case 'P': return sizeof(void*);
+ default: {
+ __Pyx_BufFmt_RaiseUnexpectedChar(ch);
+ return 0;
+ }
+ }
+}
+typedef struct { char c; short x; } __Pyx_st_short;
+typedef struct { char c; int x; } __Pyx_st_int;
+typedef struct { char c; long x; } __Pyx_st_long;
+typedef struct { char c; float x; } __Pyx_st_float;
+typedef struct { char c; double x; } __Pyx_st_double;
+typedef struct { char c; long double x; } __Pyx_st_longdouble;
+typedef struct { char c; void *x; } __Pyx_st_void_p;
+#ifdef HAVE_LONG_LONG
+typedef struct { char c; PY_LONG_LONG x; } __Pyx_st_longlong;
+#endif
+static size_t __Pyx_BufFmt_TypeCharToAlignment(char ch, CYTHON_UNUSED int is_complex) {
+ switch (ch) {
+ case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
+ case 'h': case 'H': return sizeof(__Pyx_st_short) - sizeof(short);
+ case 'i': case 'I': return sizeof(__Pyx_st_int) - sizeof(int);
+ case 'l': case 'L': return sizeof(__Pyx_st_long) - sizeof(long);
+#ifdef HAVE_LONG_LONG
+ case 'q': case 'Q': return sizeof(__Pyx_st_longlong) - sizeof(PY_LONG_LONG);
+#endif
+ case 'f': return sizeof(__Pyx_st_float) - sizeof(float);
+ case 'd': return sizeof(__Pyx_st_double) - sizeof(double);
+ case 'g': return sizeof(__Pyx_st_longdouble) - sizeof(long double);
+ case 'P': case 'O': return sizeof(__Pyx_st_void_p) - sizeof(void*);
+ default:
+ __Pyx_BufFmt_RaiseUnexpectedChar(ch);
+ return 0;
+ }
+}
+/* These are for computing the padding at the end of the struct to align
+ on the first member of the struct. This will probably the same as above,
+ but we don't have any guarantees.
+ */
+typedef struct { short x; char c; } __Pyx_pad_short;
+typedef struct { int x; char c; } __Pyx_pad_int;
+typedef struct { long x; char c; } __Pyx_pad_long;
+typedef struct { float x; char c; } __Pyx_pad_float;
+typedef struct { double x; char c; } __Pyx_pad_double;
+typedef struct { long double x; char c; } __Pyx_pad_longdouble;
+typedef struct { void *x; char c; } __Pyx_pad_void_p;
+#ifdef HAVE_LONG_LONG
+typedef struct { PY_LONG_LONG x; char c; } __Pyx_pad_longlong;
+#endif
+static size_t __Pyx_BufFmt_TypeCharToPadding(char ch, CYTHON_UNUSED int is_complex) {
+ switch (ch) {
+ case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
+ case 'h': case 'H': return sizeof(__Pyx_pad_short) - sizeof(short);
+ case 'i': case 'I': return sizeof(__Pyx_pad_int) - sizeof(int);
+ case 'l': case 'L': return sizeof(__Pyx_pad_long) - sizeof(long);
+#ifdef HAVE_LONG_LONG
+ case 'q': case 'Q': return sizeof(__Pyx_pad_longlong) - sizeof(PY_LONG_LONG);
+#endif
+ case 'f': return sizeof(__Pyx_pad_float) - sizeof(float);
+ case 'd': return sizeof(__Pyx_pad_double) - sizeof(double);
+ case 'g': return sizeof(__Pyx_pad_longdouble) - sizeof(long double);
+ case 'P': case 'O': return sizeof(__Pyx_pad_void_p) - sizeof(void*);
+ default:
+ __Pyx_BufFmt_RaiseUnexpectedChar(ch);
+ return 0;
+ }
+}
+static char __Pyx_BufFmt_TypeCharToGroup(char ch, int is_complex) {
+ switch (ch) {
+ case 'c':
+ return 'H';
+ case 'b': case 'h': case 'i':
+ case 'l': case 'q': case 's': case 'p':
+ return 'I';
+ case 'B': case 'H': case 'I': case 'L': case 'Q':
+ return 'U';
+ case 'f': case 'd': case 'g':
+ return (is_complex ? 'C' : 'R');
+ case 'O':
+ return 'O';
+ case 'P':
+ return 'P';
+ default: {
+ __Pyx_BufFmt_RaiseUnexpectedChar(ch);
+ return 0;
+ }
+ }
+}
+static void __Pyx_BufFmt_RaiseExpected(__Pyx_BufFmt_Context* ctx) {
+ if (ctx->head == NULL || ctx->head->field == &ctx->root) {
+ const char* expected;
+ const char* quote;
+ if (ctx->head == NULL) {
+ expected = "end";
+ quote = "";
+ } else {
+ expected = ctx->head->field->type->name;
+ quote = "'";
+ }
+ PyErr_Format(PyExc_ValueError,
+ "Buffer dtype mismatch, expected %s%s%s but got %s",
+ quote, expected, quote,
+ __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex));
+ } else {
+ __Pyx_StructField* field = ctx->head->field;
+ __Pyx_StructField* parent = (ctx->head - 1)->field;
+ PyErr_Format(PyExc_ValueError,
+ "Buffer dtype mismatch, expected '%s' but got %s in '%s.%s'",
+ field->type->name, __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex),
+ parent->type->name, field->name);
+ }
+}
+static int __Pyx_BufFmt_ProcessTypeChunk(__Pyx_BufFmt_Context* ctx) {
+ char group;
+ size_t size, offset, arraysize = 1;
+ if (ctx->enc_type == 0) return 0;
+ if (ctx->head->field->type->arraysize[0]) {
+ int i, ndim = 0;
+ if (ctx->enc_type == 's' || ctx->enc_type == 'p') {
+ ctx->is_valid_array = ctx->head->field->type->ndim == 1;
+ ndim = 1;
+ if (ctx->enc_count != ctx->head->field->type->arraysize[0]) {
+ PyErr_Format(PyExc_ValueError,
+ "Expected a dimension of size %zu, got %zu",
+ ctx->head->field->type->arraysize[0], ctx->enc_count);
+ return -1;
+ }
+ }
+ if (!ctx->is_valid_array) {
+ PyErr_Format(PyExc_ValueError, "Expected %d dimensions, got %d",
+ ctx->head->field->type->ndim, ndim);
+ return -1;
+ }
+ for (i = 0; i < ctx->head->field->type->ndim; i++) {
+ arraysize *= ctx->head->field->type->arraysize[i];
+ }
+ ctx->is_valid_array = 0;
+ ctx->enc_count = 1;
+ }
+ group = __Pyx_BufFmt_TypeCharToGroup(ctx->enc_type, ctx->is_complex);
+ do {
+ __Pyx_StructField* field = ctx->head->field;
+ __Pyx_TypeInfo* type = field->type;
+ if (ctx->enc_packmode == '@' || ctx->enc_packmode == '^') {
+ size = __Pyx_BufFmt_TypeCharToNativeSize(ctx->enc_type, ctx->is_complex);
+ } else {
+ size = __Pyx_BufFmt_TypeCharToStandardSize(ctx->enc_type, ctx->is_complex);
+ }
+ if (ctx->enc_packmode == '@') {
+ size_t align_at = __Pyx_BufFmt_TypeCharToAlignment(ctx->enc_type, ctx->is_complex);
+ size_t align_mod_offset;
+ if (align_at == 0) return -1;
+ align_mod_offset = ctx->fmt_offset % align_at;
+ if (align_mod_offset > 0) ctx->fmt_offset += align_at - align_mod_offset;
+ if (ctx->struct_alignment == 0)
+ ctx->struct_alignment = __Pyx_BufFmt_TypeCharToPadding(ctx->enc_type,
+ ctx->is_complex);
+ }
+ if (type->size != size || type->typegroup != group) {
+ if (type->typegroup == 'C' && type->fields != NULL) {
+ size_t parent_offset = ctx->head->parent_offset + field->offset;
+ ++ctx->head;
+ ctx->head->field = type->fields;
+ ctx->head->parent_offset = parent_offset;
+ continue;
+ }
+ if ((type->typegroup == 'H' || group == 'H') && type->size == size) {
+ } else {
+ __Pyx_BufFmt_RaiseExpected(ctx);
+ return -1;
+ }
+ }
+ offset = ctx->head->parent_offset + field->offset;
+ if (ctx->fmt_offset != offset) {
+ PyErr_Format(PyExc_ValueError,
+ "Buffer dtype mismatch; next field is at offset %" CYTHON_FORMAT_SSIZE_T "d but %" CYTHON_FORMAT_SSIZE_T "d expected",
+ (Py_ssize_t)ctx->fmt_offset, (Py_ssize_t)offset);
+ return -1;
+ }
+ ctx->fmt_offset += size;
+ if (arraysize)
+ ctx->fmt_offset += (arraysize - 1) * size;
+ --ctx->enc_count;
+ while (1) {
+ if (field == &ctx->root) {
+ ctx->head = NULL;
+ if (ctx->enc_count != 0) {
+ __Pyx_BufFmt_RaiseExpected(ctx);
+ return -1;
+ }
+ break;
+ }
+ ctx->head->field = ++field;
+ if (field->type == NULL) {
+ --ctx->head;
+ field = ctx->head->field;
+ continue;
+ } else if (field->type->typegroup == 'S') {
+ size_t parent_offset = ctx->head->parent_offset + field->offset;
+ if (field->type->fields->type == NULL) continue;
+ field = field->type->fields;
+ ++ctx->head;
+ ctx->head->field = field;
+ ctx->head->parent_offset = parent_offset;
+ break;
+ } else {
+ break;
+ }
+ }
+ } while (ctx->enc_count);
+ ctx->enc_type = 0;
+ ctx->is_complex = 0;
+ return 0;
+}
+static PyObject *
+__pyx_buffmt_parse_array(__Pyx_BufFmt_Context* ctx, const char** tsp)
+{
+ const char *ts = *tsp;
+ int i = 0, number;
+ int ndim = ctx->head->field->type->ndim;
+;
+ ++ts;
+ if (ctx->new_count != 1) {
+ PyErr_SetString(PyExc_ValueError,
+ "Cannot handle repeated arrays in format string");
+ return NULL;
+ }
+ if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
+ while (*ts && *ts != ')') {
+ switch (*ts) {
+ case ' ': case '\f': case '\r': case '\n': case '\t': case '\v': continue;
+ default: break;
+ }
+ number = __Pyx_BufFmt_ExpectNumber(&ts);
+ if (number == -1) return NULL;
+ if (i < ndim && (size_t) number != ctx->head->field->type->arraysize[i])
+ return PyErr_Format(PyExc_ValueError,
+ "Expected a dimension of size %zu, got %d",
+ ctx->head->field->type->arraysize[i], number);
+ if (*ts != ',' && *ts != ')')
+ return PyErr_Format(PyExc_ValueError,
+ "Expected a comma in format string, got '%c'", *ts);
+ if (*ts == ',') ts++;
+ i++;
+ }
+ if (i != ndim)
+ return PyErr_Format(PyExc_ValueError, "Expected %d dimension(s), got %d",
+ ctx->head->field->type->ndim, i);
+ if (!*ts) {
+ PyErr_SetString(PyExc_ValueError,
+ "Unexpected end of format string, expected ')'");
+ return NULL;
+ }
+ ctx->is_valid_array = 1;
+ ctx->new_count = 1;
+ *tsp = ++ts;
+ return Py_None;
+}
+static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts) {
+ int got_Z = 0;
+ while (1) {
+ switch(*ts) {
+ case 0:
+ if (ctx->enc_type != 0 && ctx->head == NULL) {
+ __Pyx_BufFmt_RaiseExpected(ctx);
+ return NULL;
+ }
+ if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
+ if (ctx->head != NULL) {
+ __Pyx_BufFmt_RaiseExpected(ctx);
+ return NULL;
+ }
+ return ts;
+ case ' ':
+ case '\r':
+ case '\n':
+ ++ts;
+ break;
+ case '<':
+ if (!__Pyx_Is_Little_Endian()) {
+ PyErr_SetString(PyExc_ValueError, "Little-endian buffer not supported on big-endian compiler");
+ return NULL;
+ }
+ ctx->new_packmode = '=';
+ ++ts;
+ break;
+ case '>':
+ case '!':
+ if (__Pyx_Is_Little_Endian()) {
+ PyErr_SetString(PyExc_ValueError, "Big-endian buffer not supported on little-endian compiler");
+ return NULL;
+ }
+ ctx->new_packmode = '=';
+ ++ts;
+ break;
+ case '=':
+ case '@':
+ case '^':
+ ctx->new_packmode = *ts++;
+ break;
+ case 'T':
+ {
+ const char* ts_after_sub;
+ size_t i, struct_count = ctx->new_count;
+ size_t struct_alignment = ctx->struct_alignment;
+ ctx->new_count = 1;
+ ++ts;
+ if (*ts != '{') {
+ PyErr_SetString(PyExc_ValueError, "Buffer acquisition: Expected '{' after 'T'");
+ return NULL;
+ }
+ if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
+ ctx->enc_type = 0;
+ ctx->enc_count = 0;
+ ctx->struct_alignment = 0;
+ ++ts;
+ ts_after_sub = ts;
+ for (i = 0; i != struct_count; ++i) {
+ ts_after_sub = __Pyx_BufFmt_CheckString(ctx, ts);
+ if (!ts_after_sub) return NULL;
+ }
+ ts = ts_after_sub;
+ if (struct_alignment) ctx->struct_alignment = struct_alignment;
+ }
+ break;
+ case '}':
+ {
+ size_t alignment = ctx->struct_alignment;
+ ++ts;
+ if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
+ ctx->enc_type = 0;
+ if (alignment && ctx->fmt_offset % alignment) {
+ ctx->fmt_offset += alignment - (ctx->fmt_offset % alignment);
+ }
+ }
+ return ts;
+ case 'x':
+ if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
+ ctx->fmt_offset += ctx->new_count;
+ ctx->new_count = 1;
+ ctx->enc_count = 0;
+ ctx->enc_type = 0;
+ ctx->enc_packmode = ctx->new_packmode;
+ ++ts;
+ break;
+ case 'Z':
+ got_Z = 1;
+ ++ts;
+ if (*ts != 'f' && *ts != 'd' && *ts != 'g') {
+ __Pyx_BufFmt_RaiseUnexpectedChar('Z');
+ return NULL;
+ }
+ CYTHON_FALLTHROUGH;
+ case 'c': case 'b': case 'B': case 'h': case 'H': case 'i': case 'I':
+ case 'l': case 'L': case 'q': case 'Q':
+ case 'f': case 'd': case 'g':
+ case 'O': case 'p':
+ if (ctx->enc_type == *ts && got_Z == ctx->is_complex &&
+ ctx->enc_packmode == ctx->new_packmode) {
+ ctx->enc_count += ctx->new_count;
+ ctx->new_count = 1;
+ got_Z = 0;
+ ++ts;
+ break;
+ }
+ CYTHON_FALLTHROUGH;
+ case 's':
+ if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
+ ctx->enc_count = ctx->new_count;
+ ctx->enc_packmode = ctx->new_packmode;
+ ctx->enc_type = *ts;
+ ctx->is_complex = got_Z;
+ ++ts;
+ ctx->new_count = 1;
+ got_Z = 0;
+ break;
+ case ':':
+ ++ts;
+ while(*ts != ':') ++ts;
+ ++ts;
+ break;
+ case '(':
+ if (!__pyx_buffmt_parse_array(ctx, &ts)) return NULL;
+ break;
+ default:
+ {
+ int number = __Pyx_BufFmt_ExpectNumber(&ts);
+ if (number == -1) return NULL;
+ ctx->new_count = (size_t)number;
+ }
+ }
+ }
+}
+
/* TypeInfoCompare */
- static int
+ static int
__pyx_typeinfo_cmp(__Pyx_TypeInfo *a, __Pyx_TypeInfo *b)
{
int i;
@@ -51839,7 +55121,7 @@ __pyx_typeinfo_cmp(__Pyx_TypeInfo *a, __Pyx_TypeInfo *b)
}
/* MemviewSliceValidateAndInit */
- static int
+ static int
__pyx_check_strides(Py_buffer *buf, int dim, int ndim, int spec)
{
if (buf->shape[dim] <= 1)
@@ -52021,7 +55303,7 @@ no_fail:
}
/* ObjectToMemviewSlice */
- static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float64_t(PyObject *obj) {
+ static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float64_t(PyObject *obj, int writable_flag) {
__Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } };
__Pyx_BufFmt_StackElem stack[1];
int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_STRIDED) };
@@ -52031,7 +55313,7 @@ no_fail:
return result;
}
retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, 0,
- PyBUF_RECORDS, 1,
+ PyBUF_RECORDS_RO | writable_flag, 1,
&__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, stack,
&result, obj);
if (unlikely(retcode == -1))
@@ -52044,7 +55326,7 @@ __pyx_fail:
}
/* ObjectToMemviewSlice */
- static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float32_t(PyObject *obj) {
+ static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float32_t(PyObject *obj, int writable_flag) {
__Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } };
__Pyx_BufFmt_StackElem stack[1];
int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_STRIDED) };
@@ -52054,7 +55336,7 @@ __pyx_fail:
return result;
}
retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, 0,
- PyBUF_RECORDS, 1,
+ PyBUF_RECORDS_RO | writable_flag, 1,
&__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, stack,
&result, obj);
if (unlikely(retcode == -1))
@@ -52067,7 +55349,7 @@ __pyx_fail:
}
/* ObjectToMemviewSlice */
- static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(PyObject *obj) {
+ static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int32_t(PyObject *obj, int writable_flag) {
__Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } };
__Pyx_BufFmt_StackElem stack[1];
int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_STRIDED) };
@@ -52077,7 +55359,7 @@ __pyx_fail:
return result;
}
retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, 0,
- PyBUF_RECORDS, 1,
+ PyBUF_RECORDS_RO | writable_flag, 1,
&__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, stack,
&result, obj);
if (unlikely(retcode == -1))
@@ -52090,7 +55372,7 @@ __pyx_fail:
}
/* ObjectToMemviewSlice */
- static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(PyObject *obj) {
+ static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(PyObject *obj, int writable_flag) {
__Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } };
__Pyx_BufFmt_StackElem stack[1];
int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_STRIDED) };
@@ -52100,7 +55382,7 @@ __pyx_fail:
return result;
}
retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, 0,
- PyBUF_RECORDS, 1,
+ PyBUF_RECORDS_RO | writable_flag, 1,
&__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, stack,
&result, obj);
if (unlikely(retcode == -1))
@@ -52113,7 +55395,7 @@ __pyx_fail:
}
/* ObjectToMemviewSlice */
- static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int16_t(PyObject *obj) {
+ static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int16_t(PyObject *obj, int writable_flag) {
__Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } };
__Pyx_BufFmt_StackElem stack[1];
int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_STRIDED) };
@@ -52123,7 +55405,7 @@ __pyx_fail:
return result;
}
retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, 0,
- PyBUF_RECORDS, 1,
+ PyBUF_RECORDS_RO | writable_flag, 1,
&__Pyx_TypeInfo_nn___pyx_t_5numpy_int16_t, stack,
&result, obj);
if (unlikely(retcode == -1))
@@ -52136,7 +55418,7 @@ __pyx_fail:
}
/* ObjectToMemviewSlice */
- static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(PyObject *obj) {
+ static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(PyObject *obj, int writable_flag) {
__Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } };
__Pyx_BufFmt_StackElem stack[1];
int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_STRIDED) };
@@ -52146,7 +55428,7 @@ __pyx_fail:
return result;
}
retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, 0,
- PyBUF_RECORDS, 1,
+ PyBUF_RECORDS_RO | writable_flag, 1,
&__Pyx_TypeInfo_nn___pyx_t_5numpy_uint32_t, stack,
&result, obj);
if (unlikely(retcode == -1))
@@ -52159,7 +55441,7 @@ __pyx_fail:
}
/* CIntFromPyVerify */
- #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
+ #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
__PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
__PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
@@ -52181,7 +55463,7 @@ __pyx_fail:
}
/* ObjectToMemviewSlice */
- static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_double(PyObject *obj) {
+ static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_double(PyObject *obj, int writable_flag) {
__Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } };
__Pyx_BufFmt_StackElem stack[1];
int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_STRIDED) };
@@ -52191,7 +55473,7 @@ __pyx_fail:
return result;
}
retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, 0,
- PyBUF_RECORDS, 1,
+ PyBUF_RECORDS_RO | writable_flag, 1,
&__Pyx_TypeInfo_double, stack,
&result, obj);
if (unlikely(retcode == -1))
@@ -52204,7 +55486,7 @@ __pyx_fail:
}
/* ObjectToMemviewSlice */
- static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_int(PyObject *obj) {
+ static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_int(PyObject *obj, int writable_flag) {
__Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } };
__Pyx_BufFmt_StackElem stack[1];
int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_STRIDED) };
@@ -52214,7 +55496,7 @@ __pyx_fail:
return result;
}
retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, 0,
- PyBUF_RECORDS, 1,
+ PyBUF_RECORDS_RO | writable_flag, 1,
&__Pyx_TypeInfo_int, stack,
&result, obj);
if (unlikely(retcode == -1))
@@ -52227,7 +55509,7 @@ __pyx_fail:
}
/* CIntToPy */
- static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
+ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
const long neg_one = (long) -1, const_zero = (long) 0;
const int is_unsigned = neg_one > const_zero;
if (is_unsigned) {
@@ -52258,7 +55540,7 @@ __pyx_fail:
}
/* Print */
- #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION < 3
+ #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION < 3
static PyObject *__Pyx_GetStdout(void) {
PyObject *f = PySys_GetObject((char *)"stdout");
if (!f) {
@@ -52364,7 +55646,7 @@ bad:
#endif
/* CIntToPy */
- static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
+ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
const int neg_one = (int) -1, const_zero = (int) 0;
const int is_unsigned = neg_one > const_zero;
if (is_unsigned) {
@@ -52395,7 +55677,7 @@ bad:
}
/* Declarations */
- #if CYTHON_CCOMPLEX
+ #if CYTHON_CCOMPLEX
#ifdef __cplusplus
static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
return ::std::complex< float >(x, y);
@@ -52415,7 +55697,7 @@ bad:
#endif
/* Arithmetic */
- #if CYTHON_CCOMPLEX
+ #if CYTHON_CCOMPLEX
#else
static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
return (a.real == b.real) && (a.imag == b.imag);
@@ -52550,7 +55832,7 @@ bad:
#endif
/* Declarations */
- #if CYTHON_CCOMPLEX
+ #if CYTHON_CCOMPLEX
#ifdef __cplusplus
static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
return ::std::complex< double >(x, y);
@@ -52570,7 +55852,7 @@ bad:
#endif
/* Arithmetic */
- #if CYTHON_CCOMPLEX
+ #if CYTHON_CCOMPLEX
#else
static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
return (a.real == b.real) && (a.imag == b.imag);
@@ -52705,7 +55987,7 @@ bad:
#endif
/* CIntToPy */
- static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value) {
+ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value) {
const enum NPY_TYPES neg_one = (enum NPY_TYPES) -1, const_zero = (enum NPY_TYPES) 0;
const int is_unsigned = neg_one > const_zero;
if (is_unsigned) {
@@ -52736,7 +56018,7 @@ bad:
}
/* MemviewSliceCopyTemplate */
- static __Pyx_memviewslice
+ 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,
@@ -52803,7 +56085,7 @@ no_fail:
}
/* CIntFromPy */
- static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
+ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
const int neg_one = (int) -1, const_zero = (int) 0;
const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
@@ -52992,7 +56274,7 @@ raise_neg_overflow:
}
/* CIntFromPy */
- static CYTHON_INLINE npy_int32 __Pyx_PyInt_As_npy_int32(PyObject *x) {
+ static CYTHON_INLINE npy_int32 __Pyx_PyInt_As_npy_int32(PyObject *x) {
const npy_int32 neg_one = (npy_int32) -1, const_zero = (npy_int32) 0;
const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
@@ -53181,7 +56463,7 @@ raise_neg_overflow:
}
/* CIntFromPy */
- static CYTHON_INLINE npy_int64 __Pyx_PyInt_As_npy_int64(PyObject *x) {
+ static CYTHON_INLINE npy_int64 __Pyx_PyInt_As_npy_int64(PyObject *x) {
const npy_int64 neg_one = (npy_int64) -1, const_zero = (npy_int64) 0;
const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
@@ -53370,7 +56652,7 @@ raise_neg_overflow:
}
/* PrintOne */
- #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION < 3
+ #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION < 3
static int __Pyx_PrintOne(PyObject* f, PyObject *o) {
if (!f) {
if (!(f = __Pyx_GetStdout()))
@@ -53407,26 +56689,52 @@ static int __Pyx_PrintOne(PyObject* stream, PyObject *o) {
#endif
/* BytesContains */
- static CYTHON_INLINE int __Pyx_BytesContains(PyObject* bytes, char character) {
+ static CYTHON_INLINE int __Pyx_BytesContains(PyObject* bytes, char character) {
const Py_ssize_t length = PyBytes_GET_SIZE(bytes);
char* char_start = PyBytes_AS_STRING(bytes);
return memchr(char_start, (unsigned char)character, (size_t)length) != NULL;
}
+/* ImportNumPyArray */
+ static PyObject* __Pyx__ImportNumPyArray(void) {
+ PyObject *numpy_module, *ndarray_object = NULL;
+ numpy_module = __Pyx_Import(__pyx_n_s_numpy, NULL, 0);
+ if (likely(numpy_module)) {
+ ndarray_object = PyObject_GetAttrString(numpy_module, "ndarray");
+ Py_DECREF(numpy_module);
+ }
+ if (unlikely(!ndarray_object)) {
+ PyErr_Clear();
+ }
+ if (unlikely(!ndarray_object || !PyObject_TypeCheck(ndarray_object, &PyType_Type))) {
+ Py_XDECREF(ndarray_object);
+ Py_INCREF(Py_None);
+ ndarray_object = Py_None;
+ }
+ return ndarray_object;
+}
+static CYTHON_INLINE PyObject* __Pyx_ImportNumPyArrayTypeIfAvailable(void) {
+ if (unlikely(!__pyx_numpy_ndarray)) {
+ __pyx_numpy_ndarray = __Pyx__ImportNumPyArray();
+ }
+ Py_INCREF(__pyx_numpy_ndarray);
+ return __pyx_numpy_ndarray;
+}
+
/* CIntFromPy */
- static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *x) {
- const char neg_one = (char) -1, const_zero = (char) 0;
+ static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
+ const long neg_one = (long) -1, const_zero = (long) 0;
const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
if (likely(PyInt_Check(x))) {
- if (sizeof(char) < sizeof(long)) {
- __PYX_VERIFY_RETURN_INT(char, long, PyInt_AS_LONG(x))
+ if (sizeof(long) < sizeof(long)) {
+ __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
} else {
long val = PyInt_AS_LONG(x);
if (is_unsigned && unlikely(val < 0)) {
goto raise_neg_overflow;
}
- return (char) val;
+ return (long) val;
}
} else
#endif
@@ -53435,32 +56743,32 @@ static int __Pyx_PrintOne(PyObject* stream, PyObject *o) {
#if CYTHON_USE_PYLONG_INTERNALS
const digit* digits = ((PyLongObject*)x)->ob_digit;
switch (Py_SIZE(x)) {
- case 0: return (char) 0;
- case 1: __PYX_VERIFY_RETURN_INT(char, digit, digits[0])
+ case 0: return (long) 0;
+ case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
case 2:
- if (8 * sizeof(char) > 1 * PyLong_SHIFT) {
+ if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
- __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
- } else if (8 * sizeof(char) >= 2 * PyLong_SHIFT) {
- return (char) (((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
+ __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) {
+ return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
}
}
break;
case 3:
- if (8 * sizeof(char) > 2 * PyLong_SHIFT) {
+ if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
- __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
- } else if (8 * sizeof(char) >= 3 * PyLong_SHIFT) {
- return (char) (((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
+ __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) {
+ return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
}
}
break;
case 4:
- if (8 * sizeof(char) > 3 * PyLong_SHIFT) {
+ if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
- __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
- } else if (8 * sizeof(char) >= 4 * PyLong_SHIFT) {
- return (char) (((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
+ __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) {
+ return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
}
}
break;
@@ -53474,86 +56782,86 @@ static int __Pyx_PrintOne(PyObject* stream, PyObject *o) {
{
int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
if (unlikely(result < 0))
- return (char) -1;
+ return (long) -1;
if (unlikely(result == 1))
goto raise_neg_overflow;
}
#endif
- if (sizeof(char) <= sizeof(unsigned long)) {
- __PYX_VERIFY_RETURN_INT_EXC(char, unsigned long, PyLong_AsUnsignedLong(x))
+ if (sizeof(long) <= sizeof(unsigned long)) {
+ __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
- } else if (sizeof(char) <= sizeof(unsigned PY_LONG_LONG)) {
- __PYX_VERIFY_RETURN_INT_EXC(char, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
+ } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
+ __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
}
} else {
#if CYTHON_USE_PYLONG_INTERNALS
const digit* digits = ((PyLongObject*)x)->ob_digit;
switch (Py_SIZE(x)) {
- case 0: return (char) 0;
- case -1: __PYX_VERIFY_RETURN_INT(char, sdigit, (sdigit) (-(sdigit)digits[0]))
- case 1: __PYX_VERIFY_RETURN_INT(char, digit, +digits[0])
+ case 0: return (long) 0;
+ case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0]))
+ case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0])
case -2:
- if (8 * sizeof(char) - 1 > 1 * PyLong_SHIFT) {
+ if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) {
if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
- __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
- } else if (8 * sizeof(char) - 1 > 2 * PyLong_SHIFT) {
- return (char) (((char)-1)*(((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
+ __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
+ return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
}
}
break;
case 2:
- if (8 * sizeof(char) > 1 * PyLong_SHIFT) {
+ if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
- __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
- } else if (8 * sizeof(char) - 1 > 2 * PyLong_SHIFT) {
- return (char) ((((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
+ __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
+ return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
}
}
break;
case -3:
- if (8 * sizeof(char) - 1 > 2 * PyLong_SHIFT) {
+ if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
- __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
- } else if (8 * sizeof(char) - 1 > 3 * PyLong_SHIFT) {
- return (char) (((char)-1)*(((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
+ __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
+ return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
}
}
break;
case 3:
- if (8 * sizeof(char) > 2 * PyLong_SHIFT) {
+ if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
- __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
- } else if (8 * sizeof(char) - 1 > 3 * PyLong_SHIFT) {
- return (char) ((((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
+ __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
+ return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
}
}
break;
case -4:
- if (8 * sizeof(char) - 1 > 3 * PyLong_SHIFT) {
+ if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
- __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
- } else if (8 * sizeof(char) - 1 > 4 * PyLong_SHIFT) {
- return (char) (((char)-1)*(((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
+ __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
+ return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
}
}
break;
case 4:
- if (8 * sizeof(char) > 3 * PyLong_SHIFT) {
+ if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
- __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
- } else if (8 * sizeof(char) - 1 > 4 * PyLong_SHIFT) {
- return (char) ((((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
+ __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
+ return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
}
}
break;
}
#endif
- if (sizeof(char) <= sizeof(long)) {
- __PYX_VERIFY_RETURN_INT_EXC(char, long, PyLong_AsLong(x))
+ if (sizeof(long) <= sizeof(long)) {
+ __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
- } else if (sizeof(char) <= sizeof(PY_LONG_LONG)) {
- __PYX_VERIFY_RETURN_INT_EXC(char, PY_LONG_LONG, PyLong_AsLongLong(x))
+ } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
+ __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
}
}
@@ -53562,7 +56870,7 @@ static int __Pyx_PrintOne(PyObject* stream, PyObject *o) {
PyErr_SetString(PyExc_RuntimeError,
"_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
- char val;
+ long val;
PyObject *v = __Pyx_PyNumber_IntOrLong(x);
#if PY_MAJOR_VERSION < 3
if (likely(v) && !PyLong_Check(v)) {
@@ -53582,40 +56890,40 @@ static int __Pyx_PrintOne(PyObject* stream, PyObject *o) {
return val;
}
#endif
- return (char) -1;
+ return (long) -1;
}
} else {
- char val;
+ long val;
PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
- if (!tmp) return (char) -1;
- val = __Pyx_PyInt_As_char(tmp);
+ if (!tmp) return (long) -1;
+ val = __Pyx_PyInt_As_long(tmp);
Py_DECREF(tmp);
return val;
}
raise_overflow:
PyErr_SetString(PyExc_OverflowError,
- "value too large to convert to char");
- return (char) -1;
+ "value too large to convert to long");
+ return (long) -1;
raise_neg_overflow:
PyErr_SetString(PyExc_OverflowError,
- "can't convert negative value to char");
- return (char) -1;
+ "can't convert negative value to long");
+ return (long) -1;
}
/* CIntFromPy */
- static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
- const long neg_one = (long) -1, const_zero = (long) 0;
+ static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *x) {
+ const char neg_one = (char) -1, const_zero = (char) 0;
const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
if (likely(PyInt_Check(x))) {
- if (sizeof(long) < sizeof(long)) {
- __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
+ if (sizeof(char) < sizeof(long)) {
+ __PYX_VERIFY_RETURN_INT(char, long, PyInt_AS_LONG(x))
} else {
long val = PyInt_AS_LONG(x);
if (is_unsigned && unlikely(val < 0)) {
goto raise_neg_overflow;
}
- return (long) val;
+ return (char) val;
}
} else
#endif
@@ -53624,32 +56932,32 @@ raise_neg_overflow:
#if CYTHON_USE_PYLONG_INTERNALS
const digit* digits = ((PyLongObject*)x)->ob_digit;
switch (Py_SIZE(x)) {
- case 0: return (long) 0;
- case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
+ case 0: return (char) 0;
+ case 1: __PYX_VERIFY_RETURN_INT(char, digit, digits[0])
case 2:
- if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
+ if (8 * sizeof(char) > 1 * PyLong_SHIFT) {
if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
- __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
- } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) {
- return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
+ __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(char) >= 2 * PyLong_SHIFT) {
+ return (char) (((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
}
}
break;
case 3:
- if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
+ if (8 * sizeof(char) > 2 * PyLong_SHIFT) {
if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
- __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
- } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) {
- return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
+ __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(char) >= 3 * PyLong_SHIFT) {
+ return (char) (((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
}
}
break;
case 4:
- if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
+ if (8 * sizeof(char) > 3 * PyLong_SHIFT) {
if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
- __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
- } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) {
- return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
+ __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(char) >= 4 * PyLong_SHIFT) {
+ return (char) (((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
}
}
break;
@@ -53663,86 +56971,86 @@ raise_neg_overflow:
{
int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
if (unlikely(result < 0))
- return (long) -1;
+ return (char) -1;
if (unlikely(result == 1))
goto raise_neg_overflow;
}
#endif
- if (sizeof(long) <= sizeof(unsigned long)) {
- __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
+ if (sizeof(char) <= sizeof(unsigned long)) {
+ __PYX_VERIFY_RETURN_INT_EXC(char, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
- } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
- __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
+ } else if (sizeof(char) <= sizeof(unsigned PY_LONG_LONG)) {
+ __PYX_VERIFY_RETURN_INT_EXC(char, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
}
} else {
#if CYTHON_USE_PYLONG_INTERNALS
const digit* digits = ((PyLongObject*)x)->ob_digit;
switch (Py_SIZE(x)) {
- case 0: return (long) 0;
- case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0]))
- case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0])
+ case 0: return (char) 0;
+ case -1: __PYX_VERIFY_RETURN_INT(char, sdigit, (sdigit) (-(sdigit)digits[0]))
+ case 1: __PYX_VERIFY_RETURN_INT(char, digit, +digits[0])
case -2:
- if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) {
+ if (8 * sizeof(char) - 1 > 1 * PyLong_SHIFT) {
if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
- __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
- } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
- return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
+ __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(char) - 1 > 2 * PyLong_SHIFT) {
+ return (char) (((char)-1)*(((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
}
}
break;
case 2:
- if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
+ if (8 * sizeof(char) > 1 * PyLong_SHIFT) {
if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
- __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
- } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
- return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
+ __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(char) - 1 > 2 * PyLong_SHIFT) {
+ return (char) ((((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
}
}
break;
case -3:
- if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
+ if (8 * sizeof(char) - 1 > 2 * PyLong_SHIFT) {
if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
- __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
- } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
- return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
+ __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(char) - 1 > 3 * PyLong_SHIFT) {
+ return (char) (((char)-1)*(((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
}
}
break;
case 3:
- if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
+ if (8 * sizeof(char) > 2 * PyLong_SHIFT) {
if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
- __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
- } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
- return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
+ __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(char) - 1 > 3 * PyLong_SHIFT) {
+ return (char) ((((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
}
}
break;
case -4:
- if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
+ if (8 * sizeof(char) - 1 > 3 * PyLong_SHIFT) {
if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
- __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
- } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
- return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
+ __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(char) - 1 > 4 * PyLong_SHIFT) {
+ return (char) (((char)-1)*(((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
}
}
break;
case 4:
- if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
+ if (8 * sizeof(char) > 3 * PyLong_SHIFT) {
if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
- __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
- } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
- return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
+ __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(char) - 1 > 4 * PyLong_SHIFT) {
+ return (char) ((((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
}
}
break;
}
#endif
- if (sizeof(long) <= sizeof(long)) {
- __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
+ if (sizeof(char) <= sizeof(long)) {
+ __PYX_VERIFY_RETURN_INT_EXC(char, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
- } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
- __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
+ } else if (sizeof(char) <= sizeof(PY_LONG_LONG)) {
+ __PYX_VERIFY_RETURN_INT_EXC(char, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
}
}
@@ -53751,7 +57059,7 @@ raise_neg_overflow:
PyErr_SetString(PyExc_RuntimeError,
"_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
- long val;
+ char val;
PyObject *v = __Pyx_PyNumber_IntOrLong(x);
#if PY_MAJOR_VERSION < 3
if (likely(v) && !PyLong_Check(v)) {
@@ -53771,28 +57079,28 @@ raise_neg_overflow:
return val;
}
#endif
- return (long) -1;
+ return (char) -1;
}
} else {
- long val;
+ char val;
PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
- if (!tmp) return (long) -1;
- val = __Pyx_PyInt_As_long(tmp);
+ if (!tmp) return (char) -1;
+ val = __Pyx_PyInt_As_char(tmp);
Py_DECREF(tmp);
return val;
}
raise_overflow:
PyErr_SetString(PyExc_OverflowError,
- "value too large to convert to long");
- return (long) -1;
+ "value too large to convert to char");
+ return (char) -1;
raise_neg_overflow:
PyErr_SetString(PyExc_OverflowError,
- "can't convert negative value to long");
- return (long) -1;
+ "can't convert negative value to char");
+ return (char) -1;
}
/* CheckBinaryVersion */
- static int __Pyx_check_binary_version(void) {
+ static int __Pyx_check_binary_version(void) {
char ctversion[4], rtversion[4];
PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
@@ -53808,7 +57116,7 @@ raise_neg_overflow:
}
/* ModuleImport */
- #ifndef __PYX_HAVE_RT_ImportModule
+ #ifndef __PYX_HAVE_RT_ImportModule
#define __PYX_HAVE_RT_ImportModule
static PyObject *__Pyx_ImportModule(const char *name) {
PyObject *py_name = 0;
@@ -53826,7 +57134,7 @@ bad:
#endif
/* TypeImport */
- #ifndef __PYX_HAVE_RT_ImportType
+ #ifndef __PYX_HAVE_RT_ImportType
#define __PYX_HAVE_RT_ImportType
static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name,
size_t size, int strict)
@@ -53891,7 +57199,7 @@ bad:
#endif
/* InitStrings */
- static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
+ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
while (t->p) {
#if PY_MAJOR_VERSION < 3
if (t->is_unicode) {
@@ -53916,6 +57224,8 @@ bad:
#endif
if (!*t->p)
return -1;
+ if (PyObject_Hash(*t->p) == -1)
+ return -1;
++t;
}
return 0;
@@ -53924,50 +57234,57 @@ bad:
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
}
-static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject* o) {
+static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
Py_ssize_t ignore;
return __Pyx_PyObject_AsStringAndSize(o, &ignore);
}
-static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
-#if CYTHON_COMPILING_IN_CPYTHON && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
- if (
-#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
- __Pyx_sys_getdefaultencoding_not_ascii &&
-#endif
- PyUnicode_Check(o)) {
-#if PY_VERSION_HEX < 0x03030000
- char* defenc_c;
- PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
- if (!defenc) return NULL;
- defenc_c = PyBytes_AS_STRING(defenc);
+#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
+#if !CYTHON_PEP393_ENABLED
+static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
+ char* defenc_c;
+ PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
+ if (!defenc) return NULL;
+ defenc_c = PyBytes_AS_STRING(defenc);
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
- {
- char* end = defenc_c + PyBytes_GET_SIZE(defenc);
- char* c;
- for (c = defenc_c; c < end; c++) {
- if ((unsigned char) (*c) >= 128) {
- PyUnicode_AsASCIIString(o);
- return NULL;
- }
+ {
+ char* end = defenc_c + PyBytes_GET_SIZE(defenc);
+ char* c;
+ for (c = defenc_c; c < end; c++) {
+ if ((unsigned char) (*c) >= 128) {
+ PyUnicode_AsASCIIString(o);
+ return NULL;
}
}
+ }
#endif
- *length = PyBytes_GET_SIZE(defenc);
- return defenc_c;
+ *length = PyBytes_GET_SIZE(defenc);
+ return defenc_c;
+}
#else
- if (__Pyx_PyUnicode_READY(o) == -1) return NULL;
+static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
+ if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
- if (PyUnicode_IS_ASCII(o)) {
- *length = PyUnicode_GET_LENGTH(o);
- return PyUnicode_AsUTF8(o);
- } else {
- PyUnicode_AsASCIIString(o);
- return NULL;
- }
+ if (likely(PyUnicode_IS_ASCII(o))) {
+ *length = PyUnicode_GET_LENGTH(o);
+ return PyUnicode_AsUTF8(o);
+ } else {
+ PyUnicode_AsASCIIString(o);
+ return NULL;
+ }
#else
- return PyUnicode_AsUTF8AndSize(o, length);
+ return PyUnicode_AsUTF8AndSize(o, length);
+#endif
+}
+#endif
#endif
+static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
+#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
+ if (
+#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
+ __Pyx_sys_getdefaultencoding_not_ascii &&
#endif
+ PyUnicode_Check(o)) {
+ return __Pyx_PyUnicode_AsStringAndSize(o, length);
} else
#endif
#if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
@@ -53991,6 +57308,26 @@ static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
else return PyObject_IsTrue(x);
}
+static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
+#if PY_MAJOR_VERSION >= 3
+ if (PyLong_Check(result)) {
+ if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
+ "__int__ returned non-int (type %.200s). "
+ "The ability to return an instance of a strict subclass of int "
+ "is deprecated, and may be removed in a future version of Python.",
+ Py_TYPE(result)->tp_name)) {
+ Py_DECREF(result);
+ return NULL;
+ }
+ return result;
+ }
+#endif
+ PyErr_Format(PyExc_TypeError,
+ "__%.4s__ returned non-%.4s (type %.200s)",
+ type_name, type_name, Py_TYPE(result)->tp_name);
+ Py_DECREF(result);
+ return NULL;
+}
static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
#if CYTHON_USE_TYPE_SLOTS
PyNumberMethods *m;
@@ -53998,9 +57335,9 @@ static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
const char *name = NULL;
PyObject *res = NULL;
#if PY_MAJOR_VERSION < 3
- if (PyInt_Check(x) || PyLong_Check(x))
+ if (likely(PyInt_Check(x) || PyLong_Check(x)))
#else
- if (PyLong_Check(x))
+ if (likely(PyLong_Check(x)))
#endif
return __Pyx_NewRef(x);
#if CYTHON_USE_TYPE_SLOTS
@@ -54008,32 +57345,30 @@ static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
#if PY_MAJOR_VERSION < 3
if (m && m->nb_int) {
name = "int";
- res = PyNumber_Int(x);
+ res = m->nb_int(x);
}
else if (m && m->nb_long) {
name = "long";
- res = PyNumber_Long(x);
+ res = m->nb_long(x);
}
#else
- if (m && m->nb_int) {
+ if (likely(m && m->nb_int)) {
name = "int";
- res = PyNumber_Long(x);
+ res = m->nb_int(x);
}
#endif
#else
- res = PyNumber_Int(x);
+ if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
+ res = PyNumber_Int(x);
+ }
#endif
- if (res) {
+ if (likely(res)) {
#if PY_MAJOR_VERSION < 3
- if (!PyInt_Check(res) && !PyLong_Check(res)) {
+ if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
#else
- if (!PyLong_Check(res)) {
+ if (unlikely(!PyLong_CheckExact(res))) {
#endif
- PyErr_Format(PyExc_TypeError,
- "__%.4s__ returned non-%.4s (type %.200s)",
- name, name, Py_TYPE(res)->tp_name);
- Py_DECREF(res);
- return NULL;
+ return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
}
}
else if (!PyErr_Occurred()) {
@@ -54104,6 +57439,9 @@ static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
Py_DECREF(x);
return ival;
}
+static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
+ return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);
+}
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
return PyInt_FromSize_t(ival);
}