[python-pdal] 01/09: Imported Upstream version 1.4.0+ds
Bas Couwenberg
sebastic at debian.org
Thu Dec 15 21:35:30 UTC 2016
This is an automated email from the git hooks/post-receive script.
sebastic pushed a commit to branch master
in repository python-pdal.
commit dcc6b97070a5272660ff244259fefa0163607d93
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date: Thu Dec 15 20:40:50 2016 +0100
Imported Upstream version 1.4.0+ds
---
PKG-INFO | 43 +-
README.rst | 41 +-
VERSION.txt | 2 +-
pdal/Pipeline.cpp | 59 -
pdal/Pipeline.hpp | 39 -
pdal/PyPipeline.cpp | 101 +
pdal/PyPipeline.hpp | 102 +
pdal/__init__.py | 4 +-
pdal/libpdalpython.cpp | 6376 +++++++++++++++++++++++++++++++-----------------
pdal/libpdalpython.pyx | 74 +-
pdal/pipeline.py | 46 +
pdal/pipeline_xml.py | 62 -
setup.py | 20 +-
test/__init__.py | 2 -
test/test_libpdal.py | 74 -
test/test_pipeline.py | 152 +-
16 files changed, 4655 insertions(+), 2542 deletions(-)
diff --git a/PKG-INFO b/PKG-INFO
index 34a9308..13344a6 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: PDAL
-Version: 1.3.0
+Version: 1.4.0
Summary: Point cloud data processing
Home-page: http://pdal.io
Author: Howard Butler
@@ -10,11 +10,48 @@ Description: ===================================================================
PDAL
================================================================================
+ The PDAL Python extension allows you to process data with PDAL into `Numpy`_
+ arrays. Additionally, you can use it to fetch `schema`_ and `metadata`_ from
+ PDAL operations.
+
+ Usage
+ --------------------------------------------------------------------------------
+
+ Given the following pipeline, which simply reads an `ASPRS LAS`_ file and
+ sorts it by the ``X`` dimension:
+
+ .. code-block:: python
+
+
+ json = """
+ {
+ "pipeline": [
+ "1.2-with-color.las",
+ {
+ "type": "filters.sort",
+ "dimension": "X"
+ }
+ ]
+ }"""
+
+ import pdal
+ pipeline = pdal.Pipeline(pipeline)
+ pipeline.validate() # check if our JSON and options were good
+ pipeline.loglevel = 9 #really noisy
+ count = pipeline.execute()
+ arrays = pipeline.arrays
+ metadata = pipeline.metadata
+ log = pipeline.log
+
+
+ .. _`Numpy`: http://www.numpy.org/
+ .. _`schema`: http://www.pdal.io/dimensions.html
+ .. _`metadata`: http://www.pdal.io/development/metadata.html
+
Requirements
================================================================================
- PDAL 1.0+ requires
-
+ * PDAL 1.4+
* Python >=2.7 (including Python 3.x)
diff --git a/README.rst b/README.rst
index 3ce1d14..84c6d63 100644
--- a/README.rst
+++ b/README.rst
@@ -2,10 +2,47 @@
PDAL
================================================================================
+The PDAL Python extension allows you to process data with PDAL into `Numpy`_
+arrays. Additionally, you can use it to fetch `schema`_ and `metadata`_ from
+PDAL operations.
+
+Usage
+--------------------------------------------------------------------------------
+
+Given the following pipeline, which simply reads an `ASPRS LAS`_ file and
+sorts it by the ``X`` dimension:
+
+.. code-block:: python
+
+
+ json = """
+ {
+ "pipeline": [
+ "1.2-with-color.las",
+ {
+ "type": "filters.sort",
+ "dimension": "X"
+ }
+ ]
+ }"""
+
+ import pdal
+ pipeline = pdal.Pipeline(pipeline)
+ pipeline.validate() # check if our JSON and options were good
+ pipeline.loglevel = 9 #really noisy
+ count = pipeline.execute()
+ arrays = pipeline.arrays
+ metadata = pipeline.metadata
+ log = pipeline.log
+
+
+.. _`Numpy`: http://www.numpy.org/
+.. _`schema`: http://www.pdal.io/dimensions.html
+.. _`metadata`: http://www.pdal.io/development/metadata.html
+
Requirements
================================================================================
-PDAL 1.0+ requires
-
+* PDAL 1.4+
* Python >=2.7 (including Python 3.x)
diff --git a/VERSION.txt b/VERSION.txt
index 589268e..e21e727 100644
--- a/VERSION.txt
+++ b/VERSION.txt
@@ -1 +1 @@
-1.3.0
\ No newline at end of file
+1.4.0
\ No newline at end of file
diff --git a/pdal/Pipeline.cpp b/pdal/Pipeline.cpp
deleted file mode 100644
index b18e6ee..0000000
--- a/pdal/Pipeline.cpp
+++ /dev/null
@@ -1,59 +0,0 @@
-#include "Pipeline.hpp"
-#ifdef PDAL_HAVE_LIBXML2
-#include <pdal/XMLSchema.hpp>
-#endif
-
-#include <pdal/plang/Array.hpp>
-
-
-namespace libpdalpython
-{
-
-Pipeline::Pipeline(std::string const& json)
- : m_json(json)
- , m_schema("")
- , m_manager(-1)
-{
- auto initNumpy = []()
- {
-#undef NUMPY_IMPORT_ARRAY_RETVAL
-#define NUMPY_IMPORT_ARRAY_RETVAL
- import_array();
- };
- initNumpy();
-}
-
-void Pipeline::execute()
-{
- std::stringstream strm;
- strm << m_json;
- m_manager.readPipeline(strm);
- m_manager.execute();
-#ifdef PDAL_HAVE_LIBXML2
- pdal::XMLSchema schema(m_manager.pointTable().layout());
- m_schema = schema.xml();
-#endif
-
- strm.str("");
- pdal::PipelineWriter::writePipeline(m_manager.getStage(), strm);
-
- m_json = strm.str();
-
-}
-
-std::vector<PArray> Pipeline::getArrays() const
-{
- std::vector<PArray> output;
- const pdal::PointViewSet& pvset = m_manager.views();
-
-
- for (auto i: pvset)
- {
- PArray array = new pdal::plang::Array;
- array->update(i);
- output.push_back(array);
- }
- return output;
-}
-} //namespace libpdalpython
-
diff --git a/pdal/Pipeline.hpp b/pdal/Pipeline.hpp
deleted file mode 100644
index f832ad1..0000000
--- a/pdal/Pipeline.hpp
+++ /dev/null
@@ -1,39 +0,0 @@
-#include <pdal/PipelineManager.hpp>
-#include <pdal/PipelineWriter.hpp>
-#include <pdal/util/FileUtils.hpp>
-#include <pdal/plang/Array.hpp>
-
-#include <string>
-#include <Python.h>
-#undef toupper
-#undef tolower
-#undef isspace
-
-#define PY_ARRAY_UNIQUE_SYMBOL LIBPDALPYTHON_ARRAY_API
-#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
-
-#include <numpy/arrayobject.h>
-
-
-namespace libpdalpython
-{
-// typedef std::shared_ptr<pdal::plang::Array> PArray;
- typedef pdal::plang::Array* PArray;
-class Pipeline {
-public:
- Pipeline(std::string const& xml);
- ~Pipeline(){};
-
- void execute();
- inline const char* getJSON() const { return m_json.c_str(); }
- inline const char* getSchema() const { return m_schema.c_str(); }
- std::vector<PArray> getArrays() const;
-
-private:
- std::string m_json;
- std::string m_schema;
- pdal::PipelineManager m_manager; // no progress reporting
-
-};
-
-}
diff --git a/pdal/PyPipeline.cpp b/pdal/PyPipeline.cpp
new file mode 100644
index 0000000..63f1f17
--- /dev/null
+++ b/pdal/PyPipeline.cpp
@@ -0,0 +1,101 @@
+/******************************************************************************
+* Copyright (c) 2016, Howard Butler (howard at hobu.co)
+*
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following
+* conditions are met:
+*
+* * Redistributions of source code must retain the above copyright
+* notice, this list of conditions and the following disclaimer.
+* * Redistributions in binary form must reproduce the above copyright
+* notice, this list of conditions and the following disclaimer in
+* the documentation and/or other materials provided
+* with the distribution.
+* * Neither the name of Hobu, Inc. or Flaxen Geo Consulting nor the
+* names of its contributors may be used to endorse or promote
+* products derived from this software without specific prior
+* written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
+* OF SUCH DAMAGE.
+****************************************************************************/
+
+#include "PyPipeline.hpp"
+#ifdef PDAL_HAVE_LIBXML2
+#include <pdal/XMLSchema.hpp>
+#endif
+
+
+namespace libpdalpython
+{
+
+Pipeline::Pipeline(std::string const& json)
+ : m_executor(json)
+{
+ auto initNumpy = []()
+ {
+#undef NUMPY_IMPORT_ARRAY_RETVAL
+#define NUMPY_IMPORT_ARRAY_RETVAL
+ import_array();
+ };
+
+ initNumpy();
+}
+
+Pipeline::~Pipeline()
+{
+}
+
+void Pipeline::setLogLevel(int level)
+{
+ m_executor.setLogLevel(level);
+}
+
+int Pipeline::getLogLevel() const
+{
+ return static_cast<int>(m_executor.getLogLevel());
+}
+
+int64_t Pipeline::execute()
+{
+
+ int64_t count = m_executor.execute();
+ return count;
+}
+
+bool Pipeline::validate()
+{
+ return m_executor.validate();
+}
+
+std::vector<PArray> Pipeline::getArrays() const
+{
+ std::vector<PArray> output;
+
+ if (!m_executor.executed())
+ throw python_error("call execute() before fetching arrays");
+
+ const pdal::PointViewSet& pvset = m_executor.getManagerConst().views();
+
+ for (auto i: pvset)
+ {
+ PArray array = new pdal::plang::Array;
+ array->update(i);
+ output.push_back(array);
+ }
+ return output;
+}
+} //namespace libpdalpython
+
diff --git a/pdal/PyPipeline.hpp b/pdal/PyPipeline.hpp
new file mode 100644
index 0000000..e356f7e
--- /dev/null
+++ b/pdal/PyPipeline.hpp
@@ -0,0 +1,102 @@
+/******************************************************************************
+* Copyright (c) 2016, Howard Butler (howard at hobu.co)
+*
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following
+* conditions are met:
+*
+* * Redistributions of source code must retain the above copyright
+* notice, this list of conditions and the following disclaimer.
+* * Redistributions in binary form must reproduce the above copyright
+* notice, this list of conditions and the following disclaimer in
+* the documentation and/or other materials provided
+* with the distribution.
+* * Neither the name of Hobu, Inc. or Flaxen Geo Consulting nor the
+* names of its contributors may be used to endorse or promote
+* products derived from this software without specific prior
+* written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
+* OF SUCH DAMAGE.
+****************************************************************************/
+
+#pragma once
+
+#include <pdal/PipelineManager.hpp>
+#include <pdal/PipelineWriter.hpp>
+#include <pdal/util/FileUtils.hpp>
+#include <pdal/plang/Array.hpp>
+#include <pdal/PipelineExecutor.hpp>
+
+#include <string>
+#include <sstream>
+#undef toupper
+#undef tolower
+#undef isspace
+
+#define PY_ARRAY_UNIQUE_SYMBOL LIBPDALPYTHON_ARRAY_API
+#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
+
+#include <numpy/arrayobject.h>
+
+
+namespace libpdalpython
+{
+
+class python_error : public std::runtime_error
+{
+public:
+ inline python_error(std::string const& msg) : std::runtime_error(msg)
+ {}
+};
+
+ typedef pdal::plang::Array* PArray;
+
+class Pipeline {
+public:
+ Pipeline(std::string const& xml);
+ ~Pipeline();
+
+ int64_t execute();
+ bool validate();
+ inline std::string getPipeline() const
+ {
+ return m_executor.getPipeline();
+ }
+ inline std::string getMetadata() const
+ {
+ return m_executor.getMetadata();
+ }
+ inline std::string getSchema() const
+ {
+ return m_executor.getSchema();
+ }
+ inline std::string getLog() const
+ {
+ return m_executor.getLog();
+ }
+ std::vector<PArray> getArrays() const;
+
+
+ void setLogLevel(int level);
+ int getLogLevel() const;
+
+private:
+
+ pdal::PipelineExecutor m_executor;
+
+};
+
+}
diff --git a/pdal/__init__.py b/pdal/__init__.py
index 29739b3..0ebc296 100644
--- a/pdal/__init__.py
+++ b/pdal/__init__.py
@@ -1 +1,3 @@
-__version__='1.3.0'
+__version__='1.4.0'
+
+from .pipeline import Pipeline
diff --git a/pdal/libpdalpython.cpp b/pdal/libpdalpython.cpp
index ed7b276..e73e7e6 100644
--- a/pdal/libpdalpython.cpp
+++ b/pdal/libpdalpython.cpp
@@ -1,4 +1,4 @@
-/* Generated by Cython 0.24.1 */
+/* Generated by Cython 0.25.1 */
/* BEGIN: Cython Metadata
{
@@ -7,14 +7,14 @@
"/Users/hobu/pdal-build/include/pdal/plang/Array.hpp",
"/usr/local/lib/python3.5/site-packages/numpy/core/include/numpy/arrayobject.h",
"/usr/local/lib/python3.5/site-packages/numpy/core/include/numpy/ufuncobject.h",
- "pdal/Pipeline.hpp"
+ "pdal/PyPipeline.hpp"
],
"extra_compile_args": [
"-std=c++11"
],
"include_dirs": [
"/Users/hobu/pdal-build/include",
- "/usr/local/Cellar/gdal/1.11.3_1/include",
+ "/usr/local/Cellar/gdal/1.11.5_1/include",
"/usr/local/Cellar/libxml2/2.9.4/include/libxml2",
"/usr/local/include",
"/usr/local/include",
@@ -40,7 +40,7 @@ END: Cython Metadata */
#elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03020000)
#error Cython requires Python 2.6+ or Python 3.2+.
#else
-#define CYTHON_ABI "0_24_1"
+#define CYTHON_ABI "0_25_1"
#include <stddef.h>
#ifndef offsetof
#define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
@@ -62,6 +62,11 @@ END: Cython Metadata */
#ifndef DL_EXPORT
#define DL_EXPORT(t) t
#endif
+#ifndef HAVE_LONG_LONG
+ #if PY_VERSION_HEX >= 0x03030000 || (PY_MAJOR_VERSION == 2 && PY_VERSION_HEX >= 0x02070000)
+ #define HAVE_LONG_LONG
+ #endif
+#endif
#ifndef PY_LONG_LONG
#define PY_LONG_LONG LONG_LONG
#endif
@@ -70,13 +75,110 @@ END: Cython Metadata */
#endif
#ifdef PYPY_VERSION
#define CYTHON_COMPILING_IN_PYPY 1
+ #define CYTHON_COMPILING_IN_PYSTON 0
+ #define CYTHON_COMPILING_IN_CPYTHON 0
+ #undef CYTHON_USE_TYPE_SLOTS
+ #define CYTHON_USE_TYPE_SLOTS 0
+ #undef CYTHON_USE_ASYNC_SLOTS
+ #define CYTHON_USE_ASYNC_SLOTS 0
+ #undef CYTHON_USE_PYLIST_INTERNALS
+ #define CYTHON_USE_PYLIST_INTERNALS 0
+ #undef CYTHON_USE_UNICODE_INTERNALS
+ #define CYTHON_USE_UNICODE_INTERNALS 0
+ #undef CYTHON_USE_UNICODE_WRITER
+ #define CYTHON_USE_UNICODE_WRITER 0
+ #undef CYTHON_USE_PYLONG_INTERNALS
+ #define CYTHON_USE_PYLONG_INTERNALS 0
+ #undef CYTHON_AVOID_BORROWED_REFS
+ #define CYTHON_AVOID_BORROWED_REFS 1
+ #undef CYTHON_ASSUME_SAFE_MACROS
+ #define CYTHON_ASSUME_SAFE_MACROS 0
+ #undef CYTHON_UNPACK_METHODS
+ #define CYTHON_UNPACK_METHODS 0
+ #undef CYTHON_FAST_THREAD_STATE
+ #define CYTHON_FAST_THREAD_STATE 0
+ #undef CYTHON_FAST_PYCALL
+ #define CYTHON_FAST_PYCALL 0
+#elif defined(PYSTON_VERSION)
+ #define CYTHON_COMPILING_IN_PYPY 0
+ #define CYTHON_COMPILING_IN_PYSTON 1
#define CYTHON_COMPILING_IN_CPYTHON 0
+ #ifndef CYTHON_USE_TYPE_SLOTS
+ #define CYTHON_USE_TYPE_SLOTS 1
+ #endif
+ #undef CYTHON_USE_ASYNC_SLOTS
+ #define CYTHON_USE_ASYNC_SLOTS 0
+ #undef CYTHON_USE_PYLIST_INTERNALS
+ #define CYTHON_USE_PYLIST_INTERNALS 0
+ #ifndef CYTHON_USE_UNICODE_INTERNALS
+ #define CYTHON_USE_UNICODE_INTERNALS 1
+ #endif
+ #undef CYTHON_USE_UNICODE_WRITER
+ #define CYTHON_USE_UNICODE_WRITER 0
+ #undef CYTHON_USE_PYLONG_INTERNALS
+ #define CYTHON_USE_PYLONG_INTERNALS 0
+ #ifndef CYTHON_AVOID_BORROWED_REFS
+ #define CYTHON_AVOID_BORROWED_REFS 0
+ #endif
+ #ifndef CYTHON_ASSUME_SAFE_MACROS
+ #define CYTHON_ASSUME_SAFE_MACROS 1
+ #endif
+ #ifndef CYTHON_UNPACK_METHODS
+ #define CYTHON_UNPACK_METHODS 1
+ #endif
+ #undef CYTHON_FAST_THREAD_STATE
+ #define CYTHON_FAST_THREAD_STATE 0
+ #undef CYTHON_FAST_PYCALL
+ #define CYTHON_FAST_PYCALL 0
#else
#define CYTHON_COMPILING_IN_PYPY 0
+ #define CYTHON_COMPILING_IN_PYSTON 0
#define CYTHON_COMPILING_IN_CPYTHON 1
+ #ifndef CYTHON_USE_TYPE_SLOTS
+ #define CYTHON_USE_TYPE_SLOTS 1
+ #endif
+ #if PY_MAJOR_VERSION < 3
+ #undef CYTHON_USE_ASYNC_SLOTS
+ #define CYTHON_USE_ASYNC_SLOTS 0
+ #elif !defined(CYTHON_USE_ASYNC_SLOTS)
+ #define CYTHON_USE_ASYNC_SLOTS 1
+ #endif
+ #if PY_VERSION_HEX < 0x02070000
+ #undef CYTHON_USE_PYLONG_INTERNALS
+ #define CYTHON_USE_PYLONG_INTERNALS 0
+ #elif !defined(CYTHON_USE_PYLONG_INTERNALS)
+ #define CYTHON_USE_PYLONG_INTERNALS 1
+ #endif
+ #ifndef CYTHON_USE_PYLIST_INTERNALS
+ #define CYTHON_USE_PYLIST_INTERNALS 1
+ #endif
+ #ifndef CYTHON_USE_UNICODE_INTERNALS
+ #define CYTHON_USE_UNICODE_INTERNALS 1
+ #endif
+ #if PY_VERSION_HEX < 0x030300F0
+ #undef CYTHON_USE_UNICODE_WRITER
+ #define CYTHON_USE_UNICODE_WRITER 0
+ #elif !defined(CYTHON_USE_UNICODE_WRITER)
+ #define CYTHON_USE_UNICODE_WRITER 1
+ #endif
+ #ifndef CYTHON_AVOID_BORROWED_REFS
+ #define CYTHON_AVOID_BORROWED_REFS 0
+ #endif
+ #ifndef CYTHON_ASSUME_SAFE_MACROS
+ #define CYTHON_ASSUME_SAFE_MACROS 1
+ #endif
+ #ifndef CYTHON_UNPACK_METHODS
+ #define CYTHON_UNPACK_METHODS 1
+ #endif
+ #ifndef CYTHON_FAST_THREAD_STATE
+ #define CYTHON_FAST_THREAD_STATE 1
+ #endif
+ #ifndef CYTHON_FAST_PYCALL
+ #define CYTHON_FAST_PYCALL 1
+ #endif
#endif
-#if !defined(CYTHON_USE_PYLONG_INTERNALS) && CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x02070000
- #define CYTHON_USE_PYLONG_INTERNALS 1
+#if !defined(CYTHON_FAST_PYCCALL)
+#define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
#endif
#if CYTHON_USE_PYLONG_INTERNALS
#include "longintrepr.h"
@@ -112,24 +214,44 @@ 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);
+#else
+ #define __Pyx_PyCFunctionFast _PyCFunctionFast
+#endif
+#if CYTHON_FAST_PYCCALL
+#define __Pyx_PyFastCFunction_Check(func)\
+ ((PyCFunction_Check(func) && METH_FASTCALL == PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST)))
+#else
+#define __Pyx_PyFastCFunction_Check(func) 0
+#endif
#if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
#define CYTHON_PEP393_ENABLED 1
#define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\
0 : _PyUnicode_Ready((PyObject *)(op)))
#define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u)
#define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
+ #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u)
#define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u)
#define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u)
#define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i)
+ #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch)
#define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
#else
#define CYTHON_PEP393_ENABLED 0
+ #define PyUnicode_1BYTE_KIND 1
+ #define PyUnicode_2BYTE_KIND 2
+ #define PyUnicode_4BYTE_KIND 4
#define __Pyx_PyUnicode_READY(op) (0)
#define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u)
#define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
+ #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)
#define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE))
#define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u))
#define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
+ #define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
#define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u))
#endif
#if CYTHON_COMPILING_IN_PYPY
@@ -154,6 +276,13 @@ END: Cython Metadata */
#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
@@ -182,6 +311,7 @@ END: Cython Metadata */
#define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type)
#endif
#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
+#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
#if PY_MAJOR_VERSION >= 3
#define PyIntObject PyLongObject
#define PyInt_Type PyLong_Type
@@ -220,18 +350,20 @@ END: Cython Metadata */
#else
#define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
#endif
-#if PY_VERSION_HEX >= 0x030500B1
-#define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
-#define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
-#elif CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
-typedef struct {
- unaryfunc am_await;
- unaryfunc am_aiter;
- unaryfunc am_anext;
-} __Pyx_PyAsyncMethodsStruct;
-#define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
+#if CYTHON_USE_ASYNC_SLOTS
+ #if PY_VERSION_HEX >= 0x030500B1
+ #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
+ #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
+ #else
+ typedef struct {
+ unaryfunc am_await;
+ unaryfunc am_aiter;
+ unaryfunc am_anext;
+ } __Pyx_PyAsyncMethodsStruct;
+ #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
+ #endif
#else
-#define __Pyx_PyType_AsAsync(obj) NULL
+ #define __Pyx_PyType_AsAsync(obj) NULL
#endif
#ifndef CYTHON_RESTRICT
#if defined(__GNUC__)
@@ -263,6 +395,8 @@ class __Pyx_FakeReference {
__Pyx_FakeReference(const T& ref) : ptr(const_cast<T*>(&ref)) { }
T *operator->() { return ptr; }
operator T&() { return *ptr; }
+ template<typename U> bool operator ==(U other) { return *ptr == other; };
+ template<typename U> bool operator !=(U other) { return *ptr != other; };
private:
T *ptr;
};
@@ -315,14 +449,15 @@ static CYTHON_INLINE float __PYX_NAN() {
#include "new"
#include "stdexcept"
#include "typeinfo"
-#include "string.h"
+#include <string.h>
#include <string>
-#include "stdio.h"
-#include "stdlib.h"
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
#include "numpy/arrayobject.h"
#include "numpy/ufuncobject.h"
#include "pdal/plang/Array.hpp"
-#include "Pipeline.hpp"
+#include "PyPipeline.hpp"
#include "pythread.h"
#ifdef _OPENMP
#include <omp.h>
@@ -429,7 +564,7 @@ static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
-#if CYTHON_COMPILING_IN_CPYTHON
+#if CYTHON_ASSUME_SAFE_MACROS
#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
#else
#define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
@@ -537,7 +672,7 @@ static int __pyx_clineno = 0;
static const char * __pyx_cfilenm= __FILE__;
static const char *__pyx_filename;
-/* None.proto */
+/* Header.proto */
#if !defined(CYTHON_CCOMPLEX)
#if defined(__cplusplus)
#define CYTHON_CCOMPLEX 1
@@ -563,6 +698,7 @@ static const char *__pyx_filename;
static const char *__pyx_f[] = {
"pdal/libpdalpython.pyx",
"__init__.pxd",
+ "stringsource",
"type.pxd",
"bool.pxd",
"complex.pxd",
@@ -756,7 +892,7 @@ typedef npy_double __pyx_t_5numpy_double_t;
* ctypedef npy_cfloat cfloat_t
*/
typedef npy_longdouble __pyx_t_5numpy_longdouble_t;
-/* None.proto */
+/* Declarations.proto */
#if CYTHON_CCOMPLEX
#ifdef __cplusplus
typedef ::std::complex< float > __pyx_t_float_complex;
@@ -766,8 +902,9 @@ typedef npy_longdouble __pyx_t_5numpy_longdouble_t;
#else
typedef struct { float real, imag; } __pyx_t_float_complex;
#endif
+static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float);
-/* None.proto */
+/* Declarations.proto */
#if CYTHON_CCOMPLEX
#ifdef __cplusplus
typedef ::std::complex< double > __pyx_t_double_complex;
@@ -777,6 +914,7 @@ typedef npy_longdouble __pyx_t_5numpy_longdouble_t;
#else
typedef struct { double real, imag; } __pyx_t_double_complex;
#endif
+static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double);
/*--- Type declarations ---*/
@@ -818,8 +956,8 @@ typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t;
*/
typedef npy_cdouble __pyx_t_5numpy_complex_t;
-/* "pdal/libpdalpython.pyx":23
- * vector[Array*] getArrays() except +
+/* "pdal/libpdalpython.pyx":32
+ * void setLogLevel(int)
*
* cdef class PyPipeline: # <<<<<<<<<<<<<<
* cdef Pipeline *thisptr # hold a c++ instance which we're wrapping
@@ -895,8 +1033,42 @@ struct __pyx_obj_4pdal_13libpdalpython_PyPipeline {
#define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
#define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
+/* RaiseDoubleKeywords.proto */
+static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
+
+/* ParseKeywords.proto */
+static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\
+ PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\
+ const char* function_name);
+
+/* RaiseArgTupleInvalid.proto */
+static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
+ Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
+
+/* ArgTypeTest.proto */
+static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
+ const char *name, int exact);
+
+/* IncludeCppStringH.proto */
+#include <string>
+
+/* decode_c_bytes.proto */
+static CYTHON_INLINE PyObject* __Pyx_decode_c_bytes(
+ const char* cstring, Py_ssize_t length, Py_ssize_t start, Py_ssize_t stop,
+ const char* encoding, const char* errors,
+ PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors));
+
+/* decode_cpp_string.proto */
+static CYTHON_INLINE PyObject* __Pyx_decode_cpp_string(
+ std::string cppstring, 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)) {
+ return __Pyx_decode_c_bytes(
+ cppstring.data(), cppstring.size(), start, stop, encoding, errors, decode_func);
+}
+
/* PyObjectGetAttrStr.proto */
-#if CYTHON_COMPILING_IN_CPYTHON
+#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))
@@ -911,36 +1083,44 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject
#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
#endif
-/* GetBuiltinName.proto */
-static PyObject *__Pyx_GetBuiltinName(PyObject *name);
-
-/* RaiseDoubleKeywords.proto */
-static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
+/* Import.proto */
+static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);
-/* ParseKeywords.proto */
-static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\
- PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\
- const char* function_name);
+/* PyCFunctionFastCall.proto */
+#if CYTHON_FAST_PYCCALL
+static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs);
+#else
+#define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL)
+#endif
-/* RaiseArgTupleInvalid.proto */
-static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
- Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
+/* PyFunctionFastCall.proto */
+#if CYTHON_FAST_PYCALL
+#define __Pyx_PyFunction_FastCall(func, args, nargs)\
+ __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
+#if 1 || PY_VERSION_HEX < 0x030600B1
+static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, int nargs, PyObject *kwargs);
+#else
+#define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
+#endif
+#endif
-/* ArgTypeTest.proto */
-static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
- const char *name, int exact);
+/* PyObjectCall.proto */
+#if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
+#else
+#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
+#endif
-/* IncludeStringH.proto */
-#include <string.h>
+/* PyObjectCallMethO.proto */
+#if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
+#endif
-/* 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));
+/* PyObjectCallOneArg.proto */
+static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
/* ListAppend.proto */
-#if CYTHON_COMPILING_IN_CPYTHON
+#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
PyListObject* L = (PyListObject*) list;
Py_ssize_t len = Py_SIZE(list);
@@ -956,15 +1136,8 @@ static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
#define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
#endif
-/* PyObjectCall.proto */
-#if CYTHON_COMPILING_IN_CPYTHON
-static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
-#else
-#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
-#endif
-
/* PyThreadStateGet.proto */
-#if CYTHON_COMPILING_IN_CPYTHON
+#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate;
#define __Pyx_PyThreadState_assign __pyx_tstate = PyThreadState_GET();
#else
@@ -973,7 +1146,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg
#endif
/* PyErrFetchRestore.proto */
-#if CYTHON_COMPILING_IN_CPYTHON
+#if CYTHON_FAST_THREAD_STATE
#define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
#define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
#define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
@@ -990,6 +1163,9 @@ static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject
/* RaiseException.proto */
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
+/* GetBuiltinName.proto */
+static PyObject *__Pyx_GetBuiltinName(PyObject *name);
+
/* DictGetItem.proto */
#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) {
@@ -1023,6 +1199,33 @@ static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void);
/* ExtTypeTest.proto */
static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type);
+/* SaveResetException.proto */
+#if CYTHON_FAST_THREAD_STATE
+#define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
+static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
+#define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
+static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
+#else
+#define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb)
+#define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb)
+#endif
+
+/* PyErrExceptionMatches.proto */
+#if CYTHON_FAST_THREAD_STATE
+#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
+static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
+#else
+#define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err)
+#endif
+
+/* GetException.proto */
+#if CYTHON_FAST_THREAD_STATE
+#define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb)
+static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
+#else
+static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
+#endif
+
/* CodeObjectCache.proto */
typedef struct {
PyCodeObject* code_object;
@@ -1058,6 +1261,8 @@ static void __Pyx_CppExn2PyErr() {
PyErr_SetString(PyExc_MemoryError, exn.what());
} catch (const std::bad_cast& exn) {
PyErr_SetString(PyExc_TypeError, exn.what());
+ } catch (const std::bad_typeid& exn) {
+ PyErr_SetString(PyExc_TypeError, exn.what());
} catch (const std::domain_error& exn) {
PyErr_SetString(PyExc_ValueError, exn.what());
} catch (const std::invalid_argument& exn) {
@@ -1082,7 +1287,13 @@ static void __Pyx_CppExn2PyErr() {
}
#endif
-/* None.proto */
+/* CIntToPy.proto */
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);
+
+/* CIntToPy.proto */
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int64_t(int64_t value);
+
+/* RealImag.proto */
#if CYTHON_CCOMPLEX
#ifdef __cplusplus
#define __Pyx_CREAL(z) ((z).real())
@@ -1095,7 +1306,8 @@ static void __Pyx_CppExn2PyErr() {
#define __Pyx_CREAL(z) ((z).real)
#define __Pyx_CIMAG(z) ((z).imag)
#endif
-#if defined(__cplusplus) && CYTHON_CCOMPLEX && (defined(_WIN32) || defined(__clang__) || (defined(__GNUC__) && (__GNUC__ >= 5 || __GNUC__ == 4 && __GNUC_MINOR__ >= 4 )) || __cplusplus >= 201103)
+#if defined(__cplusplus) && CYTHON_CCOMPLEX\
+ && (defined(_WIN32) || defined(__clang__) || (defined(__GNUC__) && (__GNUC__ >= 5 || __GNUC__ == 4 && __GNUC_MINOR__ >= 4 )) || __cplusplus >= 201103)
#define __Pyx_SET_CREAL(z,x) ((z).real(x))
#define __Pyx_SET_CIMAG(z,y) ((z).imag(y))
#else
@@ -1103,92 +1315,83 @@ static void __Pyx_CppExn2PyErr() {
#define __Pyx_SET_CIMAG(z,y) __Pyx_CIMAG(z) = (y)
#endif
-/* None.proto */
-static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float);
-
-/* None.proto */
+/* Arithmetic.proto */
#if CYTHON_CCOMPLEX
- #define __Pyx_c_eqf(a, b) ((a)==(b))
- #define __Pyx_c_sumf(a, b) ((a)+(b))
- #define __Pyx_c_difff(a, b) ((a)-(b))
- #define __Pyx_c_prodf(a, b) ((a)*(b))
- #define __Pyx_c_quotf(a, b) ((a)/(b))
- #define __Pyx_c_negf(a) (-(a))
+ #define __Pyx_c_eq_float(a, b) ((a)==(b))
+ #define __Pyx_c_sum_float(a, b) ((a)+(b))
+ #define __Pyx_c_diff_float(a, b) ((a)-(b))
+ #define __Pyx_c_prod_float(a, b) ((a)*(b))
+ #define __Pyx_c_quot_float(a, b) ((a)/(b))
+ #define __Pyx_c_neg_float(a) (-(a))
#ifdef __cplusplus
- #define __Pyx_c_is_zerof(z) ((z)==(float)0)
- #define __Pyx_c_conjf(z) (::std::conj(z))
+ #define __Pyx_c_is_zero_float(z) ((z)==(float)0)
+ #define __Pyx_c_conj_float(z) (::std::conj(z))
#if 1
- #define __Pyx_c_absf(z) (::std::abs(z))
- #define __Pyx_c_powf(a, b) (::std::pow(a, b))
+ #define __Pyx_c_abs_float(z) (::std::abs(z))
+ #define __Pyx_c_pow_float(a, b) (::std::pow(a, b))
#endif
#else
- #define __Pyx_c_is_zerof(z) ((z)==0)
- #define __Pyx_c_conjf(z) (conjf(z))
+ #define __Pyx_c_is_zero_float(z) ((z)==0)
+ #define __Pyx_c_conj_float(z) (conjf(z))
#if 1
- #define __Pyx_c_absf(z) (cabsf(z))
- #define __Pyx_c_powf(a, b) (cpowf(a, b))
+ #define __Pyx_c_abs_float(z) (cabsf(z))
+ #define __Pyx_c_pow_float(a, b) (cpowf(a, b))
#endif
#endif
#else
- static CYTHON_INLINE int __Pyx_c_eqf(__pyx_t_float_complex, __pyx_t_float_complex);
- static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sumf(__pyx_t_float_complex, __pyx_t_float_complex);
- static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_difff(__pyx_t_float_complex, __pyx_t_float_complex);
- static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prodf(__pyx_t_float_complex, __pyx_t_float_complex);
- static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quotf(__pyx_t_float_complex, __pyx_t_float_complex);
- static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_negf(__pyx_t_float_complex);
- static CYTHON_INLINE int __Pyx_c_is_zerof(__pyx_t_float_complex);
- static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conjf(__pyx_t_float_complex);
+ static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex, __pyx_t_float_complex);
+ static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex, __pyx_t_float_complex);
+ static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex, __pyx_t_float_complex);
+ static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex, __pyx_t_float_complex);
+ static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex, __pyx_t_float_complex);
+ static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex);
+ static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex);
+ static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex);
#if 1
- static CYTHON_INLINE float __Pyx_c_absf(__pyx_t_float_complex);
- static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_powf(__pyx_t_float_complex, __pyx_t_float_complex);
+ static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex);
+ static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex, __pyx_t_float_complex);
#endif
#endif
-/* None.proto */
-static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double);
-
-/* None.proto */
+/* Arithmetic.proto */
#if CYTHON_CCOMPLEX
- #define __Pyx_c_eq(a, b) ((a)==(b))
- #define __Pyx_c_sum(a, b) ((a)+(b))
- #define __Pyx_c_diff(a, b) ((a)-(b))
- #define __Pyx_c_prod(a, b) ((a)*(b))
- #define __Pyx_c_quot(a, b) ((a)/(b))
- #define __Pyx_c_neg(a) (-(a))
+ #define __Pyx_c_eq_double(a, b) ((a)==(b))
+ #define __Pyx_c_sum_double(a, b) ((a)+(b))
+ #define __Pyx_c_diff_double(a, b) ((a)-(b))
+ #define __Pyx_c_prod_double(a, b) ((a)*(b))
+ #define __Pyx_c_quot_double(a, b) ((a)/(b))
+ #define __Pyx_c_neg_double(a) (-(a))
#ifdef __cplusplus
- #define __Pyx_c_is_zero(z) ((z)==(double)0)
- #define __Pyx_c_conj(z) (::std::conj(z))
+ #define __Pyx_c_is_zero_double(z) ((z)==(double)0)
+ #define __Pyx_c_conj_double(z) (::std::conj(z))
#if 1
- #define __Pyx_c_abs(z) (::std::abs(z))
- #define __Pyx_c_pow(a, b) (::std::pow(a, b))
+ #define __Pyx_c_abs_double(z) (::std::abs(z))
+ #define __Pyx_c_pow_double(a, b) (::std::pow(a, b))
#endif
#else
- #define __Pyx_c_is_zero(z) ((z)==0)
- #define __Pyx_c_conj(z) (conj(z))
+ #define __Pyx_c_is_zero_double(z) ((z)==0)
+ #define __Pyx_c_conj_double(z) (conj(z))
#if 1
- #define __Pyx_c_abs(z) (cabs(z))
- #define __Pyx_c_pow(a, b) (cpow(a, b))
+ #define __Pyx_c_abs_double(z) (cabs(z))
+ #define __Pyx_c_pow_double(a, b) (cpow(a, b))
#endif
#endif
#else
- static CYTHON_INLINE int __Pyx_c_eq(__pyx_t_double_complex, __pyx_t_double_complex);
- static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum(__pyx_t_double_complex, __pyx_t_double_complex);
- static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff(__pyx_t_double_complex, __pyx_t_double_complex);
- static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod(__pyx_t_double_complex, __pyx_t_double_complex);
- static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot(__pyx_t_double_complex, __pyx_t_double_complex);
- static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg(__pyx_t_double_complex);
- static CYTHON_INLINE int __Pyx_c_is_zero(__pyx_t_double_complex);
- static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj(__pyx_t_double_complex);
+ static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex, __pyx_t_double_complex);
+ static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex, __pyx_t_double_complex);
+ static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex, __pyx_t_double_complex);
+ static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex, __pyx_t_double_complex);
+ static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex, __pyx_t_double_complex);
+ static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex);
+ static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex);
+ static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex);
#if 1
- static CYTHON_INLINE double __Pyx_c_abs(__pyx_t_double_complex);
- static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow(__pyx_t_double_complex, __pyx_t_double_complex);
+ static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex);
+ static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex, __pyx_t_double_complex);
#endif
#endif
/* CIntToPy.proto */
-static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);
-
-/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value);
/* CIntFromPy.proto */
@@ -1228,6 +1431,10 @@ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
/* Module declarations from 'libcpp.string' */
+/* Module declarations from 'libc.stdint' */
+
+/* Module declarations from 'libcpp' */
+
/* Module declarations from 'cpython.version' */
/* Module declarations from 'cpython.buffer' */
@@ -1320,50 +1527,70 @@ static PyTypeObject *__pyx_ptype_5numpy_broadcast = 0;
static PyTypeObject *__pyx_ptype_5numpy_ndarray = 0;
static PyTypeObject *__pyx_ptype_5numpy_ufunc = 0;
static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *, char *, char *, int *); /*proto*/
+static CYTHON_INLINE int __pyx_f_5numpy_import_array(void); /*proto*/
/* Module declarations from 'pdal.libpdalpython' */
static PyTypeObject *__pyx_ptype_4pdal_13libpdalpython_PyPipeline = 0;
+static CYTHON_INLINE PyObject *__pyx_convert_PyObject_string_to_py_std__in_string(std::string const &); /*proto*/
+static CYTHON_INLINE PyObject *__pyx_convert_PyUnicode_string_to_py_std__in_string(std::string const &); /*proto*/
+static CYTHON_INLINE PyObject *__pyx_convert_PyStr_string_to_py_std__in_string(std::string const &); /*proto*/
+static CYTHON_INLINE PyObject *__pyx_convert_PyBytes_string_to_py_std__in_string(std::string const &); /*proto*/
+static CYTHON_INLINE PyObject *__pyx_convert_PyByteArray_string_to_py_std__in_string(std::string const &); /*proto*/
#define __Pyx_MODULE_NAME "pdal.libpdalpython"
int __pyx_module_is_main_pdal__libpdalpython = 0;
/* Implementation of 'pdal.libpdalpython' */
-static PyObject *__pyx_builtin_Exception;
static PyObject *__pyx_builtin_ValueError;
static PyObject *__pyx_builtin_range;
static PyObject *__pyx_builtin_RuntimeError;
+static PyObject *__pyx_builtin_ImportError;
static const char __pyx_k_json[] = "json";
static const char __pyx_k_main[] = "__main__";
static const char __pyx_k_test[] = "__test__";
+static const char __pyx_k_loads[] = "loads";
static const char __pyx_k_range[] = "range";
-static const char __pyx_k_Exception[] = "Exception";
+static const char __pyx_k_import[] = "__import__";
static const char __pyx_k_ValueError[] = "ValueError";
+static const char __pyx_k_ImportError[] = "ImportError";
static const char __pyx_k_RuntimeError[] = "RuntimeError";
static const char __pyx_k_ndarray_is_not_C_contiguous[] = "ndarray is not C contiguous";
+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_C_Pipeline_object_not_constructe[] = "C++ Pipeline object not constructed!";
static const char __pyx_k_Format_string_allocated_too_shor[] = "Format string allocated too short, see comment in numpy.pxd";
static const char __pyx_k_Non_native_byte_order_not_suppor[] = "Non-native byte order not supported";
static const char __pyx_k_ndarray_is_not_Fortran_contiguou[] = "ndarray is not Fortran contiguous";
+static const char __pyx_k_numpy_core_umath_failed_to_impor[] = "numpy.core.umath failed to import";
static const char __pyx_k_Format_string_allocated_too_shor_2[] = "Format string allocated too short.";
static PyObject *__pyx_kp_s_C_Pipeline_object_not_constructe;
-static PyObject *__pyx_n_s_Exception;
static PyObject *__pyx_kp_u_Format_string_allocated_too_shor;
static PyObject *__pyx_kp_u_Format_string_allocated_too_shor_2;
+static PyObject *__pyx_n_s_ImportError;
static PyObject *__pyx_kp_u_Non_native_byte_order_not_suppor;
static PyObject *__pyx_n_s_RuntimeError;
static PyObject *__pyx_n_s_ValueError;
+static PyObject *__pyx_n_s_import;
static PyObject *__pyx_n_s_json;
+static PyObject *__pyx_n_s_loads;
static PyObject *__pyx_n_s_main;
static PyObject *__pyx_kp_u_ndarray_is_not_C_contiguous;
static PyObject *__pyx_kp_u_ndarray_is_not_Fortran_contiguou;
+static PyObject *__pyx_kp_s_numpy_core_multiarray_failed_to;
+static PyObject *__pyx_kp_s_numpy_core_umath_failed_to_impor;
static PyObject *__pyx_n_s_range;
static PyObject *__pyx_n_s_test;
static PyObject *__pyx_kp_u_unknown_dtype_code_in_numpy_pxd;
static int __pyx_pf_4pdal_13libpdalpython_10PyPipeline___cinit__(struct __pyx_obj_4pdal_13libpdalpython_PyPipeline *__pyx_v_self, PyObject *__pyx_v_json); /* proto */
static void __pyx_pf_4pdal_13libpdalpython_10PyPipeline_2__dealloc__(struct __pyx_obj_4pdal_13libpdalpython_PyPipeline *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_4pdal_13libpdalpython_10PyPipeline_4json___get__(struct __pyx_obj_4pdal_13libpdalpython_PyPipeline *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_4pdal_13libpdalpython_10PyPipeline_4arrays(struct __pyx_obj_4pdal_13libpdalpython_PyPipeline *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_4pdal_13libpdalpython_10PyPipeline_6execute(struct __pyx_obj_4pdal_13libpdalpython_PyPipeline *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_4pdal_13libpdalpython_10PyPipeline_8pipeline___get__(struct __pyx_obj_4pdal_13libpdalpython_PyPipeline *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_4pdal_13libpdalpython_10PyPipeline_8metadata___get__(struct __pyx_obj_4pdal_13libpdalpython_PyPipeline *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_4pdal_13libpdalpython_10PyPipeline_8loglevel___get__(struct __pyx_obj_4pdal_13libpdalpython_PyPipeline *__pyx_v_self); /* proto */
+static int __pyx_pf_4pdal_13libpdalpython_10PyPipeline_8loglevel_2__set__(struct __pyx_obj_4pdal_13libpdalpython_PyPipeline *__pyx_v_self, PyObject *__pyx_v_v); /* proto */
+static PyObject *__pyx_pf_4pdal_13libpdalpython_10PyPipeline_3log___get__(struct __pyx_obj_4pdal_13libpdalpython_PyPipeline *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_4pdal_13libpdalpython_10PyPipeline_6schema___get__(struct __pyx_obj_4pdal_13libpdalpython_PyPipeline *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_4pdal_13libpdalpython_10PyPipeline_6arrays___get__(struct __pyx_obj_4pdal_13libpdalpython_PyPipeline *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_4pdal_13libpdalpython_10PyPipeline_4execute(struct __pyx_obj_4pdal_13libpdalpython_PyPipeline *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_4pdal_13libpdalpython_10PyPipeline_6validate(struct __pyx_obj_4pdal_13libpdalpython_PyPipeline *__pyx_v_self); /* proto */
static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */
static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info); /* proto */
static PyObject *__pyx_tp_new_4pdal_13libpdalpython_PyPipeline(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
@@ -1374,8 +1601,12 @@ static PyObject *__pyx_tuple__4;
static PyObject *__pyx_tuple__5;
static PyObject *__pyx_tuple__6;
static PyObject *__pyx_tuple__7;
+static PyObject *__pyx_tuple__8;
+static PyObject *__pyx_tuple__9;
+static PyObject *__pyx_tuple__10;
+static PyObject *__pyx_tuple__11;
-/* "pdal/libpdalpython.pyx":25
+/* "pdal/libpdalpython.pyx":34
* cdef class PyPipeline:
* cdef Pipeline *thisptr # hold a c++ instance which we're wrapping
* def __cinit__(self, unicode json): # <<<<<<<<<<<<<<
@@ -1408,7 +1639,7 @@ static int __pyx_pw_4pdal_13libpdalpython_10PyPipeline_1__cinit__(PyObject *__py
else goto __pyx_L5_argtuple_error;
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 25, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 34, __pyx_L3_error)
}
} else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
goto __pyx_L5_argtuple_error;
@@ -1419,13 +1650,13 @@ static int __pyx_pw_4pdal_13libpdalpython_10PyPipeline_1__cinit__(PyObject *__py
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 25, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 34, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("pdal.libpdalpython.PyPipeline.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return -1;
__pyx_L4_argument_unpacking_done:;
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_json), (&PyUnicode_Type), 1, "json", 1))) __PYX_ERR(0, 25, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_json), (&PyUnicode_Type), 1, "json", 1))) __PYX_ERR(0, 34, __pyx_L1_error)
__pyx_r = __pyx_pf_4pdal_13libpdalpython_10PyPipeline___cinit__(((struct __pyx_obj_4pdal_13libpdalpython_PyPipeline *)__pyx_v_self), __pyx_v_json);
/* function exit code */
@@ -1449,7 +1680,7 @@ static int __pyx_pf_4pdal_13libpdalpython_10PyPipeline___cinit__(struct __pyx_ob
char const *__pyx_t_5;
__Pyx_RefNannySetupContext("__cinit__", 0);
- /* "pdal/libpdalpython.pyx":27
+ /* "pdal/libpdalpython.pyx":36
* def __cinit__(self, unicode json):
* cdef char* x
* if PY_MAJOR_VERSION >= 3: # <<<<<<<<<<<<<<
@@ -1459,7 +1690,7 @@ static int __pyx_pf_4pdal_13libpdalpython_10PyPipeline___cinit__(struct __pyx_ob
__pyx_t_1 = ((PY_MAJOR_VERSION >= 3) != 0);
if (__pyx_t_1) {
- /* "pdal/libpdalpython.pyx":28
+ /* "pdal/libpdalpython.pyx":37
* cdef char* x
* if PY_MAJOR_VERSION >= 3:
* py_byte_string = json.encode('UTF-8') # <<<<<<<<<<<<<<
@@ -1468,24 +1699,24 @@ static int __pyx_pf_4pdal_13libpdalpython_10PyPipeline___cinit__(struct __pyx_ob
*/
if (unlikely(__pyx_v_json == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "encode");
- __PYX_ERR(0, 28, __pyx_L1_error)
+ __PYX_ERR(0, 37, __pyx_L1_error)
}
- __pyx_t_2 = PyUnicode_AsUTF8String(__pyx_v_json); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 28, __pyx_L1_error)
+ __pyx_t_2 = PyUnicode_AsUTF8String(__pyx_v_json); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 37, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_v_py_byte_string = __pyx_t_2;
__pyx_t_2 = 0;
- /* "pdal/libpdalpython.pyx":29
+ /* "pdal/libpdalpython.pyx":38
* if PY_MAJOR_VERSION >= 3:
* py_byte_string = json.encode('UTF-8')
* x= py_byte_string # <<<<<<<<<<<<<<
* self.thisptr = new Pipeline(x)
* else:
*/
- __pyx_t_3 = __Pyx_PyObject_AsString(__pyx_v_py_byte_string); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(0, 29, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_AsString(__pyx_v_py_byte_string); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(0, 38, __pyx_L1_error)
__pyx_v_x = __pyx_t_3;
- /* "pdal/libpdalpython.pyx":30
+ /* "pdal/libpdalpython.pyx":39
* py_byte_string = json.encode('UTF-8')
* x= py_byte_string
* self.thisptr = new Pipeline(x) # <<<<<<<<<<<<<<
@@ -1496,11 +1727,11 @@ static int __pyx_pf_4pdal_13libpdalpython_10PyPipeline___cinit__(struct __pyx_ob
__pyx_t_4 = new libpdalpython::Pipeline(__pyx_v_x);
} catch(...) {
__Pyx_CppExn2PyErr();
- __PYX_ERR(0, 30, __pyx_L1_error)
+ __PYX_ERR(0, 39, __pyx_L1_error)
}
__pyx_v_self->thisptr = __pyx_t_4;
- /* "pdal/libpdalpython.pyx":27
+ /* "pdal/libpdalpython.pyx":36
* def __cinit__(self, unicode json):
* cdef char* x
* if PY_MAJOR_VERSION >= 3: # <<<<<<<<<<<<<<
@@ -1510,7 +1741,7 @@ static int __pyx_pf_4pdal_13libpdalpython_10PyPipeline___cinit__(struct __pyx_ob
goto __pyx_L3;
}
- /* "pdal/libpdalpython.pyx":32
+ /* "pdal/libpdalpython.pyx":41
* self.thisptr = new Pipeline(x)
* else:
* self.thisptr = new Pipeline(json) # <<<<<<<<<<<<<<
@@ -1518,18 +1749,18 @@ static int __pyx_pf_4pdal_13libpdalpython_10PyPipeline___cinit__(struct __pyx_ob
* del self.thisptr
*/
/*else*/ {
- __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_json); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 32, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_json); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 41, __pyx_L1_error)
try {
__pyx_t_4 = new libpdalpython::Pipeline(__pyx_t_5);
} catch(...) {
__Pyx_CppExn2PyErr();
- __PYX_ERR(0, 32, __pyx_L1_error)
+ __PYX_ERR(0, 41, __pyx_L1_error)
}
__pyx_v_self->thisptr = __pyx_t_4;
}
__pyx_L3:;
- /* "pdal/libpdalpython.pyx":25
+ /* "pdal/libpdalpython.pyx":34
* cdef class PyPipeline:
* cdef Pipeline *thisptr # hold a c++ instance which we're wrapping
* def __cinit__(self, unicode json): # <<<<<<<<<<<<<<
@@ -1550,7 +1781,7 @@ static int __pyx_pf_4pdal_13libpdalpython_10PyPipeline___cinit__(struct __pyx_ob
return __pyx_r;
}
-/* "pdal/libpdalpython.pyx":33
+/* "pdal/libpdalpython.pyx":42
* else:
* self.thisptr = new Pipeline(json)
* def __dealloc__(self): # <<<<<<<<<<<<<<
@@ -1573,16 +1804,16 @@ static void __pyx_pf_4pdal_13libpdalpython_10PyPipeline_2__dealloc__(struct __py
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__dealloc__", 0);
- /* "pdal/libpdalpython.pyx":34
+ /* "pdal/libpdalpython.pyx":43
* self.thisptr = new Pipeline(json)
* def __dealloc__(self):
* del self.thisptr # <<<<<<<<<<<<<<
*
- * property json:
+ * property pipeline:
*/
delete __pyx_v_self->thisptr;
- /* "pdal/libpdalpython.pyx":33
+ /* "pdal/libpdalpython.pyx":42
* else:
* self.thisptr = new Pipeline(json)
* def __dealloc__(self): # <<<<<<<<<<<<<<
@@ -1594,62 +1825,66 @@ static void __pyx_pf_4pdal_13libpdalpython_10PyPipeline_2__dealloc__(struct __py
__Pyx_RefNannyFinishContext();
}
-/* "pdal/libpdalpython.pyx":37
+/* "pdal/libpdalpython.pyx":46
*
- * property json:
+ * property pipeline:
* def __get__(self): # <<<<<<<<<<<<<<
- * return self.thisptr.getJSON().decode('UTF-8')
+ * return self.thisptr.getPipeline().decode('UTF-8')
*
*/
/* Python wrapper */
-static PyObject *__pyx_pw_4pdal_13libpdalpython_10PyPipeline_4json_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_4pdal_13libpdalpython_10PyPipeline_4json_1__get__(PyObject *__pyx_v_self) {
+static PyObject *__pyx_pw_4pdal_13libpdalpython_10PyPipeline_8pipeline_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_4pdal_13libpdalpython_10PyPipeline_8pipeline_1__get__(PyObject *__pyx_v_self) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
- __pyx_r = __pyx_pf_4pdal_13libpdalpython_10PyPipeline_4json___get__(((struct __pyx_obj_4pdal_13libpdalpython_PyPipeline *)__pyx_v_self));
+ __pyx_r = __pyx_pf_4pdal_13libpdalpython_10PyPipeline_8pipeline___get__(((struct __pyx_obj_4pdal_13libpdalpython_PyPipeline *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static PyObject *__pyx_pf_4pdal_13libpdalpython_10PyPipeline_4json___get__(struct __pyx_obj_4pdal_13libpdalpython_PyPipeline *__pyx_v_self) {
+static PyObject *__pyx_pf_4pdal_13libpdalpython_10PyPipeline_8pipeline___get__(struct __pyx_obj_4pdal_13libpdalpython_PyPipeline *__pyx_v_self) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
- char const *__pyx_t_1;
+ std::string __pyx_t_1;
PyObject *__pyx_t_2 = NULL;
__Pyx_RefNannySetupContext("__get__", 0);
- /* "pdal/libpdalpython.pyx":38
- * property json:
+ /* "pdal/libpdalpython.pyx":47
+ * property pipeline:
* def __get__(self):
- * return self.thisptr.getJSON().decode('UTF-8') # <<<<<<<<<<<<<<
+ * return self.thisptr.getPipeline().decode('UTF-8') # <<<<<<<<<<<<<<
*
- * def arrays(self):
+ * property metadata:
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __pyx_v_self->thisptr->getJSON();
- __pyx_t_2 = __Pyx_decode_c_string(__pyx_t_1, 0, strlen(__pyx_t_1), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 38, __pyx_L1_error)
+ try {
+ __pyx_t_1 = __pyx_v_self->thisptr->getPipeline();
+ } catch(...) {
+ __Pyx_CppExn2PyErr();
+ __PYX_ERR(0, 47, __pyx_L1_error)
+ }
+ __pyx_t_2 = __Pyx_decode_cpp_string(__pyx_t_1, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 47, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __Pyx_INCREF(__pyx_t_2);
__pyx_r = __pyx_t_2;
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = 0;
goto __pyx_L0;
- /* "pdal/libpdalpython.pyx":37
+ /* "pdal/libpdalpython.pyx":46
*
- * property json:
+ * property pipeline:
* def __get__(self): # <<<<<<<<<<<<<<
- * return self.thisptr.getJSON().decode('UTF-8')
+ * return self.thisptr.getPipeline().decode('UTF-8')
*
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
- __Pyx_AddTraceback("pdal.libpdalpython.PyPipeline.json.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("pdal.libpdalpython.PyPipeline.pipeline.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
@@ -1657,261 +1892,249 @@ static PyObject *__pyx_pf_4pdal_13libpdalpython_10PyPipeline_4json___get__(struc
return __pyx_r;
}
-/* "pdal/libpdalpython.pyx":40
- * return self.thisptr.getJSON().decode('UTF-8')
+/* "pdal/libpdalpython.pyx":50
+ *
+ * property metadata:
+ * def __get__(self): # <<<<<<<<<<<<<<
+ * return self.thisptr.getMetadata().decode('UTF-8')
*
- * def arrays(self): # <<<<<<<<<<<<<<
- * v = self.thisptr.getArrays()
- * output = []
*/
/* Python wrapper */
-static PyObject *__pyx_pw_4pdal_13libpdalpython_10PyPipeline_5arrays(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-static PyObject *__pyx_pw_4pdal_13libpdalpython_10PyPipeline_5arrays(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+static PyObject *__pyx_pw_4pdal_13libpdalpython_10PyPipeline_8metadata_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_4pdal_13libpdalpython_10PyPipeline_8metadata_1__get__(PyObject *__pyx_v_self) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("arrays (wrapper)", 0);
- __pyx_r = __pyx_pf_4pdal_13libpdalpython_10PyPipeline_4arrays(((struct __pyx_obj_4pdal_13libpdalpython_PyPipeline *)__pyx_v_self));
+ __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_4pdal_13libpdalpython_10PyPipeline_8metadata___get__(((struct __pyx_obj_4pdal_13libpdalpython_PyPipeline *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static PyObject *__pyx_pf_4pdal_13libpdalpython_10PyPipeline_4arrays(struct __pyx_obj_4pdal_13libpdalpython_PyPipeline *__pyx_v_self) {
- std::vector<pdal::plang::Array *> __pyx_v_v;
- PyObject *__pyx_v_output = NULL;
- std::vector<pdal::plang::Array *> ::iterator __pyx_v_it;
- pdal::plang::Array *__pyx_v_a;
- pdal::plang::Array *__pyx_v_ptr;
- void *__pyx_v_o;
+static PyObject *__pyx_pf_4pdal_13libpdalpython_10PyPipeline_8metadata___get__(struct __pyx_obj_4pdal_13libpdalpython_PyPipeline *__pyx_v_self) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
- std::vector<pdal::plang::Array *> __pyx_t_1;
+ std::string __pyx_t_1;
PyObject *__pyx_t_2 = NULL;
- int __pyx_t_3;
- void *__pyx_t_4;
- int __pyx_t_5;
- __Pyx_RefNannySetupContext("arrays", 0);
+ __Pyx_RefNannySetupContext("__get__", 0);
- /* "pdal/libpdalpython.pyx":41
+ /* "pdal/libpdalpython.pyx":51
+ * property metadata:
+ * def __get__(self):
+ * return self.thisptr.getMetadata().decode('UTF-8') # <<<<<<<<<<<<<<
*
- * def arrays(self):
- * v = self.thisptr.getArrays() # <<<<<<<<<<<<<<
- * output = []
- * cdef vector[Array*].iterator it = v.begin()
+ * property loglevel:
*/
+ __Pyx_XDECREF(__pyx_r);
try {
- __pyx_t_1 = __pyx_v_self->thisptr->getArrays();
+ __pyx_t_1 = __pyx_v_self->thisptr->getMetadata();
} catch(...) {
__Pyx_CppExn2PyErr();
- __PYX_ERR(0, 41, __pyx_L1_error)
+ __PYX_ERR(0, 51, __pyx_L1_error)
}
- __pyx_v_v = __pyx_t_1;
-
- /* "pdal/libpdalpython.pyx":42
- * def arrays(self):
- * v = self.thisptr.getArrays()
- * output = [] # <<<<<<<<<<<<<<
- * cdef vector[Array*].iterator it = v.begin()
- * cdef Array* a
- */
- __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 42, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_decode_cpp_string(__pyx_t_1, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 51, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __pyx_v_output = ((PyObject*)__pyx_t_2);
+ __pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
+ goto __pyx_L0;
- /* "pdal/libpdalpython.pyx":43
- * v = self.thisptr.getArrays()
- * output = []
- * cdef vector[Array*].iterator it = v.begin() # <<<<<<<<<<<<<<
- * cdef Array* a
- * while it != v.end():
- */
- __pyx_v_it = __pyx_v_v.begin();
-
- /* "pdal/libpdalpython.pyx":45
- * cdef vector[Array*].iterator it = v.begin()
- * cdef Array* a
- * while it != v.end(): # <<<<<<<<<<<<<<
- * ptr = deref(it)
- * a = ptr#.get()
+ /* "pdal/libpdalpython.pyx":50
+ *
+ * property metadata:
+ * def __get__(self): # <<<<<<<<<<<<<<
+ * return self.thisptr.getMetadata().decode('UTF-8')
+ *
*/
- while (1) {
- __pyx_t_3 = ((__pyx_v_it != __pyx_v_v.end()) != 0);
- if (!__pyx_t_3) break;
- /* "pdal/libpdalpython.pyx":46
- * cdef Array* a
- * while it != v.end():
- * ptr = deref(it) # <<<<<<<<<<<<<<
- * a = ptr#.get()
- * o = a.getPythonArray()
- */
- __pyx_v_ptr = (*__pyx_v_it);
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_AddTraceback("pdal.libpdalpython.PyPipeline.metadata.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
- /* "pdal/libpdalpython.pyx":47
- * while it != v.end():
- * ptr = deref(it)
- * a = ptr#.get() # <<<<<<<<<<<<<<
- * o = a.getPythonArray()
- * output.append(<object>o)
+/* "pdal/libpdalpython.pyx":54
+ *
+ * property loglevel:
+ * def __get__(self): # <<<<<<<<<<<<<<
+ * return self.thisptr.getLogLevel()
+ * def __set__(self, v):
*/
- __pyx_v_a = __pyx_v_ptr;
- /* "pdal/libpdalpython.pyx":48
- * ptr = deref(it)
- * a = ptr#.get()
- * o = a.getPythonArray() # <<<<<<<<<<<<<<
- * output.append(<object>o)
- * inc(it)
- */
- try {
- __pyx_t_4 = __pyx_v_a->getPythonArray();
- } catch(...) {
- __Pyx_CppExn2PyErr();
- __PYX_ERR(0, 48, __pyx_L1_error)
- }
- __pyx_v_o = __pyx_t_4;
+/* Python wrapper */
+static PyObject *__pyx_pw_4pdal_13libpdalpython_10PyPipeline_8loglevel_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_4pdal_13libpdalpython_10PyPipeline_8loglevel_1__get__(PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_4pdal_13libpdalpython_10PyPipeline_8loglevel___get__(((struct __pyx_obj_4pdal_13libpdalpython_PyPipeline *)__pyx_v_self));
- /* "pdal/libpdalpython.pyx":49
- * a = ptr#.get()
- * o = a.getPythonArray()
- * output.append(<object>o) # <<<<<<<<<<<<<<
- * inc(it)
- * return output
- */
- __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_output, ((PyObject *)__pyx_v_o)); if (unlikely(__pyx_t_5 == -1)) __PYX_ERR(0, 49, __pyx_L1_error)
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
- /* "pdal/libpdalpython.pyx":50
- * o = a.getPythonArray()
- * output.append(<object>o)
- * inc(it) # <<<<<<<<<<<<<<
- * return output
- *
- */
- (++__pyx_v_it);
- }
+static PyObject *__pyx_pf_4pdal_13libpdalpython_10PyPipeline_8loglevel___get__(struct __pyx_obj_4pdal_13libpdalpython_PyPipeline *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("__get__", 0);
- /* "pdal/libpdalpython.pyx":51
- * output.append(<object>o)
- * inc(it)
- * return output # <<<<<<<<<<<<<<
- *
- * def execute(self):
+ /* "pdal/libpdalpython.pyx":55
+ * property loglevel:
+ * def __get__(self):
+ * return self.thisptr.getLogLevel() # <<<<<<<<<<<<<<
+ * def __set__(self, v):
+ * self.thisptr.setLogLevel(v)
*/
__Pyx_XDECREF(__pyx_r);
- __Pyx_INCREF(__pyx_v_output);
- __pyx_r = __pyx_v_output;
+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->thisptr->getLogLevel()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 55, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
goto __pyx_L0;
- /* "pdal/libpdalpython.pyx":40
- * return self.thisptr.getJSON().decode('UTF-8')
+ /* "pdal/libpdalpython.pyx":54
*
- * def arrays(self): # <<<<<<<<<<<<<<
- * v = self.thisptr.getArrays()
- * output = []
+ * property loglevel:
+ * def __get__(self): # <<<<<<<<<<<<<<
+ * return self.thisptr.getLogLevel()
+ * def __set__(self, v):
*/
/* function exit code */
__pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_2);
- __Pyx_AddTraceback("pdal.libpdalpython.PyPipeline.arrays", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("pdal.libpdalpython.PyPipeline.loglevel.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
- __Pyx_XDECREF(__pyx_v_output);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "pdal/libpdalpython.pyx":53
- * return output
+/* "pdal/libpdalpython.pyx":56
+ * def __get__(self):
+ * return self.thisptr.getLogLevel()
+ * def __set__(self, v): # <<<<<<<<<<<<<<
+ * self.thisptr.setLogLevel(v)
*
- * def execute(self): # <<<<<<<<<<<<<<
- * if not self.thisptr:
- * raise Exception("C++ Pipeline object not constructed!")
*/
/* Python wrapper */
-static PyObject *__pyx_pw_4pdal_13libpdalpython_10PyPipeline_7execute(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-static PyObject *__pyx_pw_4pdal_13libpdalpython_10PyPipeline_7execute(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
- PyObject *__pyx_r = 0;
+static int __pyx_pw_4pdal_13libpdalpython_10PyPipeline_8loglevel_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_v); /*proto*/
+static int __pyx_pw_4pdal_13libpdalpython_10PyPipeline_8loglevel_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_v) {
+ int __pyx_r;
__Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("execute (wrapper)", 0);
- __pyx_r = __pyx_pf_4pdal_13libpdalpython_10PyPipeline_6execute(((struct __pyx_obj_4pdal_13libpdalpython_PyPipeline *)__pyx_v_self));
+ __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_4pdal_13libpdalpython_10PyPipeline_8loglevel_2__set__(((struct __pyx_obj_4pdal_13libpdalpython_PyPipeline *)__pyx_v_self), ((PyObject *)__pyx_v_v));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static PyObject *__pyx_pf_4pdal_13libpdalpython_10PyPipeline_6execute(struct __pyx_obj_4pdal_13libpdalpython_PyPipeline *__pyx_v_self) {
- PyObject *__pyx_r = NULL;
+static int __pyx_pf_4pdal_13libpdalpython_10PyPipeline_8loglevel_2__set__(struct __pyx_obj_4pdal_13libpdalpython_PyPipeline *__pyx_v_self, PyObject *__pyx_v_v) {
+ int __pyx_r;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
- PyObject *__pyx_t_2 = NULL;
- __Pyx_RefNannySetupContext("execute", 0);
+ __Pyx_RefNannySetupContext("__set__", 0);
- /* "pdal/libpdalpython.pyx":54
+ /* "pdal/libpdalpython.pyx":57
+ * return self.thisptr.getLogLevel()
+ * def __set__(self, v):
+ * self.thisptr.setLogLevel(v) # <<<<<<<<<<<<<<
*
- * def execute(self):
- * if not self.thisptr: # <<<<<<<<<<<<<<
- * raise Exception("C++ Pipeline object not constructed!")
- * self.thisptr.execute()
+ * property log:
*/
- __pyx_t_1 = ((!(__pyx_v_self->thisptr != 0)) != 0);
- if (__pyx_t_1) {
+ __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_v); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 57, __pyx_L1_error)
+ __pyx_v_self->thisptr->setLogLevel(__pyx_t_1);
- /* "pdal/libpdalpython.pyx":55
- * def execute(self):
- * if not self.thisptr:
- * raise Exception("C++ Pipeline object not constructed!") # <<<<<<<<<<<<<<
- * self.thisptr.execute()
+ /* "pdal/libpdalpython.pyx":56
+ * def __get__(self):
+ * return self.thisptr.getLogLevel()
+ * def __set__(self, v): # <<<<<<<<<<<<<<
+ * self.thisptr.setLogLevel(v)
*
*/
- __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 55, __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(0, 55, __pyx_L1_error)
- /* "pdal/libpdalpython.pyx":54
- *
- * def execute(self):
- * if not self.thisptr: # <<<<<<<<<<<<<<
- * raise Exception("C++ Pipeline object not constructed!")
- * self.thisptr.execute()
+ /* function exit code */
+ __pyx_r = 0;
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_AddTraceback("pdal.libpdalpython.PyPipeline.loglevel.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = -1;
+ __pyx_L0:;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pdal/libpdalpython.pyx":60
+ *
+ * property log:
+ * def __get__(self): # <<<<<<<<<<<<<<
+ *
+ * return self.thisptr.getLog().decode('UTF-8')
*/
- }
- /* "pdal/libpdalpython.pyx":56
- * if not self.thisptr:
- * raise Exception("C++ Pipeline object not constructed!")
- * self.thisptr.execute() # <<<<<<<<<<<<<<
+/* Python wrapper */
+static PyObject *__pyx_pw_4pdal_13libpdalpython_10PyPipeline_3log_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_4pdal_13libpdalpython_10PyPipeline_3log_1__get__(PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_4pdal_13libpdalpython_10PyPipeline_3log___get__(((struct __pyx_obj_4pdal_13libpdalpython_PyPipeline *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_4pdal_13libpdalpython_10PyPipeline_3log___get__(struct __pyx_obj_4pdal_13libpdalpython_PyPipeline *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ std::string __pyx_t_1;
+ PyObject *__pyx_t_2 = NULL;
+ __Pyx_RefNannySetupContext("__get__", 0);
+
+ /* "pdal/libpdalpython.pyx":62
+ * def __get__(self):
*
+ * return self.thisptr.getLog().decode('UTF-8') # <<<<<<<<<<<<<<
+ *
+ * property schema:
*/
+ __Pyx_XDECREF(__pyx_r);
try {
- __pyx_v_self->thisptr->execute();
+ __pyx_t_1 = __pyx_v_self->thisptr->getLog();
} catch(...) {
__Pyx_CppExn2PyErr();
- __PYX_ERR(0, 56, __pyx_L1_error)
+ __PYX_ERR(0, 62, __pyx_L1_error)
}
+ __pyx_t_2 = __Pyx_decode_cpp_string(__pyx_t_1, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 62, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
- /* "pdal/libpdalpython.pyx":53
- * return output
+ /* "pdal/libpdalpython.pyx":60
*
- * def execute(self): # <<<<<<<<<<<<<<
- * if not self.thisptr:
- * raise Exception("C++ Pipeline object not constructed!")
+ * property log:
+ * def __get__(self): # <<<<<<<<<<<<<<
+ *
+ * return self.thisptr.getLog().decode('UTF-8')
*/
/* function exit code */
- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
- goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
- __Pyx_AddTraceback("pdal.libpdalpython.PyPipeline.execute", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("pdal.libpdalpython.PyPipeline.log.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
@@ -1919,2122 +2142,3257 @@ static PyObject *__pyx_pf_4pdal_13libpdalpython_10PyPipeline_6execute(struct __p
return __pyx_r;
}
-/* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":197
- * # experimental exception made for __getbuffer__ and __releasebuffer__
- * # -- the details of this may change.
- * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<<
- * # This implementation of getbuffer is geared towards Cython
- * # requirements, and does not yet fullfill the PEP.
+/* "pdal/libpdalpython.pyx":65
+ *
+ * property schema:
+ * def __get__(self): # <<<<<<<<<<<<<<
+ * import json
+ *
*/
/* Python wrapper */
-static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
-static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
- int __pyx_r;
+static PyObject *__pyx_pw_4pdal_13libpdalpython_10PyPipeline_6schema_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_4pdal_13libpdalpython_10PyPipeline_6schema_1__get__(PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);
- __pyx_r = __pyx_pf_5numpy_7ndarray___getbuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags));
+ __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_4pdal_13libpdalpython_10PyPipeline_6schema___get__(((struct __pyx_obj_4pdal_13libpdalpython_PyPipeline *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
- int __pyx_v_copy_shape;
- int __pyx_v_i;
- int __pyx_v_ndim;
- int __pyx_v_endian_detector;
- int __pyx_v_little_endian;
- int __pyx_v_t;
- char *__pyx_v_f;
- PyArray_Descr *__pyx_v_descr = 0;
- int __pyx_v_offset;
- int __pyx_v_hasfields;
- int __pyx_r;
+static PyObject *__pyx_pf_4pdal_13libpdalpython_10PyPipeline_6schema___get__(struct __pyx_obj_4pdal_13libpdalpython_PyPipeline *__pyx_v_self) {
+ PyObject *__pyx_v_json = NULL;
+ PyObject *__pyx_v_j = NULL;
+ PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
- int __pyx_t_1;
- int __pyx_t_2;
+ PyObject *__pyx_t_1 = NULL;
+ std::string __pyx_t_2;
PyObject *__pyx_t_3 = NULL;
- int __pyx_t_4;
- int __pyx_t_5;
- PyObject *__pyx_t_6 = NULL;
- char *__pyx_t_7;
- __Pyx_RefNannySetupContext("__getbuffer__", 0);
- if (__pyx_v_info != NULL) {
- __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
- __Pyx_GIVEREF(__pyx_v_info->obj);
- }
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ __Pyx_RefNannySetupContext("__get__", 0);
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":203
- * # of flags
- *
- * if info == NULL: return # <<<<<<<<<<<<<<
+ /* "pdal/libpdalpython.pyx":66
+ * property schema:
+ * def __get__(self):
+ * import json # <<<<<<<<<<<<<<
*
- * cdef int copy_shape, i, ndim
+ * j = self.thisptr.getSchema().decode('UTF-8')
*/
- __pyx_t_1 = ((__pyx_v_info == NULL) != 0);
- if (__pyx_t_1) {
- __pyx_r = 0;
- goto __pyx_L0;
- }
+ __pyx_t_1 = __Pyx_Import(__pyx_n_s_json, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 66, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_v_json = __pyx_t_1;
+ __pyx_t_1 = 0;
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":206
+ /* "pdal/libpdalpython.pyx":68
+ * import json
*
- * cdef int copy_shape, i, ndim
- * cdef int endian_detector = 1 # <<<<<<<<<<<<<<
- * cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
+ * j = self.thisptr.getSchema().decode('UTF-8') # <<<<<<<<<<<<<<
+ * return json.loads(j)
*
*/
- __pyx_v_endian_detector = 1;
+ try {
+ __pyx_t_2 = __pyx_v_self->thisptr->getSchema();
+ } catch(...) {
+ __Pyx_CppExn2PyErr();
+ __PYX_ERR(0, 68, __pyx_L1_error)
+ }
+ __pyx_t_1 = __Pyx_decode_cpp_string(__pyx_t_2, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 68, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_v_j = __pyx_t_1;
+ __pyx_t_1 = 0;
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":207
- * cdef int copy_shape, i, ndim
- * cdef int endian_detector = 1
- * cdef bint little_endian = ((<char*>&endian_detector)[0] != 0) # <<<<<<<<<<<<<<
+ /* "pdal/libpdalpython.pyx":69
*
- * ndim = PyArray_NDIM(self)
+ * j = self.thisptr.getSchema().decode('UTF-8')
+ * return json.loads(j) # <<<<<<<<<<<<<<
+ *
+ * property arrays:
*/
- __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0);
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_json, __pyx_n_s_loads); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 69, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+ __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_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (!__pyx_t_4) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_j); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 69, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_j};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 69, __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_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_j};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 69, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ {
+ __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 69, __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_INCREF(__pyx_v_j);
+ __Pyx_GIVEREF(__pyx_v_j);
+ PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_j);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 69, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":209
- * cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
+ /* "pdal/libpdalpython.pyx":65
*
- * ndim = PyArray_NDIM(self) # <<<<<<<<<<<<<<
+ * property schema:
+ * def __get__(self): # <<<<<<<<<<<<<<
+ * import json
*
- * if sizeof(npy_intp) != sizeof(Py_ssize_t):
*/
- __pyx_v_ndim = PyArray_NDIM(__pyx_v_self);
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":211
- * ndim = PyArray_NDIM(self)
- *
- * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<<
- * copy_shape = 1
- * else:
- */
- __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0);
- if (__pyx_t_1) {
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_AddTraceback("pdal.libpdalpython.PyPipeline.schema.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_json);
+ __Pyx_XDECREF(__pyx_v_j);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":212
+/* "pdal/libpdalpython.pyx":72
*
- * if sizeof(npy_intp) != sizeof(Py_ssize_t):
- * copy_shape = 1 # <<<<<<<<<<<<<<
- * else:
- * copy_shape = 0
+ * property arrays:
+ * def __get__(self): # <<<<<<<<<<<<<<
+ * v = self.thisptr.getArrays()
+ * output = []
*/
- __pyx_v_copy_shape = 1;
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":211
- * ndim = PyArray_NDIM(self)
- *
- * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<<
- * copy_shape = 1
- * else:
+/* Python wrapper */
+static PyObject *__pyx_pw_4pdal_13libpdalpython_10PyPipeline_6arrays_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_4pdal_13libpdalpython_10PyPipeline_6arrays_1__get__(PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_4pdal_13libpdalpython_10PyPipeline_6arrays___get__(((struct __pyx_obj_4pdal_13libpdalpython_PyPipeline *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_4pdal_13libpdalpython_10PyPipeline_6arrays___get__(struct __pyx_obj_4pdal_13libpdalpython_PyPipeline *__pyx_v_self) {
+ std::vector<pdal::plang::Array *> __pyx_v_v;
+ PyObject *__pyx_v_output = NULL;
+ std::vector<pdal::plang::Array *> ::iterator __pyx_v_it;
+ pdal::plang::Array *__pyx_v_a;
+ pdal::plang::Array *__pyx_v_ptr;
+ void *__pyx_v_o;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ std::vector<pdal::plang::Array *> __pyx_t_1;
+ PyObject *__pyx_t_2 = NULL;
+ int __pyx_t_3;
+ void *__pyx_t_4;
+ int __pyx_t_5;
+ __Pyx_RefNannySetupContext("__get__", 0);
+
+ /* "pdal/libpdalpython.pyx":73
+ * property arrays:
+ * def __get__(self):
+ * v = self.thisptr.getArrays() # <<<<<<<<<<<<<<
+ * output = []
+ * cdef vector[Array*].iterator it = v.begin()
*/
- goto __pyx_L4;
+ try {
+ __pyx_t_1 = __pyx_v_self->thisptr->getArrays();
+ } catch(...) {
+ __Pyx_CppExn2PyErr();
+ __PYX_ERR(0, 73, __pyx_L1_error)
}
+ __pyx_v_v = __pyx_t_1;
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":214
- * copy_shape = 1
- * else:
- * copy_shape = 0 # <<<<<<<<<<<<<<
- *
- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
+ /* "pdal/libpdalpython.pyx":74
+ * def __get__(self):
+ * v = self.thisptr.getArrays()
+ * output = [] # <<<<<<<<<<<<<<
+ * cdef vector[Array*].iterator it = v.begin()
+ * cdef Array* a
*/
- /*else*/ {
- __pyx_v_copy_shape = 0;
- }
- __pyx_L4:;
+ __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 74, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_v_output = ((PyObject*)__pyx_t_2);
+ __pyx_t_2 = 0;
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":216
- * copy_shape = 0
- *
- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<<
- * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):
- * raise ValueError(u"ndarray is not C contiguous")
+ /* "pdal/libpdalpython.pyx":75
+ * v = self.thisptr.getArrays()
+ * output = []
+ * cdef vector[Array*].iterator it = v.begin() # <<<<<<<<<<<<<<
+ * cdef Array* a
+ * while it != v.end():
*/
- __pyx_t_2 = (((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS) != 0);
- if (__pyx_t_2) {
- } else {
- __pyx_t_1 = __pyx_t_2;
- goto __pyx_L6_bool_binop_done;
- }
+ __pyx_v_it = __pyx_v_v.begin();
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":217
- *
- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
- * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)): # <<<<<<<<<<<<<<
- * raise ValueError(u"ndarray is not C contiguous")
- *
+ /* "pdal/libpdalpython.pyx":77
+ * cdef vector[Array*].iterator it = v.begin()
+ * cdef Array* a
+ * while it != v.end(): # <<<<<<<<<<<<<<
+ * ptr = deref(it)
+ * a = ptr#.get()
*/
- __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_C_CONTIGUOUS) != 0)) != 0);
- __pyx_t_1 = __pyx_t_2;
- __pyx_L6_bool_binop_done:;
+ while (1) {
+ __pyx_t_3 = ((__pyx_v_it != __pyx_v_v.end()) != 0);
+ if (!__pyx_t_3) break;
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":216
- * copy_shape = 0
- *
- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<<
- * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):
- * raise ValueError(u"ndarray is not C contiguous")
+ /* "pdal/libpdalpython.pyx":78
+ * cdef Array* a
+ * while it != v.end():
+ * ptr = deref(it) # <<<<<<<<<<<<<<
+ * a = ptr#.get()
+ * o = a.getPythonArray()
*/
- if (__pyx_t_1) {
+ __pyx_v_ptr = (*__pyx_v_it);
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":218
- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
- * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):
- * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<<
- *
- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
+ /* "pdal/libpdalpython.pyx":79
+ * while it != v.end():
+ * ptr = deref(it)
+ * a = ptr#.get() # <<<<<<<<<<<<<<
+ * o = a.getPythonArray()
+ * output.append(<object>o)
*/
- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 218, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_Raise(__pyx_t_3, 0, 0, 0);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __PYX_ERR(1, 218, __pyx_L1_error)
+ __pyx_v_a = __pyx_v_ptr;
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":216
- * copy_shape = 0
+ /* "pdal/libpdalpython.pyx":80
+ * ptr = deref(it)
+ * a = ptr#.get()
+ * o = a.getPythonArray() # <<<<<<<<<<<<<<
+ * output.append(<object>o)
+ * inc(it)
+ */
+ try {
+ __pyx_t_4 = __pyx_v_a->getPythonArray();
+ } catch(...) {
+ __Pyx_CppExn2PyErr();
+ __PYX_ERR(0, 80, __pyx_L1_error)
+ }
+ __pyx_v_o = __pyx_t_4;
+
+ /* "pdal/libpdalpython.pyx":81
+ * a = ptr#.get()
+ * o = a.getPythonArray()
+ * output.append(<object>o) # <<<<<<<<<<<<<<
+ * inc(it)
+ * return output
+ */
+ __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_output, ((PyObject *)__pyx_v_o)); if (unlikely(__pyx_t_5 == -1)) __PYX_ERR(0, 81, __pyx_L1_error)
+
+ /* "pdal/libpdalpython.pyx":82
+ * o = a.getPythonArray()
+ * output.append(<object>o)
+ * inc(it) # <<<<<<<<<<<<<<
+ * return output
*
- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<<
- * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):
- * raise ValueError(u"ndarray is not C contiguous")
*/
+ (++__pyx_v_it);
}
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":220
- * raise ValueError(u"ndarray is not C contiguous")
+ /* "pdal/libpdalpython.pyx":83
+ * output.append(<object>o)
+ * inc(it)
+ * return output # <<<<<<<<<<<<<<
*
- * 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")
+ * def execute(self):
*/
- __pyx_t_2 = (((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS) != 0);
- if (__pyx_t_2) {
- } else {
- __pyx_t_1 = __pyx_t_2;
- goto __pyx_L9_bool_binop_done;
- }
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_output);
+ __pyx_r = __pyx_v_output;
+ goto __pyx_L0;
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":221
+ /* "pdal/libpdalpython.pyx":72
*
- * 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")
+ * property arrays:
+ * def __get__(self): # <<<<<<<<<<<<<<
+ * v = self.thisptr.getArrays()
+ * output = []
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_AddTraceback("pdal.libpdalpython.PyPipeline.arrays.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_output);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pdal/libpdalpython.pyx":85
+ * return output
*
+ * def execute(self): # <<<<<<<<<<<<<<
+ * if not self.thisptr:
+ * raise Exception("C++ Pipeline object not constructed!")
*/
- __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_F_CONTIGUOUS) != 0)) != 0);
- __pyx_t_1 = __pyx_t_2;
- __pyx_L9_bool_binop_done:;
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":220
- * raise ValueError(u"ndarray is not C contiguous")
+/* Python wrapper */
+static PyObject *__pyx_pw_4pdal_13libpdalpython_10PyPipeline_5execute(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_4pdal_13libpdalpython_10PyPipeline_5execute(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("execute (wrapper)", 0);
+ __pyx_r = __pyx_pf_4pdal_13libpdalpython_10PyPipeline_4execute(((struct __pyx_obj_4pdal_13libpdalpython_PyPipeline *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_4pdal_13libpdalpython_10PyPipeline_4execute(struct __pyx_obj_4pdal_13libpdalpython_PyPipeline *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ int __pyx_t_1;
+ PyObject *__pyx_t_2 = NULL;
+ int64_t __pyx_t_3;
+ __Pyx_RefNannySetupContext("execute", 0);
+
+ /* "pdal/libpdalpython.pyx":86
*
- * 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")
+ * def execute(self):
+ * if not self.thisptr: # <<<<<<<<<<<<<<
+ * raise Exception("C++ Pipeline object not constructed!")
+ * return self.thisptr.execute()
*/
+ __pyx_t_1 = ((!(__pyx_v_self->thisptr != 0)) != 0);
if (__pyx_t_1) {
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":222
- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
- * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)):
- * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<<
+ /* "pdal/libpdalpython.pyx":87
+ * def execute(self):
+ * if not self.thisptr:
+ * raise Exception("C++ Pipeline object not constructed!") # <<<<<<<<<<<<<<
+ * return self.thisptr.execute()
*
- * info.buf = PyArray_DATA(self)
*/
- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 222, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_Raise(__pyx_t_3, 0, 0, 0);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __PYX_ERR(1, 222, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple_, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 87, __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(0, 87, __pyx_L1_error)
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":220
- * raise ValueError(u"ndarray is not C contiguous")
+ /* "pdal/libpdalpython.pyx":86
*
- * 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")
+ * def execute(self):
+ * if not self.thisptr: # <<<<<<<<<<<<<<
+ * raise Exception("C++ Pipeline object not constructed!")
+ * return self.thisptr.execute()
*/
}
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":224
- * raise ValueError(u"ndarray is not Fortran contiguous")
+ /* "pdal/libpdalpython.pyx":88
+ * if not self.thisptr:
+ * raise Exception("C++ Pipeline object not constructed!")
+ * return self.thisptr.execute() # <<<<<<<<<<<<<<
*
- * info.buf = PyArray_DATA(self) # <<<<<<<<<<<<<<
- * info.ndim = ndim
- * if copy_shape:
+ * def validate(self):
*/
- __pyx_v_info->buf = PyArray_DATA(__pyx_v_self);
+ __Pyx_XDECREF(__pyx_r);
+ try {
+ __pyx_t_3 = __pyx_v_self->thisptr->execute();
+ } catch(...) {
+ __Pyx_CppExn2PyErr();
+ __PYX_ERR(0, 88, __pyx_L1_error)
+ }
+ __pyx_t_2 = __Pyx_PyInt_From_int64_t(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 88, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":225
+ /* "pdal/libpdalpython.pyx":85
+ * return output
*
- * info.buf = PyArray_DATA(self)
- * info.ndim = ndim # <<<<<<<<<<<<<<
- * if copy_shape:
- * # Allocate new buffer for strides and shape info.
+ * def execute(self): # <<<<<<<<<<<<<<
+ * if not self.thisptr:
+ * raise Exception("C++ Pipeline object not constructed!")
*/
- __pyx_v_info->ndim = __pyx_v_ndim;
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":226
- * info.buf = PyArray_DATA(self)
- * info.ndim = ndim
- * if copy_shape: # <<<<<<<<<<<<<<
- * # Allocate new buffer for strides and shape info.
- * # This is allocated as one block, strides first.
- */
- __pyx_t_1 = (__pyx_v_copy_shape != 0);
- if (__pyx_t_1) {
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_AddTraceback("pdal.libpdalpython.PyPipeline.execute", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":229
- * # Allocate new buffer for strides and shape info.
- * # This is allocated as one block, strides first.
- * info.strides = <Py_ssize_t*>stdlib.malloc(sizeof(Py_ssize_t) * <size_t>ndim * 2) # <<<<<<<<<<<<<<
- * info.shape = info.strides + ndim
- * for i in range(ndim):
+/* "pdal/libpdalpython.pyx":90
+ * return self.thisptr.execute()
+ *
+ * def validate(self): # <<<<<<<<<<<<<<
+ * if not self.thisptr:
+ * raise Exception("C++ Pipeline object not constructed!")
*/
- __pyx_v_info->strides = ((Py_ssize_t *)malloc((((sizeof(Py_ssize_t)) * ((size_t)__pyx_v_ndim)) * 2)));
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":230
- * # This is allocated as one block, strides first.
- * info.strides = <Py_ssize_t*>stdlib.malloc(sizeof(Py_ssize_t) * <size_t>ndim * 2)
- * info.shape = info.strides + ndim # <<<<<<<<<<<<<<
- * for i in range(ndim):
- * info.strides[i] = PyArray_STRIDES(self)[i]
- */
- __pyx_v_info->shape = (__pyx_v_info->strides + __pyx_v_ndim);
+/* Python wrapper */
+static PyObject *__pyx_pw_4pdal_13libpdalpython_10PyPipeline_7validate(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_4pdal_13libpdalpython_10PyPipeline_7validate(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("validate (wrapper)", 0);
+ __pyx_r = __pyx_pf_4pdal_13libpdalpython_10PyPipeline_6validate(((struct __pyx_obj_4pdal_13libpdalpython_PyPipeline *)__pyx_v_self));
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":231
- * info.strides = <Py_ssize_t*>stdlib.malloc(sizeof(Py_ssize_t) * <size_t>ndim * 2)
- * info.shape = info.strides + ndim
- * for i in range(ndim): # <<<<<<<<<<<<<<
- * info.strides[i] = PyArray_STRIDES(self)[i]
- * info.shape[i] = PyArray_DIMS(self)[i]
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_4pdal_13libpdalpython_10PyPipeline_6validate(struct __pyx_obj_4pdal_13libpdalpython_PyPipeline *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ int __pyx_t_1;
+ PyObject *__pyx_t_2 = NULL;
+ bool __pyx_t_3;
+ __Pyx_RefNannySetupContext("validate", 0);
+
+ /* "pdal/libpdalpython.pyx":91
+ *
+ * def validate(self):
+ * if not self.thisptr: # <<<<<<<<<<<<<<
+ * raise Exception("C++ Pipeline object not constructed!")
+ * return self.thisptr.validate()
*/
- __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_1 = ((!(__pyx_v_self->thisptr != 0)) != 0);
+ if (__pyx_t_1) {
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":232
- * info.shape = info.strides + ndim
- * for i in range(ndim):
- * info.strides[i] = PyArray_STRIDES(self)[i] # <<<<<<<<<<<<<<
- * info.shape[i] = PyArray_DIMS(self)[i]
- * else:
+ /* "pdal/libpdalpython.pyx":92
+ * def validate(self):
+ * if not self.thisptr:
+ * raise Exception("C++ Pipeline object not constructed!") # <<<<<<<<<<<<<<
+ * return self.thisptr.validate()
*/
- (__pyx_v_info->strides[__pyx_v_i]) = (PyArray_STRIDES(__pyx_v_self)[__pyx_v_i]);
+ __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 92, __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(0, 92, __pyx_L1_error)
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":233
- * for i in range(ndim):
- * info.strides[i] = PyArray_STRIDES(self)[i]
- * info.shape[i] = PyArray_DIMS(self)[i] # <<<<<<<<<<<<<<
- * else:
- * info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
+ /* "pdal/libpdalpython.pyx":91
+ *
+ * def validate(self):
+ * if not self.thisptr: # <<<<<<<<<<<<<<
+ * raise Exception("C++ Pipeline object not constructed!")
+ * return self.thisptr.validate()
*/
- (__pyx_v_info->shape[__pyx_v_i]) = (PyArray_DIMS(__pyx_v_self)[__pyx_v_i]);
- }
+ }
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":226
- * info.buf = PyArray_DATA(self)
- * info.ndim = ndim
- * if copy_shape: # <<<<<<<<<<<<<<
- * # Allocate new buffer for strides and shape info.
- * # This is allocated as one block, strides first.
+ /* "pdal/libpdalpython.pyx":93
+ * if not self.thisptr:
+ * raise Exception("C++ Pipeline object not constructed!")
+ * return self.thisptr.validate() # <<<<<<<<<<<<<<
*/
- goto __pyx_L11;
+ __Pyx_XDECREF(__pyx_r);
+ try {
+ __pyx_t_3 = __pyx_v_self->thisptr->validate();
+ } catch(...) {
+ __Pyx_CppExn2PyErr();
+ __PYX_ERR(0, 93, __pyx_L1_error)
}
+ __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 93, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":235
- * info.shape[i] = PyArray_DIMS(self)[i]
- * else:
- * info.strides = <Py_ssize_t*>PyArray_STRIDES(self) # <<<<<<<<<<<<<<
- * info.shape = <Py_ssize_t*>PyArray_DIMS(self)
- * info.suboffsets = NULL
+ /* "pdal/libpdalpython.pyx":90
+ * return self.thisptr.execute()
+ *
+ * def validate(self): # <<<<<<<<<<<<<<
+ * if not self.thisptr:
+ * raise Exception("C++ Pipeline object not constructed!")
*/
- /*else*/ {
- __pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(__pyx_v_self));
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":236
- * else:
- * info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
- * info.shape = <Py_ssize_t*>PyArray_DIMS(self) # <<<<<<<<<<<<<<
- * info.suboffsets = NULL
- * info.itemsize = PyArray_ITEMSIZE(self)
- */
- __pyx_v_info->shape = ((Py_ssize_t *)PyArray_DIMS(__pyx_v_self));
- }
- __pyx_L11:;
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_AddTraceback("pdal.libpdalpython.PyPipeline.validate", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":237
- * info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
- * info.shape = <Py_ssize_t*>PyArray_DIMS(self)
- * info.suboffsets = NULL # <<<<<<<<<<<<<<
- * info.itemsize = PyArray_ITEMSIZE(self)
- * info.readonly = not PyArray_ISWRITEABLE(self)
+/* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":197
+ * # experimental exception made for __getbuffer__ and __releasebuffer__
+ * # -- the details of this may change.
+ * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<<
+ * # This implementation of getbuffer is geared towards Cython
+ * # requirements, and does not yet fullfill the PEP.
*/
- __pyx_v_info->suboffsets = NULL;
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":238
- * info.shape = <Py_ssize_t*>PyArray_DIMS(self)
- * info.suboffsets = NULL
- * info.itemsize = PyArray_ITEMSIZE(self) # <<<<<<<<<<<<<<
- * info.readonly = not PyArray_ISWRITEABLE(self)
- *
- */
- __pyx_v_info->itemsize = PyArray_ITEMSIZE(__pyx_v_self);
+/* Python wrapper */
+static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
+static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_5numpy_7ndarray___getbuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags));
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":239
- * info.suboffsets = NULL
- * info.itemsize = PyArray_ITEMSIZE(self)
- * info.readonly = not PyArray_ISWRITEABLE(self) # <<<<<<<<<<<<<<
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
+ int __pyx_v_copy_shape;
+ int __pyx_v_i;
+ int __pyx_v_ndim;
+ int __pyx_v_endian_detector;
+ int __pyx_v_little_endian;
+ int __pyx_v_t;
+ char *__pyx_v_f;
+ PyArray_Descr *__pyx_v_descr = 0;
+ int __pyx_v_offset;
+ int __pyx_v_hasfields;
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ int __pyx_t_1;
+ int __pyx_t_2;
+ PyObject *__pyx_t_3 = NULL;
+ int __pyx_t_4;
+ int __pyx_t_5;
+ PyObject *__pyx_t_6 = NULL;
+ char *__pyx_t_7;
+ __Pyx_RefNannySetupContext("__getbuffer__", 0);
+ if (__pyx_v_info != NULL) {
+ __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
+ __Pyx_GIVEREF(__pyx_v_info->obj);
+ }
+
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":203
+ * # of flags
*
- * cdef int t
+ * if info == NULL: return # <<<<<<<<<<<<<<
+ *
+ * cdef int copy_shape, i, ndim
*/
- __pyx_v_info->readonly = (!(PyArray_ISWRITEABLE(__pyx_v_self) != 0));
+ __pyx_t_1 = ((__pyx_v_info == NULL) != 0);
+ if (__pyx_t_1) {
+ __pyx_r = 0;
+ goto __pyx_L0;
+ }
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":242
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":206
+ *
+ * cdef int copy_shape, i, ndim
+ * cdef int endian_detector = 1 # <<<<<<<<<<<<<<
+ * cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
*
- * cdef int t
- * cdef char* f = NULL # <<<<<<<<<<<<<<
- * cdef dtype descr = self.descr
- * cdef int offset
*/
- __pyx_v_f = NULL;
+ __pyx_v_endian_detector = 1;
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":243
- * cdef int t
- * cdef char* f = NULL
- * cdef dtype descr = self.descr # <<<<<<<<<<<<<<
- * cdef int offset
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":207
+ * cdef int copy_shape, i, ndim
+ * cdef int endian_detector = 1
+ * cdef bint little_endian = ((<char*>&endian_detector)[0] != 0) # <<<<<<<<<<<<<<
*
+ * ndim = PyArray_NDIM(self)
*/
- __pyx_t_3 = ((PyObject *)__pyx_v_self->descr);
- __Pyx_INCREF(__pyx_t_3);
- __pyx_v_descr = ((PyArray_Descr *)__pyx_t_3);
- __pyx_t_3 = 0;
+ __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0);
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":246
- * cdef int offset
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":209
+ * cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
*
- * cdef bint hasfields = PyDataType_HASFIELDS(descr) # <<<<<<<<<<<<<<
+ * ndim = PyArray_NDIM(self) # <<<<<<<<<<<<<<
*
- * if not hasfields and not copy_shape:
+ * if sizeof(npy_intp) != sizeof(Py_ssize_t):
*/
- __pyx_v_hasfields = PyDataType_HASFIELDS(__pyx_v_descr);
+ __pyx_v_ndim = PyArray_NDIM(__pyx_v_self);
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":248
- * cdef bint hasfields = PyDataType_HASFIELDS(descr)
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":211
+ * ndim = PyArray_NDIM(self)
*
- * if not hasfields and not copy_shape: # <<<<<<<<<<<<<<
- * # do not call releasebuffer
- * info.obj = None
+ * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<<
+ * copy_shape = 1
+ * else:
*/
- __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:;
+ __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0);
if (__pyx_t_1) {
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":250
- * if not hasfields and not copy_shape:
- * # do not call releasebuffer
- * info.obj = None # <<<<<<<<<<<<<<
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":212
+ *
+ * if sizeof(npy_intp) != sizeof(Py_ssize_t):
+ * copy_shape = 1 # <<<<<<<<<<<<<<
* else:
- * # need to call releasebuffer
+ * copy_shape = 0
*/
- __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;
+ __pyx_v_copy_shape = 1;
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":248
- * cdef bint hasfields = PyDataType_HASFIELDS(descr)
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":211
+ * ndim = PyArray_NDIM(self)
*
- * if not hasfields and not copy_shape: # <<<<<<<<<<<<<<
- * # do not call releasebuffer
- * info.obj = None
+ * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<<
+ * copy_shape = 1
+ * else:
*/
- goto __pyx_L14;
+ goto __pyx_L4;
}
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":253
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":214
+ * copy_shape = 1
* else:
- * # need to call releasebuffer
- * info.obj = self # <<<<<<<<<<<<<<
+ * copy_shape = 0 # <<<<<<<<<<<<<<
*
- * if not hasfields:
+ * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
*/
/*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_v_copy_shape = 0;
}
- __pyx_L14:;
+ __pyx_L4:;
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":255
- * info.obj = self
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":216
+ * copy_shape = 0
*
- * if not hasfields: # <<<<<<<<<<<<<<
- * t = descr.type_num
- * if ((descr.byteorder == c'>' and little_endian) or
+ * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<<
+ * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):
+ * raise ValueError(u"ndarray is not C contiguous")
*/
- __pyx_t_1 = ((!(__pyx_v_hasfields != 0)) != 0);
- if (__pyx_t_1) {
+ __pyx_t_2 = (((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS) != 0);
+ if (__pyx_t_2) {
+ } else {
+ __pyx_t_1 = __pyx_t_2;
+ goto __pyx_L6_bool_binop_done;
+ }
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":256
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":217
+ *
+ * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
+ * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)): # <<<<<<<<<<<<<<
+ * raise ValueError(u"ndarray is not C contiguous")
*
- * if not hasfields:
- * t = descr.type_num # <<<<<<<<<<<<<<
- * if ((descr.byteorder == c'>' and little_endian) or
- * (descr.byteorder == c'<' and not little_endian)):
*/
- __pyx_t_4 = __pyx_v_descr->type_num;
- __pyx_v_t = __pyx_t_4;
+ __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_C_CONTIGUOUS) != 0)) != 0);
+ __pyx_t_1 = __pyx_t_2;
+ __pyx_L6_bool_binop_done:;
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":257
- * if not hasfields:
- * t = descr.type_num
- * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
- * (descr.byteorder == c'<' and not little_endian)):
- * raise ValueError(u"Non-native byte order not supported")
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":216
+ * copy_shape = 0
+ *
+ * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<<
+ * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):
+ * raise ValueError(u"ndarray is not C contiguous")
*/
- __pyx_t_2 = ((__pyx_v_descr->byteorder == '>') != 0);
- if (!__pyx_t_2) {
- goto __pyx_L20_next_or;
- } else {
- }
- __pyx_t_2 = (__pyx_v_little_endian != 0);
- if (!__pyx_t_2) {
- } else {
- __pyx_t_1 = __pyx_t_2;
- goto __pyx_L19_bool_binop_done;
- }
- __pyx_L20_next_or:;
+ if (__pyx_t_1) {
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":258
- * t = descr.type_num
- * if ((descr.byteorder == c'>' and little_endian) or
- * (descr.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<<
- * raise ValueError(u"Non-native byte order not supported")
- * if t == NPY_BYTE: f = "b"
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":218
+ * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
+ * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):
+ * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<<
+ *
+ * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
*/
- __pyx_t_2 = ((__pyx_v_descr->byteorder == '<') != 0);
- if (__pyx_t_2) {
- } else {
- __pyx_t_1 = __pyx_t_2;
- goto __pyx_L19_bool_binop_done;
- }
- __pyx_t_2 = ((!(__pyx_v_little_endian != 0)) != 0);
- __pyx_t_1 = __pyx_t_2;
- __pyx_L19_bool_binop_done:;
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 218, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __PYX_ERR(1, 218, __pyx_L1_error)
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":257
- * if not hasfields:
- * t = descr.type_num
- * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
- * (descr.byteorder == c'<' and not little_endian)):
- * raise ValueError(u"Non-native byte order not supported")
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":216
+ * copy_shape = 0
+ *
+ * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<<
+ * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):
+ * raise ValueError(u"ndarray is not C contiguous")
*/
- if (__pyx_t_1) {
+ }
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":259
- * if ((descr.byteorder == c'>' and little_endian) or
- * (descr.byteorder == c'<' and not little_endian)):
- * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<<
- * if t == NPY_BYTE: f = "b"
- * elif t == NPY_UBYTE: f = "B"
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":220
+ * raise ValueError(u"ndarray is not C contiguous")
+ *
+ * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<<
+ * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)):
+ * raise ValueError(u"ndarray is not Fortran contiguous")
*/
- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 259, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_Raise(__pyx_t_3, 0, 0, 0);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __PYX_ERR(1, 259, __pyx_L1_error)
+ __pyx_t_2 = (((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS) != 0);
+ if (__pyx_t_2) {
+ } else {
+ __pyx_t_1 = __pyx_t_2;
+ goto __pyx_L9_bool_binop_done;
+ }
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":257
- * if not hasfields:
- * t = descr.type_num
- * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
- * (descr.byteorder == c'<' and not little_endian)):
- * raise ValueError(u"Non-native byte order not supported")
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":221
+ *
+ * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
+ * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)): # <<<<<<<<<<<<<<
+ * raise ValueError(u"ndarray is not Fortran contiguous")
+ *
*/
- }
+ __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_F_CONTIGUOUS) != 0)) != 0);
+ __pyx_t_1 = __pyx_t_2;
+ __pyx_L9_bool_binop_done:;
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":260
- * (descr.byteorder == c'<' and not little_endian)):
- * raise ValueError(u"Non-native byte order not supported")
- * if t == NPY_BYTE: f = "b" # <<<<<<<<<<<<<<
- * elif t == NPY_UBYTE: f = "B"
- * elif t == NPY_SHORT: f = "h"
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":220
+ * raise ValueError(u"ndarray is not C contiguous")
+ *
+ * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<<
+ * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)):
+ * raise ValueError(u"ndarray is not Fortran contiguous")
*/
- switch (__pyx_v_t) {
- case NPY_BYTE:
- __pyx_v_f = ((char *)"b");
- break;
+ if (__pyx_t_1) {
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":261
- * raise ValueError(u"Non-native byte order not supported")
- * if t == NPY_BYTE: f = "b"
- * elif t == NPY_UBYTE: f = "B" # <<<<<<<<<<<<<<
- * elif t == NPY_SHORT: f = "h"
- * elif t == NPY_USHORT: f = "H"
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":222
+ * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
+ * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)):
+ * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<<
+ *
+ * info.buf = PyArray_DATA(self)
*/
- case NPY_UBYTE:
- __pyx_v_f = ((char *)"B");
- break;
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 222, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __PYX_ERR(1, 222, __pyx_L1_error)
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":262
- * if t == NPY_BYTE: f = "b"
- * elif t == NPY_UBYTE: f = "B"
- * elif t == NPY_SHORT: f = "h" # <<<<<<<<<<<<<<
- * elif t == NPY_USHORT: f = "H"
- * elif t == NPY_INT: f = "i"
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":220
+ * raise ValueError(u"ndarray is not C contiguous")
+ *
+ * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<<
+ * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)):
+ * raise ValueError(u"ndarray is not Fortran contiguous")
*/
- case NPY_SHORT:
- __pyx_v_f = ((char *)"h");
- break;
+ }
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":263
- * elif t == NPY_UBYTE: f = "B"
- * elif t == NPY_SHORT: f = "h"
- * elif t == NPY_USHORT: f = "H" # <<<<<<<<<<<<<<
- * elif t == NPY_INT: f = "i"
- * elif t == NPY_UINT: f = "I"
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":224
+ * raise ValueError(u"ndarray is not Fortran contiguous")
+ *
+ * info.buf = PyArray_DATA(self) # <<<<<<<<<<<<<<
+ * info.ndim = ndim
+ * if copy_shape:
*/
- case NPY_USHORT:
- __pyx_v_f = ((char *)"H");
- break;
+ __pyx_v_info->buf = PyArray_DATA(__pyx_v_self);
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":264
- * elif t == NPY_SHORT: f = "h"
- * elif t == NPY_USHORT: f = "H"
- * elif t == NPY_INT: f = "i" # <<<<<<<<<<<<<<
- * elif t == NPY_UINT: f = "I"
- * elif t == NPY_LONG: f = "l"
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":225
+ *
+ * info.buf = PyArray_DATA(self)
+ * info.ndim = ndim # <<<<<<<<<<<<<<
+ * if copy_shape:
+ * # Allocate new buffer for strides and shape info.
*/
- case NPY_INT:
- __pyx_v_f = ((char *)"i");
- break;
+ __pyx_v_info->ndim = __pyx_v_ndim;
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":265
- * elif t == NPY_USHORT: f = "H"
- * elif t == NPY_INT: f = "i"
- * elif t == NPY_UINT: f = "I" # <<<<<<<<<<<<<<
- * elif t == NPY_LONG: f = "l"
- * elif t == NPY_ULONG: f = "L"
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":226
+ * info.buf = PyArray_DATA(self)
+ * info.ndim = ndim
+ * if copy_shape: # <<<<<<<<<<<<<<
+ * # Allocate new buffer for strides and shape info.
+ * # This is allocated as one block, strides first.
*/
- case NPY_UINT:
- __pyx_v_f = ((char *)"I");
- break;
+ __pyx_t_1 = (__pyx_v_copy_shape != 0);
+ if (__pyx_t_1) {
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":266
- * elif t == NPY_INT: f = "i"
- * elif t == NPY_UINT: f = "I"
- * elif t == NPY_LONG: f = "l" # <<<<<<<<<<<<<<
- * elif t == NPY_ULONG: f = "L"
- * elif t == NPY_LONGLONG: f = "q"
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":229
+ * # Allocate new buffer for strides and shape info.
+ * # This is allocated as one block, strides first.
+ * info.strides = <Py_ssize_t*>stdlib.malloc(sizeof(Py_ssize_t) * <size_t>ndim * 2) # <<<<<<<<<<<<<<
+ * info.shape = info.strides + ndim
+ * for i in range(ndim):
*/
- case NPY_LONG:
- __pyx_v_f = ((char *)"l");
- break;
+ __pyx_v_info->strides = ((Py_ssize_t *)malloc((((sizeof(Py_ssize_t)) * ((size_t)__pyx_v_ndim)) * 2)));
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":267
- * elif t == NPY_UINT: f = "I"
- * elif t == NPY_LONG: f = "l"
- * elif t == NPY_ULONG: f = "L" # <<<<<<<<<<<<<<
- * elif t == NPY_LONGLONG: f = "q"
- * elif t == NPY_ULONGLONG: f = "Q"
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":230
+ * # This is allocated as one block, strides first.
+ * info.strides = <Py_ssize_t*>stdlib.malloc(sizeof(Py_ssize_t) * <size_t>ndim * 2)
+ * info.shape = info.strides + ndim # <<<<<<<<<<<<<<
+ * for i in range(ndim):
+ * info.strides[i] = PyArray_STRIDES(self)[i]
*/
- case NPY_ULONG:
- __pyx_v_f = ((char *)"L");
- break;
+ __pyx_v_info->shape = (__pyx_v_info->strides + __pyx_v_ndim);
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":268
- * elif t == NPY_LONG: f = "l"
- * elif t == NPY_ULONG: f = "L"
- * elif t == NPY_LONGLONG: f = "q" # <<<<<<<<<<<<<<
- * elif t == NPY_ULONGLONG: f = "Q"
- * elif t == NPY_FLOAT: f = "f"
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":231
+ * info.strides = <Py_ssize_t*>stdlib.malloc(sizeof(Py_ssize_t) * <size_t>ndim * 2)
+ * info.shape = info.strides + ndim
+ * for i in range(ndim): # <<<<<<<<<<<<<<
+ * info.strides[i] = PyArray_STRIDES(self)[i]
+ * info.shape[i] = PyArray_DIMS(self)[i]
*/
- case NPY_LONGLONG:
- __pyx_v_f = ((char *)"q");
- break;
+ __pyx_t_4 = __pyx_v_ndim;
+ for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
+ __pyx_v_i = __pyx_t_5;
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":269
- * elif t == NPY_ULONG: f = "L"
- * elif t == NPY_LONGLONG: f = "q"
- * elif t == NPY_ULONGLONG: f = "Q" # <<<<<<<<<<<<<<
- * elif t == NPY_FLOAT: f = "f"
- * elif t == NPY_DOUBLE: f = "d"
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":232
+ * info.shape = info.strides + ndim
+ * for i in range(ndim):
+ * info.strides[i] = PyArray_STRIDES(self)[i] # <<<<<<<<<<<<<<
+ * info.shape[i] = PyArray_DIMS(self)[i]
+ * else:
*/
- case NPY_ULONGLONG:
- __pyx_v_f = ((char *)"Q");
- break;
+ (__pyx_v_info->strides[__pyx_v_i]) = (PyArray_STRIDES(__pyx_v_self)[__pyx_v_i]);
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":270
- * elif t == NPY_LONGLONG: f = "q"
- * elif t == NPY_ULONGLONG: f = "Q"
- * elif t == NPY_FLOAT: f = "f" # <<<<<<<<<<<<<<
- * elif t == NPY_DOUBLE: f = "d"
- * elif t == NPY_LONGDOUBLE: f = "g"
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":233
+ * for i in range(ndim):
+ * info.strides[i] = PyArray_STRIDES(self)[i]
+ * info.shape[i] = PyArray_DIMS(self)[i] # <<<<<<<<<<<<<<
+ * else:
+ * info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
*/
- case NPY_FLOAT:
- __pyx_v_f = ((char *)"f");
- break;
-
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":271
- * elif t == NPY_ULONGLONG: f = "Q"
- * elif t == NPY_FLOAT: f = "f"
- * elif t == NPY_DOUBLE: f = "d" # <<<<<<<<<<<<<<
- * elif t == NPY_LONGDOUBLE: f = "g"
- * elif t == NPY_CFLOAT: f = "Zf"
- */
- case NPY_DOUBLE:
- __pyx_v_f = ((char *)"d");
- break;
+ (__pyx_v_info->shape[__pyx_v_i]) = (PyArray_DIMS(__pyx_v_self)[__pyx_v_i]);
+ }
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":272
- * elif t == NPY_FLOAT: f = "f"
- * elif t == NPY_DOUBLE: f = "d"
- * elif t == NPY_LONGDOUBLE: f = "g" # <<<<<<<<<<<<<<
- * elif t == NPY_CFLOAT: f = "Zf"
- * elif t == NPY_CDOUBLE: f = "Zd"
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":226
+ * info.buf = PyArray_DATA(self)
+ * info.ndim = ndim
+ * if copy_shape: # <<<<<<<<<<<<<<
+ * # Allocate new buffer for strides and shape info.
+ * # This is allocated as one block, strides first.
*/
- case NPY_LONGDOUBLE:
- __pyx_v_f = ((char *)"g");
- break;
+ goto __pyx_L11;
+ }
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":273
- * elif t == NPY_DOUBLE: f = "d"
- * elif t == NPY_LONGDOUBLE: f = "g"
- * elif t == NPY_CFLOAT: f = "Zf" # <<<<<<<<<<<<<<
- * elif t == NPY_CDOUBLE: f = "Zd"
- * elif t == NPY_CLONGDOUBLE: f = "Zg"
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":235
+ * info.shape[i] = PyArray_DIMS(self)[i]
+ * else:
+ * info.strides = <Py_ssize_t*>PyArray_STRIDES(self) # <<<<<<<<<<<<<<
+ * info.shape = <Py_ssize_t*>PyArray_DIMS(self)
+ * info.suboffsets = NULL
*/
- case NPY_CFLOAT:
- __pyx_v_f = ((char *)"Zf");
- break;
+ /*else*/ {
+ __pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(__pyx_v_self));
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":274
- * elif t == NPY_LONGDOUBLE: f = "g"
- * elif t == NPY_CFLOAT: f = "Zf"
- * elif t == NPY_CDOUBLE: f = "Zd" # <<<<<<<<<<<<<<
- * elif t == NPY_CLONGDOUBLE: f = "Zg"
- * elif t == NPY_OBJECT: f = "O"
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":236
+ * else:
+ * info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
+ * info.shape = <Py_ssize_t*>PyArray_DIMS(self) # <<<<<<<<<<<<<<
+ * info.suboffsets = NULL
+ * info.itemsize = PyArray_ITEMSIZE(self)
*/
- case NPY_CDOUBLE:
- __pyx_v_f = ((char *)"Zd");
- break;
+ __pyx_v_info->shape = ((Py_ssize_t *)PyArray_DIMS(__pyx_v_self));
+ }
+ __pyx_L11:;
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":275
- * elif t == NPY_CFLOAT: f = "Zf"
- * elif t == NPY_CDOUBLE: f = "Zd"
- * elif t == NPY_CLONGDOUBLE: f = "Zg" # <<<<<<<<<<<<<<
- * elif t == NPY_OBJECT: f = "O"
- * else:
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":237
+ * info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
+ * info.shape = <Py_ssize_t*>PyArray_DIMS(self)
+ * info.suboffsets = NULL # <<<<<<<<<<<<<<
+ * info.itemsize = PyArray_ITEMSIZE(self)
+ * info.readonly = not PyArray_ISWRITEABLE(self)
*/
- case NPY_CLONGDOUBLE:
- __pyx_v_f = ((char *)"Zg");
- break;
+ __pyx_v_info->suboffsets = NULL;
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":276
- * elif t == NPY_CDOUBLE: f = "Zd"
- * elif t == NPY_CLONGDOUBLE: f = "Zg"
- * elif t == NPY_OBJECT: f = "O" # <<<<<<<<<<<<<<
- * else:
- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":238
+ * info.shape = <Py_ssize_t*>PyArray_DIMS(self)
+ * info.suboffsets = NULL
+ * info.itemsize = PyArray_ITEMSIZE(self) # <<<<<<<<<<<<<<
+ * info.readonly = not PyArray_ISWRITEABLE(self)
+ *
*/
- case NPY_OBJECT:
- __pyx_v_f = ((char *)"O");
- break;
- default:
+ __pyx_v_info->itemsize = PyArray_ITEMSIZE(__pyx_v_self);
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":278
- * elif t == NPY_OBJECT: f = "O"
- * else:
- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<<
- * info.format = f
- * return
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":239
+ * info.suboffsets = NULL
+ * info.itemsize = PyArray_ITEMSIZE(self)
+ * info.readonly = not PyArray_ISWRITEABLE(self) # <<<<<<<<<<<<<<
+ *
+ * cdef int t
*/
- __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 278, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_6 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 278, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 278, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_GIVEREF(__pyx_t_6);
- PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6);
- __pyx_t_6 = 0;
- __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 278, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_Raise(__pyx_t_6, 0, 0, 0);
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- __PYX_ERR(1, 278, __pyx_L1_error)
- break;
- }
+ __pyx_v_info->readonly = (!(PyArray_ISWRITEABLE(__pyx_v_self) != 0));
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":279
- * else:
- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
- * info.format = f # <<<<<<<<<<<<<<
- * return
- * else:
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":242
+ *
+ * cdef int t
+ * cdef char* f = NULL # <<<<<<<<<<<<<<
+ * cdef dtype descr = self.descr
+ * cdef int offset
*/
- __pyx_v_info->format = __pyx_v_f;
+ __pyx_v_f = NULL;
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":280
- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
- * info.format = f
- * return # <<<<<<<<<<<<<<
- * else:
- * info.format = <char*>stdlib.malloc(_buffer_format_string_len)
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":243
+ * cdef int t
+ * cdef char* f = NULL
+ * cdef dtype descr = self.descr # <<<<<<<<<<<<<<
+ * cdef int offset
+ *
*/
- __pyx_r = 0;
- goto __pyx_L0;
+ __pyx_t_3 = ((PyObject *)__pyx_v_self->descr);
+ __Pyx_INCREF(__pyx_t_3);
+ __pyx_v_descr = ((PyArray_Descr *)__pyx_t_3);
+ __pyx_t_3 = 0;
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":255
- * info.obj = self
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":246
+ * cdef int offset
*
- * if not hasfields: # <<<<<<<<<<<<<<
- * t = descr.type_num
- * if ((descr.byteorder == c'>' and little_endian) or
+ * cdef bint hasfields = PyDataType_HASFIELDS(descr) # <<<<<<<<<<<<<<
+ *
+ * if not hasfields and not copy_shape:
*/
- }
+ __pyx_v_hasfields = PyDataType_HASFIELDS(__pyx_v_descr);
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":282
- * return
- * else:
- * info.format = <char*>stdlib.malloc(_buffer_format_string_len) # <<<<<<<<<<<<<<
- * info.format[0] = c'^' # Native data types, manual alignment
- * offset = 0
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":248
+ * cdef bint hasfields = PyDataType_HASFIELDS(descr)
+ *
+ * if not hasfields and not copy_shape: # <<<<<<<<<<<<<<
+ * # do not call releasebuffer
+ * info.obj = None
*/
- /*else*/ {
- __pyx_v_info->format = ((char *)malloc(0xFF));
+ __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/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":283
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":250
+ * if not hasfields and not copy_shape:
+ * # do not call releasebuffer
+ * info.obj = None # <<<<<<<<<<<<<<
* else:
- * info.format = <char*>stdlib.malloc(_buffer_format_string_len)
- * info.format[0] = c'^' # Native data types, manual alignment # <<<<<<<<<<<<<<
- * offset = 0
- * f = _util_dtypestring(descr, info.format + 1,
- */
- (__pyx_v_info->format[0]) = '^';
-
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":284
- * info.format = <char*>stdlib.malloc(_buffer_format_string_len)
- * info.format[0] = c'^' # Native data types, manual alignment
- * offset = 0 # <<<<<<<<<<<<<<
- * f = _util_dtypestring(descr, info.format + 1,
- * info.format + _buffer_format_string_len,
+ * # need to call releasebuffer
*/
- __pyx_v_offset = 0;
+ __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/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":285
- * info.format[0] = c'^' # Native data types, manual alignment
- * offset = 0
- * f = _util_dtypestring(descr, info.format + 1, # <<<<<<<<<<<<<<
- * info.format + _buffer_format_string_len,
- * &offset)
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":248
+ * cdef bint hasfields = PyDataType_HASFIELDS(descr)
+ *
+ * if not hasfields and not copy_shape: # <<<<<<<<<<<<<<
+ * # do not call releasebuffer
+ * info.obj = None
*/
- __pyx_t_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;
+ goto __pyx_L14;
+ }
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":288
- * info.format + _buffer_format_string_len,
- * &offset)
- * f[0] = c'\0' # Terminate format string # <<<<<<<<<<<<<<
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":253
+ * else:
+ * # need to call releasebuffer
+ * info.obj = self # <<<<<<<<<<<<<<
*
- * def __releasebuffer__(ndarray self, Py_buffer* info):
+ * if not hasfields:
*/
- (__pyx_v_f[0]) = '\x00';
+ /*else*/ {
+ __Pyx_INCREF(((PyObject *)__pyx_v_self));
+ __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
+ __Pyx_GOTREF(__pyx_v_info->obj);
+ __Pyx_DECREF(__pyx_v_info->obj);
+ __pyx_v_info->obj = ((PyObject *)__pyx_v_self);
}
+ __pyx_L14:;
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":197
- * # experimental exception made for __getbuffer__ and __releasebuffer__
- * # -- the details of this may change.
- * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<<
- * # This implementation of getbuffer is geared towards Cython
- * # requirements, and does not yet fullfill the PEP.
- */
-
- /* function exit code */
- __pyx_r = 0;
- goto __pyx_L0;
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_3);
- __Pyx_XDECREF(__pyx_t_6);
- __Pyx_AddTraceback("numpy.ndarray.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = -1;
- if (__pyx_v_info != NULL && __pyx_v_info->obj != NULL) {
- __Pyx_GOTREF(__pyx_v_info->obj);
- __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = NULL;
- }
- goto __pyx_L2;
- __pyx_L0:;
- if (__pyx_v_info != NULL && __pyx_v_info->obj == Py_None) {
- __Pyx_GOTREF(Py_None);
- __Pyx_DECREF(Py_None); __pyx_v_info->obj = NULL;
- }
- __pyx_L2:;
- __Pyx_XDECREF((PyObject *)__pyx_v_descr);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-/* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":290
- * f[0] = c'\0' # Terminate format string
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":255
+ * info.obj = self
*
- * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<<
- * if PyArray_HASFIELDS(self):
- * stdlib.free(info.format)
+ * if not hasfields: # <<<<<<<<<<<<<<
+ * t = descr.type_num
+ * if ((descr.byteorder == c'>' and little_endian) or
*/
+ __pyx_t_1 = ((!(__pyx_v_hasfields != 0)) != 0);
+ if (__pyx_t_1) {
-/* Python wrapper */
-static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info); /*proto*/
-static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info) {
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("__releasebuffer__ (wrapper)", 0);
- __pyx_pf_5numpy_7ndarray_2__releasebuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info));
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
-}
-
-static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info) {
- __Pyx_RefNannyDeclarations
- int __pyx_t_1;
- __Pyx_RefNannySetupContext("__releasebuffer__", 0);
-
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":291
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":256
*
- * def __releasebuffer__(ndarray self, Py_buffer* info):
- * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<<
- * stdlib.free(info.format)
- * if sizeof(npy_intp) != sizeof(Py_ssize_t):
+ * if not hasfields:
+ * t = descr.type_num # <<<<<<<<<<<<<<
+ * if ((descr.byteorder == c'>' and little_endian) or
+ * (descr.byteorder == c'<' and not little_endian)):
*/
- __pyx_t_1 = (PyArray_HASFIELDS(__pyx_v_self) != 0);
- if (__pyx_t_1) {
+ __pyx_t_4 = __pyx_v_descr->type_num;
+ __pyx_v_t = __pyx_t_4;
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":292
- * def __releasebuffer__(ndarray self, Py_buffer* info):
- * if PyArray_HASFIELDS(self):
- * stdlib.free(info.format) # <<<<<<<<<<<<<<
- * if sizeof(npy_intp) != sizeof(Py_ssize_t):
- * stdlib.free(info.strides)
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":257
+ * if not hasfields:
+ * t = descr.type_num
+ * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
+ * (descr.byteorder == c'<' and not little_endian)):
+ * raise ValueError(u"Non-native byte order not supported")
*/
- free(__pyx_v_info->format);
+ __pyx_t_2 = ((__pyx_v_descr->byteorder == '>') != 0);
+ if (!__pyx_t_2) {
+ goto __pyx_L20_next_or;
+ } else {
+ }
+ __pyx_t_2 = (__pyx_v_little_endian != 0);
+ if (!__pyx_t_2) {
+ } else {
+ __pyx_t_1 = __pyx_t_2;
+ goto __pyx_L19_bool_binop_done;
+ }
+ __pyx_L20_next_or:;
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":291
- *
- * def __releasebuffer__(ndarray self, Py_buffer* info):
- * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<<
- * stdlib.free(info.format)
- * if sizeof(npy_intp) != sizeof(Py_ssize_t):
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":258
+ * t = descr.type_num
+ * if ((descr.byteorder == c'>' and little_endian) or
+ * (descr.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<<
+ * raise ValueError(u"Non-native byte order not supported")
+ * if t == NPY_BYTE: f = "b"
*/
- }
+ __pyx_t_2 = ((__pyx_v_descr->byteorder == '<') != 0);
+ if (__pyx_t_2) {
+ } else {
+ __pyx_t_1 = __pyx_t_2;
+ goto __pyx_L19_bool_binop_done;
+ }
+ __pyx_t_2 = ((!(__pyx_v_little_endian != 0)) != 0);
+ __pyx_t_1 = __pyx_t_2;
+ __pyx_L19_bool_binop_done:;
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":293
- * if PyArray_HASFIELDS(self):
- * stdlib.free(info.format)
- * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<<
- * stdlib.free(info.strides)
- * # info.shape was stored after info.strides in the same block
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":257
+ * if not hasfields:
+ * t = descr.type_num
+ * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
+ * (descr.byteorder == c'<' and not little_endian)):
+ * raise ValueError(u"Non-native byte order not supported")
*/
- __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0);
- if (__pyx_t_1) {
+ if (__pyx_t_1) {
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":294
- * stdlib.free(info.format)
- * if sizeof(npy_intp) != sizeof(Py_ssize_t):
- * stdlib.free(info.strides) # <<<<<<<<<<<<<<
- * # info.shape was stored after info.strides in the same block
- *
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":259
+ * if ((descr.byteorder == c'>' and little_endian) or
+ * (descr.byteorder == c'<' and not little_endian)):
+ * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<<
+ * if t == NPY_BYTE: f = "b"
+ * elif t == NPY_UBYTE: f = "B"
*/
- free(__pyx_v_info->strides);
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 259, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __PYX_ERR(1, 259, __pyx_L1_error)
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":293
- * if PyArray_HASFIELDS(self):
- * stdlib.free(info.format)
- * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<<
- * stdlib.free(info.strides)
- * # info.shape was stored after info.strides in the same block
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":257
+ * if not hasfields:
+ * t = descr.type_num
+ * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
+ * (descr.byteorder == c'<' and not little_endian)):
+ * raise ValueError(u"Non-native byte order not supported")
*/
- }
+ }
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":290
- * f[0] = c'\0' # Terminate format string
- *
- * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<<
- * if PyArray_HASFIELDS(self):
- * stdlib.free(info.format)
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":260
+ * (descr.byteorder == c'<' and not little_endian)):
+ * raise ValueError(u"Non-native byte order not supported")
+ * if t == NPY_BYTE: f = "b" # <<<<<<<<<<<<<<
+ * elif t == NPY_UBYTE: f = "B"
+ * elif t == NPY_SHORT: f = "h"
*/
+ switch (__pyx_v_t) {
+ case NPY_BYTE:
+ __pyx_v_f = ((char *)"b");
+ break;
- /* function exit code */
- __Pyx_RefNannyFinishContext();
-}
-
-/* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":770
- * ctypedef npy_cdouble complex_t
- *
- * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<<
- * return PyArray_MultiIterNew(1, <void*>a)
- *
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":261
+ * raise ValueError(u"Non-native byte order not supported")
+ * if t == NPY_BYTE: f = "b"
+ * elif t == NPY_UBYTE: f = "B" # <<<<<<<<<<<<<<
+ * elif t == NPY_SHORT: f = "h"
+ * elif t == NPY_USHORT: f = "H"
*/
+ case NPY_UBYTE:
+ __pyx_v_f = ((char *)"B");
+ break;
-static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) {
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
- __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0);
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":262
+ * if t == NPY_BYTE: f = "b"
+ * elif t == NPY_UBYTE: f = "B"
+ * elif t == NPY_SHORT: f = "h" # <<<<<<<<<<<<<<
+ * elif t == NPY_USHORT: f = "H"
+ * elif t == NPY_INT: f = "i"
+ */
+ case NPY_SHORT:
+ __pyx_v_f = ((char *)"h");
+ break;
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":771
- *
- * cdef inline object PyArray_MultiIterNew1(a):
- * return PyArray_MultiIterNew(1, <void*>a) # <<<<<<<<<<<<<<
- *
- * cdef inline object PyArray_MultiIterNew2(a, b):
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":263
+ * elif t == NPY_UBYTE: f = "B"
+ * elif t == NPY_SHORT: f = "h"
+ * elif t == NPY_USHORT: f = "H" # <<<<<<<<<<<<<<
+ * elif t == NPY_INT: f = "i"
+ * elif t == NPY_UINT: f = "I"
*/
- __Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 771, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_r = __pyx_t_1;
- __pyx_t_1 = 0;
- goto __pyx_L0;
+ case NPY_USHORT:
+ __pyx_v_f = ((char *)"H");
+ break;
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":770
- * ctypedef npy_cdouble complex_t
- *
- * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<<
- * return PyArray_MultiIterNew(1, <void*>a)
- *
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":264
+ * elif t == NPY_SHORT: f = "h"
+ * elif t == NPY_USHORT: f = "H"
+ * elif t == NPY_INT: f = "i" # <<<<<<<<<<<<<<
+ * elif t == NPY_UINT: f = "I"
+ * elif t == NPY_LONG: f = "l"
*/
+ case NPY_INT:
+ __pyx_v_f = ((char *)"i");
+ break;
- /* function exit code */
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
- __Pyx_AddTraceback("numpy.PyArray_MultiIterNew1", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = 0;
- __pyx_L0:;
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-/* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":773
- * return PyArray_MultiIterNew(1, <void*>a)
- *
- * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<<
- * return PyArray_MultiIterNew(2, <void*>a, <void*>b)
- *
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":265
+ * elif t == NPY_USHORT: f = "H"
+ * elif t == NPY_INT: f = "i"
+ * elif t == NPY_UINT: f = "I" # <<<<<<<<<<<<<<
+ * elif t == NPY_LONG: f = "l"
+ * elif t == NPY_ULONG: f = "L"
*/
+ case NPY_UINT:
+ __pyx_v_f = ((char *)"I");
+ break;
-static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) {
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
- __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0);
-
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":774
- *
- * cdef inline object PyArray_MultiIterNew2(a, b):
- * return PyArray_MultiIterNew(2, <void*>a, <void*>b) # <<<<<<<<<<<<<<
- *
- * cdef inline object PyArray_MultiIterNew3(a, b, c):
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":266
+ * elif t == NPY_INT: f = "i"
+ * elif t == NPY_UINT: f = "I"
+ * elif t == NPY_LONG: f = "l" # <<<<<<<<<<<<<<
+ * elif t == NPY_ULONG: f = "L"
+ * elif t == NPY_LONGLONG: f = "q"
*/
- __Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 774, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_r = __pyx_t_1;
- __pyx_t_1 = 0;
- goto __pyx_L0;
+ case NPY_LONG:
+ __pyx_v_f = ((char *)"l");
+ break;
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":773
- * return PyArray_MultiIterNew(1, <void*>a)
- *
- * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<<
- * return PyArray_MultiIterNew(2, <void*>a, <void*>b)
- *
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":267
+ * elif t == NPY_UINT: f = "I"
+ * elif t == NPY_LONG: f = "l"
+ * elif t == NPY_ULONG: f = "L" # <<<<<<<<<<<<<<
+ * elif t == NPY_LONGLONG: f = "q"
+ * elif t == NPY_ULONGLONG: f = "Q"
*/
+ case NPY_ULONG:
+ __pyx_v_f = ((char *)"L");
+ break;
- /* function exit code */
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
- __Pyx_AddTraceback("numpy.PyArray_MultiIterNew2", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = 0;
- __pyx_L0:;
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-/* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":776
- * return PyArray_MultiIterNew(2, <void*>a, <void*>b)
- *
- * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<<
- * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
- *
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":268
+ * elif t == NPY_LONG: f = "l"
+ * elif t == NPY_ULONG: f = "L"
+ * elif t == NPY_LONGLONG: f = "q" # <<<<<<<<<<<<<<
+ * elif t == NPY_ULONGLONG: f = "Q"
+ * elif t == NPY_FLOAT: f = "f"
*/
+ case NPY_LONGLONG:
+ __pyx_v_f = ((char *)"q");
+ break;
-static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) {
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
- __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0);
-
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":777
- *
- * cdef inline object PyArray_MultiIterNew3(a, b, c):
- * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c) # <<<<<<<<<<<<<<
- *
- * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":269
+ * elif t == NPY_ULONG: f = "L"
+ * elif t == NPY_LONGLONG: f = "q"
+ * elif t == NPY_ULONGLONG: f = "Q" # <<<<<<<<<<<<<<
+ * elif t == NPY_FLOAT: f = "f"
+ * elif t == NPY_DOUBLE: f = "d"
*/
- __Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 777, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_r = __pyx_t_1;
- __pyx_t_1 = 0;
- goto __pyx_L0;
+ case NPY_ULONGLONG:
+ __pyx_v_f = ((char *)"Q");
+ break;
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":776
- * return PyArray_MultiIterNew(2, <void*>a, <void*>b)
- *
- * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<<
- * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
- *
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":270
+ * elif t == NPY_LONGLONG: f = "q"
+ * elif t == NPY_ULONGLONG: f = "Q"
+ * elif t == NPY_FLOAT: f = "f" # <<<<<<<<<<<<<<
+ * elif t == NPY_DOUBLE: f = "d"
+ * elif t == NPY_LONGDOUBLE: f = "g"
*/
+ case NPY_FLOAT:
+ __pyx_v_f = ((char *)"f");
+ break;
- /* function exit code */
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
- __Pyx_AddTraceback("numpy.PyArray_MultiIterNew3", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = 0;
- __pyx_L0:;
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-/* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":779
- * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
- *
- * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<<
- * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
- *
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":271
+ * elif t == NPY_ULONGLONG: f = "Q"
+ * elif t == NPY_FLOAT: f = "f"
+ * elif t == NPY_DOUBLE: f = "d" # <<<<<<<<<<<<<<
+ * elif t == NPY_LONGDOUBLE: f = "g"
+ * elif t == NPY_CFLOAT: f = "Zf"
*/
+ case NPY_DOUBLE:
+ __pyx_v_f = ((char *)"d");
+ break;
-static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) {
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
- __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0);
-
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":780
- *
- * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
- * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d) # <<<<<<<<<<<<<<
- *
- * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":272
+ * elif t == NPY_FLOAT: f = "f"
+ * elif t == NPY_DOUBLE: f = "d"
+ * elif t == NPY_LONGDOUBLE: f = "g" # <<<<<<<<<<<<<<
+ * elif t == NPY_CFLOAT: f = "Zf"
+ * elif t == NPY_CDOUBLE: f = "Zd"
*/
- __Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 780, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_r = __pyx_t_1;
- __pyx_t_1 = 0;
- goto __pyx_L0;
+ case NPY_LONGDOUBLE:
+ __pyx_v_f = ((char *)"g");
+ break;
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":779
- * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
- *
- * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<<
- * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
- *
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":273
+ * elif t == NPY_DOUBLE: f = "d"
+ * elif t == NPY_LONGDOUBLE: f = "g"
+ * elif t == NPY_CFLOAT: f = "Zf" # <<<<<<<<<<<<<<
+ * elif t == NPY_CDOUBLE: f = "Zd"
+ * elif t == NPY_CLONGDOUBLE: f = "Zg"
*/
+ case NPY_CFLOAT:
+ __pyx_v_f = ((char *)"Zf");
+ break;
- /* function exit code */
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
- __Pyx_AddTraceback("numpy.PyArray_MultiIterNew4", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = 0;
- __pyx_L0:;
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-/* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":782
- * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
- *
- * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<<
- * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
- *
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":274
+ * elif t == NPY_LONGDOUBLE: f = "g"
+ * elif t == NPY_CFLOAT: f = "Zf"
+ * elif t == NPY_CDOUBLE: f = "Zd" # <<<<<<<<<<<<<<
+ * elif t == NPY_CLONGDOUBLE: f = "Zg"
+ * elif t == NPY_OBJECT: f = "O"
*/
+ case NPY_CDOUBLE:
+ __pyx_v_f = ((char *)"Zd");
+ break;
-static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d, PyObject *__pyx_v_e) {
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
- __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0);
-
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":783
- *
- * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
- * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e) # <<<<<<<<<<<<<<
- *
- * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL:
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":275
+ * elif t == NPY_CFLOAT: f = "Zf"
+ * elif t == NPY_CDOUBLE: f = "Zd"
+ * elif t == NPY_CLONGDOUBLE: f = "Zg" # <<<<<<<<<<<<<<
+ * elif t == NPY_OBJECT: f = "O"
+ * else:
*/
- __Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 783, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_r = __pyx_t_1;
- __pyx_t_1 = 0;
- goto __pyx_L0;
+ case NPY_CLONGDOUBLE:
+ __pyx_v_f = ((char *)"Zg");
+ break;
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":782
- * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
- *
- * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<<
- * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":276
+ * elif t == NPY_CDOUBLE: f = "Zd"
+ * elif t == NPY_CLONGDOUBLE: f = "Zg"
+ * elif t == NPY_OBJECT: f = "O" # <<<<<<<<<<<<<<
+ * else:
+ * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
+ */
+ case NPY_OBJECT:
+ __pyx_v_f = ((char *)"O");
+ break;
+ default:
+
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":278
+ * elif t == NPY_OBJECT: f = "O"
+ * else:
+ * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<<
+ * info.format = f
+ * return
+ */
+ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 278, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_6 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 278, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 278, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6);
+ __pyx_t_6 = 0;
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 278, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_Raise(__pyx_t_6, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __PYX_ERR(1, 278, __pyx_L1_error)
+ break;
+ }
+
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":279
+ * else:
+ * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
+ * info.format = f # <<<<<<<<<<<<<<
+ * return
+ * else:
+ */
+ __pyx_v_info->format = __pyx_v_f;
+
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":280
+ * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
+ * info.format = f
+ * return # <<<<<<<<<<<<<<
+ * else:
+ * info.format = <char*>stdlib.malloc(_buffer_format_string_len)
+ */
+ __pyx_r = 0;
+ goto __pyx_L0;
+
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":255
+ * info.obj = self
+ *
+ * if not hasfields: # <<<<<<<<<<<<<<
+ * t = descr.type_num
+ * if ((descr.byteorder == c'>' and little_endian) or
+ */
+ }
+
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":282
+ * return
+ * else:
+ * info.format = <char*>stdlib.malloc(_buffer_format_string_len) # <<<<<<<<<<<<<<
+ * info.format[0] = c'^' # Native data types, manual alignment
+ * offset = 0
+ */
+ /*else*/ {
+ __pyx_v_info->format = ((char *)malloc(0xFF));
+
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":283
+ * else:
+ * info.format = <char*>stdlib.malloc(_buffer_format_string_len)
+ * info.format[0] = c'^' # Native data types, manual alignment # <<<<<<<<<<<<<<
+ * offset = 0
+ * f = _util_dtypestring(descr, info.format + 1,
+ */
+ (__pyx_v_info->format[0]) = '^';
+
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":284
+ * info.format = <char*>stdlib.malloc(_buffer_format_string_len)
+ * info.format[0] = c'^' # Native data types, manual alignment
+ * offset = 0 # <<<<<<<<<<<<<<
+ * f = _util_dtypestring(descr, info.format + 1,
+ * info.format + _buffer_format_string_len,
+ */
+ __pyx_v_offset = 0;
+
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":285
+ * info.format[0] = c'^' # Native data types, manual alignment
+ * offset = 0
+ * f = _util_dtypestring(descr, info.format + 1, # <<<<<<<<<<<<<<
+ * info.format + _buffer_format_string_len,
+ * &offset)
+ */
+ __pyx_t_7 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 0xFF), (&__pyx_v_offset)); if (unlikely(__pyx_t_7 == NULL)) __PYX_ERR(1, 285, __pyx_L1_error)
+ __pyx_v_f = __pyx_t_7;
+
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":288
+ * info.format + _buffer_format_string_len,
+ * &offset)
+ * f[0] = c'\0' # Terminate format string # <<<<<<<<<<<<<<
*
+ * def __releasebuffer__(ndarray self, Py_buffer* info):
+ */
+ (__pyx_v_f[0]) = '\x00';
+ }
+
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":197
+ * # experimental exception made for __getbuffer__ and __releasebuffer__
+ * # -- the details of this may change.
+ * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<<
+ * # This implementation of getbuffer is geared towards Cython
+ * # requirements, and does not yet fullfill the PEP.
*/
/* function exit code */
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
- __Pyx_AddTraceback("numpy.PyArray_MultiIterNew5", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = 0;
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_AddTraceback("numpy.ndarray.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = -1;
+ if (__pyx_v_info != NULL && __pyx_v_info->obj != NULL) {
+ __Pyx_GOTREF(__pyx_v_info->obj);
+ __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = NULL;
+ }
+ goto __pyx_L2;
__pyx_L0:;
- __Pyx_XGIVEREF(__pyx_r);
+ if (__pyx_v_info != NULL && __pyx_v_info->obj == Py_None) {
+ __Pyx_GOTREF(Py_None);
+ __Pyx_DECREF(Py_None); __pyx_v_info->obj = NULL;
+ }
+ __pyx_L2:;
+ __Pyx_XDECREF((PyObject *)__pyx_v_descr);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":785
- * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
+/* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":290
+ * f[0] = c'\0' # Terminate format string
*
- * 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.
+ * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<<
+ * if PyArray_HASFIELDS(self):
+ * stdlib.free(info.format)
*/
-static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_descr, char *__pyx_v_f, char *__pyx_v_end, int *__pyx_v_offset) {
- PyArray_Descr *__pyx_v_child = 0;
- int __pyx_v_endian_detector;
- int __pyx_v_little_endian;
- PyObject *__pyx_v_fields = 0;
- PyObject *__pyx_v_childname = NULL;
- PyObject *__pyx_v_new_offset = NULL;
- PyObject *__pyx_v_t = NULL;
- char *__pyx_r;
+/* Python wrapper */
+static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info); /*proto*/
+static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info) {
__Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
- Py_ssize_t __pyx_t_2;
- PyObject *__pyx_t_3 = NULL;
- PyObject *__pyx_t_4 = NULL;
- int __pyx_t_5;
- int __pyx_t_6;
- int __pyx_t_7;
- long __pyx_t_8;
- char *__pyx_t_9;
- __Pyx_RefNannySetupContext("_util_dtypestring", 0);
+ __Pyx_RefNannySetupContext("__releasebuffer__ (wrapper)", 0);
+ __pyx_pf_5numpy_7ndarray_2__releasebuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info));
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":790
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+}
+
+static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info) {
+ __Pyx_RefNannyDeclarations
+ int __pyx_t_1;
+ __Pyx_RefNannySetupContext("__releasebuffer__", 0);
+
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":291
*
- * cdef dtype child
- * cdef int endian_detector = 1 # <<<<<<<<<<<<<<
- * cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
- * cdef tuple fields
+ * def __releasebuffer__(ndarray self, Py_buffer* info):
+ * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<<
+ * stdlib.free(info.format)
+ * if sizeof(npy_intp) != sizeof(Py_ssize_t):
*/
- __pyx_v_endian_detector = 1;
+ __pyx_t_1 = (PyArray_HASFIELDS(__pyx_v_self) != 0);
+ if (__pyx_t_1) {
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":791
- * cdef dtype child
- * cdef int endian_detector = 1
- * cdef bint little_endian = ((<char*>&endian_detector)[0] != 0) # <<<<<<<<<<<<<<
- * cdef tuple fields
- *
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":292
+ * def __releasebuffer__(ndarray self, Py_buffer* info):
+ * if PyArray_HASFIELDS(self):
+ * stdlib.free(info.format) # <<<<<<<<<<<<<<
+ * if sizeof(npy_intp) != sizeof(Py_ssize_t):
+ * stdlib.free(info.strides)
*/
- __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0);
+ free(__pyx_v_info->format);
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":794
- * cdef tuple fields
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":291
*
- * for childname in descr.names: # <<<<<<<<<<<<<<
- * fields = descr.fields[childname]
- * child, new_offset = fields
+ * def __releasebuffer__(ndarray self, Py_buffer* info):
+ * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<<
+ * stdlib.free(info.format)
+ * if sizeof(npy_intp) != sizeof(Py_ssize_t):
*/
- if (unlikely(__pyx_v_descr->names == Py_None)) {
- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
- __PYX_ERR(1, 794, __pyx_L1_error)
}
- __pyx_t_1 = __pyx_v_descr->names; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
- for (;;) {
- if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(1, 794, __pyx_L1_error)
- #else
- __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 794, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- #endif
- __Pyx_XDECREF_SET(__pyx_v_childname, __pyx_t_3);
- __pyx_t_3 = 0;
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":795
- *
- * for childname in descr.names:
- * fields = descr.fields[childname] # <<<<<<<<<<<<<<
- * child, new_offset = fields
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":293
+ * if PyArray_HASFIELDS(self):
+ * stdlib.free(info.format)
+ * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<<
+ * stdlib.free(info.strides)
+ * # info.shape was stored after info.strides in the same block
+ */
+ __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0);
+ if (__pyx_t_1) {
+
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":294
+ * stdlib.free(info.format)
+ * if sizeof(npy_intp) != sizeof(Py_ssize_t):
+ * stdlib.free(info.strides) # <<<<<<<<<<<<<<
+ * # info.shape was stored after info.strides in the same block
*
*/
- if (unlikely(__pyx_v_descr->fields == Py_None)) {
- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
- __PYX_ERR(1, 795, __pyx_L1_error)
- }
- __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 795, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- if (!(likely(PyTuple_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(1, 795, __pyx_L1_error)
- __Pyx_XDECREF_SET(__pyx_v_fields, ((PyObject*)__pyx_t_3));
- __pyx_t_3 = 0;
+ free(__pyx_v_info->strides);
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":796
- * for childname in descr.names:
- * fields = descr.fields[childname]
- * child, new_offset = fields # <<<<<<<<<<<<<<
- *
- * if (end - f) - <int>(new_offset - offset[0]) < 15:
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":293
+ * if PyArray_HASFIELDS(self):
+ * stdlib.free(info.format)
+ * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<<
+ * stdlib.free(info.strides)
+ * # info.shape was stored after info.strides in the same block
*/
- if (likely(__pyx_v_fields != Py_None)) {
- PyObject* sequence = __pyx_v_fields;
- #if CYTHON_COMPILING_IN_CPYTHON
- Py_ssize_t size = Py_SIZE(sequence);
- #else
- Py_ssize_t size = PySequence_Size(sequence);
- #endif
- if (unlikely(size != 2)) {
- if (size > 2) __Pyx_RaiseTooManyValuesError(2);
- else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
- __PYX_ERR(1, 796, __pyx_L1_error)
- }
- #if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0);
- __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1);
- __Pyx_INCREF(__pyx_t_3);
- __Pyx_INCREF(__pyx_t_4);
- #else
- __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 796, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 796, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- #endif
- } else {
- __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(1, 796, __pyx_L1_error)
- }
- if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) __PYX_ERR(1, 796, __pyx_L1_error)
- __Pyx_XDECREF_SET(__pyx_v_child, ((PyArray_Descr *)__pyx_t_3));
- __pyx_t_3 = 0;
- __Pyx_XDECREF_SET(__pyx_v_new_offset, __pyx_t_4);
- __pyx_t_4 = 0;
+ }
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":798
- * child, new_offset = fields
- *
- * if (end - f) - <int>(new_offset - offset[0]) < 15: # <<<<<<<<<<<<<<
- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":290
+ * f[0] = c'\0' # Terminate format string
*
+ * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<<
+ * if PyArray_HASFIELDS(self):
+ * stdlib.free(info.format)
*/
- __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 798, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_3 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 798, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 798, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_6 = ((((__pyx_v_end - __pyx_v_f) - ((int)__pyx_t_5)) < 15) != 0);
- if (__pyx_t_6) {
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":799
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+}
+
+/* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":770
+ * ctypedef npy_cdouble complex_t
*
- * if (end - f) - <int>(new_offset - offset[0]) < 15:
- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<<
+ * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<<
+ * return PyArray_MultiIterNew(1, <void*>a)
*
- * if ((child.byteorder == c'>' and little_endian) or
*/
- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 799, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_Raise(__pyx_t_3, 0, 0, 0);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __PYX_ERR(1, 799, __pyx_L1_error)
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":798
- * child, new_offset = fields
+static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0);
+
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":771
*
- * if (end - f) - <int>(new_offset - offset[0]) < 15: # <<<<<<<<<<<<<<
- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
+ * cdef inline object PyArray_MultiIterNew1(a):
+ * return PyArray_MultiIterNew(1, <void*>a) # <<<<<<<<<<<<<<
*
+ * cdef inline object PyArray_MultiIterNew2(a, b):
*/
- }
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 771, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":801
- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":770
+ * ctypedef npy_cdouble complex_t
*
- * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
- * (child.byteorder == c'<' and not little_endian)):
- * raise ValueError(u"Non-native byte order not supported")
- */
- __pyx_t_7 = ((__pyx_v_child->byteorder == '>') != 0);
- if (!__pyx_t_7) {
- goto __pyx_L8_next_or;
- } else {
- }
- __pyx_t_7 = (__pyx_v_little_endian != 0);
- if (!__pyx_t_7) {
- } else {
- __pyx_t_6 = __pyx_t_7;
- goto __pyx_L7_bool_binop_done;
- }
- __pyx_L8_next_or:;
-
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":802
+ * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<<
+ * return PyArray_MultiIterNew(1, <void*>a)
*
- * if ((child.byteorder == c'>' and little_endian) or
- * (child.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<<
- * raise ValueError(u"Non-native byte order not supported")
- * # One could encode it in the format string and have Cython
*/
- __pyx_t_7 = ((__pyx_v_child->byteorder == '<') != 0);
- if (__pyx_t_7) {
- } else {
- __pyx_t_6 = __pyx_t_7;
- goto __pyx_L7_bool_binop_done;
- }
- __pyx_t_7 = ((!(__pyx_v_little_endian != 0)) != 0);
- __pyx_t_6 = __pyx_t_7;
- __pyx_L7_bool_binop_done:;
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":801
- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("numpy.PyArray_MultiIterNew1", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = 0;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":773
+ * return PyArray_MultiIterNew(1, <void*>a)
+ *
+ * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<<
+ * return PyArray_MultiIterNew(2, <void*>a, <void*>b)
*
- * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
- * (child.byteorder == c'<' and not little_endian)):
- * raise ValueError(u"Non-native byte order not supported")
*/
- if (__pyx_t_6) {
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":803
- * if ((child.byteorder == c'>' and little_endian) or
- * (child.byteorder == c'<' and not little_endian)):
- * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<<
- * # One could encode it in the format string and have Cython
- * # complain instead, BUT: < and > in format strings also imply
- */
- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 803, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_Raise(__pyx_t_3, 0, 0, 0);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __PYX_ERR(1, 803, __pyx_L1_error)
+static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0);
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":801
- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":774
*
- * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
- * (child.byteorder == c'<' and not little_endian)):
- * raise ValueError(u"Non-native byte order not supported")
+ * cdef inline object PyArray_MultiIterNew2(a, b):
+ * return PyArray_MultiIterNew(2, <void*>a, <void*>b) # <<<<<<<<<<<<<<
+ *
+ * cdef inline object PyArray_MultiIterNew3(a, b, c):
*/
- }
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 774, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":813
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":773
+ * return PyArray_MultiIterNew(1, <void*>a)
+ *
+ * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<<
+ * return PyArray_MultiIterNew(2, <void*>a, <void*>b)
*
- * # Output padding bytes
- * while offset[0] < new_offset: # <<<<<<<<<<<<<<
- * f[0] = 120 # "x"; pad byte
- * f += 1
*/
- while (1) {
- __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 813, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_v_new_offset, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 813, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 813, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (!__pyx_t_6) break;
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":814
- * # Output padding bytes
- * while offset[0] < new_offset:
- * f[0] = 120 # "x"; pad byte # <<<<<<<<<<<<<<
- * f += 1
- * offset[0] += 1
- */
- (__pyx_v_f[0]) = 0x78;
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("numpy.PyArray_MultiIterNew2", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = 0;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":815
- * while offset[0] < new_offset:
- * f[0] = 120 # "x"; pad byte
- * f += 1 # <<<<<<<<<<<<<<
- * offset[0] += 1
+/* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":776
+ * return PyArray_MultiIterNew(2, <void*>a, <void*>b)
*
- */
- __pyx_v_f = (__pyx_v_f + 1);
-
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":816
- * f[0] = 120 # "x"; pad byte
- * f += 1
- * offset[0] += 1 # <<<<<<<<<<<<<<
+ * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<<
+ * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
*
- * offset[0] += child.itemsize
*/
- __pyx_t_8 = 0;
- (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + 1);
- }
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":818
- * offset[0] += 1
+static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0);
+
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":777
*
- * offset[0] += child.itemsize # <<<<<<<<<<<<<<
+ * cdef inline object PyArray_MultiIterNew3(a, b, c):
+ * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c) # <<<<<<<<<<<<<<
*
- * if not PyDataType_HASFIELDS(child):
+ * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
*/
- __pyx_t_8 = 0;
- (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + __pyx_v_child->elsize);
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 777, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":820
- * offset[0] += child.itemsize
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":776
+ * return PyArray_MultiIterNew(2, <void*>a, <void*>b)
*
- * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<<
- * t = child.type_num
- * if end - f < 5:
- */
- __pyx_t_6 = ((!(PyDataType_HASFIELDS(__pyx_v_child) != 0)) != 0);
- if (__pyx_t_6) {
-
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":821
+ * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<<
+ * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
*
- * if not PyDataType_HASFIELDS(child):
- * t = child.type_num # <<<<<<<<<<<<<<
- * if end - f < 5:
- * raise RuntimeError(u"Format string allocated too short.")
*/
- __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_child->type_num); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 821, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_4);
- __pyx_t_4 = 0;
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":822
- * if not PyDataType_HASFIELDS(child):
- * t = child.type_num
- * if end - f < 5: # <<<<<<<<<<<<<<
- * raise RuntimeError(u"Format string allocated too short.")
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("numpy.PyArray_MultiIterNew3", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = 0;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":779
+ * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
+ *
+ * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<<
+ * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
*
*/
- __pyx_t_6 = (((__pyx_v_end - __pyx_v_f) < 5) != 0);
- if (__pyx_t_6) {
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":823
- * t = child.type_num
- * if end - f < 5:
- * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<<
+static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0);
+
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":780
*
- * # Until ticket #99 is fixed, use integers to avoid warnings
+ * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
+ * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d) # <<<<<<<<<<<<<<
+ *
+ * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
*/
- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 823, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_Raise(__pyx_t_4, 0, 0, 0);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __PYX_ERR(1, 823, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 780, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":822
- * if not PyDataType_HASFIELDS(child):
- * t = child.type_num
- * if end - f < 5: # <<<<<<<<<<<<<<
- * raise RuntimeError(u"Format string allocated too short.")
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":779
+ * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
+ *
+ * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<<
+ * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
*
*/
- }
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":826
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("numpy.PyArray_MultiIterNew4", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = 0;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":782
+ * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
+ *
+ * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<<
+ * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
*
- * # Until ticket #99 is fixed, use integers to avoid warnings
- * if t == NPY_BYTE: f[0] = 98 #"b" # <<<<<<<<<<<<<<
- * elif t == NPY_UBYTE: f[0] = 66 #"B"
- * elif t == NPY_SHORT: f[0] = 104 #"h"
*/
- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_BYTE); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 826, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 826, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 826, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- if (__pyx_t_6) {
- (__pyx_v_f[0]) = 98;
- goto __pyx_L15;
- }
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":827
- * # Until ticket #99 is fixed, use integers to avoid warnings
- * if t == NPY_BYTE: f[0] = 98 #"b"
- * elif t == NPY_UBYTE: f[0] = 66 #"B" # <<<<<<<<<<<<<<
- * elif t == NPY_SHORT: f[0] = 104 #"h"
- * elif t == NPY_USHORT: f[0] = 72 #"H"
- */
- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UBYTE); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 827, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 827, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 827, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (__pyx_t_6) {
- (__pyx_v_f[0]) = 66;
- goto __pyx_L15;
- }
+static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d, PyObject *__pyx_v_e) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0);
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":828
- * if t == NPY_BYTE: f[0] = 98 #"b"
- * elif t == NPY_UBYTE: f[0] = 66 #"B"
- * elif t == NPY_SHORT: f[0] = 104 #"h" # <<<<<<<<<<<<<<
- * elif t == NPY_USHORT: f[0] = 72 #"H"
- * elif t == NPY_INT: f[0] = 105 #"i"
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":783
+ *
+ * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
+ * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e) # <<<<<<<<<<<<<<
+ *
+ * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL:
*/
- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_SHORT); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 828, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 828, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 828, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- if (__pyx_t_6) {
- (__pyx_v_f[0]) = 0x68;
- goto __pyx_L15;
- }
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 783, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":829
- * elif t == NPY_UBYTE: f[0] = 66 #"B"
- * elif t == NPY_SHORT: f[0] = 104 #"h"
- * elif t == NPY_USHORT: f[0] = 72 #"H" # <<<<<<<<<<<<<<
- * elif t == NPY_INT: f[0] = 105 #"i"
- * elif t == NPY_UINT: f[0] = 73 #"I"
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":782
+ * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
+ *
+ * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<<
+ * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
+ *
*/
- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_USHORT); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 829, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 829, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 829, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (__pyx_t_6) {
- (__pyx_v_f[0]) = 72;
- goto __pyx_L15;
- }
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":830
- * elif t == NPY_SHORT: f[0] = 104 #"h"
- * elif t == NPY_USHORT: f[0] = 72 #"H"
- * elif t == NPY_INT: f[0] = 105 #"i" # <<<<<<<<<<<<<<
- * elif t == NPY_UINT: f[0] = 73 #"I"
- * elif t == NPY_LONG: f[0] = 108 #"l"
- */
- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_INT); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 830, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 830, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 830, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- if (__pyx_t_6) {
- (__pyx_v_f[0]) = 0x69;
- goto __pyx_L15;
- }
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("numpy.PyArray_MultiIterNew5", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = 0;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":831
- * elif t == NPY_USHORT: f[0] = 72 #"H"
- * elif t == NPY_INT: f[0] = 105 #"i"
- * elif t == NPY_UINT: f[0] = 73 #"I" # <<<<<<<<<<<<<<
- * elif t == NPY_LONG: f[0] = 108 #"l"
- * elif t == NPY_ULONG: f[0] = 76 #"L"
+/* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":785
+ * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
+ *
+ * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<<
+ * # Recursive utility function used in __getbuffer__ to get format
+ * # string. The new location in the format string is returned.
*/
- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UINT); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 831, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 831, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 831, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (__pyx_t_6) {
- (__pyx_v_f[0]) = 73;
- goto __pyx_L15;
- }
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":832
+static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_descr, char *__pyx_v_f, char *__pyx_v_end, int *__pyx_v_offset) {
+ PyArray_Descr *__pyx_v_child = 0;
+ int __pyx_v_endian_detector;
+ int __pyx_v_little_endian;
+ PyObject *__pyx_v_fields = 0;
+ PyObject *__pyx_v_childname = NULL;
+ PyObject *__pyx_v_new_offset = NULL;
+ PyObject *__pyx_v_t = NULL;
+ char *__pyx_r;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ Py_ssize_t __pyx_t_2;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ int __pyx_t_5;
+ int __pyx_t_6;
+ int __pyx_t_7;
+ long __pyx_t_8;
+ char *__pyx_t_9;
+ __Pyx_RefNannySetupContext("_util_dtypestring", 0);
+
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":790
+ *
+ * cdef dtype child
+ * cdef int endian_detector = 1 # <<<<<<<<<<<<<<
+ * cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
+ * cdef tuple fields
+ */
+ __pyx_v_endian_detector = 1;
+
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":791
+ * cdef dtype child
+ * cdef int endian_detector = 1
+ * cdef bint little_endian = ((<char*>&endian_detector)[0] != 0) # <<<<<<<<<<<<<<
+ * cdef tuple fields
+ *
+ */
+ __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0);
+
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":794
+ * cdef tuple fields
+ *
+ * for childname in descr.names: # <<<<<<<<<<<<<<
+ * fields = descr.fields[childname]
+ * child, new_offset = fields
+ */
+ if (unlikely(__pyx_v_descr->names == Py_None)) {
+ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
+ __PYX_ERR(1, 794, __pyx_L1_error)
+ }
+ __pyx_t_1 = __pyx_v_descr->names; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
+ for (;;) {
+ if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(1, 794, __pyx_L1_error)
+ #else
+ __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 794, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ #endif
+ __Pyx_XDECREF_SET(__pyx_v_childname, __pyx_t_3);
+ __pyx_t_3 = 0;
+
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":795
+ *
+ * for childname in descr.names:
+ * fields = descr.fields[childname] # <<<<<<<<<<<<<<
+ * child, new_offset = fields
+ *
+ */
+ if (unlikely(__pyx_v_descr->fields == Py_None)) {
+ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
+ __PYX_ERR(1, 795, __pyx_L1_error)
+ }
+ __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 795, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ if (!(likely(PyTuple_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(1, 795, __pyx_L1_error)
+ __Pyx_XDECREF_SET(__pyx_v_fields, ((PyObject*)__pyx_t_3));
+ __pyx_t_3 = 0;
+
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":796
+ * for childname in descr.names:
+ * fields = descr.fields[childname]
+ * child, new_offset = fields # <<<<<<<<<<<<<<
+ *
+ * if (end - f) - <int>(new_offset - offset[0]) < 15:
+ */
+ if (likely(__pyx_v_fields != Py_None)) {
+ PyObject* sequence = __pyx_v_fields;
+ #if !CYTHON_COMPILING_IN_PYPY
+ Py_ssize_t size = Py_SIZE(sequence);
+ #else
+ Py_ssize_t size = PySequence_Size(sequence);
+ #endif
+ if (unlikely(size != 2)) {
+ if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+ else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+ __PYX_ERR(1, 796, __pyx_L1_error)
+ }
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0);
+ __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_4);
+ #else
+ __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 796, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 796, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ #endif
+ } else {
+ __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(1, 796, __pyx_L1_error)
+ }
+ if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) __PYX_ERR(1, 796, __pyx_L1_error)
+ __Pyx_XDECREF_SET(__pyx_v_child, ((PyArray_Descr *)__pyx_t_3));
+ __pyx_t_3 = 0;
+ __Pyx_XDECREF_SET(__pyx_v_new_offset, __pyx_t_4);
+ __pyx_t_4 = 0;
+
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":798
+ * child, new_offset = fields
+ *
+ * if (end - f) - <int>(new_offset - offset[0]) < 15: # <<<<<<<<<<<<<<
+ * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
+ *
+ */
+ __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 798, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_3 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 798, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 798, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_6 = ((((__pyx_v_end - __pyx_v_f) - ((int)__pyx_t_5)) < 15) != 0);
+ if (__pyx_t_6) {
+
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":799
+ *
+ * if (end - f) - <int>(new_offset - offset[0]) < 15:
+ * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<<
+ *
+ * if ((child.byteorder == c'>' and little_endian) or
+ */
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 799, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __PYX_ERR(1, 799, __pyx_L1_error)
+
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":798
+ * child, new_offset = fields
+ *
+ * if (end - f) - <int>(new_offset - offset[0]) < 15: # <<<<<<<<<<<<<<
+ * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
+ *
+ */
+ }
+
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":801
+ * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
+ *
+ * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
+ * (child.byteorder == c'<' and not little_endian)):
+ * raise ValueError(u"Non-native byte order not supported")
+ */
+ __pyx_t_7 = ((__pyx_v_child->byteorder == '>') != 0);
+ if (!__pyx_t_7) {
+ goto __pyx_L8_next_or;
+ } else {
+ }
+ __pyx_t_7 = (__pyx_v_little_endian != 0);
+ if (!__pyx_t_7) {
+ } else {
+ __pyx_t_6 = __pyx_t_7;
+ goto __pyx_L7_bool_binop_done;
+ }
+ __pyx_L8_next_or:;
+
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":802
+ *
+ * if ((child.byteorder == c'>' and little_endian) or
+ * (child.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<<
+ * raise ValueError(u"Non-native byte order not supported")
+ * # One could encode it in the format string and have Cython
+ */
+ __pyx_t_7 = ((__pyx_v_child->byteorder == '<') != 0);
+ if (__pyx_t_7) {
+ } else {
+ __pyx_t_6 = __pyx_t_7;
+ goto __pyx_L7_bool_binop_done;
+ }
+ __pyx_t_7 = ((!(__pyx_v_little_endian != 0)) != 0);
+ __pyx_t_6 = __pyx_t_7;
+ __pyx_L7_bool_binop_done:;
+
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":801
+ * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
+ *
+ * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
+ * (child.byteorder == c'<' and not little_endian)):
+ * raise ValueError(u"Non-native byte order not supported")
+ */
+ if (__pyx_t_6) {
+
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":803
+ * if ((child.byteorder == c'>' and little_endian) or
+ * (child.byteorder == c'<' and not little_endian)):
+ * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<<
+ * # One could encode it in the format string and have Cython
+ * # complain instead, BUT: < and > in format strings also imply
+ */
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 803, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __PYX_ERR(1, 803, __pyx_L1_error)
+
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":801
+ * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
+ *
+ * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
+ * (child.byteorder == c'<' and not little_endian)):
+ * raise ValueError(u"Non-native byte order not supported")
+ */
+ }
+
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":813
+ *
+ * # Output padding bytes
+ * while offset[0] < new_offset: # <<<<<<<<<<<<<<
+ * f[0] = 120 # "x"; pad byte
+ * f += 1
+ */
+ while (1) {
+ __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 813, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_v_new_offset, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 813, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 813, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ if (!__pyx_t_6) break;
+
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":814
+ * # Output padding bytes
+ * while offset[0] < new_offset:
+ * f[0] = 120 # "x"; pad byte # <<<<<<<<<<<<<<
+ * f += 1
+ * offset[0] += 1
+ */
+ (__pyx_v_f[0]) = 0x78;
+
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":815
+ * while offset[0] < new_offset:
+ * f[0] = 120 # "x"; pad byte
+ * f += 1 # <<<<<<<<<<<<<<
+ * offset[0] += 1
+ *
+ */
+ __pyx_v_f = (__pyx_v_f + 1);
+
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":816
+ * f[0] = 120 # "x"; pad byte
+ * f += 1
+ * offset[0] += 1 # <<<<<<<<<<<<<<
+ *
+ * offset[0] += child.itemsize
+ */
+ __pyx_t_8 = 0;
+ (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + 1);
+ }
+
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":818
+ * offset[0] += 1
+ *
+ * offset[0] += child.itemsize # <<<<<<<<<<<<<<
+ *
+ * if not PyDataType_HASFIELDS(child):
+ */
+ __pyx_t_8 = 0;
+ (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + __pyx_v_child->elsize);
+
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":820
+ * offset[0] += child.itemsize
+ *
+ * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<<
+ * t = child.type_num
+ * if end - f < 5:
+ */
+ __pyx_t_6 = ((!(PyDataType_HASFIELDS(__pyx_v_child) != 0)) != 0);
+ if (__pyx_t_6) {
+
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":821
+ *
+ * if not PyDataType_HASFIELDS(child):
+ * t = child.type_num # <<<<<<<<<<<<<<
+ * if end - f < 5:
+ * raise RuntimeError(u"Format string allocated too short.")
+ */
+ __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_child->type_num); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 821, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_4);
+ __pyx_t_4 = 0;
+
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":822
+ * if not PyDataType_HASFIELDS(child):
+ * t = child.type_num
+ * if end - f < 5: # <<<<<<<<<<<<<<
+ * raise RuntimeError(u"Format string allocated too short.")
+ *
+ */
+ __pyx_t_6 = (((__pyx_v_end - __pyx_v_f) < 5) != 0);
+ if (__pyx_t_6) {
+
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":823
+ * t = child.type_num
+ * if end - f < 5:
+ * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<<
+ *
+ * # Until ticket #99 is fixed, use integers to avoid warnings
+ */
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 823, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_Raise(__pyx_t_4, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __PYX_ERR(1, 823, __pyx_L1_error)
+
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":822
+ * if not PyDataType_HASFIELDS(child):
+ * t = child.type_num
+ * if end - f < 5: # <<<<<<<<<<<<<<
+ * raise RuntimeError(u"Format string allocated too short.")
+ *
+ */
+ }
+
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":826
+ *
+ * # Until ticket #99 is fixed, use integers to avoid warnings
+ * if t == NPY_BYTE: f[0] = 98 #"b" # <<<<<<<<<<<<<<
+ * elif t == NPY_UBYTE: f[0] = 66 #"B"
+ * elif t == NPY_SHORT: f[0] = 104 #"h"
+ */
+ __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_BYTE); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 826, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 826, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 826, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (__pyx_t_6) {
+ (__pyx_v_f[0]) = 98;
+ goto __pyx_L15;
+ }
+
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":827
+ * # Until ticket #99 is fixed, use integers to avoid warnings
+ * if t == NPY_BYTE: f[0] = 98 #"b"
+ * elif t == NPY_UBYTE: f[0] = 66 #"B" # <<<<<<<<<<<<<<
+ * elif t == NPY_SHORT: f[0] = 104 #"h"
+ * elif t == NPY_USHORT: f[0] = 72 #"H"
+ */
+ __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UBYTE); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 827, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 827, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 827, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ if (__pyx_t_6) {
+ (__pyx_v_f[0]) = 66;
+ goto __pyx_L15;
+ }
+
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":828
+ * if t == NPY_BYTE: f[0] = 98 #"b"
+ * elif t == NPY_UBYTE: f[0] = 66 #"B"
+ * elif t == NPY_SHORT: f[0] = 104 #"h" # <<<<<<<<<<<<<<
+ * elif t == NPY_USHORT: f[0] = 72 #"H"
+ * elif t == NPY_INT: f[0] = 105 #"i"
+ */
+ __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_SHORT); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 828, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 828, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 828, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (__pyx_t_6) {
+ (__pyx_v_f[0]) = 0x68;
+ goto __pyx_L15;
+ }
+
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":829
+ * elif t == NPY_UBYTE: f[0] = 66 #"B"
+ * elif t == NPY_SHORT: f[0] = 104 #"h"
+ * elif t == NPY_USHORT: f[0] = 72 #"H" # <<<<<<<<<<<<<<
+ * elif t == NPY_INT: f[0] = 105 #"i"
+ * elif t == NPY_UINT: f[0] = 73 #"I"
+ */
+ __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_USHORT); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 829, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 829, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 829, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ if (__pyx_t_6) {
+ (__pyx_v_f[0]) = 72;
+ goto __pyx_L15;
+ }
+
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":830
+ * elif t == NPY_SHORT: f[0] = 104 #"h"
+ * elif t == NPY_USHORT: f[0] = 72 #"H"
+ * elif t == NPY_INT: f[0] = 105 #"i" # <<<<<<<<<<<<<<
+ * elif t == NPY_UINT: f[0] = 73 #"I"
+ * elif t == NPY_LONG: f[0] = 108 #"l"
+ */
+ __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_INT); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 830, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 830, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 830, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (__pyx_t_6) {
+ (__pyx_v_f[0]) = 0x69;
+ goto __pyx_L15;
+ }
+
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":831
+ * elif t == NPY_USHORT: f[0] = 72 #"H"
+ * elif t == NPY_INT: f[0] = 105 #"i"
+ * elif t == NPY_UINT: f[0] = 73 #"I" # <<<<<<<<<<<<<<
+ * elif t == NPY_LONG: f[0] = 108 #"l"
+ * elif t == NPY_ULONG: f[0] = 76 #"L"
+ */
+ __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UINT); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 831, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 831, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 831, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ if (__pyx_t_6) {
+ (__pyx_v_f[0]) = 73;
+ goto __pyx_L15;
+ }
+
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":832
* elif t == NPY_INT: f[0] = 105 #"i"
* elif t == NPY_UINT: f[0] = 73 #"I"
* elif t == NPY_LONG: f[0] = 108 #"l" # <<<<<<<<<<<<<<
* elif t == NPY_ULONG: f[0] = 76 #"L"
* elif t == NPY_LONGLONG: f[0] = 113 #"q"
*/
- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 832, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 832, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 832, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- if (__pyx_t_6) {
- (__pyx_v_f[0]) = 0x6C;
- goto __pyx_L15;
- }
+ __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 832, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 832, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 832, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (__pyx_t_6) {
+ (__pyx_v_f[0]) = 0x6C;
+ goto __pyx_L15;
+ }
+
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":833
+ * elif t == NPY_UINT: f[0] = 73 #"I"
+ * elif t == NPY_LONG: f[0] = 108 #"l"
+ * elif t == NPY_ULONG: f[0] = 76 #"L" # <<<<<<<<<<<<<<
+ * elif t == NPY_LONGLONG: f[0] = 113 #"q"
+ * elif t == NPY_ULONGLONG: f[0] = 81 #"Q"
+ */
+ __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 833, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 833, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 833, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ if (__pyx_t_6) {
+ (__pyx_v_f[0]) = 76;
+ goto __pyx_L15;
+ }
+
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":834
+ * elif t == NPY_LONG: f[0] = 108 #"l"
+ * elif t == NPY_ULONG: f[0] = 76 #"L"
+ * elif t == NPY_LONGLONG: f[0] = 113 #"q" # <<<<<<<<<<<<<<
+ * elif t == NPY_ULONGLONG: f[0] = 81 #"Q"
+ * elif t == NPY_FLOAT: f[0] = 102 #"f"
+ */
+ __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGLONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 834, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 834, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 834, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (__pyx_t_6) {
+ (__pyx_v_f[0]) = 0x71;
+ goto __pyx_L15;
+ }
+
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":835
+ * elif t == NPY_ULONG: f[0] = 76 #"L"
+ * elif t == NPY_LONGLONG: f[0] = 113 #"q"
+ * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" # <<<<<<<<<<<<<<
+ * elif t == NPY_FLOAT: f[0] = 102 #"f"
+ * elif t == NPY_DOUBLE: f[0] = 100 #"d"
+ */
+ __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONGLONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 835, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 835, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 835, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ if (__pyx_t_6) {
+ (__pyx_v_f[0]) = 81;
+ goto __pyx_L15;
+ }
+
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":836
+ * elif t == NPY_LONGLONG: f[0] = 113 #"q"
+ * elif t == NPY_ULONGLONG: f[0] = 81 #"Q"
+ * elif t == NPY_FLOAT: f[0] = 102 #"f" # <<<<<<<<<<<<<<
+ * elif t == NPY_DOUBLE: f[0] = 100 #"d"
+ * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g"
+ */
+ __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_FLOAT); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 836, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 836, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 836, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (__pyx_t_6) {
+ (__pyx_v_f[0]) = 0x66;
+ goto __pyx_L15;
+ }
+
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":837
+ * elif t == NPY_ULONGLONG: f[0] = 81 #"Q"
+ * elif t == NPY_FLOAT: f[0] = 102 #"f"
+ * elif t == NPY_DOUBLE: f[0] = 100 #"d" # <<<<<<<<<<<<<<
+ * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g"
+ * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf
+ */
+ __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_DOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 837, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 837, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 837, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ if (__pyx_t_6) {
+ (__pyx_v_f[0]) = 0x64;
+ goto __pyx_L15;
+ }
+
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":838
+ * elif t == NPY_FLOAT: f[0] = 102 #"f"
+ * elif t == NPY_DOUBLE: f[0] = 100 #"d"
+ * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" # <<<<<<<<<<<<<<
+ * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf
+ * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd
+ */
+ __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 838, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 838, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 838, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (__pyx_t_6) {
+ (__pyx_v_f[0]) = 0x67;
+ goto __pyx_L15;
+ }
+
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":839
+ * elif t == NPY_DOUBLE: f[0] = 100 #"d"
+ * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g"
+ * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf # <<<<<<<<<<<<<<
+ * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd
+ * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
+ */
+ __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CFLOAT); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 839, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 839, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 839, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ if (__pyx_t_6) {
+ (__pyx_v_f[0]) = 90;
+ (__pyx_v_f[1]) = 0x66;
+ __pyx_v_f = (__pyx_v_f + 1);
+ goto __pyx_L15;
+ }
+
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":840
+ * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g"
+ * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf
+ * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd # <<<<<<<<<<<<<<
+ * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
+ * elif t == NPY_OBJECT: f[0] = 79 #"O"
+ */
+ __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 840, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 840, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 840, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (__pyx_t_6) {
+ (__pyx_v_f[0]) = 90;
+ (__pyx_v_f[1]) = 0x64;
+ __pyx_v_f = (__pyx_v_f + 1);
+ goto __pyx_L15;
+ }
+
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":841
+ * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf
+ * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd
+ * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg # <<<<<<<<<<<<<<
+ * elif t == NPY_OBJECT: f[0] = 79 #"O"
+ * else:
+ */
+ __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 841, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 841, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 841, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ if (__pyx_t_6) {
+ (__pyx_v_f[0]) = 90;
+ (__pyx_v_f[1]) = 0x67;
+ __pyx_v_f = (__pyx_v_f + 1);
+ goto __pyx_L15;
+ }
+
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":842
+ * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd
+ * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
+ * elif t == NPY_OBJECT: f[0] = 79 #"O" # <<<<<<<<<<<<<<
+ * else:
+ * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
+ */
+ __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_OBJECT); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 842, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 842, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 842, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (__pyx_t_6) {
+ (__pyx_v_f[0]) = 79;
+ goto __pyx_L15;
+ }
+
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":844
+ * elif t == NPY_OBJECT: f[0] = 79 #"O"
+ * else:
+ * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<<
+ * f += 1
+ * else:
+ */
+ /*else*/ {
+ __pyx_t_3 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 844, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 844, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
+ __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 844, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __PYX_ERR(1, 844, __pyx_L1_error)
+ }
+ __pyx_L15:;
+
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":845
+ * else:
+ * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
+ * f += 1 # <<<<<<<<<<<<<<
+ * else:
+ * # Cython ignores struct boundary information ("T{...}"),
+ */
+ __pyx_v_f = (__pyx_v_f + 1);
+
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":820
+ * offset[0] += child.itemsize
+ *
+ * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<<
+ * t = child.type_num
+ * if end - f < 5:
+ */
+ goto __pyx_L13;
+ }
+
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":849
+ * # Cython ignores struct boundary information ("T{...}"),
+ * # so don't output it
+ * f = _util_dtypestring(child, f, end, offset) # <<<<<<<<<<<<<<
+ * return f
+ *
+ */
+ /*else*/ {
+ __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_9 == NULL)) __PYX_ERR(1, 849, __pyx_L1_error)
+ __pyx_v_f = __pyx_t_9;
+ }
+ __pyx_L13:;
+
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":794
+ * cdef tuple fields
+ *
+ * for childname in descr.names: # <<<<<<<<<<<<<<
+ * fields = descr.fields[childname]
+ * child, new_offset = fields
+ */
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":850
+ * # so don't output it
+ * f = _util_dtypestring(child, f, end, offset)
+ * return f # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __pyx_r = __pyx_v_f;
+ goto __pyx_L0;
+
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":785
+ * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
+ *
+ * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<<
+ * # Recursive utility function used in __getbuffer__ to get format
+ * # string. The new location in the format string is returned.
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_AddTraceback("numpy._util_dtypestring", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF((PyObject *)__pyx_v_child);
+ __Pyx_XDECREF(__pyx_v_fields);
+ __Pyx_XDECREF(__pyx_v_childname);
+ __Pyx_XDECREF(__pyx_v_new_offset);
+ __Pyx_XDECREF(__pyx_v_t);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":966
+ *
+ *
+ * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<<
+ * cdef PyObject* baseptr
+ * if base is None:
+ */
+
+static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) {
+ PyObject *__pyx_v_baseptr;
+ __Pyx_RefNannyDeclarations
+ int __pyx_t_1;
+ int __pyx_t_2;
+ __Pyx_RefNannySetupContext("set_array_base", 0);
+
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":968
+ * cdef inline void set_array_base(ndarray arr, object base):
+ * cdef PyObject* baseptr
+ * if base is None: # <<<<<<<<<<<<<<
+ * baseptr = NULL
+ * else:
+ */
+ __pyx_t_1 = (__pyx_v_base == Py_None);
+ __pyx_t_2 = (__pyx_t_1 != 0);
+ if (__pyx_t_2) {
+
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":969
+ * cdef PyObject* baseptr
+ * if base is None:
+ * baseptr = NULL # <<<<<<<<<<<<<<
+ * else:
+ * Py_INCREF(base) # important to do this before decref below!
+ */
+ __pyx_v_baseptr = NULL;
+
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":968
+ * cdef inline void set_array_base(ndarray arr, object base):
+ * cdef PyObject* baseptr
+ * if base is None: # <<<<<<<<<<<<<<
+ * baseptr = NULL
+ * else:
+ */
+ goto __pyx_L3;
+ }
+
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":971
+ * baseptr = NULL
+ * else:
+ * Py_INCREF(base) # important to do this before decref below! # <<<<<<<<<<<<<<
+ * baseptr = <PyObject*>base
+ * Py_XDECREF(arr.base)
+ */
+ /*else*/ {
+ Py_INCREF(__pyx_v_base);
+
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":972
+ * else:
+ * Py_INCREF(base) # important to do this before decref below!
+ * baseptr = <PyObject*>base # <<<<<<<<<<<<<<
+ * Py_XDECREF(arr.base)
+ * arr.base = baseptr
+ */
+ __pyx_v_baseptr = ((PyObject *)__pyx_v_base);
+ }
+ __pyx_L3:;
+
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":973
+ * Py_INCREF(base) # important to do this before decref below!
+ * baseptr = <PyObject*>base
+ * Py_XDECREF(arr.base) # <<<<<<<<<<<<<<
+ * arr.base = baseptr
+ *
+ */
+ Py_XDECREF(__pyx_v_arr->base);
+
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":974
+ * baseptr = <PyObject*>base
+ * Py_XDECREF(arr.base)
+ * arr.base = baseptr # <<<<<<<<<<<<<<
+ *
+ * cdef inline object get_array_base(ndarray arr):
+ */
+ __pyx_v_arr->base = __pyx_v_baseptr;
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":833
- * elif t == NPY_UINT: f[0] = 73 #"I"
- * elif t == NPY_LONG: f[0] = 108 #"l"
- * elif t == NPY_ULONG: f[0] = 76 #"L" # <<<<<<<<<<<<<<
- * elif t == NPY_LONGLONG: f[0] = 113 #"q"
- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q"
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":966
+ *
+ *
+ * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<<
+ * cdef PyObject* baseptr
+ * if base is None:
*/
- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 833, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 833, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 833, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (__pyx_t_6) {
- (__pyx_v_f[0]) = 76;
- goto __pyx_L15;
- }
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":834
- * elif t == NPY_LONG: f[0] = 108 #"l"
- * elif t == NPY_ULONG: f[0] = 76 #"L"
- * elif t == NPY_LONGLONG: f[0] = 113 #"q" # <<<<<<<<<<<<<<
- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q"
- * elif t == NPY_FLOAT: f[0] = 102 #"f"
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+}
+
+/* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":976
+ * arr.base = baseptr
+ *
+ * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<<
+ * if arr.base is NULL:
+ * return None
*/
- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGLONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 834, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 834, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 834, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- if (__pyx_t_6) {
- (__pyx_v_f[0]) = 0x71;
- goto __pyx_L15;
- }
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":835
- * elif t == NPY_ULONG: f[0] = 76 #"L"
- * elif t == NPY_LONGLONG: f[0] = 113 #"q"
- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" # <<<<<<<<<<<<<<
- * elif t == NPY_FLOAT: f[0] = 102 #"f"
- * elif t == NPY_DOUBLE: f[0] = 100 #"d"
+static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__pyx_v_arr) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ int __pyx_t_1;
+ __Pyx_RefNannySetupContext("get_array_base", 0);
+
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":977
+ *
+ * cdef inline object get_array_base(ndarray arr):
+ * if arr.base is NULL: # <<<<<<<<<<<<<<
+ * return None
+ * else:
*/
- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONGLONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 835, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 835, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 835, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (__pyx_t_6) {
- (__pyx_v_f[0]) = 81;
- goto __pyx_L15;
- }
+ __pyx_t_1 = ((__pyx_v_arr->base == NULL) != 0);
+ if (__pyx_t_1) {
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":836
- * elif t == NPY_LONGLONG: f[0] = 113 #"q"
- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q"
- * elif t == NPY_FLOAT: f[0] = 102 #"f" # <<<<<<<<<<<<<<
- * elif t == NPY_DOUBLE: f[0] = 100 #"d"
- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g"
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":978
+ * cdef inline object get_array_base(ndarray arr):
+ * if arr.base is NULL:
+ * return None # <<<<<<<<<<<<<<
+ * else:
+ * return <object>arr.base
*/
- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_FLOAT); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 836, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 836, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 836, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- if (__pyx_t_6) {
- (__pyx_v_f[0]) = 0x66;
- goto __pyx_L15;
- }
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(Py_None);
+ __pyx_r = Py_None;
+ goto __pyx_L0;
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":837
- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q"
- * elif t == NPY_FLOAT: f[0] = 102 #"f"
- * elif t == NPY_DOUBLE: f[0] = 100 #"d" # <<<<<<<<<<<<<<
- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g"
- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":977
+ *
+ * cdef inline object get_array_base(ndarray arr):
+ * if arr.base is NULL: # <<<<<<<<<<<<<<
+ * return None
+ * else:
*/
- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_DOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 837, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 837, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 837, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (__pyx_t_6) {
- (__pyx_v_f[0]) = 0x64;
- goto __pyx_L15;
- }
+ }
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":838
- * elif t == NPY_FLOAT: f[0] = 102 #"f"
- * elif t == NPY_DOUBLE: f[0] = 100 #"d"
- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" # <<<<<<<<<<<<<<
- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf
- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":980
+ * return None
+ * else:
+ * return <object>arr.base # <<<<<<<<<<<<<<
+ *
+ *
*/
- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 838, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 838, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 838, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- if (__pyx_t_6) {
- (__pyx_v_f[0]) = 0x67;
- goto __pyx_L15;
- }
+ /*else*/ {
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(((PyObject *)__pyx_v_arr->base));
+ __pyx_r = ((PyObject *)__pyx_v_arr->base);
+ goto __pyx_L0;
+ }
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":839
- * elif t == NPY_DOUBLE: f[0] = 100 #"d"
- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g"
- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf # <<<<<<<<<<<<<<
- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd
- * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":976
+ * arr.base = baseptr
+ *
+ * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<<
+ * if arr.base is NULL:
+ * return None
*/
- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CFLOAT); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 839, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 839, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 839, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (__pyx_t_6) {
- (__pyx_v_f[0]) = 90;
- (__pyx_v_f[1]) = 0x66;
- __pyx_v_f = (__pyx_v_f + 1);
- goto __pyx_L15;
- }
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":840
- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g"
- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf
- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd # <<<<<<<<<<<<<<
- * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
- * elif t == NPY_OBJECT: f[0] = 79 #"O"
+ /* function exit code */
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":985
+ * # Versions of the import_* functions which are more suitable for
+ * # Cython code.
+ * cdef inline int import_array() except -1: # <<<<<<<<<<<<<<
+ * try:
+ * _import_array()
*/
- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 840, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 840, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 840, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- if (__pyx_t_6) {
- (__pyx_v_f[0]) = 90;
- (__pyx_v_f[1]) = 0x64;
- __pyx_v_f = (__pyx_v_f + 1);
- goto __pyx_L15;
- }
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":841
- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf
- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd
- * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg # <<<<<<<<<<<<<<
- * elif t == NPY_OBJECT: f[0] = 79 #"O"
- * else:
+static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ int __pyx_t_4;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *__pyx_t_7 = NULL;
+ PyObject *__pyx_t_8 = NULL;
+ __Pyx_RefNannySetupContext("import_array", 0);
+
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":986
+ * # Cython code.
+ * cdef inline int import_array() except -1:
+ * try: # <<<<<<<<<<<<<<
+ * _import_array()
+ * except Exception:
*/
- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 841, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 841, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 841, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (__pyx_t_6) {
- (__pyx_v_f[0]) = 90;
- (__pyx_v_f[1]) = 0x67;
- __pyx_v_f = (__pyx_v_f + 1);
- goto __pyx_L15;
- }
+ {
+ __Pyx_PyThreadState_declare
+ __Pyx_PyThreadState_assign
+ __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
+ __Pyx_XGOTREF(__pyx_t_1);
+ __Pyx_XGOTREF(__pyx_t_2);
+ __Pyx_XGOTREF(__pyx_t_3);
+ /*try:*/ {
+
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":987
+ * cdef inline int import_array() except -1:
+ * try:
+ * _import_array() # <<<<<<<<<<<<<<
+ * except Exception:
+ * raise ImportError("numpy.core.multiarray failed to import")
+ */
+ __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(1, 987, __pyx_L3_error)
+
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":986
+ * # Cython code.
+ * cdef inline int import_array() except -1:
+ * try: # <<<<<<<<<<<<<<
+ * _import_array()
+ * except Exception:
+ */
+ }
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ goto __pyx_L10_try_end;
+ __pyx_L3_error:;
+ __Pyx_PyThreadState_assign
+
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":988
+ * try:
+ * _import_array()
+ * except Exception: # <<<<<<<<<<<<<<
+ * raise ImportError("numpy.core.multiarray failed to import")
+ *
+ */
+ __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
+ if (__pyx_t_4) {
+ __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 988, __pyx_L5_except_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_GOTREF(__pyx_t_7);
+
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":989
+ * _import_array()
+ * except Exception:
+ * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<<
+ *
+ * cdef inline int import_umath() except -1:
+ */
+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 989, __pyx_L5_except_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_Raise(__pyx_t_8, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __PYX_ERR(1, 989, __pyx_L5_except_error)
+ }
+ goto __pyx_L5_except_error;
+ __pyx_L5_except_error:;
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":842
- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd
- * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
- * elif t == NPY_OBJECT: f[0] = 79 #"O" # <<<<<<<<<<<<<<
- * else:
- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":986
+ * # Cython code.
+ * cdef inline int import_array() except -1:
+ * try: # <<<<<<<<<<<<<<
+ * _import_array()
+ * except Exception:
*/
- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_OBJECT); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 842, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 842, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 842, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- if (__pyx_t_6) {
- (__pyx_v_f[0]) = 79;
- goto __pyx_L15;
- }
+ __Pyx_PyThreadState_assign
+ __Pyx_XGIVEREF(__pyx_t_1);
+ __Pyx_XGIVEREF(__pyx_t_2);
+ __Pyx_XGIVEREF(__pyx_t_3);
+ __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
+ goto __pyx_L1_error;
+ __pyx_L10_try_end:;
+ }
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":844
- * elif t == NPY_OBJECT: f[0] = 79 #"O"
- * else:
- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<<
- * f += 1
- * else:
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":985
+ * # Versions of the import_* functions which are more suitable for
+ * # Cython code.
+ * cdef inline int import_array() except -1: # <<<<<<<<<<<<<<
+ * try:
+ * _import_array()
*/
- /*else*/ {
- __pyx_t_3 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 844, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 844, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_GIVEREF(__pyx_t_3);
- PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
- __pyx_t_3 = 0;
- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 844, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __Pyx_Raise(__pyx_t_3, 0, 0, 0);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __PYX_ERR(1, 844, __pyx_L1_error)
- }
- __pyx_L15:;
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":845
- * else:
- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
- * f += 1 # <<<<<<<<<<<<<<
- * else:
- * # Cython ignores struct boundary information ("T{...}"),
+ /* function exit code */
+ __pyx_r = 0;
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_XDECREF(__pyx_t_8);
+ __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = -1;
+ __pyx_L0:;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":991
+ * raise ImportError("numpy.core.multiarray failed to import")
+ *
+ * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<<
+ * try:
+ * _import_umath()
*/
- __pyx_v_f = (__pyx_v_f + 1);
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":820
- * offset[0] += child.itemsize
+static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ int __pyx_t_4;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *__pyx_t_7 = NULL;
+ PyObject *__pyx_t_8 = NULL;
+ __Pyx_RefNannySetupContext("import_umath", 0);
+
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":992
*
- * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<<
- * t = child.type_num
- * if end - f < 5:
+ * cdef inline int import_umath() except -1:
+ * try: # <<<<<<<<<<<<<<
+ * _import_umath()
+ * except Exception:
+ */
+ {
+ __Pyx_PyThreadState_declare
+ __Pyx_PyThreadState_assign
+ __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
+ __Pyx_XGOTREF(__pyx_t_1);
+ __Pyx_XGOTREF(__pyx_t_2);
+ __Pyx_XGOTREF(__pyx_t_3);
+ /*try:*/ {
+
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":993
+ * cdef inline int import_umath() except -1:
+ * try:
+ * _import_umath() # <<<<<<<<<<<<<<
+ * except Exception:
+ * raise ImportError("numpy.core.umath failed to import")
+ */
+ __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(1, 993, __pyx_L3_error)
+
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":992
+ *
+ * cdef inline int import_umath() except -1:
+ * try: # <<<<<<<<<<<<<<
+ * _import_umath()
+ * except Exception:
*/
- goto __pyx_L13;
}
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ goto __pyx_L10_try_end;
+ __pyx_L3_error:;
+ __Pyx_PyThreadState_assign
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":849
- * # Cython ignores struct boundary information ("T{...}"),
- * # so don't output it
- * f = _util_dtypestring(child, f, end, offset) # <<<<<<<<<<<<<<
- * return f
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":994
+ * try:
+ * _import_umath()
+ * except Exception: # <<<<<<<<<<<<<<
+ * raise ImportError("numpy.core.umath failed to import")
*
*/
- /*else*/ {
- __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_9 == NULL)) __PYX_ERR(1, 849, __pyx_L1_error)
- __pyx_v_f = __pyx_t_9;
+ __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
+ if (__pyx_t_4) {
+ __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 994, __pyx_L5_except_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_GOTREF(__pyx_t_7);
+
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":995
+ * _import_umath()
+ * except Exception:
+ * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<<
+ *
+ * cdef inline int import_ufunc() except -1:
+ */
+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 995, __pyx_L5_except_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_Raise(__pyx_t_8, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __PYX_ERR(1, 995, __pyx_L5_except_error)
}
- __pyx_L13:;
+ goto __pyx_L5_except_error;
+ __pyx_L5_except_error:;
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":794
- * cdef tuple fields
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":992
*
- * for childname in descr.names: # <<<<<<<<<<<<<<
- * fields = descr.fields[childname]
- * child, new_offset = fields
+ * 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_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":850
- * # so don't output it
- * f = _util_dtypestring(child, f, end, offset)
- * return f # <<<<<<<<<<<<<<
- *
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":991
+ * raise ImportError("numpy.core.multiarray failed to import")
*
+ * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<<
+ * try:
+ * _import_umath()
*/
- __pyx_r = __pyx_v_f;
+
+ /* function exit code */
+ __pyx_r = 0;
goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_XDECREF(__pyx_t_8);
+ __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = -1;
+ __pyx_L0:;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":785
- * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
+/* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":997
+ * raise ImportError("numpy.core.umath failed to import")
*
- * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<<
- * # Recursive utility function used in __getbuffer__ to get format
- * # string. The new location in the format string is returned.
+ * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<<
+ * try:
+ * _import_umath()
+ */
+
+static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) {
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ int __pyx_t_4;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *__pyx_t_7 = NULL;
+ PyObject *__pyx_t_8 = NULL;
+ __Pyx_RefNannySetupContext("import_ufunc", 0);
+
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":998
+ *
+ * cdef inline int import_ufunc() except -1:
+ * try: # <<<<<<<<<<<<<<
+ * _import_umath()
+ * except Exception:
+ */
+ {
+ __Pyx_PyThreadState_declare
+ __Pyx_PyThreadState_assign
+ __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
+ __Pyx_XGOTREF(__pyx_t_1);
+ __Pyx_XGOTREF(__pyx_t_2);
+ __Pyx_XGOTREF(__pyx_t_3);
+ /*try:*/ {
+
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":999
+ * cdef inline int import_ufunc() except -1:
+ * try:
+ * _import_umath() # <<<<<<<<<<<<<<
+ * except Exception:
+ * raise ImportError("numpy.core.umath failed to import")
+ */
+ __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(1, 999, __pyx_L3_error)
+
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":998
+ *
+ * cdef inline int import_ufunc() except -1:
+ * try: # <<<<<<<<<<<<<<
+ * _import_umath()
+ * except Exception:
+ */
+ }
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ goto __pyx_L10_try_end;
+ __pyx_L3_error:;
+ __Pyx_PyThreadState_assign
+
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":1000
+ * try:
+ * _import_umath()
+ * except Exception: # <<<<<<<<<<<<<<
+ * raise ImportError("numpy.core.umath failed to import")
+ */
+ __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
+ if (__pyx_t_4) {
+ __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 1000, __pyx_L5_except_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_GOTREF(__pyx_t_7);
+
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":1001
+ * _import_umath()
+ * except Exception:
+ * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<<
+ */
+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1001, __pyx_L5_except_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_Raise(__pyx_t_8, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __PYX_ERR(1, 1001, __pyx_L5_except_error)
+ }
+ goto __pyx_L5_except_error;
+ __pyx_L5_except_error:;
+
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":998
+ *
+ * cdef inline int import_ufunc() except -1:
+ * try: # <<<<<<<<<<<<<<
+ * _import_umath()
+ * except Exception:
+ */
+ __Pyx_PyThreadState_assign
+ __Pyx_XGIVEREF(__pyx_t_1);
+ __Pyx_XGIVEREF(__pyx_t_2);
+ __Pyx_XGIVEREF(__pyx_t_3);
+ __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
+ goto __pyx_L1_error;
+ __pyx_L10_try_end:;
+ }
+
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":997
+ * raise ImportError("numpy.core.umath failed to import")
+ *
+ * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<<
+ * try:
+ * _import_umath()
*/
/* function exit code */
+ __pyx_r = 0;
+ goto __pyx_L0;
__pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
- __Pyx_XDECREF(__pyx_t_3);
- __Pyx_XDECREF(__pyx_t_4);
- __Pyx_AddTraceback("numpy._util_dtypestring", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_XDECREF(__pyx_t_8);
+ __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = -1;
__pyx_L0:;
- __Pyx_XDECREF((PyObject *)__pyx_v_child);
- __Pyx_XDECREF(__pyx_v_fields);
- __Pyx_XDECREF(__pyx_v_childname);
- __Pyx_XDECREF(__pyx_v_new_offset);
- __Pyx_XDECREF(__pyx_v_t);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":966
+/* "string.to_py":31
*
- *
- * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<<
- * cdef PyObject* baseptr
- * if base is None:
+ * @cname("__pyx_convert_PyObject_string_to_py_std__in_string")
+ * cdef inline object __pyx_convert_PyObject_string_to_py_std__in_string(const string& s): # <<<<<<<<<<<<<<
+ * return __Pyx_PyObject_FromStringAndSize(s.data(), s.size())
+ * cdef extern from *:
*/
-static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) {
- PyObject *__pyx_v_baseptr;
+static CYTHON_INLINE PyObject *__pyx_convert_PyObject_string_to_py_std__in_string(std::string const &__pyx_v_s) {
+ PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
- int __pyx_t_1;
- int __pyx_t_2;
- __Pyx_RefNannySetupContext("set_array_base", 0);
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("__pyx_convert_PyObject_string_to_py_std__in_string", 0);
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":968
- * cdef inline void set_array_base(ndarray arr, object base):
- * cdef PyObject* baseptr
- * if base is None: # <<<<<<<<<<<<<<
- * baseptr = NULL
- * else:
+ /* "string.to_py":32
+ * @cname("__pyx_convert_PyObject_string_to_py_std__in_string")
+ * cdef inline object __pyx_convert_PyObject_string_to_py_std__in_string(const string& s):
+ * return __Pyx_PyObject_FromStringAndSize(s.data(), s.size()) # <<<<<<<<<<<<<<
+ * cdef extern from *:
+ * cdef object __Pyx_PyUnicode_FromStringAndSize(char*, size_t)
*/
- __pyx_t_1 = (__pyx_v_base == Py_None);
- __pyx_t_2 = (__pyx_t_1 != 0);
- if (__pyx_t_2) {
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyObject_FromStringAndSize(__pyx_v_s.data(), __pyx_v_s.size()); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 32, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":969
- * cdef PyObject* baseptr
- * if base is None:
- * baseptr = NULL # <<<<<<<<<<<<<<
- * else:
- * Py_INCREF(base) # important to do this before decref below!
+ /* "string.to_py":31
+ *
+ * @cname("__pyx_convert_PyObject_string_to_py_std__in_string")
+ * cdef inline object __pyx_convert_PyObject_string_to_py_std__in_string(const string& s): # <<<<<<<<<<<<<<
+ * return __Pyx_PyObject_FromStringAndSize(s.data(), s.size())
+ * cdef extern from *:
*/
- __pyx_v_baseptr = NULL;
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":968
- * cdef inline void set_array_base(ndarray arr, object base):
- * cdef PyObject* baseptr
- * if base is None: # <<<<<<<<<<<<<<
- * baseptr = NULL
- * else:
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("string.to_py.__pyx_convert_PyObject_string_to_py_std__in_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = 0;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "string.to_py":37
+ *
+ * @cname("__pyx_convert_PyUnicode_string_to_py_std__in_string")
+ * cdef inline object __pyx_convert_PyUnicode_string_to_py_std__in_string(const string& s): # <<<<<<<<<<<<<<
+ * return __Pyx_PyUnicode_FromStringAndSize(s.data(), s.size())
+ * cdef extern from *:
*/
- goto __pyx_L3;
- }
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":971
- * baseptr = NULL
- * else:
- * Py_INCREF(base) # important to do this before decref below! # <<<<<<<<<<<<<<
- * baseptr = <PyObject*>base
- * Py_XDECREF(arr.base)
+static CYTHON_INLINE PyObject *__pyx_convert_PyUnicode_string_to_py_std__in_string(std::string const &__pyx_v_s) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("__pyx_convert_PyUnicode_string_to_py_std__in_string", 0);
+
+ /* "string.to_py":38
+ * @cname("__pyx_convert_PyUnicode_string_to_py_std__in_string")
+ * cdef inline object __pyx_convert_PyUnicode_string_to_py_std__in_string(const string& s):
+ * return __Pyx_PyUnicode_FromStringAndSize(s.data(), s.size()) # <<<<<<<<<<<<<<
+ * cdef extern from *:
+ * cdef object __Pyx_PyStr_FromStringAndSize(char*, size_t)
*/
- /*else*/ {
- Py_INCREF(__pyx_v_base);
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyUnicode_FromStringAndSize(__pyx_v_s.data(), __pyx_v_s.size()); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 38, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":972
- * else:
- * Py_INCREF(base) # important to do this before decref below!
- * baseptr = <PyObject*>base # <<<<<<<<<<<<<<
- * Py_XDECREF(arr.base)
- * arr.base = baseptr
+ /* "string.to_py":37
+ *
+ * @cname("__pyx_convert_PyUnicode_string_to_py_std__in_string")
+ * cdef inline object __pyx_convert_PyUnicode_string_to_py_std__in_string(const string& s): # <<<<<<<<<<<<<<
+ * return __Pyx_PyUnicode_FromStringAndSize(s.data(), s.size())
+ * cdef extern from *:
*/
- __pyx_v_baseptr = ((PyObject *)__pyx_v_base);
- }
- __pyx_L3:;
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":973
- * Py_INCREF(base) # important to do this before decref below!
- * baseptr = <PyObject*>base
- * Py_XDECREF(arr.base) # <<<<<<<<<<<<<<
- * arr.base = baseptr
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("string.to_py.__pyx_convert_PyUnicode_string_to_py_std__in_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = 0;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "string.to_py":43
*
+ * @cname("__pyx_convert_PyStr_string_to_py_std__in_string")
+ * cdef inline object __pyx_convert_PyStr_string_to_py_std__in_string(const string& s): # <<<<<<<<<<<<<<
+ * return __Pyx_PyStr_FromStringAndSize(s.data(), s.size())
+ * cdef extern from *:
*/
- Py_XDECREF(__pyx_v_arr->base);
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":974
- * baseptr = <PyObject*>base
- * Py_XDECREF(arr.base)
- * arr.base = baseptr # <<<<<<<<<<<<<<
- *
- * cdef inline object get_array_base(ndarray arr):
+static CYTHON_INLINE PyObject *__pyx_convert_PyStr_string_to_py_std__in_string(std::string const &__pyx_v_s) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("__pyx_convert_PyStr_string_to_py_std__in_string", 0);
+
+ /* "string.to_py":44
+ * @cname("__pyx_convert_PyStr_string_to_py_std__in_string")
+ * cdef inline object __pyx_convert_PyStr_string_to_py_std__in_string(const string& s):
+ * return __Pyx_PyStr_FromStringAndSize(s.data(), s.size()) # <<<<<<<<<<<<<<
+ * cdef extern from *:
+ * cdef object __Pyx_PyBytes_FromStringAndSize(char*, size_t)
*/
- __pyx_v_arr->base = __pyx_v_baseptr;
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyStr_FromStringAndSize(__pyx_v_s.data(), __pyx_v_s.size()); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 44, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":966
+ /* "string.to_py":43
*
- *
- * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<<
- * cdef PyObject* baseptr
- * if base is None:
+ * @cname("__pyx_convert_PyStr_string_to_py_std__in_string")
+ * cdef inline object __pyx_convert_PyStr_string_to_py_std__in_string(const string& s): # <<<<<<<<<<<<<<
+ * return __Pyx_PyStr_FromStringAndSize(s.data(), s.size())
+ * cdef extern from *:
*/
/* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("string.to_py.__pyx_convert_PyStr_string_to_py_std__in_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = 0;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
+ return __pyx_r;
}
-/* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":976
- * arr.base = baseptr
+/* "string.to_py":49
*
- * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<<
- * if arr.base is NULL:
- * return None
+ * @cname("__pyx_convert_PyBytes_string_to_py_std__in_string")
+ * cdef inline object __pyx_convert_PyBytes_string_to_py_std__in_string(const string& s): # <<<<<<<<<<<<<<
+ * return __Pyx_PyBytes_FromStringAndSize(s.data(), s.size())
+ * cdef extern from *:
*/
-static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__pyx_v_arr) {
+static CYTHON_INLINE PyObject *__pyx_convert_PyBytes_string_to_py_std__in_string(std::string const &__pyx_v_s) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
- int __pyx_t_1;
- __Pyx_RefNannySetupContext("get_array_base", 0);
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("__pyx_convert_PyBytes_string_to_py_std__in_string", 0);
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":977
- *
- * cdef inline object get_array_base(ndarray arr):
- * if arr.base is NULL: # <<<<<<<<<<<<<<
- * return None
- * else:
+ /* "string.to_py":50
+ * @cname("__pyx_convert_PyBytes_string_to_py_std__in_string")
+ * cdef inline object __pyx_convert_PyBytes_string_to_py_std__in_string(const string& s):
+ * return __Pyx_PyBytes_FromStringAndSize(s.data(), s.size()) # <<<<<<<<<<<<<<
+ * cdef extern from *:
+ * cdef object __Pyx_PyByteArray_FromStringAndSize(char*, size_t)
*/
- __pyx_t_1 = ((__pyx_v_arr->base == NULL) != 0);
- if (__pyx_t_1) {
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_s.data(), __pyx_v_s.size()); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 50, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":978
- * cdef inline object get_array_base(ndarray arr):
- * if arr.base is NULL:
- * return None # <<<<<<<<<<<<<<
- * else:
- * return <object>arr.base
+ /* "string.to_py":49
+ *
+ * @cname("__pyx_convert_PyBytes_string_to_py_std__in_string")
+ * cdef inline object __pyx_convert_PyBytes_string_to_py_std__in_string(const string& s): # <<<<<<<<<<<<<<
+ * return __Pyx_PyBytes_FromStringAndSize(s.data(), s.size())
+ * cdef extern from *:
*/
- __Pyx_XDECREF(__pyx_r);
- __Pyx_INCREF(Py_None);
- __pyx_r = Py_None;
- goto __pyx_L0;
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":977
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("string.to_py.__pyx_convert_PyBytes_string_to_py_std__in_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = 0;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "string.to_py":55
+ *
+ * @cname("__pyx_convert_PyByteArray_string_to_py_std__in_string")
+ * cdef inline object __pyx_convert_PyByteArray_string_to_py_std__in_string(const string& s): # <<<<<<<<<<<<<<
+ * return __Pyx_PyByteArray_FromStringAndSize(s.data(), s.size())
*
- * cdef inline object get_array_base(ndarray arr):
- * if arr.base is NULL: # <<<<<<<<<<<<<<
- * return None
- * else:
*/
- }
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":980
- * return None
- * else:
- * return <object>arr.base # <<<<<<<<<<<<<<
+static CYTHON_INLINE PyObject *__pyx_convert_PyByteArray_string_to_py_std__in_string(std::string const &__pyx_v_s) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("__pyx_convert_PyByteArray_string_to_py_std__in_string", 0);
+
+ /* "string.to_py":56
+ * @cname("__pyx_convert_PyByteArray_string_to_py_std__in_string")
+ * cdef inline object __pyx_convert_PyByteArray_string_to_py_std__in_string(const string& s):
+ * return __Pyx_PyByteArray_FromStringAndSize(s.data(), s.size()) # <<<<<<<<<<<<<<
+ *
*/
- /*else*/ {
- __Pyx_XDECREF(__pyx_r);
- __Pyx_INCREF(((PyObject *)__pyx_v_arr->base));
- __pyx_r = ((PyObject *)__pyx_v_arr->base);
- goto __pyx_L0;
- }
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyByteArray_FromStringAndSize(__pyx_v_s.data(), __pyx_v_s.size()); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 56, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":976
- * arr.base = baseptr
+ /* "string.to_py":55
+ *
+ * @cname("__pyx_convert_PyByteArray_string_to_py_std__in_string")
+ * cdef inline object __pyx_convert_PyByteArray_string_to_py_std__in_string(const string& s): # <<<<<<<<<<<<<<
+ * return __Pyx_PyByteArray_FromStringAndSize(s.data(), s.size())
*
- * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<<
- * if arr.base is NULL:
- * return None
*/
/* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("string.to_py.__pyx_convert_PyByteArray_string_to_py_std__in_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = 0;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
@@ -4049,10 +5407,11 @@ static PyObject *__pyx_tp_new_4pdal_13libpdalpython_PyPipeline(PyTypeObject *t,
o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
}
if (unlikely(!o)) return 0;
- if (unlikely(__pyx_pw_4pdal_13libpdalpython_10PyPipeline_1__cinit__(o, a, k) < 0)) {
- Py_DECREF(o); o = 0;
- }
+ if (unlikely(__pyx_pw_4pdal_13libpdalpython_10PyPipeline_1__cinit__(o, a, k) < 0)) goto bad;
return o;
+ bad:
+ Py_DECREF(o); o = 0;
+ return NULL;
}
static void __pyx_tp_dealloc_4pdal_13libpdalpython_PyPipeline(PyObject *o) {
@@ -4072,18 +5431,53 @@ static void __pyx_tp_dealloc_4pdal_13libpdalpython_PyPipeline(PyObject *o) {
(*Py_TYPE(o)->tp_free)(o);
}
-static PyObject *__pyx_getprop_4pdal_13libpdalpython_10PyPipeline_json(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4pdal_13libpdalpython_10PyPipeline_4json_1__get__(o);
+static PyObject *__pyx_getprop_4pdal_13libpdalpython_10PyPipeline_pipeline(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4pdal_13libpdalpython_10PyPipeline_8pipeline_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_4pdal_13libpdalpython_10PyPipeline_metadata(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4pdal_13libpdalpython_10PyPipeline_8metadata_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_4pdal_13libpdalpython_10PyPipeline_loglevel(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4pdal_13libpdalpython_10PyPipeline_8loglevel_1__get__(o);
+}
+
+static int __pyx_setprop_4pdal_13libpdalpython_10PyPipeline_loglevel(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+ if (v) {
+ return __pyx_pw_4pdal_13libpdalpython_10PyPipeline_8loglevel_3__set__(o, v);
+ }
+ else {
+ PyErr_SetString(PyExc_NotImplementedError, "__del__");
+ return -1;
+ }
+}
+
+static PyObject *__pyx_getprop_4pdal_13libpdalpython_10PyPipeline_log(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4pdal_13libpdalpython_10PyPipeline_3log_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_4pdal_13libpdalpython_10PyPipeline_schema(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4pdal_13libpdalpython_10PyPipeline_6schema_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_4pdal_13libpdalpython_10PyPipeline_arrays(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4pdal_13libpdalpython_10PyPipeline_6arrays_1__get__(o);
}
static PyMethodDef __pyx_methods_4pdal_13libpdalpython_PyPipeline[] = {
- {"arrays", (PyCFunction)__pyx_pw_4pdal_13libpdalpython_10PyPipeline_5arrays, METH_NOARGS, 0},
- {"execute", (PyCFunction)__pyx_pw_4pdal_13libpdalpython_10PyPipeline_7execute, METH_NOARGS, 0},
+ {"execute", (PyCFunction)__pyx_pw_4pdal_13libpdalpython_10PyPipeline_5execute, METH_NOARGS, 0},
+ {"validate", (PyCFunction)__pyx_pw_4pdal_13libpdalpython_10PyPipeline_7validate, METH_NOARGS, 0},
{0, 0, 0, 0}
};
static struct PyGetSetDef __pyx_getsets_4pdal_13libpdalpython_PyPipeline[] = {
- {(char *)"json", __pyx_getprop_4pdal_13libpdalpython_10PyPipeline_json, 0, (char *)0, 0},
+ {(char *)"pipeline", __pyx_getprop_4pdal_13libpdalpython_10PyPipeline_pipeline, 0, (char *)0, 0},
+ {(char *)"metadata", __pyx_getprop_4pdal_13libpdalpython_10PyPipeline_metadata, 0, (char *)0, 0},
+ {(char *)"loglevel", __pyx_getprop_4pdal_13libpdalpython_10PyPipeline_loglevel, __pyx_setprop_4pdal_13libpdalpython_10PyPipeline_loglevel, (char *)0, 0},
+ {(char *)"log", __pyx_getprop_4pdal_13libpdalpython_10PyPipeline_log, 0, (char *)0, 0},
+ {(char *)"schema", __pyx_getprop_4pdal_13libpdalpython_10PyPipeline_schema, 0, (char *)0, 0},
+ {(char *)"arrays", __pyx_getprop_4pdal_13libpdalpython_10PyPipeline_arrays, 0, (char *)0, 0},
{0, 0, 0, 0, 0}
};
@@ -4169,26 +5563,30 @@ static struct PyModuleDef __pyx_moduledef = {
static __Pyx_StringTabEntry __pyx_string_tab[] = {
{&__pyx_kp_s_C_Pipeline_object_not_constructe, __pyx_k_C_Pipeline_object_not_constructe, sizeof(__pyx_k_C_Pipeline_object_not_constructe), 0, 0, 1, 0},
- {&__pyx_n_s_Exception, __pyx_k_Exception, sizeof(__pyx_k_Exception), 0, 0, 1, 1},
{&__pyx_kp_u_Format_string_allocated_too_shor, __pyx_k_Format_string_allocated_too_shor, sizeof(__pyx_k_Format_string_allocated_too_shor), 0, 1, 0, 0},
{&__pyx_kp_u_Format_string_allocated_too_shor_2, __pyx_k_Format_string_allocated_too_shor_2, sizeof(__pyx_k_Format_string_allocated_too_shor_2), 0, 1, 0, 0},
+ {&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1},
{&__pyx_kp_u_Non_native_byte_order_not_suppor, __pyx_k_Non_native_byte_order_not_suppor, sizeof(__pyx_k_Non_native_byte_order_not_suppor), 0, 1, 0, 0},
{&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1},
{&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
+ {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
{&__pyx_n_s_json, __pyx_k_json, sizeof(__pyx_k_json), 0, 0, 1, 1},
+ {&__pyx_n_s_loads, __pyx_k_loads, sizeof(__pyx_k_loads), 0, 0, 1, 1},
{&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
{&__pyx_kp_u_ndarray_is_not_C_contiguous, __pyx_k_ndarray_is_not_C_contiguous, sizeof(__pyx_k_ndarray_is_not_C_contiguous), 0, 1, 0, 0},
{&__pyx_kp_u_ndarray_is_not_Fortran_contiguou, __pyx_k_ndarray_is_not_Fortran_contiguou, sizeof(__pyx_k_ndarray_is_not_Fortran_contiguou), 0, 1, 0, 0},
+ {&__pyx_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},
+ {&__pyx_kp_s_numpy_core_umath_failed_to_impor, __pyx_k_numpy_core_umath_failed_to_impor, sizeof(__pyx_k_numpy_core_umath_failed_to_impor), 0, 0, 1, 0},
{&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
{&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
{&__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_k_unknown_dtype_code_in_numpy_pxd, sizeof(__pyx_k_unknown_dtype_code_in_numpy_pxd), 0, 1, 0, 0},
{0, 0, 0, 0, 0, 0, 0}
};
static int __Pyx_InitCachedBuiltins(void) {
- __pyx_builtin_Exception = __Pyx_GetBuiltinName(__pyx_n_s_Exception); if (!__pyx_builtin_Exception) __PYX_ERR(0, 55, __pyx_L1_error)
__pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(1, 218, __pyx_L1_error)
__pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(1, 231, __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_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(1, 989, __pyx_L1_error)
return 0;
__pyx_L1_error:;
return -1;
@@ -4198,17 +5596,27 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
- /* "pdal/libpdalpython.pyx":55
+ /* "pdal/libpdalpython.pyx":87
* def execute(self):
* if not self.thisptr:
* raise Exception("C++ Pipeline object not constructed!") # <<<<<<<<<<<<<<
- * self.thisptr.execute()
+ * return self.thisptr.execute()
*
*/
- __pyx_tuple_ = PyTuple_Pack(1, __pyx_kp_s_C_Pipeline_object_not_constructe); if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 55, __pyx_L1_error)
+ __pyx_tuple_ = PyTuple_Pack(1, __pyx_kp_s_C_Pipeline_object_not_constructe); if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 87, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple_);
__Pyx_GIVEREF(__pyx_tuple_);
+ /* "pdal/libpdalpython.pyx":92
+ * def validate(self):
+ * if not self.thisptr:
+ * raise Exception("C++ Pipeline object not constructed!") # <<<<<<<<<<<<<<
+ * return self.thisptr.validate()
+ */
+ __pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_s_C_Pipeline_object_not_constructe); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(0, 92, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__2);
+ __Pyx_GIVEREF(__pyx_tuple__2);
+
/* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":218
* if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
* and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):
@@ -4216,9 +5624,9 @@ static int __Pyx_InitCachedConstants(void) {
*
* if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
*/
- __pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_C_contiguous); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(1, 218, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__2);
- __Pyx_GIVEREF(__pyx_tuple__2);
+ __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_C_contiguous); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(1, 218, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__3);
+ __Pyx_GIVEREF(__pyx_tuple__3);
/* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":222
* if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
@@ -4227,9 +5635,9 @@ static int __Pyx_InitCachedConstants(void) {
*
* info.buf = PyArray_DATA(self)
*/
- __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_Fortran_contiguou); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(1, 222, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__3);
- __Pyx_GIVEREF(__pyx_tuple__3);
+ __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_Fortran_contiguou); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(1, 222, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__4);
+ __Pyx_GIVEREF(__pyx_tuple__4);
/* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":259
* if ((descr.byteorder == c'>' and little_endian) or
@@ -4238,9 +5646,9 @@ static int __Pyx_InitCachedConstants(void) {
* if t == NPY_BYTE: f = "b"
* elif t == NPY_UBYTE: f = "B"
*/
- __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(1, 259, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__4);
- __Pyx_GIVEREF(__pyx_tuple__4);
+ __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(1, 259, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__5);
+ __Pyx_GIVEREF(__pyx_tuple__5);
/* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":799
*
@@ -4249,9 +5657,9 @@ static int __Pyx_InitCachedConstants(void) {
*
* if ((child.byteorder == c'>' and little_endian) or
*/
- __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(1, 799, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__5);
- __Pyx_GIVEREF(__pyx_tuple__5);
+ __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(1, 799, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__6);
+ __Pyx_GIVEREF(__pyx_tuple__6);
/* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":803
* if ((child.byteorder == c'>' and little_endian) or
@@ -4260,9 +5668,9 @@ static int __Pyx_InitCachedConstants(void) {
* # One could encode it in the format string and have Cython
* # complain instead, BUT: < and > in format strings also imply
*/
- __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(1, 803, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__6);
- __Pyx_GIVEREF(__pyx_tuple__6);
+ __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(1, 803, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__7);
+ __Pyx_GIVEREF(__pyx_tuple__7);
/* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":823
* t = child.type_num
@@ -4271,9 +5679,40 @@ static int __Pyx_InitCachedConstants(void) {
*
* # Until ticket #99 is fixed, use integers to avoid warnings
*/
- __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor_2); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(1, 823, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__7);
- __Pyx_GIVEREF(__pyx_tuple__7);
+ __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor_2); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(1, 823, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__8);
+ __Pyx_GIVEREF(__pyx_tuple__8);
+
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":989
+ * _import_array()
+ * except Exception:
+ * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<<
+ *
+ * cdef inline int import_umath() except -1:
+ */
+ __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_multiarray_failed_to); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(1, 989, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__9);
+ __Pyx_GIVEREF(__pyx_tuple__9);
+
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":995
+ * _import_umath()
+ * except Exception:
+ * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<<
+ *
+ * cdef inline int import_ufunc() except -1:
+ */
+ __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(1, 995, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__10);
+ __Pyx_GIVEREF(__pyx_tuple__10);
+
+ /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":1001
+ * _import_umath()
+ * except Exception:
+ * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<<
+ */
+ __pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(1, 1001, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__11);
+ __Pyx_GIVEREF(__pyx_tuple__11);
__Pyx_RefNannyFinishContext();
return 0;
__pyx_L1_error:;
@@ -4296,7 +5735,8 @@ PyMODINIT_FUNC PyInit_libpdalpython(void); /*proto*/
PyMODINIT_FUNC PyInit_libpdalpython(void)
#endif
{
- PyObject *__pyx_t_1 = NULL;
+ int __pyx_t_1;
+ PyObject *__pyx_t_2 = NULL;
__Pyx_RefNannyDeclarations
#if CYTHON_REFNANNY
__Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
@@ -4372,9 +5812,9 @@ PyMODINIT_FUNC PyInit_libpdalpython(void)
/*--- Variable export code ---*/
/*--- Function export code ---*/
/*--- Type init code ---*/
- if (PyType_Ready(&__pyx_type_4pdal_13libpdalpython_PyPipeline) < 0) __PYX_ERR(0, 23, __pyx_L1_error)
+ if (PyType_Ready(&__pyx_type_4pdal_13libpdalpython_PyPipeline) < 0) __PYX_ERR(0, 32, __pyx_L1_error)
__pyx_type_4pdal_13libpdalpython_PyPipeline.tp_print = 0;
- if (PyObject_SetAttrString(__pyx_m, "PyPipeline", (PyObject *)&__pyx_type_4pdal_13libpdalpython_PyPipeline) < 0) __PYX_ERR(0, 23, __pyx_L1_error)
+ if (PyObject_SetAttrString(__pyx_m, "PyPipeline", (PyObject *)&__pyx_type_4pdal_13libpdalpython_PyPipeline) < 0) __PYX_ERR(0, 32, __pyx_L1_error)
__pyx_ptype_4pdal_13libpdalpython_PyPipeline = &__pyx_type_4pdal_13libpdalpython_PyPipeline;
/*--- Type import code ---*/
__pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "type",
@@ -4383,9 +5823,9 @@ PyMODINIT_FUNC PyInit_libpdalpython(void)
#else
sizeof(PyHeapTypeObject),
#endif
- 0); if (unlikely(!__pyx_ptype_7cpython_4type_type)) __PYX_ERR(2, 9, __pyx_L1_error)
- __pyx_ptype_7cpython_4bool_bool = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "bool", sizeof(PyBoolObject), 0); if (unlikely(!__pyx_ptype_7cpython_4bool_bool)) __PYX_ERR(3, 8, __pyx_L1_error)
- __pyx_ptype_7cpython_7complex_complex = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "complex", sizeof(PyComplexObject), 0); if (unlikely(!__pyx_ptype_7cpython_7complex_complex)) __PYX_ERR(4, 15, __pyx_L1_error)
+ 0); if (unlikely(!__pyx_ptype_7cpython_4type_type)) __PYX_ERR(3, 9, __pyx_L1_error)
+ __pyx_ptype_7cpython_4bool_bool = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "bool", sizeof(PyBoolObject), 0); if (unlikely(!__pyx_ptype_7cpython_4bool_bool)) __PYX_ERR(4, 8, __pyx_L1_error)
+ __pyx_ptype_7cpython_7complex_complex = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "complex", sizeof(PyComplexObject), 0); if (unlikely(!__pyx_ptype_7cpython_7complex_complex)) __PYX_ERR(5, 15, __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)
@@ -4398,38 +5838,38 @@ PyMODINIT_FUNC PyInit_libpdalpython(void)
if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
#endif
- /* "pdal/libpdalpython.pyx":7
+ /* "pdal/libpdalpython.pyx":9
* from cpython.version cimport PY_MAJOR_VERSION
* cimport numpy as np
* np.import_array() # <<<<<<<<<<<<<<
*
* from cpython cimport PyObject, Py_INCREF
*/
- import_array();
+ __pyx_t_1 = __pyx_f_5numpy_import_array(); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(0, 9, __pyx_L1_error)
/* "pdal/libpdalpython.pyx":1
* # distutils: language = c++ # <<<<<<<<<<<<<<
*
* from libcpp.vector cimport vector
*/
- __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "../../../../../../usr/local/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":976
- * arr.base = baseptr
+ /* "string.to_py":55
+ *
+ * @cname("__pyx_convert_PyByteArray_string_to_py_std__in_string")
+ * cdef inline object __pyx_convert_PyByteArray_string_to_py_std__in_string(const string& s): # <<<<<<<<<<<<<<
+ * return __Pyx_PyByteArray_FromStringAndSize(s.data(), s.size())
*
- * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<<
- * if arr.base is NULL:
- * return None
*/
/*--- Wrapped vars code ---*/
goto __pyx_L0;
__pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
if (__pyx_m) {
if (__pyx_d) {
__Pyx_AddTraceback("init pdal.libpdalpython", __pyx_clineno, __pyx_lineno, __pyx_filename);
@@ -4465,20 +5905,6 @@ end:
}
#endif
-/* GetBuiltinName */
-static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
- PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
- if (unlikely(!result)) {
- PyErr_Format(PyExc_NameError,
-#if PY_MAJOR_VERSION >= 3
- "name '%U' is not defined", name);
-#else
- "name '%.200s' is not defined", PyString_AS_STRING(name));
-#endif
- }
- return result;
-}
-
/* RaiseDoubleKeywords */
static void __Pyx_RaiseDoubleKeywordsError(
const char* func_name,
@@ -4648,20 +6074,12 @@ static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, in
return 0;
}
-/* decode_c_string */
-static CYTHON_INLINE PyObject* __Pyx_decode_c_string(
- const char* cstring, Py_ssize_t start, Py_ssize_t stop,
+/* decode_c_bytes */
+static CYTHON_INLINE PyObject* __Pyx_decode_c_bytes(
+ const char* cstring, Py_ssize_t length, Py_ssize_t start, Py_ssize_t stop,
const char* encoding, const char* errors,
PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) {
- Py_ssize_t length;
if (unlikely((start < 0) | (stop < 0))) {
- size_t slen = strlen(cstring);
- if (unlikely(slen > (size_t) PY_SSIZE_T_MAX)) {
- PyErr_SetString(PyExc_OverflowError,
- "c-string too long to convert to Python");
- return NULL;
- }
- length = (Py_ssize_t) slen;
if (start < 0) {
start += length;
if (start < 0)
@@ -4670,16 +6088,232 @@ static CYTHON_INLINE PyObject* __Pyx_decode_c_string(
if (stop < 0)
stop += length;
}
- length = stop - start;
- if (unlikely(length <= 0))
- return PyUnicode_FromUnicode(NULL, 0);
- cstring += start;
- if (decode_func) {
- return decode_func(cstring, length, errors);
- } else {
- return PyUnicode_Decode(cstring, length, encoding, errors);
+ if (stop > length)
+ stop = length;
+ length = stop - start;
+ if (unlikely(length <= 0))
+ return PyUnicode_FromUnicode(NULL, 0);
+ cstring += start;
+ if (decode_func) {
+ return decode_func(cstring, length, errors);
+ } else {
+ return PyUnicode_Decode(cstring, length, encoding, errors);
+ }
+}
+
+/* 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
+ }
+ }
+bad:
+ #if PY_VERSION_HEX < 0x03030000
+ Py_XDECREF(py_import);
+ #endif
+ Py_XDECREF(empty_list);
+ Py_XDECREF(empty_dict);
+ return module;
+}
+
+/* PyCFunctionFastCall */
+#if CYTHON_FAST_PYCCALL
+static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {
+ PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
+ PyCFunction meth = PyCFunction_GET_FUNCTION(func);
+ PyObject *self = PyCFunction_GET_SELF(func);
+ PyObject *result;
+ int flags;
+ assert(PyCFunction_Check(func));
+ assert(METH_FASTCALL == PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST));
+ 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);
+}
+#endif // CYTHON_FAST_PYCCALL
+
+/* PyFunctionFastCall */
+#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();
+ PyObject **fastlocals;
+ Py_ssize_t i;
+ PyObject *result;
+ assert(globals != NULL);
+ /* XXX Perhaps we should create a specialized
+ PyFrame_New() that doesn't take locals, but does
+ take builtins without sanity checking them.
+ */
+ assert(tstate != NULL);
+ f = PyFrame_New(tstate, co, globals, NULL);
+ if (f == NULL) {
+ return NULL;
+ }
+ fastlocals = f->f_localsplus;
+ for (i = 0; i < na; i++) {
+ Py_INCREF(*args);
+ fastlocals[i] = *args++;
+ }
+ result = PyEval_EvalFrameEx(f,0);
+ ++tstate->recursion_depth;
+ Py_DECREF(f);
+ --tstate->recursion_depth;
+ return result;
+}
+#if 1 || PY_VERSION_HEX < 0x030600B1
+static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, int nargs, PyObject *kwargs) {
+ PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
+ PyObject *globals = PyFunction_GET_GLOBALS(func);
+ PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
+ PyObject *closure;
+#if PY_MAJOR_VERSION >= 3
+ PyObject *kwdefs;
+#endif
+ PyObject *kwtuple, **k;
+ PyObject **d;
+ Py_ssize_t nd;
+ Py_ssize_t nk;
+ PyObject *result;
+ assert(kwargs == NULL || PyDict_Check(kwargs));
+ nk = kwargs ? PyDict_Size(kwargs) : 0;
+ if (Py_EnterRecursiveCall((char*)" while calling a Python object")) {
+ return NULL;
+ }
+ if (
+#if PY_MAJOR_VERSION >= 3
+ co->co_kwonlyargcount == 0 &&
+#endif
+ likely(kwargs == NULL || nk == 0) &&
+ co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
+ if (argdefs == NULL && co->co_argcount == nargs) {
+ result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
+ goto done;
+ }
+ else if (nargs == 0 && argdefs != NULL
+ && co->co_argcount == Py_SIZE(argdefs)) {
+ /* function called with no arguments, but all parameters have
+ a default value: use default values as arguments .*/
+ args = &PyTuple_GET_ITEM(argdefs, 0);
+ result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
+ goto done;
+ }
+ }
+ if (kwargs != NULL) {
+ Py_ssize_t pos, i;
+ kwtuple = PyTuple_New(2 * nk);
+ if (kwtuple == NULL) {
+ result = NULL;
+ goto done;
+ }
+ k = &PyTuple_GET_ITEM(kwtuple, 0);
+ pos = i = 0;
+ while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
+ Py_INCREF(k[i]);
+ Py_INCREF(k[i+1]);
+ i += 2;
+ }
+ nk = i / 2;
+ }
+ else {
+ kwtuple = NULL;
+ k = NULL;
+ }
+ closure = PyFunction_GET_CLOSURE(func);
+#if PY_MAJOR_VERSION >= 3
+ kwdefs = PyFunction_GET_KW_DEFAULTS(func);
+#endif
+ if (argdefs != NULL) {
+ d = &PyTuple_GET_ITEM(argdefs, 0);
+ nd = Py_SIZE(argdefs);
+ }
+ else {
+ d = NULL;
+ nd = 0;
}
+#if PY_MAJOR_VERSION >= 3
+ result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
+ args, nargs,
+ k, (int)nk,
+ d, (int)nd, kwdefs, closure);
+#else
+ result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
+ args, nargs,
+ k, (int)nk,
+ d, (int)nd, closure);
+#endif
+ Py_XDECREF(kwtuple);
+done:
+ Py_LeaveRecursiveCall();
+ return result;
}
+#endif // CPython < 3.6
+#endif // CYTHON_FAST_PYCALL
/* PyObjectCall */
#if CYTHON_COMPILING_IN_CPYTHON
@@ -4701,8 +6335,72 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg
}
#endif
-/* PyErrFetchRestore */
+/* PyObjectCallMethO */
+#if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
+ PyObject *self, *result;
+ PyCFunction cfunc;
+ cfunc = PyCFunction_GET_FUNCTION(func);
+ self = PyCFunction_GET_SELF(func);
+ if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
+ return NULL;
+ result = cfunc(self, arg);
+ Py_LeaveRecursiveCall();
+ if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
+ PyErr_SetString(
+ PyExc_SystemError,
+ "NULL result without error in PyObject_Call");
+ }
+ return result;
+}
+#endif
+
+/* PyObjectCallOneArg */
#if CYTHON_COMPILING_IN_CPYTHON
+static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
+ PyObject *result;
+ PyObject *args = PyTuple_New(1);
+ if (unlikely(!args)) return NULL;
+ Py_INCREF(arg);
+ PyTuple_SET_ITEM(args, 0, arg);
+ result = __Pyx_PyObject_Call(func, args, NULL);
+ Py_DECREF(args);
+ return result;
+}
+static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
+#if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(func)) {
+ return __Pyx_PyFunction_FastCall(func, &arg, 1);
+ }
+#endif
+#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
+ } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) {
+ return __Pyx_PyCFunction_FastCall(func, &arg, 1);
+#endif
+ }
+ }
+ return __Pyx__PyObject_CallOneArg(func, arg);
+}
+#else
+static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
+ PyObject *result;
+ PyObject *args = PyTuple_Pack(1, arg);
+ if (unlikely(!args)) return NULL;
+ result = __Pyx_PyObject_Call(func, args, NULL);
+ Py_DECREF(args);
+ return result;
+}
+#endif
+
+/* PyErrFetchRestore */
+ #if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
PyObject *tmp_type, *tmp_value, *tmp_tb;
tmp_type = tstate->curexc_type;
@@ -4726,7 +6424,7 @@ static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject
#endif
/* RaiseException */
-#if PY_MAJOR_VERSION < 3
+ #if PY_MAJOR_VERSION < 3
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
CYTHON_UNUSED PyObject *cause) {
__Pyx_PyThreadState_declare
@@ -4888,26 +6586,40 @@ bad:
}
#endif
+/* GetBuiltinName */
+ static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
+ PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
+ if (unlikely(!result)) {
+ PyErr_Format(PyExc_NameError,
+#if PY_MAJOR_VERSION >= 3
+ "name '%U' is not defined", name);
+#else
+ "name '%.200s' is not defined", PyString_AS_STRING(name));
+#endif
+ }
+ return result;
+}
+
/* 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);
}
/* 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");
}
/* RaiseNoneIterError */
- static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) {
+ static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
}
/* 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;
@@ -4919,8 +6631,103 @@ bad:
return 0;
}
+/* SaveResetException */
+ #if CYTHON_FAST_THREAD_STATE
+static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
+ *type = tstate->exc_type;
+ *value = tstate->exc_value;
+ *tb = tstate->exc_traceback;
+ 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;
+ tmp_type = tstate->exc_type;
+ tmp_value = tstate->exc_value;
+ tmp_tb = tstate->exc_traceback;
+ tstate->exc_type = type;
+ tstate->exc_value = value;
+ tstate->exc_traceback = tb;
+ Py_XDECREF(tmp_type);
+ Py_XDECREF(tmp_value);
+ Py_XDECREF(tmp_tb);
+}
+#endif
+
+/* PyErrExceptionMatches */
+ #if CYTHON_FAST_THREAD_STATE
+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);
+}
+#endif
+
+/* GetException */
+ #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) {
+#endif
+ PyObject *local_type, *local_value, *local_tb;
+#if CYTHON_FAST_THREAD_STATE
+ PyObject *tmp_type, *tmp_value, *tmp_tb;
+ local_type = tstate->curexc_type;
+ local_value = tstate->curexc_value;
+ local_tb = tstate->curexc_traceback;
+ tstate->curexc_type = 0;
+ tstate->curexc_value = 0;
+ tstate->curexc_traceback = 0;
+#else
+ PyErr_Fetch(&local_type, &local_value, &local_tb);
+#endif
+ PyErr_NormalizeException(&local_type, &local_value, &local_tb);
+#if CYTHON_FAST_THREAD_STATE
+ if (unlikely(tstate->curexc_type))
+#else
+ if (unlikely(PyErr_Occurred()))
+#endif
+ goto bad;
+ #if PY_MAJOR_VERSION >= 3
+ if (local_tb) {
+ if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
+ goto bad;
+ }
+ #endif
+ Py_XINCREF(local_tb);
+ Py_XINCREF(local_type);
+ Py_XINCREF(local_value);
+ *type = local_type;
+ *value = local_value;
+ *tb = local_tb;
+#if CYTHON_FAST_THREAD_STATE
+ tmp_type = tstate->exc_type;
+ tmp_value = tstate->exc_value;
+ tmp_tb = tstate->exc_traceback;
+ tstate->exc_type = local_type;
+ tstate->exc_value = local_value;
+ tstate->exc_traceback = local_tb;
+ Py_XDECREF(tmp_type);
+ Py_XDECREF(tmp_value);
+ Py_XDECREF(tmp_tb);
+#else
+ PyErr_SetExcInfo(local_type, local_value, local_tb);
+#endif
+ return 0;
+bad:
+ *type = 0;
+ *value = 0;
+ *tb = 0;
+ Py_XDECREF(local_type);
+ Py_XDECREF(local_value);
+ Py_XDECREF(local_tb);
+ return -1;
+}
+
/* 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;
@@ -5000,7 +6807,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(
@@ -5073,15 +6880,99 @@ static void __Pyx_AddTraceback(const char *funcname, int c_line,
0 /*PyObject *locals*/
);
if (!py_frame) goto bad;
- py_frame->f_lineno = py_line;
+ __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
PyTraceBack_Here(py_frame);
bad:
Py_XDECREF(py_code);
Py_XDECREF(py_frame);
}
-/* None */
- #if CYTHON_CCOMPLEX
+/* CIntToPy */
+ 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) {
+ if (sizeof(int) < sizeof(long)) {
+ return PyInt_FromLong((long) value);
+ } else if (sizeof(int) <= sizeof(unsigned long)) {
+ return PyLong_FromUnsignedLong((unsigned long) value);
+#ifdef HAVE_LONG_LONG
+ } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
+ return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
+#endif
+ }
+ } else {
+ if (sizeof(int) <= sizeof(long)) {
+ return PyInt_FromLong((long) value);
+#ifdef HAVE_LONG_LONG
+ } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
+ return PyLong_FromLongLong((PY_LONG_LONG) value);
+#endif
+ }
+ }
+ {
+ int one = 1; int little = (int)*(unsigned char *)&one;
+ unsigned char *bytes = (unsigned char *)&value;
+ return _PyLong_FromByteArray(bytes, sizeof(int),
+ little, !is_unsigned);
+ }
+}
+
+/* CIntFromPyVerify */
+ #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
+ __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
+#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
+ __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
+#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
+ {\
+ func_type value = func_value;\
+ if (sizeof(target_type) < sizeof(func_type)) {\
+ if (unlikely(value != (func_type) (target_type) value)) {\
+ func_type zero = 0;\
+ if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
+ return (target_type) -1;\
+ if (is_unsigned && unlikely(value < zero))\
+ goto raise_neg_overflow;\
+ else\
+ goto raise_overflow;\
+ }\
+ }\
+ return (target_type) value;\
+ }
+
+/* CIntToPy */
+ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int64_t(int64_t value) {
+ const int64_t neg_one = (int64_t) -1, const_zero = (int64_t) 0;
+ const int is_unsigned = neg_one > const_zero;
+ if (is_unsigned) {
+ if (sizeof(int64_t) < sizeof(long)) {
+ return PyInt_FromLong((long) value);
+ } else if (sizeof(int64_t) <= sizeof(unsigned long)) {
+ return PyLong_FromUnsignedLong((unsigned long) value);
+#ifdef HAVE_LONG_LONG
+ } else if (sizeof(int64_t) <= sizeof(unsigned PY_LONG_LONG)) {
+ return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
+#endif
+ }
+ } else {
+ if (sizeof(int64_t) <= sizeof(long)) {
+ return PyInt_FromLong((long) value);
+#ifdef HAVE_LONG_LONG
+ } else if (sizeof(int64_t) <= sizeof(PY_LONG_LONG)) {
+ return PyLong_FromLongLong((PY_LONG_LONG) value);
+#endif
+ }
+ }
+ {
+ int one = 1; int little = (int)*(unsigned char *)&one;
+ unsigned char *bytes = (unsigned char *)&value;
+ return _PyLong_FromByteArray(bytes, sizeof(int64_t),
+ little, !is_unsigned);
+ }
+}
+
+/* Declarations */
+ #if CYTHON_CCOMPLEX
#ifdef __cplusplus
static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
return ::std::complex< float >(x, y);
@@ -5100,61 +6991,86 @@ bad:
}
#endif
-/* None */
- #if CYTHON_CCOMPLEX
+/* Arithmetic */
+ #if CYTHON_CCOMPLEX
#else
- static CYTHON_INLINE int __Pyx_c_eqf(__pyx_t_float_complex a, __pyx_t_float_complex b) {
+ static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
return (a.real == b.real) && (a.imag == b.imag);
}
- static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sumf(__pyx_t_float_complex a, __pyx_t_float_complex b) {
+ static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
__pyx_t_float_complex z;
z.real = a.real + b.real;
z.imag = a.imag + b.imag;
return z;
}
- static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_difff(__pyx_t_float_complex a, __pyx_t_float_complex b) {
+ static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
__pyx_t_float_complex z;
z.real = a.real - b.real;
z.imag = a.imag - b.imag;
return z;
}
- static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prodf(__pyx_t_float_complex a, __pyx_t_float_complex b) {
+ static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
__pyx_t_float_complex z;
z.real = a.real * b.real - a.imag * b.imag;
z.imag = a.real * b.imag + a.imag * b.real;
return z;
}
- static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quotf(__pyx_t_float_complex a, __pyx_t_float_complex b) {
- __pyx_t_float_complex z;
- float denom = b.real * b.real + b.imag * b.imag;
- z.real = (a.real * b.real + a.imag * b.imag) / denom;
- z.imag = (a.imag * b.real - a.real * b.imag) / denom;
- return z;
+ #if 1
+ static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
+ if (b.imag == 0) {
+ return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real);
+ } else if (fabsf(b.real) >= fabsf(b.imag)) {
+ if (b.real == 0 && b.imag == 0) {
+ return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.imag);
+ } else {
+ float r = b.imag / b.real;
+ float s = 1.0 / (b.real + b.imag * r);
+ return __pyx_t_float_complex_from_parts(
+ (a.real + a.imag * r) * s, (a.imag - a.real * r) * s);
+ }
+ } else {
+ float r = b.real / b.imag;
+ float s = 1.0 / (b.imag + b.real * r);
+ return __pyx_t_float_complex_from_parts(
+ (a.real * r + a.imag) * s, (a.imag * r - a.real) * s);
+ }
+ }
+ #else
+ static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
+ if (b.imag == 0) {
+ return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real);
+ } else {
+ float denom = b.real * b.real + b.imag * b.imag;
+ return __pyx_t_float_complex_from_parts(
+ (a.real * b.real + a.imag * b.imag) / denom,
+ (a.imag * b.real - a.real * b.imag) / denom);
+ }
}
- static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_negf(__pyx_t_float_complex a) {
+ #endif
+ static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex a) {
__pyx_t_float_complex z;
z.real = -a.real;
z.imag = -a.imag;
return z;
}
- static CYTHON_INLINE int __Pyx_c_is_zerof(__pyx_t_float_complex a) {
+ static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex a) {
return (a.real == 0) && (a.imag == 0);
}
- static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conjf(__pyx_t_float_complex a) {
+ static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex a) {
__pyx_t_float_complex z;
z.real = a.real;
z.imag = -a.imag;
return z;
}
#if 1
- static CYTHON_INLINE float __Pyx_c_absf(__pyx_t_float_complex z) {
+ static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex z) {
#if !defined(HAVE_HYPOT) || defined(_MSC_VER)
return sqrtf(z.real*z.real + z.imag*z.imag);
#else
return hypotf(z.real, z.imag);
#endif
}
- static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_powf(__pyx_t_float_complex a, __pyx_t_float_complex b) {
+ static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
__pyx_t_float_complex z;
float r, lnr, theta, z_r, z_theta;
if (b.imag == 0 && b.real == (int)b.real) {
@@ -5172,14 +7088,14 @@ bad:
case 1:
return a;
case 2:
- z = __Pyx_c_prodf(a, a);
- return __Pyx_c_prodf(a, a);
+ z = __Pyx_c_prod_float(a, a);
+ return __Pyx_c_prod_float(a, a);
case 3:
- z = __Pyx_c_prodf(a, a);
- return __Pyx_c_prodf(z, a);
+ z = __Pyx_c_prod_float(a, a);
+ return __Pyx_c_prod_float(z, a);
case 4:
- z = __Pyx_c_prodf(a, a);
- return __Pyx_c_prodf(z, z);
+ z = __Pyx_c_prod_float(a, a);
+ return __Pyx_c_prod_float(z, z);
}
}
if (a.imag == 0) {
@@ -5189,7 +7105,7 @@ bad:
r = a.real;
theta = 0;
} else {
- r = __Pyx_c_absf(a);
+ r = __Pyx_c_abs_float(a);
theta = atan2f(a.imag, a.real);
}
lnr = logf(r);
@@ -5202,8 +7118,8 @@ bad:
#endif
#endif
-/* None */
- #if CYTHON_CCOMPLEX
+/* Declarations */
+ #if CYTHON_CCOMPLEX
#ifdef __cplusplus
static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
return ::std::complex< double >(x, y);
@@ -5222,61 +7138,86 @@ bad:
}
#endif
-/* None */
- #if CYTHON_CCOMPLEX
+/* Arithmetic */
+ #if CYTHON_CCOMPLEX
#else
- static CYTHON_INLINE int __Pyx_c_eq(__pyx_t_double_complex a, __pyx_t_double_complex b) {
+ static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
return (a.real == b.real) && (a.imag == b.imag);
}
- static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum(__pyx_t_double_complex a, __pyx_t_double_complex b) {
+ static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
__pyx_t_double_complex z;
z.real = a.real + b.real;
z.imag = a.imag + b.imag;
return z;
}
- static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff(__pyx_t_double_complex a, __pyx_t_double_complex b) {
+ static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
__pyx_t_double_complex z;
z.real = a.real - b.real;
z.imag = a.imag - b.imag;
return z;
}
- static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod(__pyx_t_double_complex a, __pyx_t_double_complex b) {
+ static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
__pyx_t_double_complex z;
z.real = a.real * b.real - a.imag * b.imag;
z.imag = a.real * b.imag + a.imag * b.real;
return z;
}
- static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot(__pyx_t_double_complex a, __pyx_t_double_complex b) {
- __pyx_t_double_complex z;
- double denom = b.real * b.real + b.imag * b.imag;
- z.real = (a.real * b.real + a.imag * b.imag) / denom;
- z.imag = (a.imag * b.real - a.real * b.imag) / denom;
- return z;
+ #if 1
+ static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
+ if (b.imag == 0) {
+ return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real);
+ } else if (fabs(b.real) >= fabs(b.imag)) {
+ if (b.real == 0 && b.imag == 0) {
+ return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.imag);
+ } else {
+ double r = b.imag / b.real;
+ double s = 1.0 / (b.real + b.imag * r);
+ return __pyx_t_double_complex_from_parts(
+ (a.real + a.imag * r) * s, (a.imag - a.real * r) * s);
+ }
+ } else {
+ double r = b.real / b.imag;
+ double s = 1.0 / (b.imag + b.real * r);
+ return __pyx_t_double_complex_from_parts(
+ (a.real * r + a.imag) * s, (a.imag * r - a.real) * s);
+ }
+ }
+ #else
+ static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
+ if (b.imag == 0) {
+ return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real);
+ } else {
+ double denom = b.real * b.real + b.imag * b.imag;
+ return __pyx_t_double_complex_from_parts(
+ (a.real * b.real + a.imag * b.imag) / denom,
+ (a.imag * b.real - a.real * b.imag) / denom);
+ }
}
- static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg(__pyx_t_double_complex a) {
+ #endif
+ static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex a) {
__pyx_t_double_complex z;
z.real = -a.real;
z.imag = -a.imag;
return z;
}
- static CYTHON_INLINE int __Pyx_c_is_zero(__pyx_t_double_complex a) {
+ static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex a) {
return (a.real == 0) && (a.imag == 0);
}
- static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj(__pyx_t_double_complex a) {
+ static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex a) {
__pyx_t_double_complex z;
z.real = a.real;
z.imag = -a.imag;
return z;
}
#if 1
- static CYTHON_INLINE double __Pyx_c_abs(__pyx_t_double_complex z) {
+ static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex z) {
#if !defined(HAVE_HYPOT) || defined(_MSC_VER)
return sqrt(z.real*z.real + z.imag*z.imag);
#else
return hypot(z.real, z.imag);
#endif
}
- static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow(__pyx_t_double_complex a, __pyx_t_double_complex b) {
+ static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
__pyx_t_double_complex z;
double r, lnr, theta, z_r, z_theta;
if (b.imag == 0 && b.real == (int)b.real) {
@@ -5294,14 +7235,14 @@ bad:
case 1:
return a;
case 2:
- z = __Pyx_c_prod(a, a);
- return __Pyx_c_prod(a, a);
+ z = __Pyx_c_prod_double(a, a);
+ return __Pyx_c_prod_double(a, a);
case 3:
- z = __Pyx_c_prod(a, a);
- return __Pyx_c_prod(z, a);
+ z = __Pyx_c_prod_double(a, a);
+ return __Pyx_c_prod_double(z, a);
case 4:
- z = __Pyx_c_prod(a, a);
- return __Pyx_c_prod(z, z);
+ z = __Pyx_c_prod_double(a, a);
+ return __Pyx_c_prod_double(z, z);
}
}
if (a.imag == 0) {
@@ -5311,7 +7252,7 @@ bad:
r = a.real;
theta = 0;
} else {
- r = __Pyx_c_abs(a);
+ r = __Pyx_c_abs_double(a);
theta = atan2(a.imag, a.real);
}
lnr = log(r);
@@ -5325,56 +7266,7 @@ bad:
#endif
/* CIntToPy */
- 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) {
- if (sizeof(int) < sizeof(long)) {
- return PyInt_FromLong((long) value);
- } else if (sizeof(int) <= sizeof(unsigned long)) {
- return PyLong_FromUnsignedLong((unsigned long) value);
- } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
- return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
- }
- } else {
- if (sizeof(int) <= sizeof(long)) {
- return PyInt_FromLong((long) value);
- } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
- return PyLong_FromLongLong((PY_LONG_LONG) value);
- }
- }
- {
- int one = 1; int little = (int)*(unsigned char *)&one;
- unsigned char *bytes = (unsigned char *)&value;
- return _PyLong_FromByteArray(bytes, sizeof(int),
- little, !is_unsigned);
- }
-}
-
-/* CIntFromPyVerify */
- #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
- __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
-#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
- __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
-#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
- {\
- func_type value = func_value;\
- if (sizeof(target_type) < sizeof(func_type)) {\
- if (unlikely(value != (func_type) (target_type) value)) {\
- func_type zero = 0;\
- if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
- return (target_type) -1;\
- if (is_unsigned && unlikely(value < zero))\
- goto raise_neg_overflow;\
- else\
- goto raise_overflow;\
- }\
- }\
- return (target_type) value;\
- }
-
-/* 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) {
@@ -5382,14 +7274,18 @@ bad:
return PyInt_FromLong((long) value);
} else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned long)) {
return PyLong_FromUnsignedLong((unsigned long) value);
+#ifdef HAVE_LONG_LONG
} else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned PY_LONG_LONG)) {
return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
+#endif
}
} else {
if (sizeof(enum NPY_TYPES) <= sizeof(long)) {
return PyInt_FromLong((long) value);
+#ifdef HAVE_LONG_LONG
} else if (sizeof(enum NPY_TYPES) <= sizeof(PY_LONG_LONG)) {
return PyLong_FromLongLong((PY_LONG_LONG) value);
+#endif
}
}
{
@@ -5401,7 +7297,7 @@ bad:
}
/* 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
@@ -5468,8 +7364,10 @@ bad:
#endif
if (sizeof(int) <= sizeof(unsigned long)) {
__PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
+#ifdef HAVE_LONG_LONG
} else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
__PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
+#endif
}
} else {
#if CYTHON_USE_PYLONG_INTERNALS
@@ -5536,8 +7434,10 @@ bad:
#endif
if (sizeof(int) <= sizeof(long)) {
__PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
+#ifdef HAVE_LONG_LONG
} else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
__PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
+#endif
}
}
{
@@ -5586,7 +7486,7 @@ raise_neg_overflow:
}
/* 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) {
@@ -5594,14 +7494,18 @@ raise_neg_overflow:
return PyInt_FromLong((long) value);
} else if (sizeof(long) <= sizeof(unsigned long)) {
return PyLong_FromUnsignedLong((unsigned long) value);
+#ifdef HAVE_LONG_LONG
} else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
+#endif
}
} else {
if (sizeof(long) <= sizeof(long)) {
return PyInt_FromLong((long) value);
+#ifdef HAVE_LONG_LONG
} else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
return PyLong_FromLongLong((PY_LONG_LONG) value);
+#endif
}
}
{
@@ -5613,7 +7517,7 @@ raise_neg_overflow:
}
/* CIntFromPy */
- static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
+ 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
@@ -5680,8 +7584,10 @@ raise_neg_overflow:
#endif
if (sizeof(long) <= sizeof(unsigned long)) {
__PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
+#ifdef HAVE_LONG_LONG
} else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
__PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
+#endif
}
} else {
#if CYTHON_USE_PYLONG_INTERNALS
@@ -5748,8 +7654,10 @@ raise_neg_overflow:
#endif
if (sizeof(long) <= sizeof(long)) {
__PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
+#ifdef HAVE_LONG_LONG
} else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
__PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
+#endif
}
}
{
@@ -5798,7 +7706,7 @@ raise_neg_overflow:
}
/* 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());
@@ -5814,7 +7722,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;
@@ -5832,7 +7740,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)
@@ -5897,7 +7805,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) {
@@ -5998,7 +7906,9 @@ static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
else return PyObject_IsTrue(x);
}
static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
+#if CYTHON_USE_TYPE_SLOTS
PyNumberMethods *m;
+#endif
const char *name = NULL;
PyObject *res = NULL;
#if PY_MAJOR_VERSION < 3
@@ -6007,8 +7917,9 @@ static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
if (PyLong_Check(x))
#endif
return __Pyx_NewRef(x);
+#if CYTHON_USE_TYPE_SLOTS
m = Py_TYPE(x)->tp_as_number;
-#if PY_MAJOR_VERSION < 3
+ #if PY_MAJOR_VERSION < 3
if (m && m->nb_int) {
name = "int";
res = PyNumber_Int(x);
@@ -6017,11 +7928,14 @@ static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
name = "long";
res = PyNumber_Long(x);
}
-#else
+ #else
if (m && m->nb_int) {
name = "int";
res = PyNumber_Long(x);
}
+ #endif
+#else
+ res = PyNumber_Int(x);
#endif
if (res) {
#if PY_MAJOR_VERSION < 3
diff --git a/pdal/libpdalpython.pyx b/pdal/libpdalpython.pyx
index d049bee..0728cc1 100644
--- a/pdal/libpdalpython.pyx
+++ b/pdal/libpdalpython.pyx
@@ -2,6 +2,8 @@
from libcpp.vector cimport vector
from libcpp.string cimport string
+from libc.stdint cimport uint32_t, int64_t
+from libcpp cimport bool
from cpython.version cimport PY_MAJOR_VERSION
cimport numpy as np
np.import_array()
@@ -9,16 +11,23 @@ np.import_array()
from cpython cimport PyObject, Py_INCREF
from cython.operator cimport dereference as deref, preincrement as inc
+
cdef extern from "pdal/plang/Array.hpp" namespace "pdal::plang":
cdef cppclass Array:
void* getPythonArray() except+
-cdef extern from "Pipeline.hpp" namespace "libpdalpython":
+cdef extern from "PyPipeline.hpp" namespace "libpdalpython":
cdef cppclass Pipeline:
Pipeline(const char* ) except +
- void execute() except +
- const char* getJSON()
+ int64_t execute() except +
+ bool validate() except +
+ string getPipeline() except +
+ string getMetadata() except +
+ string getSchema() except +
+ string getLog() except +
vector[Array*] getArrays() except +
+ int getLogLevel()
+ void setLogLevel(int)
cdef class PyPipeline:
cdef Pipeline *thisptr # hold a c++ instance which we're wrapping
@@ -33,25 +42,52 @@ cdef class PyPipeline:
def __dealloc__(self):
del self.thisptr
- property json:
+ property pipeline:
+ def __get__(self):
+ return self.thisptr.getPipeline().decode('UTF-8')
+
+ property metadata:
+ def __get__(self):
+ return self.thisptr.getMetadata().decode('UTF-8')
+
+ property loglevel:
+ def __get__(self):
+ return self.thisptr.getLogLevel()
+ def __set__(self, v):
+ self.thisptr.setLogLevel(v)
+
+ property log:
def __get__(self):
- return self.thisptr.getJSON().decode('UTF-8')
-
- def arrays(self):
- v = self.thisptr.getArrays()
- output = []
- cdef vector[Array*].iterator it = v.begin()
- cdef Array* a
- while it != v.end():
- ptr = deref(it)
- a = ptr#.get()
- o = a.getPythonArray()
- output.append(<object>o)
- inc(it)
- return output
+
+ return self.thisptr.getLog().decode('UTF-8')
+
+ property schema:
+ def __get__(self):
+ import json
+
+ j = self.thisptr.getSchema().decode('UTF-8')
+ return json.loads(j)
+
+ property arrays:
+ def __get__(self):
+ v = self.thisptr.getArrays()
+ output = []
+ cdef vector[Array*].iterator it = v.begin()
+ cdef Array* a
+ while it != v.end():
+ ptr = deref(it)
+ a = ptr#.get()
+ o = a.getPythonArray()
+ output.append(<object>o)
+ inc(it)
+ return output
def execute(self):
if not self.thisptr:
raise Exception("C++ Pipeline object not constructed!")
- self.thisptr.execute()
+ return self.thisptr.execute()
+ def validate(self):
+ if not self.thisptr:
+ raise Exception("C++ Pipeline object not constructed!")
+ return self.thisptr.validate()
diff --git a/pdal/pipeline.py b/pdal/pipeline.py
new file mode 100644
index 0000000..7cd7aef
--- /dev/null
+++ b/pdal/pipeline.py
@@ -0,0 +1,46 @@
+
+from pdal import libpdalpython
+
+class Pipeline(object):
+ """A PDAL pipeline object, defined by JSON. See http://www.pdal.io/pipeline.html for more
+ information on how to define one"""
+
+ def __init__(self, json):
+ if isinstance(json, str):
+ data = json
+ else:
+ data = json.decode('UTF-8')
+ self.p = libpdalpython.PyPipeline(data)
+
+ def get_metadata(self):
+ return self.p.metadata
+ metadata = property(get_metadata)
+
+ def get_schema(self):
+ return self.p.schema
+ schema = property(get_schema)
+
+ def get_pipeline(self):
+ return self.p.pipeline
+ pipeline = property(get_pipeline)
+
+ def get_loglevel(self):
+ return self.p.loglevel
+
+ def set_loglevel(self, v):
+ self.p.loglevel = v
+ loglevel = property(get_loglevel, set_loglevel)
+
+ def get_log(self):
+ return self.p.log
+ log = property(get_log)
+
+ def execute(self):
+ return self.p.execute()
+
+ def validate(self):
+ return self.p.validate()
+
+ def get_arrays(self):
+ return self.p.arrays
+ arrays = property(get_arrays)
diff --git a/pdal/pipeline_xml.py b/pdal/pipeline_xml.py
deleted file mode 100644
index 1b809f0..0000000
--- a/pdal/pipeline_xml.py
+++ /dev/null
@@ -1,62 +0,0 @@
-from xml.etree import ElementTree
-import pdal
-
-
-class XMLElement(object):
-
- def __init__(self):
- self.source = None
-
- def xml(self):
- element = ElementTree.Element(self.tag, self.attrib)
- if self.source:
- try:
- sources = iter(self.source)
- except TypeError:
- sources = [self.source]
- for source in sources:
- element.append(source.xml())
- return element
-
-
-class Pipeline(XMLElement):
-
- tag = 'Pipeline'
-
- def __init__(self, customversion=None):
- super(Pipeline, self).__init__()
- self.attrib = {'version': customversion or pdal.__version__}
-
- def xml(self):
- element = super(Pipeline, self).xml()
- return ElementTree.ElementTree(element)
-
-
-class PipelineComponent(XMLElement):
-
- def __init__(self, drivertype):
- super(PipelineComponent, self).__init__()
- self.attrib = {'type': self.typeformat % drivertype}
-
-
-class Stage(PipelineComponent):
- pass
-
-
-class Reader(Stage):
- tag = 'Reader'
- typeformat = 'readers.%s'
-
-
-class Filter(Stage):
- tag = 'Filter'
- typeformat = 'filters.%s'
-
-
-class MultiFilter(Filter):
- tag = 'MultiFilter'
-
-
-class Writer(PipelineComponent):
- tag = 'Writer'
- typeformat = 'writers.%s'
diff --git a/setup.py b/setup.py
index a74b90e..0542234 100644
--- a/setup.py
+++ b/setup.py
@@ -44,12 +44,15 @@ if 'PDAL_CONFIG' in os.environ:
log.debug('pdal_config: %s', pdal_config)
else:
pdal_config = 'pdal-config'
+ # in case of windows...
+ if os.name in ['nt']:
+ pdal_config += '.bat'
def get_pdal_config(option):
'''Get configuration option from the `pdal-config` development utility
- This code was adapted from Shaply's pdal-config stuff
+ This code was adapted from Shapely's geos-config stuff
'''
import subprocess
pdal_config = globals().get('pdal_config')
@@ -77,9 +80,7 @@ module_version = None
with open('pdal/__init__.py', 'r') as fp:
for line in fp:
if line.startswith("__version__"):
-
- module_version = Version(
- line.split("=")[1].strip().strip("\"'"))
+ module_version = Version(line.split("=")[1].strip().strip("\"'"))
break
if not module_version:
@@ -128,12 +129,17 @@ if pdal_config and "clean" not in sys.argv:
except ValueError:
pass
+ separator = ':'
+ if os.name in ['nt']:
+ separator = ';'
+
for item in get_pdal_config('--includes').split():
if item.startswith("-I"):
- include_dirs.extend(item[2:].split(":"))
+ include_dirs.extend(item[2:].split(separator))
+
for item in get_pdal_config('--libs').split():
if item.startswith("-L"):
- library_dirs.extend(item[2:].split(":"))
+ library_dirs.extend(item[2:].split(separator))
elif item.startswith("-l"):
libraries.append(item[2:])
@@ -145,7 +151,7 @@ DEBUG=False
if DEBUG:
extra_compile_args += ['-g','-O0']
-sources=['pdal/libpdalpython'+ext,"pdal/Pipeline.cpp", ]
+sources=['pdal/libpdalpython'+ext, "pdal/PyPipeline.cpp" ]
extensions = [DistutilsExtension("*",
sources,
include_dirs=include_dirs,
diff --git a/test/__init__.py b/test/__init__.py
index d5c8c8b..8a3c854 100644
--- a/test/__init__.py
+++ b/test/__init__.py
@@ -1,5 +1,3 @@
import sys
DATADIRECTORY = sys.argv.pop()
-print (DATADIRECTORY)
-from test.test_libpdal import test_suite
from test.test_pipeline import test_suite
diff --git a/test/test_libpdal.py b/test/test_libpdal.py
deleted file mode 100644
index ce3c9bc..0000000
--- a/test/test_libpdal.py
+++ /dev/null
@@ -1,74 +0,0 @@
-import pdal
-from pdal import libpdalpython
-import unittest
-import os
-
-DATADIRECTORY = os.environ.get('PDAL_TEST_DIR')
-if not DATADIRECTORY:
- DATADIRECTORY = "../test"
-
-class TestPDALArray(unittest.TestCase):
-
- DATADIRECTORY = os.environ.get('PDAL_TEST_DIR')
- if not DATADIRECTORY:
- DATADIRECTORY = "../test"
-
- def fetch_json(self, filename):
- import os
- fn = DATADIRECTORY + os.path.sep + filename
- output = ''
- with open(fn, 'rb') as f:
- output = f.read().decode('UTF-8')
- return output
-
- @unittest.skipUnless(os.path.exists(os.path.join(DATADIRECTORY, 'data/pipeline/pipeline_read.json')),
- os.path.join(DATADIRECTORY, 'data/pipeline/pipeline_read.json'))
- def test_construction(self):
- """Can we construct a PDAL pipeline"""
- json = self.fetch_json('/data/pipeline/pipeline_read.json')
- r = libpdalpython.PyPipeline(json)
-
- @unittest.skipUnless(os.path.exists(os.path.join(DATADIRECTORY, 'data/pipeline/pipeline_read.json')),
- "missing test data")
- def test_execution(self):
- """Can we execute a PDAL pipeline"""
- x = self.fetch_json('/data/pipeline/pipeline_read.json')
- r = libpdalpython.PyPipeline(x)
- r.execute()
- import sys
- self.assertGreater(len(r.json), 200)
-
- @unittest.skipUnless(os.path.exists(os.path.join(DATADIRECTORY, 'data/pipeline/pipeline_read.json')),
- "missing test data")
- def test_array(self):
- """Can we fetch PDAL data as a numpy array"""
- json = self.fetch_json('/data/pipeline/pipeline_read.json')
- r = libpdalpython.PyPipeline(json)
- r.execute()
- arrays = r.arrays()
- self.assertEqual(len(arrays), 1)
-
- a = arrays[0]
- self.assertAlmostEqual(a[0][0], 637012.24, 7)
- self.assertAlmostEqual(a[1064][2], 423.92, 7)
-
- @unittest.skipUnless(os.path.exists(os.path.join(DATADIRECTORY, 'data/filters/chip.json')),
- "missing test data")
- def test_merged_arrays(self):
- """Can we fetch merged PDAL data """
- json = self.fetch_json('/data/filters/chip.json')
- r = libpdalpython.PyPipeline(json)
- r.execute()
- arrays = r.arrays()
- self.assertEqual(len(arrays), 43)
- # data are going to all be a little different
- # due to sorting not being stable
-# for a in arrays:
-# self.assertAlmostEqual(a[0][0], 494057.30, 2)
-# self.assertAlmostEqual(a[0][2], 130.63, 2)
-def test_suite():
- return unittest.TestSuite(
- [TestPDALArray])
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/test/test_pipeline.py b/test/test_pipeline.py
index cd6be3d..e906150 100644
--- a/test/test_pipeline.py
+++ b/test/test_pipeline.py
@@ -1,47 +1,115 @@
import unittest
import pdal
-import pdal.pipeline_xml as pxml
-
-class TestXML(unittest.TestCase):
-
- def test_simplest_xml(self):
- p = pxml.Pipeline()
- p.source = pxml.Reader('foo')
- xml = p.xml()
- self.assertEqual(xml.getroot().attrib['version'], pdal.__version__)
- self.assertEqual(xml.find('Reader').attrib['type'],
- 'readers.foo')
-
- def test_writer(self):
- xml = pxml.Writer('bar').xml()
- self.assertEqual(xml.tag, 'Writer')
- self.assertEqual(xml.attrib['type'], 'writers.bar')
-
- def test_pipeline_version(self):
- xml = pxml.Pipeline('custom version').xml()
- self.assertEqual(xml.getroot().attrib['version'], 'custom version')
-
- def test_filter(self):
- xml = pxml.Filter('foo').xml()
- self.assertEqual(xml.tag, 'Filter')
- self.assertEqual(xml.attrib['type'], 'filters.foo')
-
- def test_multifilter(self):
- xml = pxml.MultiFilter('foo').xml()
- self.assertEqual(xml.tag, 'MultiFilter')
- self.assertEqual(xml.attrib['type'], 'filters.foo')
-
- def test_writer_source(self):
- writer = pxml.Writer('foo')
- writer.source = pxml.Reader('bar')
- xml = writer.xml()
- self.assertTrue(xml.find('Reader') is not None)
-
- def test_multifilter_source(self):
- mfilter = pxml.MultiFilter('multi')
- mfilter.source = [pxml.Reader('foo'), pxml.Reader('bar')]
- xml = mfilter.xml()
- self.assertEqual(len(xml.findall('Reader')), 2)
+import os
+
+DATADIRECTORY = os.environ.get('PDAL_TEST_DIR')
+if not DATADIRECTORY:
+ DATADIRECTORY = "../test"
+
+bad_json = u"""
+{
+ "pipeline": [
+ "nofile.las",
+ {
+ "type": "filters.sort",
+ "dimension": "X"
+ }
+ ]
+}
+"""
+
+class TestPipeline(unittest.TestCase):
+
+ DATADIRECTORY = os.environ.get('PDAL_TEST_DIR')
+ if not DATADIRECTORY:
+ DATADIRECTORY = "../test"
+ def fetch_json(self, filename):
+ import os
+ fn = DATADIRECTORY + os.path.sep + filename
+ output = ''
+ with open(fn, 'rb') as f:
+ output = f.read().decode('UTF-8')
+ return output
+
+ @unittest.skipUnless(os.path.exists(os.path.join(DATADIRECTORY, 'data/pipeline/sort.json')),
+ os.path.join(DATADIRECTORY, 'data/pipeline/sort.json'))
+ def test_construction(self):
+ """Can we construct a PDAL pipeline"""
+ json = self.fetch_json('/data/pipeline/sort.json')
+ r = pdal.Pipeline(json)
+
+ @unittest.skipUnless(os.path.exists(os.path.join(DATADIRECTORY, 'data/pipeline/sort.json')),
+ "missing test data")
+ def test_execution(self):
+ """Can we execute a PDAL pipeline"""
+ x = self.fetch_json('/data/pipeline/sort.json')
+ r = pdal.Pipeline(x)
+ r.execute()
+ self.assertGreater(len(r.pipeline), 200)
+
+ def test_validate(self):
+ """Do we complain with bad pipelines"""
+ r = pdal.Pipeline(bad_json)
+ with self.assertRaises(RuntimeError):
+ r.validate()
+
+ @unittest.skipUnless(os.path.exists(os.path.join(DATADIRECTORY, 'data/pipeline/sort.json')),
+ "missing test data")
+ def test_array(self):
+ """Can we fetch PDAL data as a numpy array"""
+ json = self.fetch_json('/data/pipeline/sort.json')
+ r = pdal.Pipeline(json)
+ r.execute()
+ arrays = r.arrays
+ self.assertEqual(len(arrays), 1)
+
+ a = arrays[0]
+ self.assertAlmostEqual(a[0][0], 635619.85, 7)
+ self.assertAlmostEqual(a[1064][2], 456.92, 7)
+
+ def test_metadata(self):
+ """Can we fetch PDAL metadata"""
+ json = self.fetch_json('/data/pipeline/sort.json')
+ r = pdal.Pipeline(json)
+ r.execute()
+ metadata = r.metadata
+ import json
+ j = json.loads(metadata)
+ self.assertEqual(j["metadata"]["readers.las"]["count"], 1065)
+
+
+ def test_no_execute(self):
+ """Does fetching arrays without executing throw an exception"""
+ json = self.fetch_json('/data/pipeline/sort.json')
+ r = pdal.Pipeline(json)
+ with self.assertRaises(RuntimeError):
+ r.arrays
+
+ def test_logging(self):
+ """Can we fetch log output"""
+ json = self.fetch_json('/data/pipeline/reproject.json')
+ r = pdal.Pipeline(json)
+ r.loglevel = 8
+ count = r.execute()
+ self.assertEqual(count, 789)
+ self.assertEqual(r.log.split()[0], '(pypipeline')
+
+ def test_schema(self):
+ """Fetching a schema works"""
+ json = self.fetch_json('/data/pipeline/sort.json')
+ r = pdal.Pipeline(json)
+ r.execute()
+ self.assertEqual(r.schema['schema']['dimensions'][0]['name'], 'X')
+
+ @unittest.skipUnless(os.path.exists(os.path.join(DATADIRECTORY, 'data/filters/chip.json')),
+ "missing test data")
+ def test_merged_arrays(self):
+ """Can we fetch multiple point views from merged PDAL data """
+ json = self.fetch_json('/data/filters/chip.json')
+ r = pdal.Pipeline(json)
+ r.execute()
+ arrays = r.arrays
+ self.assertEqual(len(arrays), 43)
def test_suite():
return unittest.TestSuite(
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/python-pdal.git
More information about the Pkg-grass-devel
mailing list