summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.rst69
-rw-r--r--PKG-INFO12
-rw-r--r--README.rst9
-rw-r--r--doc/source/ext/snapshotqt_directive.py29
-rw-r--r--doc/source/install.rst4
-rw-r--r--doc/source/modules/gui/icons.rst9
-rw-r--r--doc/source/modules/gui/plot/index.rst7
-rw-r--r--doc/source/modules/gui/plot/statswidget.rst8
-rw-r--r--doc/source/modules/gui/plot/utils.rst12
-rw-r--r--doc/source/modules/gui/plot3d/glutils.rst10
-rw-r--r--doc/source/modules/opencl/convolution.rst10
-rw-r--r--doc/source/modules/opencl/index.rst3
-rw-r--r--doc/source/modules/opencl/processing.rst10
-rw-r--r--doc/source/modules/opencl/statistics.rst10
-rw-r--r--doc/source/sample_code/img/plot3dUpdateScatterFromThread.pngbin0 -> 181775 bytes
-rw-r--r--doc/source/sample_code/index.rst91
-rw-r--r--examples/plot3dSceneWindow.py12
-rw-r--r--examples/plot3dUpdateScatterFromThread.py176
-rw-r--r--examples/plotLimits.py6
-rw-r--r--examples/plotStats.py63
-rw-r--r--examples/plotWidget.py72
-rw-r--r--package/debian8/control6
-rw-r--r--package/debian9/control6
-rw-r--r--requirements.txt2
-rw-r--r--setup.py11
-rw-r--r--silx.egg-info/PKG-INFO12
-rw-r--r--silx.egg-info/SOURCES.txt31
-rw-r--r--silx.egg-info/requires.txt2
-rw-r--r--silx/_config.py4
-rw-r--r--silx/app/view/About.py5
-rw-r--r--silx/gui/_glutils/Context.py42
-rw-r--r--silx/gui/_glutils/Program.py12
-rw-r--r--silx/gui/_glutils/Texture.py10
-rw-r--r--silx/gui/_glutils/__init__.py5
-rw-r--r--silx/gui/_glutils/utils.py73
-rw-r--r--silx/gui/colors.py8
-rw-r--r--silx/gui/console.py32
-rw-r--r--silx/gui/data/ArrayTableModel.py5
-rw-r--r--silx/gui/data/DataViews.py46
-rw-r--r--silx/gui/data/NXdataWidgets.py68
-rw-r--r--silx/gui/data/_VolumeWindow.py148
-rw-r--r--silx/gui/data/test/test_dataviewer.py6
-rw-r--r--silx/gui/data/test/test_textformatter.py4
-rw-r--r--silx/gui/dialog/AbstractDataFileDialog.py34
-rw-r--r--silx/gui/dialog/ColormapDialog.py3
-rw-r--r--silx/gui/dialog/ImageFileDialog.py25
-rw-r--r--silx/gui/dialog/test/test_colormapdialog.py6
-rw-r--r--silx/gui/dialog/test/test_datafiledialog.py15
-rw-r--r--silx/gui/dialog/test/test_imagefiledialog.py74
-rw-r--r--silx/gui/hdf5/test/test_hdf5.py8
-rw-r--r--silx/gui/plot/CompareImages.py77
-rw-r--r--silx/gui/plot/ComplexImageView.py85
-rw-r--r--silx/gui/plot/CurvesROIWidget.py46
-rw-r--r--silx/gui/plot/PlotToolButtons.py104
-rw-r--r--silx/gui/plot/PlotWidget.py122
-rw-r--r--silx/gui/plot/PlotWindow.py64
-rw-r--r--silx/gui/plot/Profile.py29
-rw-r--r--silx/gui/plot/ProfileMainWindow.py14
-rw-r--r--silx/gui/plot/ScatterView.py74
-rw-r--r--silx/gui/plot/StatsWidget.py436
-rw-r--r--silx/gui/plot/_BaseMaskToolsWidget.py48
-rw-r--r--silx/gui/plot/_utils/delaunay.py (renamed from silx/sx/test/__init__.py)42
-rw-r--r--silx/gui/plot/actions/control.py10
-rw-r--r--silx/gui/plot/backends/BackendBase.py17
-rw-r--r--silx/gui/plot/backends/BackendMatplotlib.py52
-rw-r--r--silx/gui/plot/backends/BackendOpenGL.py236
-rw-r--r--silx/gui/plot/backends/glutils/GLPlotTriangles.py193
-rw-r--r--silx/gui/plot/backends/glutils/GLText.py23
-rw-r--r--silx/gui/plot/backends/glutils/GLTexture.py3
-rw-r--r--silx/gui/plot/backends/glutils/__init__.py3
-rw-r--r--silx/gui/plot/items/__init__.py7
-rw-r--r--silx/gui/plot/items/complex.py121
-rw-r--r--silx/gui/plot/items/core.py197
-rw-r--r--silx/gui/plot/items/curve.py6
-rw-r--r--silx/gui/plot/items/image.py72
-rw-r--r--silx/gui/plot/items/marker.py17
-rw-r--r--silx/gui/plot/items/roi.py40
-rw-r--r--silx/gui/plot/items/scatter.py231
-rw-r--r--silx/gui/plot/matplotlib/__init__.py76
-rw-r--r--silx/gui/plot/test/testAlphaSlider.py5
-rw-r--r--silx/gui/plot/test/testComplexImageView.py6
-rw-r--r--silx/gui/plot/test/testCurvesROIWidget.py140
-rw-r--r--silx/gui/plot/test/testItem.py13
-rw-r--r--silx/gui/plot/test/testPlotWidget.py55
-rw-r--r--silx/gui/plot/test/testPlotWindow.py29
-rw-r--r--silx/gui/plot/test/testProfile.py6
-rw-r--r--silx/gui/plot/test/testStackView.py6
-rw-r--r--silx/gui/plot/test/testStats.py259
-rw-r--r--silx/gui/plot/tools/profile/ScatterProfileToolBar.py362
-rw-r--r--silx/gui/plot/tools/roi.py23
-rw-r--r--silx/gui/plot/tools/test/testScatterProfileToolBar.py1
-rw-r--r--silx/gui/plot/tools/test/testTools.py30
-rw-r--r--silx/gui/plot/tools/toolbars.py28
-rw-r--r--silx/gui/plot3d/Plot3DWidget.py52
-rw-r--r--silx/gui/plot3d/Plot3DWindow.py21
-rw-r--r--silx/gui/plot3d/SceneWidget.py27
-rw-r--r--silx/gui/plot3d/SceneWindow.py22
-rw-r--r--silx/gui/plot3d/_model/items.py512
-rw-r--r--silx/gui/plot3d/actions/mode.py61
-rw-r--r--silx/gui/plot3d/items/__init__.py4
-rw-r--r--silx/gui/plot3d/items/mesh.py5
-rw-r--r--silx/gui/plot3d/items/mixins.py18
-rw-r--r--silx/gui/plot3d/items/scatter.py108
-rw-r--r--silx/gui/plot3d/items/volume.py308
-rw-r--r--silx/gui/plot3d/scene/camera.py2
-rw-r--r--silx/gui/plot3d/scene/core.py11
-rw-r--r--silx/gui/plot3d/scene/cutplane.py18
-rw-r--r--silx/gui/plot3d/scene/function.py87
-rw-r--r--silx/gui/plot3d/scene/interaction.py60
-rw-r--r--silx/gui/plot3d/scene/primitives.py130
-rw-r--r--silx/gui/plot3d/scene/utils.py73
-rw-r--r--silx/gui/plot3d/scene/viewport.py75
-rw-r--r--silx/gui/plot3d/test/__init__.py4
-rw-r--r--silx/gui/plot3d/test/testSceneWidget.py84
-rw-r--r--silx/gui/plot3d/test/testSceneWidgetPicking.py96
-rw-r--r--silx/gui/plot3d/test/testSceneWindow.py209
-rw-r--r--silx/gui/plot3d/tools/PositionInfoWidget.py42
-rw-r--r--silx/gui/qt/_qt.py30
-rw-r--r--silx/gui/qt/inspect.py13
-rw-r--r--silx/gui/test/test_colors.py6
-rw-r--r--silx/gui/utils/testutils.py23
-rw-r--r--silx/image/bilinear.c39
-rw-r--r--silx/image/marchingsquares/_mergeimpl.cpp482
-rw-r--r--silx/image/shapes.c39
-rw-r--r--silx/image/tomography.py169
-rw-r--r--silx/io/commonh5.py8
-rw-r--r--silx/io/fabioh5.py4
-rw-r--r--silx/io/specfile.c55
-rw-r--r--silx/io/test/test_specfile.py13
-rw-r--r--silx/io/test/test_spech5.py11
-rw-r--r--silx/io/test/test_spectoh5.py4
-rw-r--r--silx/io/test/test_utils.py20
-rw-r--r--silx/io/utils.py7
-rw-r--r--silx/math/chistogramnd.c466
-rw-r--r--silx/math/chistogramnd_lut.c464
-rw-r--r--silx/math/colormap.c464
-rw-r--r--silx/math/combo.c40
-rw-r--r--silx/math/fft/test/__init__.py7
-rw-r--r--silx/math/fft/test/test_fft.py247
-rw-r--r--silx/math/fit/bgtheories.py4
-rw-r--r--silx/math/fit/filters.c34
-rw-r--r--silx/math/fit/functions.c34
-rw-r--r--silx/math/fit/peaks.c34
-rw-r--r--silx/math/marchingcubes.cpp463
-rw-r--r--silx/math/medianfilter/include/median_filter.hpp20
-rw-r--r--silx/math/medianfilter/medianfilter.cpp458
-rw-r--r--silx/math/medianfilter/test/benchmark.py4
-rw-r--r--silx/math/test/test_HistogramndLut_nominal.py3
-rw-r--r--silx/math/test/test_colormap.py8
-rw-r--r--silx/math/test/test_combo.py21
-rw-r--r--silx/math/test/test_histogramnd_nominal.py27
-rw-r--r--silx/opencl/backprojection.py11
-rw-r--r--silx/opencl/common.py52
-rw-r--r--silx/opencl/convolution.py555
-rw-r--r--silx/opencl/processing.py57
-rw-r--r--silx/opencl/sinofilter.py205
-rw-r--r--silx/opencl/sparse.py331
-rw-r--r--silx/opencl/test/__init__.py4
-rw-r--r--silx/opencl/test/test_backprojection.py21
-rw-r--r--silx/opencl/test/test_convolution.py263
-rw-r--r--silx/opencl/test/test_sparse.py192
-rw-r--r--silx/resources/__init__.py200
-rw-r--r--silx/resources/gui/icons/compare-mode-a-minus-b.pngbin0 -> 3862 bytes
-rw-r--r--silx/resources/gui/icons/compare-mode-a-minus-b.svg25
-rw-r--r--silx/resources/gui/icons/eye.pngbin0 -> 755 bytes
-rw-r--r--silx/resources/gui/icons/eye.svg23
-rw-r--r--silx/resources/gui/icons/pointing-hand.pngbin0 -> 680 bytes
-rw-r--r--silx/resources/gui/icons/pointing-hand.svg2
-rw-r--r--silx/resources/opencl/convolution.cl312
-rw-r--r--silx/resources/opencl/convolution_textures.cl374
-rw-r--r--silx/resources/opencl/sparse.cl84
-rw-r--r--silx/setup.py3
-rw-r--r--silx/sx/__init__.py15
-rw-r--r--silx/sx/_plot.py8
-rw-r--r--silx/sx/_plot3d.py7
-rw-r--r--silx/test/__init__.py4
-rw-r--r--silx/test/test_resources.py57
-rw-r--r--silx/test/test_sx.py (renamed from silx/sx/test/test_sx.py)23
-rw-r--r--silx/test/utils.py11
-rw-r--r--silx/utils/ExternalResources.py321
-rw-r--r--silx/utils/enum.py79
-rw-r--r--silx/utils/proxy.py39
-rw-r--r--silx/utils/test/__init__.py8
-rw-r--r--silx/utils/test/test_enum.py96
-rw-r--r--silx/utils/test/test_external_resources.py99
-rw-r--r--silx/utils/test/test_number.py3
-rw-r--r--silx/utils/test/test_proxy.py53
-rw-r--r--silx/utils/test/test_weakref.py6
-rw-r--r--version.py4
189 files changed, 10098 insertions, 3932 deletions
diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 0b353a1..ec0b01d 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -1,6 +1,41 @@
Change Log
==========
+0.11.0: 2019/07/03
+------------------
+
+ * Graphical user interface:
+
+ * Plot:
+
+ * Add sample code on how to update a plot3d widget from a thread
+ * ScatterPlot: add the possibility to plot as a surface using Delaunay triangulation
+ * ScatterView: add a tool button to change scatter visualization mode (ex. Solid)
+ * (OpenGL backend) Fix memory leak when creating/deleting widgets in a loop
+
+
+ * Plot3D:
+
+ * Add an action to toggle plot3d's `PositionInfoWidget` picking.
+ * Add a 3D complex field visualization: Complex3DField (also available from silx view)
+ * Add a PositionInfoWidget and a tool button to toggle the picking mode to SceneWindow
+ * Add the possibility to render the scene with linear fog.
+
+ * `silx.gui.widgets`:
+
+ * Fix ImageFileDialog selection for a cube with shape like `1,y,x`.
+
+ * Miscellaneous:
+
+ * Requires numpy version >= 1.12
+ * HDF5 creator script
+ * Support of Python 3.4 is dropped. Please upgrade to at least Python 3.5.
+ * This is the last version to officially support Python 2.7.
+ * The source code is Python 3.8 ready.
+ * Improve PySide2 support. PyQt4 and PySide are deprecated.
+
+
+
0.10.0: 2019/02/19
------------------
@@ -150,7 +185,7 @@ Change Log
* Graphical user interface:
* Plot:
-
+
* Adds support of x-axis date/time ticks for time series display (see `silx.gui.plot.items.XAxis.setTickMode`)
* Adds support of interactive authoring of regions of interest (see `silx.gui.plot.items.roi` and `silx.gui.plot.tools.roi`)
* Adds `StatsWidget` widget for displaying statistics on data displayed in a `PlotWidget`
@@ -284,7 +319,7 @@ Change Log
* OpenCl. Tomography. Implement a filtered back projection.
* Add a *PrintPreview* widget and a *PrintPreviewToolButton* for *PlotWidget*.
* Plot:
-
+
* Add a context menu on right click.
* Add a *ComplexImageView* widget.
* Merged abstract *Plot* class with *PlotWidget* class.
@@ -295,14 +330,14 @@ Change Log
* Refactor plot actions, new sub-package *silx.gui.plot.actions*.
* Add signals on *PlotWidget* items notifying updates.
* Mask. Support loading of TIFF images.
-
+
* Plot3d:
-
+
* Rework toolbar and interaction to use only the left mouse button.
* Support any colormap.
-
+
* Hdf5TreeView:
-
+
* Add an API to select a single tree node item (*setSelectedH5Node*)
* Better support and display of types.
* New column for displaying the kind of links.
@@ -312,25 +347,25 @@ Change Log
* Median filter. Add new modes (*reflect, mirror, shrink*) in addition to *nearest*.
* IO:
-
+
* Rename module *spectoh5* to *convert*. Add support for conversion of *fabio* formats.
* Support NPZ format.
* Support opening an URI (*silx.io.open(filename::path)*).
* *Group* methods *.keys*, *.value* and *.items* now return lists in Python 2
and iterators in Python 3.
-
+
* Image. Add tomography utils: *phantomgenerator* to produce Shepp-Logan phantom, function to compute center of rotation (*calc_center_corr*, *calc_center_centroid*) and rescale the intensity of an image (*rescale_intensity*).
-
+
* Commands:
-
+
* *silx view*:
-
+
* Add command line option *--use-opengl-plot*.
* Add command line option *--debug*, to print dataset reading errors.
* Support opening URI (*silx view filename::path*).
-
+
* *silx convert*. New command line application to convert supported data files to HDF5.
-
+
* Enable usage of *silx.resources* for other projects.
* The *silx* license is now fully MIT.
@@ -339,7 +374,7 @@ Change Log
-----------------
* Adds OpenGL backend to 1D and 2D graphics
- * Adds Object Oriented plot API with Curve, Histogram, Image, ImageRgba and Scatter items.
+ * Adds Object Oriented plot API with Curve, Histogram, Image, ImageRgba and Scatter items.
* Implements generic launcher (``silx view``)
* NXdataViewer. Module providing NeXus NXdata support
* Math/OpenCL. Implementation of median filter.
@@ -352,7 +387,7 @@ Change Log
* ROIs. Simplification of API: setRois, getRois, calculateRois.
* ROIs. Correction of calculation bug when the X-axis values were not ordered.
* Sift. Moves package from ``silx.image`` to ``silx.opencl``.
-
+
0.4.0: 2017/02/01
-----------------
@@ -366,7 +401,7 @@ Change Log
* Adds pixel intensity histogram action
* Adds histogram parameter to addCurve
* Refactoring. Create silx.gui.data (include widgets for data)
- * Refactoring. Rename utils.load as silx.io.open
+ * Refactoring. Rename utils.load as silx.io.open
* Changes active curve behavior in Plot. No default active curve is set by default
* Fit Action. Add polynomial functions and background customization
* PlotWindow. Provide API to access toolbar actions
@@ -388,7 +423,7 @@ Change Log
* Adds HDF5 load API (supporting Spec files) to silx.io.utils module
* Adds SpecFile support for multiple MCA headers
* Adds HDF5 TreeView
- * Adds FitManager to silx.math.fit and FitWidget to silx.gui.fit
+ * Adds FitManager to silx.math.fit and FitWidget to silx.gui.fit
* Adds ThreadPoolPushButton to silx.gui.widgets
* Adds getDataRange function to plot widget
* Adds loadUi, Slot and Property to qt.py
diff --git a/PKG-INFO b/PKG-INFO
index a5b84db..1f1f36b 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: silx
-Version: 0.10.1
+Version: 0.11.0
Summary: Software library for X-ray data analysis
Home-page: http://www.silx.org/
Author: data analysis unit
@@ -24,7 +24,8 @@ Description:
images file formats.
* OpenCL-based data processing: image alignment (SIFT),
image processing (median filter, histogram),
- filtered backprojection for tomography
+ filtered backprojection for tomography,
+ convolution
* Data reduction: histogramming, fitting, median filter
* A set of Qt widgets, including:
@@ -55,13 +56,13 @@ Description:
Or using Anaconda on Linux and MacOS:
- .. code-block:: bash
-
+ .. code-block:: bash
+
conda install silx -c conda-forge
Unofficial packages for different distributions are available:
- - Unofficial Debian8 packages are available at http://www.silx.org/pub/debian/
+ - Unofficial Debian9 packages are available at http://www.silx.org/pub/debian/
- CentOS 7 rpm packages are provided by Max IV at: http://pubrepo.maxiv.lu.se/rpm/el7/x86_64/
- Fedora 23 rpm packages are provided by Max IV at http://pubrepo.maxiv.lu.se/rpm/fc23/x86_64/
- Arch Linux (AUR) packages are also available: https://aur.archlinux.org/packages/python-silx
@@ -129,7 +130,6 @@ Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX
Classifier: Programming Language :: Cython
Classifier: Programming Language :: Python :: 2.7
-Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
diff --git a/README.rst b/README.rst
index bd91773..6b30551 100644
--- a/README.rst
+++ b/README.rst
@@ -16,7 +16,8 @@ The current version features:
images file formats.
* OpenCL-based data processing: image alignment (SIFT),
image processing (median filter, histogram),
- filtered backprojection for tomography
+ filtered backprojection for tomography,
+ convolution
* Data reduction: histogramming, fitting, median filter
* A set of Qt widgets, including:
@@ -47,13 +48,13 @@ To install silx with a minimal set of dependencies, run:
Or using Anaconda on Linux and MacOS:
-.. code-block:: bash
-
+.. code-block:: bash
+
conda install silx -c conda-forge
Unofficial packages for different distributions are available:
-- Unofficial Debian8 packages are available at http://www.silx.org/pub/debian/
+- Unofficial Debian9 packages are available at http://www.silx.org/pub/debian/
- CentOS 7 rpm packages are provided by Max IV at: http://pubrepo.maxiv.lu.se/rpm/el7/x86_64/
- Fedora 23 rpm packages are provided by Max IV at http://pubrepo.maxiv.lu.se/rpm/fc23/x86_64/
- Arch Linux (AUR) packages are also available: https://aur.archlinux.org/packages/python-silx
diff --git a/doc/source/ext/snapshotqt_directive.py b/doc/source/ext/snapshotqt_directive.py
index 53508df..81305e0 100644
--- a/doc/source/ext/snapshotqt_directive.py
+++ b/doc/source/ext/snapshotqt_directive.py
@@ -1,7 +1,7 @@
# coding: utf-8
# /*##########################################################################
#
-# Copyright (c) 2004-2018 European Synchrotron Radiation Facility
+# Copyright (c) 2004-2019 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -39,41 +39,14 @@ __date__ = "07/12/2018"
import os
import logging
-import subprocess
import sys
-import distutils
-import shutil
from docutils.parsers.rst.directives.images import Image
from docutils.parsers.rst import directives
-from docutils.parsers.rst import Directive
-from docutils.nodes import fully_normalize_name
-from docutils import nodes
# from docutils.par
# note: conf.py is patching the PATH so this will be the 'current' qt version
-
-def _distutils_dir_name(dname="lib"):
- """
- Returns the name of a distutils build directory
- """
- platform = distutils.util.get_platform()
- architecture = "%s.%s-%i.%i" % (dname, platform,
- sys.version_info[0], sys.version_info[1])
- return architecture
-
home = os.path.abspath(os.path.join(__file__, "..", "..", "..", '..'))
-home = os.path.abspath(home)
-LIBPATH = os.path.join(home, 'build', _distutils_dir_name('lib'))
-
-if not os.path.exists(LIBPATH):
- raise RuntimeError("%s is not on the path. Fix your PYTHONPATH and restart sphinx." % project)
-
-sys.path.append(LIBPATH)
-env = os.environ.copy()
-env.update(
- {"PYTHONPATH": LIBPATH + os.pathsep + os.environ.get("PYTHONPATH", ""),
- "PATH": os.environ.get("PATH", "")})
if not os.environ.get('DIRECTIVE_SNAPSHOT_QT') == 'True':
diff --git a/doc/source/install.rst b/doc/source/install.rst
index 7941a7b..3862e4c 100644
--- a/doc/source/install.rst
+++ b/doc/source/install.rst
@@ -110,7 +110,7 @@ Linux
Packages are available for a few distributions:
-- Debian 8: see `Installing a Debian package`_.
+- Debian 9: see `Installing a Debian package`_.
- `CentOS 7 RPM packages <http://pubrepo.maxiv.lu.se/rpm/el7/x86_64/>`_ provided by the Max IV institute at Lund, Sweden.
- `Fedora 23 rpm packages <http://pubrepo.maxiv.lu.se/rpm/fc23/x86_64/>`_ provided by the Max IV institute at Lund, Sweden.
- `Arch Linux (AUR) package <https://aur.archlinux.org/packages/python-silx>`_ provided by Leonid Bloch.
@@ -125,7 +125,7 @@ You can also follow one of those installation procedures:
Installing a Debian package
+++++++++++++++++++++++++++
-Debian 8 (Jessie) packages are available on http://www.silx.org/pub/debian/ for amd64 computers.
+Debian 9 (Stretch) packages are available on http://www.silx.org/pub/debian/ for amd64 computers.
To install it, you need to download this file :
.. code-block:: bash
diff --git a/doc/source/modules/gui/icons.rst b/doc/source/modules/gui/icons.rst
index 659bc4c..dbd58b4 100644
--- a/doc/source/modules/gui/icons.rst
+++ b/doc/source/modules/gui/icons.rst
@@ -75,6 +75,8 @@ Available icons
- compare-align-stretch
* - |compare-keypoints|
- compare-keypoints
+ * - |compare-mode-a-minus-b|
+ - compare-mode-a-minus-b
* - |compare-mode-a|
- compare-mode-a
* - |compare-mode-b|
@@ -121,6 +123,8 @@ Available icons
- draw-rubber
* - |edit-copy|
- edit-copy
+ * - |eye|
+ - eye
* - |first|
- first
* - |folder|
@@ -251,6 +255,8 @@ Available icons
- plot-ylog
* - |plot-yup|
- plot-yup
+ * - |pointing-hand|
+ - pointing-hand
* - |previous|
- previous
* - |profile-clear|
@@ -370,6 +376,7 @@ Available icons
.. |compare-align-origin| image:: ../../../../silx/resources/gui/icons/compare-align-origin.png
.. |compare-align-stretch| image:: ../../../../silx/resources/gui/icons/compare-align-stretch.png
.. |compare-keypoints| image:: ../../../../silx/resources/gui/icons/compare-keypoints.png
+.. |compare-mode-a-minus-b| image:: ../../../../silx/resources/gui/icons/compare-mode-a-minus-b.png
.. |compare-mode-a| image:: ../../../../silx/resources/gui/icons/compare-mode-a.png
.. |compare-mode-b| image:: ../../../../silx/resources/gui/icons/compare-mode-b.png
.. |compare-mode-hline| image:: ../../../../silx/resources/gui/icons/compare-mode-hline.png
@@ -393,6 +400,7 @@ Available icons
.. |draw-pencil| image:: ../../../../silx/resources/gui/icons/draw-pencil.png
.. |draw-rubber| image:: ../../../../silx/resources/gui/icons/draw-rubber.png
.. |edit-copy| image:: ../../../../silx/resources/gui/icons/edit-copy.png
+.. |eye| image:: ../../../../silx/resources/gui/icons/eye.png
.. |first| image:: ../../../../silx/resources/gui/icons/first.png
.. |folder| image:: ../../../../silx/resources/gui/icons/folder.png
.. |image-mask| image:: ../../../../silx/resources/gui/icons/image-mask.png
@@ -458,6 +466,7 @@ Available icons
.. |plot-ydown| image:: ../../../../silx/resources/gui/icons/plot-ydown.png
.. |plot-ylog| image:: ../../../../silx/resources/gui/icons/plot-ylog.png
.. |plot-yup| image:: ../../../../silx/resources/gui/icons/plot-yup.png
+.. |pointing-hand| image:: ../../../../silx/resources/gui/icons/pointing-hand.png
.. |previous| image:: ../../../../silx/resources/gui/icons/previous.png
.. |profile-clear| image:: ../../../../silx/resources/gui/icons/profile-clear.png
.. |profile1D| image:: ../../../../silx/resources/gui/icons/profile1D.png
diff --git a/doc/source/modules/gui/plot/index.rst b/doc/source/modules/gui/plot/index.rst
index 6f06830..01cb29b 100644
--- a/doc/source/modules/gui/plot/index.rst
+++ b/doc/source/modules/gui/plot/index.rst
@@ -61,6 +61,13 @@ Additionnal plot tool widgets:
statswidget.rst
stats/index.rst
+Utilities
+
+.. toctree::
+ :maxdepth: 2
+
+ utils.rst
+
Internals
---------
diff --git a/doc/source/modules/gui/plot/statswidget.rst b/doc/source/modules/gui/plot/statswidget.rst
index 6cd8ecf..1574abc 100644
--- a/doc/source/modules/gui/plot/statswidget.rst
+++ b/doc/source/modules/gui/plot/statswidget.rst
@@ -32,18 +32,18 @@
:members:
-:class:`BasicGridStatsWidget` class
+:class:`BasicLineStatsWidget` class
-----------------------------------
-.. autoclass:: BasicGridStatsWidget
+.. autoclass:: BasicLineStatsWidget
:show-inheritance:
:members:
-:class:`BasicLineStatsWidget` class
+:class:`BasicGridStatsWidget` class
-----------------------------------
-.. autoclass:: BasicLineStatsWidget
+.. autoclass:: BasicGridStatsWidget
:show-inheritance:
:members:
diff --git a/doc/source/modules/gui/plot/utils.rst b/doc/source/modules/gui/plot/utils.rst
new file mode 100644
index 0000000..e930208
--- /dev/null
+++ b/doc/source/modules/gui/plot/utils.rst
@@ -0,0 +1,12 @@
+.. currentmodule:: silx.gui.plot.utils
+
+
+:mod:`axis`: utilities for plots
+================================
+
+SyncAxes
+--------
+
+.. autoclass:: silx.gui.plot.utils.axis.SyncAxes
+ :members:
+
diff --git a/doc/source/modules/gui/plot3d/glutils.rst b/doc/source/modules/gui/plot3d/glutils.rst
index 2c36e83..21781d9 100644
--- a/doc/source/modules/gui/plot3d/glutils.rst
+++ b/doc/source/modules/gui/plot3d/glutils.rst
@@ -13,13 +13,17 @@
Utility functions
-----------------
-.. currentmodule:: silx.gui._glutils
+.. currentmodule:: silx.gui._glutils.Context
For OpenGL context management:
-.. autofunction:: getGLContext
+.. autofunction:: getCurrent
+
+.. autofunction:: setCurrent
-.. autofunction:: setGLContextGetter
+.. autofunction:: current
+
+.. currentmodule:: silx.gui._glutils
For type checking and conversion:
diff --git a/doc/source/modules/opencl/convolution.rst b/doc/source/modules/opencl/convolution.rst
new file mode 100644
index 0000000..225d016
--- /dev/null
+++ b/doc/source/modules/opencl/convolution.rst
@@ -0,0 +1,10 @@
+
+.. currentmodule:: silx.opencl
+
+:mod:`convolution`: Convolution
+-------------------------------
+
+.. automodule:: silx.opencl.convolution
+ :members: Convolution, gaussian_kernel
+ :show-inheritance:
+ :undoc-members:
diff --git a/doc/source/modules/opencl/index.rst b/doc/source/modules/opencl/index.rst
index 20a3a01..ef8b9e6 100644
--- a/doc/source/modules/opencl/index.rst
+++ b/doc/source/modules/opencl/index.rst
@@ -11,6 +11,9 @@
sift/index.rst
fbp.rst
sinofilter.rst
+ processing.rst
+ convolution.rst
+ statistics.rst
medfilt.rst
codec_cbf.rst
diff --git a/doc/source/modules/opencl/processing.rst b/doc/source/modules/opencl/processing.rst
new file mode 100644
index 0000000..a246cc6
--- /dev/null
+++ b/doc/source/modules/opencl/processing.rst
@@ -0,0 +1,10 @@
+
+.. currentmodule:: silx.opencl
+
+:mod:`processing`: Processing
+-------------------------------
+
+.. automodule:: silx.opencl.processing
+ :members: OpenclProcessing, KernelContainer
+ :show-inheritance:
+ :undoc-members:
diff --git a/doc/source/modules/opencl/statistics.rst b/doc/source/modules/opencl/statistics.rst
new file mode 100644
index 0000000..0db7566
--- /dev/null
+++ b/doc/source/modules/opencl/statistics.rst
@@ -0,0 +1,10 @@
+
+.. currentmodule:: silx.opencl
+
+:mod:`statistics`: Statistics
+-------------------------------
+
+.. automodule:: silx.opencl.statistics
+ :members: Statistics
+ :show-inheritance:
+ :undoc-members:
diff --git a/doc/source/sample_code/img/plot3dUpdateScatterFromThread.png b/doc/source/sample_code/img/plot3dUpdateScatterFromThread.png
new file mode 100644
index 0000000..acd1c58
--- /dev/null
+++ b/doc/source/sample_code/img/plot3dUpdateScatterFromThread.png
Binary files differ
diff --git a/doc/source/sample_code/index.rst b/doc/source/sample_code/index.rst
index a5cbf11..409391f 100644
--- a/doc/source/sample_code/index.rst
+++ b/doc/source/sample_code/index.rst
@@ -25,8 +25,7 @@ All sample codes can be downloaded as a zip file: |sample_code_archive|.
- Description
* - :download:`icons.py <../../../examples/icons.py>`
- .. image:: img/icons.png
- :height: 150px
- :align: center
+ :width: 150px
- Display icons and animated icons provided by silx.
:mod:`silx.gui.data` and :mod:`silx.gui.hdf5`
@@ -41,18 +40,15 @@ All sample codes can be downloaded as a zip file: |sample_code_archive|.
- Description
* - :download:`customHdf5TreeModel.py <../../../examples/customHdf5TreeModel.py>`
- .. image:: img/customHdf5TreeModel.png
- :height: 150px
- :align: center
+ :width: 150px
- Qt Hdf5 widget examples
* - :download:`customDataView.py <../../../examples/customDataView.py>`
- .. image:: img/customDataView.png
- :height: 150px
- :align: center
+ :width: 150px
- Qt data view example
* - :download:`hdf5widget.py <../../../examples/hdf5widget.py>`
- .. image:: img/hdf5widget.png
- :height: 150px
- :align: center
+ :width: 150px
- Qt Hdf5 widget examples
.. note:: This module has a dependency on the `h5py <http://www.h5py.org/>`_
@@ -71,8 +67,7 @@ All sample codes can be downloaded as a zip file: |sample_code_archive|.
- Description
* - :download:`fileDialog.py <../../../examples/fileDialog.py>`
- .. image:: img/fileDialog.png
- :height: 150px
- :align: center
+ :width: 150px
- Example for the use of the ImageFileDialog.
:mod:`silx.gui.widgets`
@@ -87,14 +82,13 @@ All sample codes can be downloaded as a zip file: |sample_code_archive|.
- Description
* - :download:`periodicTable.py <../../../examples/periodicTable.py>`
- .. image:: img/periodicTable.png
- :height: 150px
+ :width: 150px
:align: center
- This script is a simple example of how to use the periodic table widgets,
select elements and connect signals.
* - :download:`simplewidget.py <../../../examples/simplewidget.py>`
- .. image:: img/simplewidget.png
- :height: 150px
- :align: center
+ :width: 150px
- This script shows a gallery of simple widgets provided by silx.
It shows the following widgets:
@@ -117,8 +111,7 @@ Widgets
- Description
* - :download:`imageview.py <../../../examples/imageview.py>`
- .. image:: img/imageview.png
- :height: 150px
- :align: center
+ :width: 150px
- Example to show the use of :mod:`~silx.gui.plot.ImageView` widget.
It can be used to open an EDF or TIFF file from the shell command line.
@@ -134,14 +127,12 @@ Widgets
``./bootstrap.py python examples/imageview.py <file to open>``
* - :download:`stackView.py <../../../examples/stackView.py>`
- .. image:: img/stackView.png
- :height: 150px
- :align: center
+ :width: 150px
- This script is a simple example to illustrate how to use the
:mod:`~silx.gui.plot.StackView` widget.
* - :download:`colormapDialog.py <../../../examples/colormapDialog.py>`
- .. image:: img/colormapDialog.png
- :height: 150px
- :align: center
+ :width: 150px
- This script shows the features of a :mod:`~silx.gui.dialog.ColormapDialog`.
:class:`silx.gui.plot.actions.PlotAction`
@@ -158,16 +149,14 @@ Sample code that adds buttons to the toolbar of a silx plot widget.
- Description
* - :download:`plotClearAction.py <../../../examples/plotClearAction.py>`
- .. image:: img/plotClearAction.png
- :height: 150px
- :align: center
+ :width: 150px
- This script shows how to create a minimalistic
:class:`~silx.gui.plot.actions.PlotAction` that clear the plot.
This illustrates how to add more buttons in a plot widget toolbar.
* - :download:`shiftPlotAction.py <../../../examples/shiftPlotAction.py>`
- .. image:: img/shiftPlotAction.png
- :height: 150px
- :align: center
+ :width: 150px
- This script is a simple (trivial) example of how to create a :class:`~silx.gui.plot.PlotWindow`,
create a custom :class:`~silx.gui.plot.actions.PlotAction` and add it to the toolbar.
@@ -176,8 +165,7 @@ Sample code that adds buttons to the toolbar of a silx plot widget.
* - :download:`fftPlotAction.py <../../../examples/fftPlotAction.py>`,
:download:`fft.png <../../../examples/fft.png>`
- .. image:: img/fftPlotAction.png
- :height: 150px
- :align: center
+ :width: 150px
- This script is a simple example of how to create a :class:`~silx.gui.plot.PlotWindow`
with a custom :class:`~silx.gui.plot.actions.PlotAction` added to the toolbar.
@@ -206,8 +194,7 @@ Sample code that adds specific tools or functions to plot widgets.
- Description
* - :download:`plotWidget.py <../../../examples/plotWidget.py>`
- .. image:: img/plotWidget.png
- :height: 150px
- :align: center
+ :width: 150px
- This script shows how to create a custom window around a PlotWidget.
It subclasses :class:`QMainWindow`, uses a :class:`~silx.gui.plot.PlotWidget`
@@ -220,8 +207,7 @@ Sample code that adds specific tools or functions to plot widgets.
- :class:`silx.gui.plot.ColorBar.ColorBarWidget`
* - :download:`plotContextMenu.py <../../../examples/plotContextMenu.py>`
- .. image:: img/plotContextMenu.png
- :height: 150px
- :align: center
+ :width: 150px
- This script illustrates the addition of a context menu to a
:class:`~silx.gui.plot.PlotWidget`.
@@ -237,20 +223,17 @@ Sample code that adds specific tools or functions to plot widgets.
For more information on context menus, see Qt documentation.
* - :download:`plotItemsSelector.py <../../../examples/plotItemsSelector.py>`
- .. image:: img/plotItemsSelector.png
- :height: 150px
- :align: center
+ :width: 150px
- This example illustrates how to use a :class:`ItemsSelectionDialog` widget
associated with a :class:`~silx.gui.plot.PlotWidget`
* - :download:`plotLimits.py <../../../examples/plotLimits.py>`
- .. image:: img/plotLimits.png
- :height: 150px
- :align: center
+ :width: 150px
- This script is an example to illustrate how to use axis synchronization
tool.
* - :download:`plotUpdateCurveFromThread.py <../../../examples/plotUpdateCurveFromThread.py>`
- .. image:: img/plotUpdateCurveFromThread.png
- :height: 150px
- :align: center
+ :width: 150px
- This script illustrates the update of a :mod:`silx.gui.plot` widget from a thread.
The problem is that plot and GUI methods should be called from the main thread.
@@ -263,8 +246,7 @@ Sample code that adds specific tools or functions to plot widgets.
of a plot.
* - :download:`plotUpdateImageFromThread.py <../../../examples/plotUpdateImageFromThread.py>`
- .. image:: img/plotUpdateImageFromThread.png
- :height: 150px
- :align: center
+ :width: 150px
- This script illustrates the update of a :mod:`silx.gui.plot` widget from a thread.
The problem is that plot and GUI methods should be called from the main thread.
@@ -277,8 +259,7 @@ Sample code that adds specific tools or functions to plot widgets.
of a plot.
* - :download:`plotInteractiveImageROI.py <../../../examples/plotInteractiveImageROI.py>`
- .. image:: img/plotInteractiveImageROI.png
- :height: 150px
- :align: center
+ :width: 150px
- This script illustrates image ROI selection in a :class:`~silx.gui.plot.PlotWidget`
It uses :class:`~silx.gui.plot.tools.roi.RegionOfInterestManager` and
@@ -286,8 +267,7 @@ Sample code that adds specific tools or functions to plot widgets.
interactive selection and to display the list of selected ROIs.
* - :download:`printPreview.py <../../../examples/printPreview.py>`
- .. image:: img/printPreview.png
- :height: 150px
- :align: center
+ :width: 150px
- This script illustrates how to add a print preview tool button to any plot
widget inheriting :class:`~silx.gui.plot.PlotWidget`.
@@ -298,14 +278,12 @@ Sample code that adds specific tools or functions to plot widgets.
which allows them to send their content to the same print preview page.
* - :download:`scatterMask.py <../../../examples/scatterMask.py>`
- .. image:: img/scatterMask.png
- :height: 150px
- :align: center
+ :width: 150px
- This example demonstrates how to use ScatterMaskToolsWidget
and NamedScatterAlphaSlider with a PlotWidget.
* - :download:`syncaxis.py <../../../examples/syncaxis.py>`
- .. image:: img/syncaxis.png
- :height: 150px
- :align: center
+ :width: 150px
- This script is an example to illustrate how to use axis synchronization
tool.
@@ -323,8 +301,7 @@ Sample code that adds specific tools or functions to plot widgets.
- Description
* - :download:`plot3dContextMenu.py <../../../examples/plot3dContextMenu.py>`
- .. image:: img/plot3dContextMenu.png
- :height: 150px
- :align: center
+ :width: 150px
- This script adds a context menu to a :class:`silx.gui.plot3d.ScalarFieldView`.
This is done by adding a custom context menu to the :class:`Plot3DWidget`:
@@ -335,8 +312,7 @@ Sample code that adds specific tools or functions to plot widgets.
For more information on context menus, see Qt documentation.
* - :download:`viewer3DVolume.py <../../../examples/viewer3DVolume.py>`
- .. image:: img/viewer3DVolume.png
- :height: 150px
- :align: center
+ :width: 150px
- This script illustrates the use of :class:`silx.gui.plot3d.ScalarFieldView`.
It loads a 3D scalar data set from a file and displays iso-surfaces and
@@ -344,8 +320,7 @@ Sample code that adds specific tools or functions to plot widgets.
It can also be started without providing a file.
* - :download:`plot3dSceneWindow.py <../../../examples/plot3dSceneWindow.py>`
- .. image:: img/plot3dSceneWindow.png
- :height: 150px
- :align: center
+ :width: 150px
- This script displays the different items of :class:`~silx.gui.plot3d.SceneWindow`.
It shows the different visualizations of :class:`~silx.gui.plot3d.SceneWindow`
@@ -359,6 +334,20 @@ Sample code that adds specific tools or functions to plot widgets.
- 3D scatter plot
- 3D scalar field with iso-surface and cutting plane.
- A clipping plane.
+ * - :download:`plot3dUpdateScatterFromThread.py <../../../examples/plot3dUpdateScatterFromThread.py>`
+ - .. image:: img/plot3dUpdateScatterFromThread.png
+ :width: 150px
+ - This script illustrates the update of a
+ :class:`~silx.gui.plot3d.SceneWindow.SceneWindow` widget from a thread.
+
+ The problem is that GUI methods should be called from the main thread.
+ To safely update the scene from another thread, one need to execute the update
+ asynchronously in the main thread.
+ In this example, this is achieved with
+ :func:`~silx.gui.utils.concurrent.submitToQtMainThread`.
+
+ In this example a thread calls submitToQtMainThread to append data to a 3D scatter.
+
:mod:`silx.io` sample code
++++++++++++++++++++++++++
diff --git a/examples/plot3dSceneWindow.py b/examples/plot3dSceneWindow.py
index 5e78aa6..1b2f808 100644
--- a/examples/plot3dSceneWindow.py
+++ b/examples/plot3dSceneWindow.py
@@ -1,7 +1,7 @@
# coding: utf-8
# /*##########################################################################
#
-# Copyright (c) 2017-2018 European Synchrotron Radiation Facility
+# Copyright (c) 2017-2019 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -51,8 +51,6 @@ import numpy
from silx.gui import qt
from silx.gui.plot3d.SceneWindow import SceneWindow, items
-from silx.gui.plot3d.tools.PositionInfoWidget import PositionInfoWidget
-from silx.gui.widgets.BoxLayoutDockWidget import BoxLayoutDockWidget
SIZE = 1024
@@ -69,14 +67,6 @@ sceneWidget.setForegroundColor((1., 1., 1., 1.))
sceneWidget.setTextColor((0.1, 0.1, 0.1, 1.))
-# Add PositionInfoWidget to display picking info
-positionInfo = PositionInfoWidget()
-positionInfo.setSceneWidget(sceneWidget)
-dock = BoxLayoutDockWidget()
-dock.setWindowTitle("Selection Info")
-dock.setWidget(positionInfo)
-window.addDockWidget(qt.Qt.BottomDockWidgetArea, dock)
-
# 2D Image ###
# Add a dummy RGBA image
diff --git a/examples/plot3dUpdateScatterFromThread.py b/examples/plot3dUpdateScatterFromThread.py
new file mode 100644
index 0000000..9c2213f
--- /dev/null
+++ b/examples/plot3dUpdateScatterFromThread.py
@@ -0,0 +1,176 @@
+# coding: utf-8
+# /*##########################################################################
+#
+# Copyright (c) 2019 European Synchrotron Radiation Facility
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+#
+# ###########################################################################*/
+"""This script illustrates the update of a
+:class:`~silx.gui.plot3d.SceneWindow.SceneWindow` widget from a thread.
+
+The problem is that GUI methods should be called from the main thread.
+To safely update the scene from another thread, one need to execute the update
+asynchronously in the main thread.
+In this example, this is achieved with
+:func:`~silx.gui.utils.concurrent.submitToQtMainThread`.
+
+In this example a thread calls submitToQtMainThread to append data to a 3D scatter.
+"""
+
+__authors__ = ["T. Vincent"]
+__license__ = "MIT"
+__date__ = "08/03/2019"
+
+
+import threading
+import time
+
+import numpy
+
+from silx.gui import qt
+from silx.gui.utils import concurrent
+from silx.gui.plot3d.SceneWindow import SceneWindow
+from silx.gui.plot3d import items
+
+
+MAX_NUMBER_OF_POINTS = 10**6
+
+
+class UpdateScatterThread(threading.Thread):
+ """Thread updating the scatter 3D item data
+
+ :param ~silx.gui.plot3d.items.Scatter3D scatter3d: 3D scatter to update.
+ """
+
+ def __init__(self, scatter3d):
+ self.scatter3d = scatter3d
+ self.running = False
+ self.future_result = None
+ super(UpdateScatterThread, self).__init__()
+
+ def start(self):
+ """Start the update thread"""
+ self.running = True
+ super(UpdateScatterThread, self).start()
+
+ def _appendScatterData(self, x, y, z, value):
+ """Add some data points to the Scatter3D item.
+
+ This method MUST be called in the Qt main thread.
+
+ :param numpy.ndarray x:
+ :param numpy.ndarray y:
+ :param numpy.ndarray z:
+ :param numpy.ndarray value:
+ """
+ # use copy=False to avoid useless copy of numpy arrays
+ curX, curY, curZ, curValue = self.scatter3d.getData(copy=False)
+
+ x = numpy.append(curX, x)
+ y = numpy.append(curY, y)
+ z = numpy.append(curZ, z)
+ value = numpy.append(curValue, value)
+
+ # Update data
+ self.scatter3d.setData(x, y, z, value, copy=False)
+
+ def run(self):
+ """Method implementing thread loop that updates the scatter data
+
+ It produces adds scatter points every 10 ms or so, up to 1 million.
+ """
+ count = 0 # Number of data points currently rendered
+
+ # Init arrays that accumulate scatter points
+ x = numpy.array((), dtype=numpy.float32)
+ y = numpy.array((), dtype=numpy.float32)
+ z = numpy.array((), dtype=numpy.float32)
+ value = numpy.array((), dtype=numpy.float32)
+
+ while self.running:
+ time.sleep(0.01)
+
+ # Generate new data points
+ inclination = numpy.random.random(1000).astype(numpy.float32) * numpy.pi
+ azimuth = numpy.random.random(1000).astype(numpy.float32) * 2. * numpy.pi
+ radius = numpy.random.normal(loc=10., scale=.5, size=1000)
+ newX = radius * numpy.sin(inclination) * numpy.cos(azimuth)
+ newY = radius * numpy.sin(inclination) * numpy.sin(azimuth)
+ newZ = radius * numpy.cos(inclination)
+ newValue = numpy.random.random(1000).astype(numpy.float32)
+
+ # Accumulate data points
+ x = numpy.append(x, newX)
+ y = numpy.append(y, newY)
+ z = numpy.append(z, newZ)
+ value = numpy.append(value, newValue)
+
+ # Only append data if the previous one has been added
+ if self.future_result is None or self.future_result.done():
+ if count > MAX_NUMBER_OF_POINTS:
+ # Restart a new scatter plot asyn
+ self.future_result = concurrent.submitToQtMainThread(
+ self.scatter3d.setData, x, y, z, value)
+
+ count = len(x)
+ else:
+ # Append data asynchronously
+ self.future_result = concurrent.submitToQtMainThread(
+ self._appendScatterData, x, y, z, value)
+
+ count += len(x)
+
+ # Reset accumulators
+ x = numpy.array((), dtype=numpy.float32)
+ y = numpy.array((), dtype=numpy.float32)
+ z = numpy.array((), dtype=numpy.float32)
+ value = numpy.array((), dtype=numpy.float32)
+
+ def stop(self):
+ """Stop the update thread"""
+ self.running = False
+ self.join(2)
+
+
+def main():
+ global app
+ app = qt.QApplication([])
+
+ # Create a SceneWindow
+ window = SceneWindow()
+ window.show()
+
+ sceneWidget = window.getSceneWidget()
+ scatter = items.Scatter3D()
+ scatter.setSymbol(',')
+ scatter.getColormap().setName('magma')
+ sceneWidget.addItem(scatter)
+
+ # Create the thread that calls submitToQtMainThread
+ updateThread = UpdateScatterThread(scatter)
+ updateThread.start() # Start updating the plot
+
+ app.exec_()
+
+ updateThread.stop() # Stop updating the plot
+
+
+if __name__ == '__main__':
+ main()
diff --git a/examples/plotLimits.py b/examples/plotLimits.py
index 0a39bc6..c7cc7f5 100644
--- a/examples/plotLimits.py
+++ b/examples/plotLimits.py
@@ -23,8 +23,8 @@
# THE SOFTWARE.
#
# ###########################################################################*/
-"""This script is an example to illustrate how to use axis synchronization
-tool.
+"""This script is an example to illustrate how to set range constraints on
+plot axes.
"""
from silx.gui import qt
@@ -37,7 +37,7 @@ class ConstrainedViewPlot(qt.QMainWindow):
def __init__(self):
qt.QMainWindow.__init__(self)
- self.setWindowTitle("Plot with synchronized axes")
+ self.setWindowTitle("Plot with constrained axes")
widget = qt.QWidget(self)
self.setCentralWidget(widget)
diff --git a/examples/plotStats.py b/examples/plotStats.py
index f7474ec..3929697 100644
--- a/examples/plotStats.py
+++ b/examples/plotStats.py
@@ -46,7 +46,46 @@ from silx.gui import qt
from silx.gui.colors import Colormap
from silx.gui.plot import Plot1D
from silx.gui.plot.stats.stats import StatBase
+from silx.gui.utils import concurrent
+import random
+import threading
+import argparse
import numpy
+import time
+
+
+class UpdateThread(threading.Thread):
+ """Thread updating the curve of a :class:`~silx.gui.plot.Plot1D`
+
+ :param plot1d: The Plot1D to update."""
+
+ def __init__(self, plot1d):
+ self.plot1d = plot1d
+ self.running = False
+ super(UpdateThread, self).__init__()
+
+ def start(self):
+ """Start the update thread"""
+ self.running = True
+ super(UpdateThread, self).start()
+
+ def run(self):
+ """Method implementing thread loop that updates the plot"""
+ while self.running:
+ time.sleep(1)
+ # Run plot update asynchronously
+ concurrent.submitToQtMainThread(
+ self.plot1d.addCurve,
+ numpy.arange(1000),
+ numpy.random.random(1000),
+ resetzoom=False,
+ legend=random.choice(('mycurve0', 'mycurve1'))
+ )
+
+ def stop(self):
+ """Stop the update thread"""
+ self.running = False
+ self.join(2)
class Integral(StatBase):
@@ -88,17 +127,22 @@ class COM(StatBase):
return comX, comY
-def main():
+def main(argv):
+ parser = argparse.ArgumentParser(description=__doc__)
+ parser.add_argument(
+ '--update-mode',
+ default='manual',
+ help='update mode to display (manual or auto)')
+
+ options = parser.parse_args(argv[1:])
+
app = qt.QApplication([])
plot = Plot1D()
- x = numpy.arange(21)
- y = numpy.arange(21)
- plot.addCurve(x=x, y=y, legend='myCurve')
- plot.addCurve(x=x, y=(y + 5), legend='myCurve2')
-
- plot.setActiveCurve('myCurve')
+ # Create the thread that calls submitToQtMainThread
+ updateThread = UpdateThread(plot)
+ updateThread.start() # Start updating the plot
plot.addScatter(x=[0, 2, 5, 5, 12, 20],
y=[2, 3, 4, 20, 15, 6],
@@ -113,11 +157,14 @@ def main():
]
plot.getStatsWidget().setStats(stats)
+ plot.getStatsWidget().setUpdateMode(options.update_mode)
+ plot.getStatsWidget().setDisplayOnlyActiveItem(False)
plot.getStatsWidget().parent().setVisible(True)
plot.show()
app.exec_()
+ updateThread.stop() # Stop updating the plot
if __name__ == '__main__':
- main()
+ main(sys.argv)
diff --git a/examples/plotWidget.py b/examples/plotWidget.py
index c8a90a5..af64afb 100644
--- a/examples/plotWidget.py
+++ b/examples/plotWidget.py
@@ -36,7 +36,7 @@ as its central widget and adds toolbars and a colorbar by using pluggable widget
__authors__ = ["T. Vincent"]
__license__ = "MIT"
-__date__ = "05/09/2017"
+__date__ = "06/05/2019"
import numpy
@@ -68,15 +68,29 @@ class MyPlotWindow(qt.QMainWindow):
palette.setColor(qt.QPalette.Window, qt.Qt.white)
colorBar.setPalette(palette)
+ options = qt.QWidget(self)
+ layout = qt.QVBoxLayout(options)
+ button = qt.QPushButton("Show image", self)
+ button.clicked.connect(self.showImage)
+ layout.addWidget(button)
+ button = qt.QPushButton("Show scatter", self)
+ button.clicked.connect(self.showScatter)
+ layout.addWidget(button)
+ button = qt.QPushButton("Show delaunay", self)
+ button.clicked.connect(self.showDelaunay)
+ layout.addWidget(button)
+ layout.addStretch()
+
# Combine the ColorBarWidget and the PlotWidget as
# this QMainWindow's central widget
gridLayout = qt.QGridLayout()
gridLayout.setSpacing(0)
gridLayout.setContentsMargins(0, 0, 0, 0)
- gridLayout.addWidget(self._plot, 0, 0)
- gridLayout.addWidget(colorBar, 0, 1)
+ gridLayout.addWidget(options, 0, 0)
+ gridLayout.addWidget(self._plot, 0, 1)
+ gridLayout.addWidget(colorBar, 0, 2)
gridLayout.setRowStretch(0, 1)
- gridLayout.setColumnStretch(0, 1)
+ gridLayout.setColumnStretch(1, 1)
centralWidget = qt.QWidget(self)
centralWidget.setLayout(gridLayout)
self.setCentralWidget(centralWidget)
@@ -116,6 +130,44 @@ class MyPlotWindow(qt.QMainWindow):
"""Returns the PlotWidget contains in this window"""
return self._plot
+ def showImage(self):
+ plot = self.getPlotWidget()
+ plot.clear()
+ plot.getDefaultColormap().setName('viridis')
+
+ # Add an image to the plot
+ x = numpy.outer(
+ numpy.linspace(-10, 10, 200), numpy.linspace(-10, 5, 150))
+ image = numpy.sin(x) / x
+ plot.addImage(image)
+ plot.resetZoom()
+
+ def showScatter(self):
+ plot = self.getPlotWidget()
+ plot.clear()
+ plot.getDefaultColormap().setName('viridis')
+
+ nbPoints = 50
+ x = numpy.random.rand(nbPoints)
+ y = numpy.random.rand(nbPoints)
+ value = numpy.random.rand(nbPoints)
+ plot.addScatter(x=x, y=y, value=value)
+ plot.resetZoom()
+
+ def showDelaunay(self):
+ plot = self.getPlotWidget()
+ plot.clear()
+ plot.getDefaultColormap().setName('viridis')
+
+ nbPoints = 50
+ x = numpy.random.rand(nbPoints)
+ y = numpy.random.rand(nbPoints)
+ value = numpy.random.rand(nbPoints)
+ legend = plot.addScatter(x=x, y=y, value=value)
+ scatter = plot.getScatter(legend)
+ scatter.setVisualization("solid")
+ plot.resetZoom()
+
def main():
global app
@@ -125,17 +177,7 @@ def main():
window = MyPlotWindow()
window.setAttribute(qt.Qt.WA_DeleteOnClose)
window.show()
-
- # Change the default colormap
- plot = window.getPlotWidget()
- plot.getDefaultColormap().setName('viridis')
-
- # Add an image to the plot
- x = numpy.outer(
- numpy.linspace(-10, 10, 200), numpy.linspace(-10, 5, 150))
- image = numpy.sin(x) / x
- plot.addImage(image)
-
+ window.showImage()
app.exec_()
diff --git a/package/debian8/control b/package/debian8/control
index 43a22a2..2e3fc58 100644
--- a/package/debian8/control
+++ b/package/debian8/control
@@ -17,12 +17,14 @@ Build-Depends: cython,
python-pyopencl,
python-mako,
python-matplotlib,
+ python-nbsphinx,
python-dateutil,
python-opengl,
python-pyqt5,
python-pyqt5.qtsvg,
python-pyqt5.qtopengl,
python-scipy,
+ python-setuptools,
python-six,
python-sphinx,
python-sphinxcontrib.programoutput,
@@ -35,12 +37,14 @@ Build-Depends: cython,
python3-pyopencl,
python3-mako,
python3-matplotlib,
+ python3-nbsphinx,
python3-dateutil,
python3-opengl,
python3-pyqt5,
python3-pyqt5.qtsvg,
python3-pyqt5.qtopengl,
python3-scipy,
+ python3-setuptools,
python3-six,
python3-sphinx,
python3-sphinxcontrib.programoutput,
@@ -83,6 +87,7 @@ Depends: ${misc:Depends},
python-pyqt5.qtsvg,
python-pyqt5.qtopengl,
python-scipy,
+ python-setuptools,
python-six,
python-enum34,
python-concurrent.futures,
@@ -111,6 +116,7 @@ Depends: ${misc:Depends},
python3-pyqt5.qtsvg,
python3-pyqt5.qtopengl,
python3-scipy,
+ python3-setuptools,
python3-six,
# Recommends:
# Suggests: python3-rfoo
diff --git a/package/debian9/control b/package/debian9/control
index a706fc0..d0de5fe 100644
--- a/package/debian9/control
+++ b/package/debian9/control
@@ -17,12 +17,14 @@ Build-Depends: cython,
python-mako,
python-qtconsole,
python-matplotlib,
+ python-nbsphinx,
python-dateutil,
python-opengl,
python-pyqt5,
python-pyqt5.qtsvg,
python-pyqt5.qtopengl,
python-scipy,
+ python-setuptools,
python-sphinx,
python-sphinxcontrib.programoutput,
python-six,
@@ -36,12 +38,14 @@ Build-Depends: cython,
python3-mako,
python3-qtconsole,
python3-matplotlib,
+ python3-nbsphinx,
python3-dateutil,
python3-opengl,
python3-pyqt5,
python3-pyqt5.qtsvg,
python3-pyqt5.qtopengl,
python3-scipy,
+ python3-setuptools,
python3-six,
python3-sphinx,
python3-sphinxcontrib.programoutput,
@@ -87,6 +91,7 @@ Depends: ${misc:Depends},
python-pyqt5.qtsvg,
python-pyqt5.qtopengl,
python-scipy,
+ python-setuptools,
python-six,
python-enum34,
python-concurrent.futures,
@@ -117,6 +122,7 @@ Depends: ${misc:Depends},
python3-pyqt5.qtsvg,
python3-pyqt5.qtopengl,
python3-scipy,
+ python3-setuptools,
python3-six,
# Recommends:
# Suggests: python3-rfoo
diff --git a/requirements.txt b/requirements.txt
index 2f75c73..cdffb47 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -6,7 +6,7 @@
--only-binary numpy,h5py,scipy,PyQt4,PyQt5
# Required dependencies (from setup.py install_requires)
-numpy >= 1.8
+numpy >= 1.12
setuptools
h5py
fabio >= 0.7
diff --git a/setup.py b/setup.py
index b63d0eb..1029bf0 100644
--- a/setup.py
+++ b/setup.py
@@ -40,6 +40,7 @@ import glob
# The silx.io module seems to be loaded instead.
import io
+
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger("silx.setup")
@@ -114,7 +115,6 @@ classifiers = ["Development Status :: 4 - Beta",
"Operating System :: POSIX",
"Programming Language :: Cython",
"Programming Language :: Python :: 2.7",
- "Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
@@ -489,7 +489,7 @@ class Build(_build):
# By default Xcode5 & XCode6 do not support OpenMP, Xcode4 is OK.
osx = tuple([int(i) for i in platform.mac_ver()[0].split(".")])
if osx >= (10, 8):
- logger.warning("OpenMP support ignored. Your platform do not support it")
+ logger.warning("OpenMP support ignored. Your platform does not support it.")
use_openmp = False
# Remove attributes used by distutils parsing
@@ -556,7 +556,7 @@ class BuildExt(build_ext):
LINK_ARGS_CONVERTER = {'-fopenmp': ''}
- description = 'Build silx extensions'
+ description = 'Build extensions'
def finalize_options(self):
build_ext.finalize_options(self)
@@ -707,6 +707,7 @@ class BuildExt(build_ext):
self.patch_extension(ext)
build_ext.build_extensions(self)
+
################################################################################
# Clean command
################################################################################
@@ -785,7 +786,7 @@ class SourceDistWithCython(sdist):
without suppport of OpenMP.
"""
- description = "Create a source distribution including cythonozed files (tarball, zip file, etc.)"
+ description = "Create a source distribution including cythonized files (tarball, zip file, etc.)"
def finalize_options(self):
sdist.finalize_options(self)
@@ -903,7 +904,7 @@ def get_project_configuration(dry_run):
install_requires.append("enum34")
install_requires.append("futures")
- setup_requires = ["setuptools", "numpy"]
+ setup_requires = ["setuptools", "numpy>=1.12"]
# extras requirements: target 'full' to install all dependencies at once
full_requires = [
diff --git a/silx.egg-info/PKG-INFO b/silx.egg-info/PKG-INFO
index a5b84db..1f1f36b 100644
--- a/silx.egg-info/PKG-INFO
+++ b/silx.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: silx
-Version: 0.10.1
+Version: 0.11.0
Summary: Software library for X-ray data analysis
Home-page: http://www.silx.org/
Author: data analysis unit
@@ -24,7 +24,8 @@ Description:
images file formats.
* OpenCL-based data processing: image alignment (SIFT),
image processing (median filter, histogram),
- filtered backprojection for tomography
+ filtered backprojection for tomography,
+ convolution
* Data reduction: histogramming, fitting, median filter
* A set of Qt widgets, including:
@@ -55,13 +56,13 @@ Description:
Or using Anaconda on Linux and MacOS:
- .. code-block:: bash
-
+ .. code-block:: bash
+
conda install silx -c conda-forge
Unofficial packages for different distributions are available:
- - Unofficial Debian8 packages are available at http://www.silx.org/pub/debian/
+ - Unofficial Debian9 packages are available at http://www.silx.org/pub/debian/
- CentOS 7 rpm packages are provided by Max IV at: http://pubrepo.maxiv.lu.se/rpm/el7/x86_64/
- Fedora 23 rpm packages are provided by Max IV at http://pubrepo.maxiv.lu.se/rpm/fc23/x86_64/
- Arch Linux (AUR) packages are also available: https://aur.archlinux.org/packages/python-silx
@@ -129,7 +130,6 @@ Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX
Classifier: Programming Language :: Cython
Classifier: Programming Language :: Python :: 2.7
-Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
diff --git a/silx.egg-info/SOURCES.txt b/silx.egg-info/SOURCES.txt
index f294cec..024a121 100644
--- a/silx.egg-info/SOURCES.txt
+++ b/silx.egg-info/SOURCES.txt
@@ -138,6 +138,7 @@ doc/source/modules/gui/plot/scatterview.rst
doc/source/modules/gui/plot/stackview.rst
doc/source/modules/gui/plot/statswidget.rst
doc/source/modules/gui/plot/tools.rst
+doc/source/modules/gui/plot/utils.rst
doc/source/modules/gui/plot/actions/control.rst
doc/source/modules/gui/plot/actions/examples.rst
doc/source/modules/gui/plot/actions/fit.rst
@@ -255,10 +256,13 @@ doc/source/modules/math/fit/index.rst
doc/source/modules/math/fit/leastsq.rst
doc/source/modules/math/fit/peaksearch.rst
doc/source/modules/opencl/codec_cbf.rst
+doc/source/modules/opencl/convolution.rst
doc/source/modules/opencl/fbp.rst
doc/source/modules/opencl/index.rst
doc/source/modules/opencl/medfilt.rst
+doc/source/modules/opencl/processing.rst
doc/source/modules/opencl/sinofilter.rst
+doc/source/modules/opencl/statistics.rst
doc/source/modules/opencl/sift/align.rst
doc/source/modules/opencl/sift/index.rst
doc/source/modules/opencl/sift/match.rst
@@ -283,6 +287,7 @@ doc/source/sample_code/img/imageview.png
doc/source/sample_code/img/periodicTable.png
doc/source/sample_code/img/plot3dContextMenu.png
doc/source/sample_code/img/plot3dSceneWindow.png
+doc/source/sample_code/img/plot3dUpdateScatterFromThread.png
doc/source/sample_code/img/plotClearAction.png
doc/source/sample_code/img/plotContextMenu.png
doc/source/sample_code/img/plotInteractiveImageROI.png
@@ -314,6 +319,7 @@ examples/imageview.py
examples/periodicTable.py
examples/plot3dContextMenu.py
examples/plot3dSceneWindow.py
+examples/plot3dUpdateScatterFromThread.py
examples/plotClearAction.py
examples/plotContextMenu.py
examples/plotCurveLegendWidget.py
@@ -425,6 +431,7 @@ silx/gui/data/NXdataWidgets.py
silx/gui/data/NumpyAxesSelector.py
silx/gui/data/RecordTableView.py
silx/gui/data/TextFormatter.py
+silx/gui/data/_VolumeWindow.py
silx/gui/data/__init__.py
silx/gui/data/setup.py
silx/gui/data/test/__init__.py
@@ -504,6 +511,7 @@ silx/gui/plot/_BaseMaskToolsWidget.py
silx/gui/plot/__init__.py
silx/gui/plot/setup.py
silx/gui/plot/_utils/__init__.py
+silx/gui/plot/_utils/delaunay.py
silx/gui/plot/_utils/dtime_ticklayout.py
silx/gui/plot/_utils/panzoom.py
silx/gui/plot/_utils/setup.py
@@ -527,6 +535,7 @@ silx/gui/plot/backends/__init__.py
silx/gui/plot/backends/glutils/GLPlotCurve.py
silx/gui/plot/backends/glutils/GLPlotFrame.py
silx/gui/plot/backends/glutils/GLPlotImage.py
+silx/gui/plot/backends/glutils/GLPlotTriangles.py
silx/gui/plot/backends/glutils/GLSupport.py
silx/gui/plot/backends/glutils/GLText.py
silx/gui/plot/backends/glutils/GLTexture.py
@@ -636,7 +645,9 @@ silx/gui/plot3d/scene/test/test_utils.py
silx/gui/plot3d/test/__init__.py
silx/gui/plot3d/test/testGL.py
silx/gui/plot3d/test/testScalarFieldView.py
+silx/gui/plot3d/test/testSceneWidget.py
silx/gui/plot3d/test/testSceneWidgetPicking.py
+silx/gui/plot3d/test/testSceneWindow.py
silx/gui/plot3d/test/testStatsWidget.py
silx/gui/plot3d/tools/GroupPropertiesWidget.py
silx/gui/plot3d/tools/PositionInfoWidget.py
@@ -861,6 +872,7 @@ silx/math/test/test_marchingcubes.py
silx/opencl/__init__.py
silx/opencl/backprojection.py
silx/opencl/common.py
+silx/opencl/convolution.py
silx/opencl/image.py
silx/opencl/linalg.py
silx/opencl/medfilt.py
@@ -869,6 +881,7 @@ silx/opencl/projection.py
silx/opencl/reconstruction.py
silx/opencl/setup.py
silx/opencl/sinofilter.py
+silx/opencl/sparse.py
silx/opencl/statistics.py
silx/opencl/utils.py
silx/opencl/codec/__init__.py
@@ -901,11 +914,13 @@ silx/opencl/test/__init__.py
silx/opencl/test/test_addition.py
silx/opencl/test/test_array_utils.py
silx/opencl/test/test_backprojection.py
+silx/opencl/test/test_convolution.py
silx/opencl/test/test_image.py
silx/opencl/test/test_kahan.py
silx/opencl/test/test_linalg.py
silx/opencl/test/test_medfilt.py
silx/opencl/test/test_projection.py
+silx/opencl/test/test_sparse.py
silx/opencl/test/test_stats.py
silx/resources/__init__.py
silx/resources/gui/colormaps/inferno.npy
@@ -968,6 +983,8 @@ silx/resources/gui/icons/compare-align-stretch.png
silx/resources/gui/icons/compare-align-stretch.svg
silx/resources/gui/icons/compare-keypoints.png
silx/resources/gui/icons/compare-keypoints.svg
+silx/resources/gui/icons/compare-mode-a-minus-b.png
+silx/resources/gui/icons/compare-mode-a-minus-b.svg
silx/resources/gui/icons/compare-mode-a.png
silx/resources/gui/icons/compare-mode-a.svg
silx/resources/gui/icons/compare-mode-b.png
@@ -1014,6 +1031,8 @@ silx/resources/gui/icons/draw-rubber.png
silx/resources/gui/icons/draw-rubber.svg
silx/resources/gui/icons/edit-copy.png
silx/resources/gui/icons/edit-copy.svg
+silx/resources/gui/icons/eye.png
+silx/resources/gui/icons/eye.svg
silx/resources/gui/icons/first.png
silx/resources/gui/icons/first.svg
silx/resources/gui/icons/folder.png
@@ -1144,6 +1163,8 @@ silx/resources/gui/icons/plot-ylog.png
silx/resources/gui/icons/plot-ylog.svg
silx/resources/gui/icons/plot-yup.png
silx/resources/gui/icons/plot-yup.svg
+silx/resources/gui/icons/pointing-hand.png
+silx/resources/gui/icons/pointing-hand.svg
silx/resources/gui/icons/previous.png
silx/resources/gui/icons/previous.svg
silx/resources/gui/icons/process-working.mng
@@ -1273,11 +1294,14 @@ silx/resources/opencl/array_utils.cl
silx/resources/opencl/backproj.cl
silx/resources/opencl/backproj_helper.cl
silx/resources/opencl/bitonic.cl
+silx/resources/opencl/convolution.cl
+silx/resources/opencl/convolution_textures.cl
silx/resources/opencl/kahan.cl
silx/resources/opencl/linalg.cl
silx/resources/opencl/medfilt.cl
silx/resources/opencl/preprocess.cl
silx/resources/opencl/proj.cl
+silx/resources/opencl/sparse.cl
silx/resources/opencl/statistics.cl
silx/resources/opencl/codec/byte_offset.cl
silx/resources/opencl/image/cast.cl
@@ -1305,10 +1329,9 @@ silx/resources/opencl/sift/transform.cl
silx/sx/__init__.py
silx/sx/_plot.py
silx/sx/_plot3d.py
-silx/sx/test/__init__.py
-silx/sx/test/test_sx.py
silx/test/__init__.py
silx/test/test_resources.py
+silx/test/test_sx.py
silx/test/test_version.py
silx/test/utils.py
silx/third_party/EdfFile.py
@@ -1353,11 +1376,13 @@ silx/third_party/_local/scipy_spatial/qhull/src/user_r.h
silx/third_party/_local/scipy_spatial/qhull/src/usermem_r.c
silx/third_party/_local/scipy_spatial/qhull/src/userprintf_r.c
silx/third_party/_local/scipy_spatial/qhull/src/userprintf_rbox_r.c
+silx/utils/ExternalResources.py
silx/utils/__init__.py
silx/utils/_have_openmp.pxi
silx/utils/array_like.py
silx/utils/debug.py
silx/utils/deprecation.py
+silx/utils/enum.py
silx/utils/exceptions.py
silx/utils/files.py
silx/utils/html.py
@@ -1373,6 +1398,8 @@ silx/utils/test/__init__.py
silx/utils/test/test_array_like.py
silx/utils/test/test_debug.py
silx/utils/test/test_deprecation.py
+silx/utils/test/test_enum.py
+silx/utils/test/test_external_resources.py
silx/utils/test/test_html.py
silx/utils/test/test_launcher.py
silx/utils/test/test_launcher_command.py
diff --git a/silx.egg-info/requires.txt b/silx.egg-info/requires.txt
index 9acb971..79c4d9c 100644
--- a/silx.egg-info/requires.txt
+++ b/silx.egg-info/requires.txt
@@ -1,4 +1,4 @@
-numpy>=1.15.4
+numpy>=1.12.0
setuptools
h5py
fabio>=0.7
diff --git a/silx/_config.py b/silx/_config.py
index c9a5c30..fb0e409 100644
--- a/silx/_config.py
+++ b/silx/_config.py
@@ -38,7 +38,7 @@ class Config(object):
.. versionadded:: 0.8
"""
- DEFAULT_PLOT_BACKEND = "matplotlib"
+ DEFAULT_PLOT_BACKEND = "matplotlib", "opengl"
"""Default plot backend.
It will be used as default backend for all the next created PlotWidget.
@@ -51,6 +51,8 @@ class Config(object):
- A :class:`silx.gui.plot.backend.BackendBase.BackendBase` class
- A callable returning backend class or binding name
+ If multiple backends are provided, the first available one is used.
+
.. versionadded:: 0.8
"""
diff --git a/silx/app/view/About.py b/silx/app/view/About.py
index 4b804f2..a2b430f 100644
--- a/silx/app/view/About.py
+++ b/silx/app/view/About.py
@@ -1,6 +1,6 @@
# coding: utf-8
# /*##########################################################################
-# Copyright (C) 2016-2017 European Synchrotron Radiation Facility
+# Copyright (C) 2016-2019 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -27,6 +27,7 @@ __authors__ = ["V. Valls"]
__license__ = "MIT"
__date__ = "05/07/2018"
+import os
import sys
from silx.gui import qt
@@ -208,7 +209,7 @@ class About(qt.QDialog):
pass
# Access to the logo in SVG or PNG
- logo = icons.getQFile("../logo/silx")
+ logo = icons.getQFile("silx:" + os.path.join("gui", "logo", "silx"))
info = dict(
application_name=self.__applicationName,
diff --git a/silx/gui/_glutils/Context.py b/silx/gui/_glutils/Context.py
index 7600992..c62dbb9 100644
--- a/silx/gui/_glutils/Context.py
+++ b/silx/gui/_glutils/Context.py
@@ -1,7 +1,7 @@
# coding: utf-8
# /*##########################################################################
#
-# Copyright (c) 2014-2017 European Synchrotron Radiation Facility
+# Copyright (c) 2014-2019 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -32,32 +32,44 @@ __authors__ = ["T. Vincent"]
__license__ = "MIT"
__date__ = "25/07/2016"
+import contextlib
-# context #####################################################################
+class _DEFAULT_CONTEXT(object):
+ """The default value for OpenGL context"""
+ pass
-def _defaultGLContextGetter():
- return None
+_context = _DEFAULT_CONTEXT
+"""The current OpenGL context"""
-_glContextGetter = _defaultGLContextGetter
-
-def getGLContext():
+def getCurrent():
"""Returns platform dependent object of current OpenGL context.
This is useful to associate OpenGL resources with the context they are
created in.
:return: Platform specific OpenGL context
- :rtype: None by default or a platform dependent object"""
- return _glContextGetter()
+ """
+ return _context
+
+
+def setCurrent(context=_DEFAULT_CONTEXT):
+ """Set a platform dependent OpenGL context
+
+ :param context: Platform dependent GL context
+ """
+ global _context
+ _context = context
-def setGLContextGetter(getter=_defaultGLContextGetter):
- """Set a platform dependent function to retrieve the current OpenGL context
+@contextlib.contextmanager
+def current(context):
+ """Context manager setting the platform-dependent GL context
- :param getter: Platform dependent GL context getter
- :type getter: Function with no args returning the current OpenGL context
+ :param context: Platform dependent GL context
"""
- global _glContextGetter
- _glContextGetter = getter
+ previous_context = getCurrent()
+ setCurrent(context)
+ yield
+ setCurrent(previous_context)
diff --git a/silx/gui/_glutils/Program.py b/silx/gui/_glutils/Program.py
index 48c12f5..87eec5f 100644
--- a/silx/gui/_glutils/Program.py
+++ b/silx/gui/_glutils/Program.py
@@ -1,7 +1,7 @@
# coding: utf-8
# /*##########################################################################
#
-# Copyright (c) 2014-2017 European Synchrotron Radiation Facility
+# Copyright (c) 2014-2019 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -30,11 +30,11 @@ __date__ = "25/07/2016"
import logging
+import weakref
import numpy
-from . import gl
-from .Context import getGLContext
+from . import Context, gl
_logger = logging.getLogger(__name__)
@@ -61,7 +61,7 @@ class Program(object):
self._vertexShader = vertexShader
self._fragmentShader = fragmentShader
self._attrib0 = attrib0
- self._programs = {}
+ self._programs = weakref.WeakKeyDictionary()
@staticmethod
def _compileGL(vertexShader, fragmentShader, attrib0):
@@ -106,7 +106,7 @@ class Program(object):
return program, attributes, uniforms
def _getProgramInfo(self):
- glcontext = getGLContext()
+ glcontext = Context.getCurrent()
if glcontext not in self._programs:
raise RuntimeError(
"Program was not compiled for current OpenGL context.")
@@ -149,7 +149,7 @@ class Program(object):
def use(self):
"""Make use of the program, compiling it if necessary"""
- glcontext = getGLContext()
+ glcontext = Context.getCurrent()
if glcontext not in self._programs:
self._programs[glcontext] = self._compileGL(
diff --git a/silx/gui/_glutils/Texture.py b/silx/gui/_glutils/Texture.py
index 0875ebe..a7fd44b 100644
--- a/silx/gui/_glutils/Texture.py
+++ b/silx/gui/_glutils/Texture.py
@@ -1,7 +1,7 @@
# coding: utf-8
# /*##########################################################################
#
-# Copyright (c) 2014-2018 European Synchrotron Radiation Facility
+# Copyright (c) 2014-2019 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -29,7 +29,11 @@ __license__ = "MIT"
__date__ = "04/10/2016"
-import collections
+try:
+ from collections import abc
+except ImportError: # Python2 support
+ import collections as abc
+
from ctypes import c_void_p
import logging
@@ -93,7 +97,7 @@ class Texture(object):
self.magFilter = magFilter if magFilter is not None else gl.GL_LINEAR
if wrap is not None:
- if not isinstance(wrap, collections.Iterable):
+ if not isinstance(wrap, abc.Iterable):
wrap = [wrap] * self.ndim
assert len(wrap) == self.ndim
diff --git a/silx/gui/_glutils/__init__.py b/silx/gui/_glutils/__init__.py
index 15e48e1..e88affd 100644
--- a/silx/gui/_glutils/__init__.py
+++ b/silx/gui/_glutils/__init__.py
@@ -1,7 +1,7 @@
# coding: utf-8
# /*##########################################################################
#
-# Copyright (c) 2014-2017 European Synchrotron Radiation Facility
+# Copyright (c) 2014-2019 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -34,9 +34,10 @@ __date__ = "25/07/2016"
# OpenGL convenient functions
from .OpenGLWidget import OpenGLWidget # noqa
-from .Context import getGLContext, setGLContextGetter # noqa
+from . import Context # noqa
from .FramebufferTexture import FramebufferTexture # noqa
from .Program import Program # noqa
from .Texture import Texture # noqa
from .VertexBuffer import VertexBuffer, VertexBufferAttrib, vertexBuffer # noqa
from .utils import sizeofGLType, isSupportedGLType, numpyToGLType # noqa
+from .utils import segmentTrianglesIntersection # noqa
diff --git a/silx/gui/_glutils/utils.py b/silx/gui/_glutils/utils.py
index 73af338..35cf819 100644
--- a/silx/gui/_glutils/utils.py
+++ b/silx/gui/_glutils/utils.py
@@ -1,7 +1,7 @@
# coding: utf-8
# /*##########################################################################
#
-# Copyright (c) 2014-2017 European Synchrotron Radiation Facility
+# Copyright (c) 2014-2019 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -68,3 +68,74 @@ def isSupportedGLType(type_):
def numpyToGLType(type_):
"""Returns the GL type corresponding the provided numpy type or dtype."""
return _TYPE_CONVERTER[numpy.dtype(type_)]
+
+
+def segmentTrianglesIntersection(segment, triangles):
+ """Check for segment/triangles intersection.
+
+ This is based on signed tetrahedron volume comparison.
+
+ See A. Kensler, A., Shirley, P.
+ Optimizing Ray-Triangle Intersection via Automated Search.
+ Symposium on Interactive Ray Tracing, vol. 0, p33-38 (2006)
+
+ :param numpy.ndarray segment:
+ Segment end points as a 2x3 array of coordinates
+ :param numpy.ndarray triangles:
+ Nx3x3 array of triangles
+ :return: (triangle indices, segment parameter, barycentric coord)
+ Indices of intersected triangles, "depth" along the segment
+ of the intersection point and barycentric coordinates of intersection
+ point in the triangle.
+ :rtype: List[numpy.ndarray]
+ """
+ # TODO triangles from vertices + indices
+ # TODO early rejection? e.g., check segment bbox vs triangle bbox
+ segment = numpy.asarray(segment)
+ assert segment.ndim == 2
+ assert segment.shape == (2, 3)
+
+ triangles = numpy.asarray(triangles)
+ assert triangles.ndim == 3
+ assert triangles.shape[1] == 3
+
+ # Test line/triangles intersection
+ d = segment[1] - segment[0]
+ t0s0 = segment[0] - triangles[:, 0, :]
+ edge01 = triangles[:, 1, :] - triangles[:, 0, :]
+ edge02 = triangles[:, 2, :] - triangles[:, 0, :]
+
+ dCrossEdge02 = numpy.cross(d, edge02)
+ t0s0CrossEdge01 = numpy.cross(t0s0, edge01)
+ volume = numpy.sum(dCrossEdge02 * edge01, axis=1)
+ del edge01
+ subVolumes = numpy.empty((len(triangles), 3), dtype=triangles.dtype)
+ subVolumes[:, 1] = numpy.sum(dCrossEdge02 * t0s0, axis=1)
+ del dCrossEdge02
+ subVolumes[:, 2] = numpy.sum(t0s0CrossEdge01 * d, axis=1)
+ subVolumes[:, 0] = volume - subVolumes[:, 1] - subVolumes[:, 2]
+ intersect = numpy.logical_or(
+ numpy.all(subVolumes >= 0., axis=1), # All positive
+ numpy.all(subVolumes <= 0., axis=1)) # All negative
+ intersect = numpy.where(intersect)[0] # Indices of intersected triangles
+
+ # Get barycentric coordinates
+ barycentric = subVolumes[intersect] / volume[intersect].reshape(-1, 1)
+ del subVolumes
+
+ # Test segment/triangles intersection
+ volAlpha = numpy.sum(t0s0CrossEdge01[intersect] * edge02[intersect], axis=1)
+ t = volAlpha / volume[intersect] # segment parameter of intersected triangles
+ del t0s0CrossEdge01
+ del edge02
+ del volAlpha
+ del volume
+
+ inSegmentMask = numpy.logical_and(t >= 0., t <= 1.)
+ intersect = intersect[inSegmentMask]
+ t = t[inSegmentMask]
+ barycentric = barycentric[inSegmentMask]
+
+ # Sort intersecting triangles by t
+ indices = numpy.argsort(t)
+ return intersect[indices], t[indices], barycentric[indices]
diff --git a/silx/gui/colors.py b/silx/gui/colors.py
index f1f34c9..aa2958a 100644
--- a/silx/gui/colors.py
+++ b/silx/gui/colors.py
@@ -1,7 +1,7 @@
# coding: utf-8
# /*##########################################################################
#
-# Copyright (c) 2015-2018 European Synchrotron Radiation Facility
+# Copyright (c) 2015-2019 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -887,7 +887,11 @@ def preferredColormaps():
global _PREFERRED_COLORMAPS
if _PREFERRED_COLORMAPS is None:
# Initialize preferred colormaps
- default_preferred = [k for k in _AVAILABLE_LUTS.keys() if _AVAILABLE_LUTS[k].preferred]
+ default_preferred = []
+ for name, info in _AVAILABLE_LUTS.items():
+ if (info.preferred and
+ (info.source != 'matplotlib' or _matplotlib_cm is not None)):
+ default_preferred.append(name)
setPreferredColormaps(default_preferred)
return tuple(_PREFERRED_COLORMAPS)
diff --git a/silx/gui/console.py b/silx/gui/console.py
index b6341ef..5dc6336 100644
--- a/silx/gui/console.py
+++ b/silx/gui/console.py
@@ -1,7 +1,7 @@
# coding: utf-8
# /*##########################################################################
#
-# Copyright (c) 2004-2018 European Synchrotron Radiation Facility
+# Copyright (c) 2004-2019 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -87,17 +87,26 @@ else:
msg = "Module " + __name__ + " cannot be used within an IPython shell"
raise ImportError(msg)
-
try:
- from qtconsole.rich_ipython_widget import RichJupyterWidget as \
- RichIPythonWidget
+ from qtconsole.rich_jupyter_widget import RichJupyterWidget as \
+ _RichJupyterWidget
except ImportError:
- from qtconsole.rich_ipython_widget import RichIPythonWidget
+ try:
+ from qtconsole.rich_ipython_widget import RichJupyterWidget as \
+ _RichJupyterWidget
+ except ImportError:
+ from qtconsole.rich_ipython_widget import RichIPythonWidget as \
+ _RichJupyterWidget
from qtconsole.inprocess import QtInProcessKernelManager
+try:
+ from ipykernel import version_info as _ipykernel_version_info
+except ImportError:
+ _ipykernel_version_info = None
+
-class IPythonWidget(RichIPythonWidget):
+class IPythonWidget(_RichJupyterWidget):
"""Live IPython console widget.
.. image:: img/IPythonWidget.png
@@ -115,6 +124,16 @@ class IPythonWidget(RichIPythonWidget):
self.setWindowTitle(self.banner)
self.kernel_manager = kernel_manager = QtInProcessKernelManager()
kernel_manager.start_kernel()
+
+ # Monkey-patch to workaround issue:
+ # https://github.com/ipython/ipykernel/issues/370
+ if (_ipykernel_version_info is not None and
+ _ipykernel_version_info[0] > 4 and
+ _ipykernel_version_info[:3] <= (5, 1, 0)):
+ def _abort_queues(*args, **kwargs):
+ pass
+ kernel_manager.kernel._abort_queues = _abort_queues
+
self.kernel_client = kernel_client = self._kernel_manager.client()
kernel_client.start_channels()
@@ -178,5 +197,6 @@ def main():
widget.show()
app.exec_()
+
if __name__ == '__main__':
main()
diff --git a/silx/gui/data/ArrayTableModel.py b/silx/gui/data/ArrayTableModel.py
index ad4d33a..8805241 100644
--- a/silx/gui/data/ArrayTableModel.py
+++ b/silx/gui/data/ArrayTableModel.py
@@ -1,7 +1,7 @@
# coding: utf-8
# /*##########################################################################
#
-# Copyright (c) 2016-2017 European Synchrotron Radiation Facility
+# Copyright (c) 2016-2019 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -245,8 +245,7 @@ class ArrayTableModel(qt.QAbstractTableModel):
if index.isValid() and role == qt.Qt.EditRole:
try:
# cast value to same type as array
- v = numpy.asscalar(
- numpy.array(value, dtype=self._array.dtype))
+ v = numpy.array(value, dtype=self._array.dtype).item()
except ValueError:
return False
diff --git a/silx/gui/data/DataViews.py b/silx/gui/data/DataViews.py
index 6575d0d..664090d 100644
--- a/silx/gui/data/DataViews.py
+++ b/silx/gui/data/DataViews.py
@@ -893,53 +893,27 @@ class _Plot3dView(DataView):
label="Cube",
icon=icons.getQIcon("view-3d"))
try:
- import silx.gui.plot3d #noqa
+ from ._VolumeWindow import VolumeWindow # noqa
except ImportError:
- _logger.warning("Plot3dView is not available")
+ _logger.warning("3D visualization is not available")
_logger.debug("Backtrace", exc_info=True)
raise
self.__resetZoomNextTime = True
def createWidget(self, parent):
- from silx.gui.plot3d import ScalarFieldView
- from silx.gui.plot3d import SFViewParamTree
+ from ._VolumeWindow import VolumeWindow
- plot = ScalarFieldView.ScalarFieldView(parent)
+ plot = VolumeWindow(parent)
plot.setAxesLabels(*reversed(self.axesNames(None, None)))
-
- def computeIsolevel(data):
- data = data[numpy.isfinite(data)]
- if len(data) == 0:
- return 0
- else:
- return numpy.mean(data) + numpy.std(data)
-
- plot.addIsosurface(computeIsolevel, '#FF0000FF')
-
- # Create a parameter tree for the scalar field view
- options = SFViewParamTree.TreeView(plot)
- options.setSfView(plot)
-
- # Add the parameter tree to the main window in a dock widget
- dock = qt.QDockWidget()
- dock.setWidget(options)
- plot.addDockWidget(qt.Qt.RightDockWidgetArea, dock)
-
return plot
def clear(self):
- self.getWidget().setData(None)
+ self.getWidget().clear()
self.__resetZoomNextTime = True
- def normalizeData(self, data):
- data = DataView.normalizeData(self, data)
- data = _normalizeComplex(data)
- return data
-
def setData(self, data):
data = self.normalizeData(data)
- plot = self.getWidget()
- plot.setData(data)
+ self.getWidget().setData(data)
self.__resetZoomNextTime = False
def axesNames(self, data, info):
@@ -973,10 +947,10 @@ class _ComplexImageView(DataView):
def createWidget(self, parent):
from silx.gui.plot.ComplexImageView import ComplexImageView
widget = ComplexImageView(parent=parent)
- widget.setColormap(self.defaultColormap(), mode=ComplexImageView.Mode.ABSOLUTE)
- widget.setColormap(self.defaultColormap(), mode=ComplexImageView.Mode.SQUARE_AMPLITUDE)
- widget.setColormap(self.defaultColormap(), mode=ComplexImageView.Mode.REAL)
- widget.setColormap(self.defaultColormap(), mode=ComplexImageView.Mode.IMAGINARY)
+ widget.setColormap(self.defaultColormap(), mode=ComplexImageView.ComplexMode.ABSOLUTE)
+ widget.setColormap(self.defaultColormap(), mode=ComplexImageView.ComplexMode.SQUARE_AMPLITUDE)
+ widget.setColormap(self.defaultColormap(), mode=ComplexImageView.ComplexMode.REAL)
+ widget.setColormap(self.defaultColormap(), mode=ComplexImageView.ComplexMode.IMAGINARY)
widget.getPlot().getColormapAction().setColorDialog(self.defaultColorDialog())
widget.getPlot().getIntensityHistogramAction().setVisible(True)
widget.getPlot().setKeepDataAspectRatio(True)
diff --git a/silx/gui/data/NXdataWidgets.py b/silx/gui/data/NXdataWidgets.py
index e5a2550..c3aefd3 100644
--- a/silx/gui/data/NXdataWidgets.py
+++ b/silx/gui/data/NXdataWidgets.py
@@ -29,7 +29,6 @@ __license__ = "MIT"
__date__ = "12/11/2018"
import logging
-import numbers
import numpy
from silx.gui import qt
@@ -533,10 +532,10 @@ class ArrayComplexImagePlot(qt.QWidget):
self._plot = ComplexImageView(self)
if colormap is not None:
- for mode in (ComplexImageView.Mode.ABSOLUTE,
- ComplexImageView.Mode.SQUARE_AMPLITUDE,
- ComplexImageView.Mode.REAL,
- ComplexImageView.Mode.IMAGINARY):
+ for mode in (ComplexImageView.ComplexMode.ABSOLUTE,
+ ComplexImageView.ComplexMode.SQUARE_AMPLITUDE,
+ ComplexImageView.ComplexMode.REAL,
+ ComplexImageView.ComplexMode.IMAGINARY):
self._plot.setColormap(colormap, mode)
self._plot.getPlot().getIntensityHistogramAction().setVisible(True)
@@ -893,28 +892,9 @@ class ArrayVolumePlot(qt.QWidget):
self.__x_axis = None
self.__x_axis_name = None
- from silx.gui.plot3d.ScalarFieldView import ScalarFieldView
- from silx.gui.plot3d import SFViewParamTree
+ from ._VolumeWindow import VolumeWindow
- self._view = ScalarFieldView(self)
-
- def computeIsolevel(data):
- data = data[numpy.isfinite(data)]
- if len(data) == 0:
- return 0
- else:
- return numpy.mean(data) + numpy.std(data)
-
- self._view.addIsosurface(computeIsolevel, '#FF0000FF')
-
- # Create a parameter tree for the scalar field view
- options = SFViewParamTree.TreeView(self._view)
- options.setSfView(self._view)
-
- # Add the parameter tree to the main window in a dock widget
- dock = qt.QDockWidget()
- dock.setWidget(options)
- self._view.addDockWidget(qt.Qt.RightDockWidgetArea, dock)
+ self._view = VolumeWindow(self)
self._hline = qt.QFrame(self)
self._hline.setFrameStyle(qt.QFrame.HLine)
@@ -935,24 +915,10 @@ class ArrayVolumePlot(qt.QWidget):
def getVolumeView(self):
"""Returns the plot used for the display
- :rtype: ScalarFieldView
+ :rtype: SceneWindow
"""
return self._view
- def normalizeComplexData(self, data):
- """
- Converts a complex data array to its amplitude, if necessary.
- :param data: the data to normalize
- :return:
- """
- if hasattr(data, "dtype"):
- isComplex = numpy.issubdtype(data.dtype, numpy.complexfloating)
- else:
- isComplex = isinstance(data, numbers.Complex)
- if isComplex:
- data = numpy.absolute(data)
- return data
-
def setData(self, signal,
x_axis=None, y_axis=None, z_axis=None,
signal_name=None,
@@ -977,7 +943,6 @@ class ArrayVolumePlot(qt.QWidget):
:param zlabel: Label for Z axis
:param title: Graph title
"""
- signal = self.normalizeComplexData(signal)
if self.__selector_is_connected:
self._selector.selectionChanged.disconnect(self._updateVolume)
self.__selector_is_connected = False
@@ -994,9 +959,6 @@ class ArrayVolumePlot(qt.QWidget):
self._selector.setData(signal)
self._selector.setAxisNames(["Y", "X", "Z"])
- self._view.setAxesLabels(self.__x_axis_name or 'X',
- self.__y_axis_name or 'Y',
- self.__z_axis_name or 'Z')
self._updateVolume()
# the legend label shows the selection slice producing the volume
@@ -1017,7 +979,6 @@ class ArrayVolumePlot(qt.QWidget):
def _updateVolume(self):
"""Update displayed stack according to the current axes selector
data."""
- data = self._selector.selectedData()
x_axis = self.__x_axis
y_axis = self.__y_axis
z_axis = self.__z_axis
@@ -1049,15 +1010,16 @@ class ArrayVolumePlot(qt.QWidget):
legend = legend[:-2] + "]"
self._legend.setText("Displayed data: " + legend)
- self._view.setData(data, copy=False)
- self._view.setScale(*scale)
- self._view.setTranslation(*offset)
- self._view.setAxesLabels(self.__x_axis_name,
- self.__y_axis_name,
- self.__z_axis_name)
+ # Update SceneWidget
+ data = self._selector.selectedData()
+
+ volumeView = self.getVolumeView()
+ volumeView.setData(data, offset=offset, scale=scale)
+ volumeView.setAxesLabels(
+ self.__x_axis_name, self.__y_axis_name, self.__z_axis_name)
def clear(self):
old = self._selector.blockSignals(True)
self._selector.clear()
self._selector.blockSignals(old)
- self._view.setData(None)
+ self.getVolumeView().clear()
diff --git a/silx/gui/data/_VolumeWindow.py b/silx/gui/data/_VolumeWindow.py
new file mode 100644
index 0000000..03b6876
--- /dev/null
+++ b/silx/gui/data/_VolumeWindow.py
@@ -0,0 +1,148 @@
+# coding: utf-8
+# /*##########################################################################
+#
+# Copyright (c) 2019 European Synchrotron Radiation Facility
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+#
+# ###########################################################################*/
+"""This module provides a widget to visualize 3D arrays"""
+
+__authors__ = ["T. Vincent"]
+__license__ = "MIT"
+__date__ = "22/03/2019"
+
+
+import numpy
+
+from .. import qt
+from ..plot3d.SceneWindow import SceneWindow
+from ..plot3d.items import ScalarField3D, ComplexField3D, ItemChangedType
+
+
+class VolumeWindow(SceneWindow):
+ """Extends SceneWindow with a convenient API for 3D array
+
+ :param QWidget: parent
+ """
+
+ def __init__(self, parent):
+ super(VolumeWindow, self).__init__(parent)
+ self.__firstData = True
+ # Hide global parameter dock
+ self.getGroupResetWidget().parent().setVisible(False)
+
+ def setAxesLabels(self, xlabel=None, ylabel=None, zlabel=None):
+ """Set the text labels of the axes.
+
+ :param Union[str,None] xlabel: Label of the X axis
+ :param Union[str,None] ylabel: Label of the Y axis
+ :param Union[str,None] zlabel: Label of the Z axis
+ """
+ sceneWidget = self.getSceneWidget()
+ sceneWidget.getSceneGroup().setAxesLabels(
+ 'X' if xlabel is None else xlabel,
+ 'Y' if ylabel is None else ylabel,
+ 'Z' if zlabel is None else zlabel)
+
+ def clear(self):
+ """Clear any currently displayed data"""
+ sceneWidget = self.getSceneWidget()
+ items = sceneWidget.getItems()
+ if (len(items) == 1 and
+ isinstance(items[0], (ScalarField3D, ComplexField3D))):
+ items[0].setData(None)
+ else: # Safety net
+ sceneWidget.clearItems()
+
+ @staticmethod
+ def __computeIsolevel(data):
+ """Returns a suitable isolevel value for data
+
+ :param numpy.ndarray data:
+ :rtype: float
+ """
+ data = data[numpy.isfinite(data)]
+ if len(data) == 0:
+ return 0
+ else:
+ return numpy.mean(data) + numpy.std(data)
+
+ def setData(self, data, offset=(0., 0., 0.), scale=(1., 1., 1.)):
+ """Set the 3D array data to display.
+
+ :param numpy.ndarray data: 3D array of float or complex
+ :param List[float] offset: (tx, ty, tz) coordinates of the origin
+ :param List[float] scale: (sx, sy, sz) scale for each dimension
+ """
+ sceneWidget = self.getSceneWidget()
+ dataMaxCoords = numpy.array(list(reversed(data.shape))) - 1
+
+ previousItems = sceneWidget.getItems()
+ if (len(previousItems) == 1 and
+ isinstance(previousItems[0], (ScalarField3D, ComplexField3D)) and
+ numpy.iscomplexobj(data) == isinstance(previousItems[0], ComplexField3D)):
+ # Reuse existing volume item
+ volume = sceneWidget.getItems()[0]
+ volume.setData(data, copy=False)
+ # Make sure the plane goes through the dataset
+ for plane in volume.getCutPlanes():
+ point = numpy.array(plane.getPoint())
+ if numpy.any(point < (0, 0, 0)) or numpy.any(point > dataMaxCoords):
+ plane.setPoint(dataMaxCoords // 2)
+ else:
+ # Add a new volume
+ sceneWidget.clearItems()
+ volume = sceneWidget.addVolume(data, copy=False)
+ volume.setLabel('Volume')
+ for plane in volume.getCutPlanes():
+ # Make plane going through the center of the data
+ plane.setPoint(dataMaxCoords // 2)
+ plane.setVisible(False)
+ plane.sigItemChanged.connect(self.__cutPlaneUpdated)
+ volume.addIsosurface(self.__computeIsolevel, '#FF0000FF')
+
+ # Expand the parameter tree
+ model = self.getParamTreeView().model()
+ index = qt.QModelIndex() # Invalid index for top level
+ while 1:
+ rowCount = model.rowCount(parent=index)
+ if rowCount == 0:
+ break
+ index = model.index(rowCount - 1, 0, parent=index)
+ self.getParamTreeView().setExpanded(index, True)
+ if not index.isValid():
+ break
+
+ volume.setTranslation(*offset)
+ volume.setScale(*scale)
+
+ if self.__firstData: # Only center for first dataset
+ self.__firstData = False
+ sceneWidget.centerScene()
+
+ def __cutPlaneUpdated(self, event):
+ """Handle the change of visibility of the cut plane
+
+ :param event: Kind of update
+ """
+ if event == ItemChangedType.VISIBLE:
+ plane = self.sender()
+ if plane.isVisible():
+ self.getSceneWidget().selection().setCurrentItem(plane)
diff --git a/silx/gui/data/test/test_dataviewer.py b/silx/gui/data/test/test_dataviewer.py
index dc6fee8..12a640e 100644
--- a/silx/gui/data/test/test_dataviewer.py
+++ b/silx/gui/data/test/test_dataviewer.py
@@ -1,7 +1,7 @@
# coding: utf-8
# /*##########################################################################
#
-# Copyright (c) 2016-2018 European Synchrotron Radiation Facility
+# Copyright (c) 2016-2019 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -242,8 +242,8 @@ class AbstractDataViewerTests(TestCaseQt):
self.assertTrue(replaced)
nxdata_view = widget.getViewFromModeId(DataViews.NXDATA_MODE)
self.assertNotIn(DataViews.NXDATA_INVALID_MODE,
- [v.modeId() for v in nxdata_view.availableViews()])
- self.assertTrue(view in nxdata_view.availableViews())
+ [v.modeId() for v in nxdata_view.getViews()])
+ self.assertTrue(view in nxdata_view.getViews())
class TestDataViewer(AbstractDataViewerTests):
diff --git a/silx/gui/data/test/test_textformatter.py b/silx/gui/data/test/test_textformatter.py
index 935344a..1a63074 100644
--- a/silx/gui/data/test/test_textformatter.py
+++ b/silx/gui/data/test/test_textformatter.py
@@ -1,7 +1,7 @@
# coding: utf-8
# /*##########################################################################
#
-# Copyright (c) 2016-2018 European Synchrotron Radiation Facility
+# Copyright (c) 2016-2019 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -48,7 +48,7 @@ class TestTextFormatter(TestCaseQt):
self.assertIsNot(formatter, copy)
copy.setFloatFormat("%.3f")
self.assertEqual(formatter.integerFormat(), copy.integerFormat())
- self.assertNotEquals(formatter.floatFormat(), copy.floatFormat())
+ self.assertNotEqual(formatter.floatFormat(), copy.floatFormat())
self.assertEqual(formatter.useQuoteForText(), copy.useQuoteForText())
self.assertEqual(formatter.imaginaryUnit(), copy.imaginaryUnit())
diff --git a/silx/gui/dialog/AbstractDataFileDialog.py b/silx/gui/dialog/AbstractDataFileDialog.py
index c660cd7..29e7bb5 100644
--- a/silx/gui/dialog/AbstractDataFileDialog.py
+++ b/silx/gui/dialog/AbstractDataFileDialog.py
@@ -28,7 +28,7 @@ This module contains an :class:`AbstractDataFileDialog`.
__authors__ = ["V. Valls"]
__license__ = "MIT"
-__date__ = "03/12/2018"
+__date__ = "05/03/2019"
import sys
@@ -468,9 +468,13 @@ class _FabioData(object):
def shape(self):
if self.__fabioFile.nframes == 0:
return None
+ if self.__fabioFile.nframes == 1:
+ return [slice(None), slice(None)]
return [self.__fabioFile.nframes, slice(None), slice(None)]
def __getitem__(self, selector):
+ if self.__fabioFile.nframes == 1 and selector == tuple():
+ return self.__fabioFile.data
if isinstance(selector, tuple) and len(selector) == 1:
selector = selector[0]
@@ -542,6 +546,10 @@ class AbstractDataFileDialog(qt.QDialog):
def _init(self):
self.setWindowTitle("Open")
+ self.__openedFiles = []
+ """Store the list of files opened by the model itself."""
+ # FIXME: It should be managed one by one by Hdf5Item itself
+
self.__directory = None
self.__directoryLoadedFilter = None
self.__errorWhileLoadingFile = None
@@ -591,10 +599,6 @@ class AbstractDataFileDialog(qt.QDialog):
self.__fileTypeCombo.setCurrentIndex(0)
self.__filterSelected(0)
- self.__openedFiles = []
- """Store the list of files opened by the model itself."""
- # FIXME: It should be managed one by one by Hdf5Item itself
-
# It is not possible to override the QObject destructor nor
# to access to the content of the Python object with the `destroyed`
# signal cause the Python method was already removed with the QWidget,
@@ -1038,15 +1042,16 @@ class AbstractDataFileDialog(qt.QDialog):
return
self.__directoryLoadedFilter = path
self.__processing += 1
+ if self.__fileModel is None:
+ return
index = self.__fileModel.setRootPath(path)
if not index.isValid():
+ # There is a problem with this path
+ # No asynchronous process will be waked up
self.__processing -= 1
self.__browser.setRootIndex(index, model=self.__fileModel)
self.__clearData()
self.__updatePath()
- else:
- # asynchronous process
- pass
def __directoryLoaded(self, path):
if self.__directoryLoadedFilter is not None:
@@ -1055,6 +1060,8 @@ class AbstractDataFileDialog(qt.QDialog):
# The first click on the sidebar sent 2 events
self.__processing -= 1
return
+ if self.__fileModel is None:
+ return
index = self.__fileModel.index(path)
self.__browser.setRootIndex(index, model=self.__fileModel)
self.__updatePath()
@@ -1233,6 +1240,7 @@ class AbstractDataFileDialog(qt.QDialog):
if self.__previewWidget is not None:
self.__previewWidget.setData(None)
if self.__selectorWidget is not None:
+ self.__selectorWidget.setData(None)
self.__selectorWidget.hide()
self.__selectedData = None
self.__data = None
@@ -1250,6 +1258,8 @@ class AbstractDataFileDialog(qt.QDialog):
If :meth:`_isDataSupported` returns false, this function will be
inhibited and no data will be selected.
"""
+ if isinstance(data, _FabioData):
+ data = data[()]
if self.__previewWidget is not None:
fromDataSelector = self.__selectedData is not None
self.__previewWidget.setData(data, fromDataSelector=fromDataSelector)
@@ -1317,8 +1327,10 @@ class AbstractDataFileDialog(qt.QDialog):
filename = ""
dataPath = None
- if useSelectorWidget and self.__selectorWidget is not None and self.__selectorWidget.isVisible():
+ if useSelectorWidget and self.__selectorWidget is not None and self.__selectorWidget.isUsed():
slicing = self.__selectorWidget.slicing()
+ if slicing == tuple():
+ slicing = None
else:
slicing = None
@@ -1483,9 +1495,7 @@ class AbstractDataFileDialog(qt.QDialog):
self.__clearData()
if self.__selectorWidget is not None:
- self.__selectorWidget.setVisible(url.data_slice() is not None)
- if url.data_slice() is not None:
- self.__selectorWidget.setSlicing(url.data_slice())
+ self.__selectorWidget.selectSlicing(url.data_slice())
else:
self.__errorWhileLoadingFile = (url.file_path(), "File not found")
self.__clearData()
diff --git a/silx/gui/dialog/ColormapDialog.py b/silx/gui/dialog/ColormapDialog.py
index 9950ad4..9c956f8 100644
--- a/silx/gui/dialog/ColormapDialog.py
+++ b/silx/gui/dialog/ColormapDialog.py
@@ -661,8 +661,7 @@ class ColormapDialog(qt.QDialog):
dataRange = None
if dataRange is not None:
- min_positive = dataRange.min_positive
- dataRange = dataRange.minimum, min_positive, dataRange.maximum
+ dataRange = dataRange.minimum, dataRange.min_positive, dataRange.maximum
if dataRange is None or len(dataRange) != 3:
qt.QMessageBox.warning(
diff --git a/silx/gui/dialog/ImageFileDialog.py b/silx/gui/dialog/ImageFileDialog.py
index ef6b472..d015bd2 100644
--- a/silx/gui/dialog/ImageFileDialog.py
+++ b/silx/gui/dialog/ImageFileDialog.py
@@ -28,7 +28,7 @@ This module contains an :class:`ImageFileDialog`.
__authors__ = ["V. Valls"]
__license__ = "MIT"
-__date__ = "12/02/2018"
+__date__ = "05/03/2019"
import logging
from silx.gui.plot import actions
@@ -36,7 +36,6 @@ from silx.gui import qt
from silx.gui.plot.PlotWidget import PlotWidget
from .AbstractDataFileDialog import AbstractDataFileDialog
import silx.io
-import fabio
_logger = logging.getLogger(__name__)
@@ -61,7 +60,7 @@ class _ImageSelection(qt.QWidget):
def isUsed(self):
if self.__shape is None:
- return None
+ return False
return len(self.__shape) > 2
def getSelectedData(self, data):
@@ -70,6 +69,10 @@ class _ImageSelection(qt.QWidget):
return image
def setData(self, data):
+ if data is None:
+ self.__visibleSliders = 0
+ return
+
shape = data.shape
if self.__shape is not None:
# clean up
@@ -114,6 +117,22 @@ class _ImageSelection(qt.QWidget):
break
self.__axis[i].setValue(value)
+ def selectSlicing(self, slicing):
+ """Select a slicing.
+
+ The provided value could be unconsistent and therefore is not supposed
+ to be retrivable with a getter.
+
+ :param Union[None,Tuple[int]] slicing:
+ """
+ if slicing is None:
+ # Create a default slicing
+ needed = self.__visibleSliders
+ slicing = (0,) * needed
+ if len(slicing) < self.__visibleSliders:
+ slicing = slicing + (0,) * (self.__visibleSliders - len(slicing))
+ self.setSlicing(slicing)
+
class _ImagePreview(qt.QWidget):
"""Provide a preview of the selected image"""
diff --git a/silx/gui/dialog/test/test_colormapdialog.py b/silx/gui/dialog/test/test_colormapdialog.py
index cbc9de1..8dad196 100644
--- a/silx/gui/dialog/test/test_colormapdialog.py
+++ b/silx/gui/dialog/test/test_colormapdialog.py
@@ -1,7 +1,7 @@
# coding: utf-8
# /*##########################################################################
#
-# Copyright (c) 2016-2018 European Synchrotron Radiation Facility
+# Copyright (c) 2016-2019 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -41,10 +41,6 @@ from silx.gui.plot.PlotWindow import PlotWindow
import numpy.random
-# Makes sure a QApplication exists
-_qapp = qt.QApplication.instance() or qt.QApplication([])
-
-
class TestColormapDialog(TestCaseQt, ParametricTestCase):
"""Test the ColormapDialog."""
def setUp(self):
diff --git a/silx/gui/dialog/test/test_datafiledialog.py b/silx/gui/dialog/test/test_datafiledialog.py
index 06f8961..b60ea12 100644
--- a/silx/gui/dialog/test/test_datafiledialog.py
+++ b/silx/gui/dialog/test/test_datafiledialog.py
@@ -26,7 +26,7 @@
__authors__ = ["V. Valls"]
__license__ = "MIT"
-__date__ = "05/10/2018"
+__date__ = "08/03/2019"
import unittest
@@ -130,7 +130,7 @@ class _UtilsMixin(object):
path2_ = os.path.normcase(path2)
if path1_ == path2_:
# Use the unittest API to log and display error
- self.assertNotEquals(path1, path2)
+ self.assertNotEqual(path1, path2)
class TestDataFileDialogInteraction(testutils.TestCaseQt, _UtilsMixin):
@@ -385,7 +385,7 @@ class TestDataFileDialogInteraction(testutils.TestCaseQt, _UtilsMixin):
filename = _tmpDirectory + "/singleimage.edf"
url = silx.io.url.DataUrl(scheme="silx", file_path=filename, data_path="/scan_0/instrument/detector_0/data")
dialog.selectUrl(url.path())
- self.assertTrue(dialog._selectedData().shape, (100, 100))
+ self.assertEqual(dialog._selectedData().shape, (100, 100))
self.assertSamePath(dialog.selectedFile(), filename)
self.assertSamePath(dialog.selectedUrl(), url.path())
@@ -399,7 +399,7 @@ class TestDataFileDialogInteraction(testutils.TestCaseQt, _UtilsMixin):
path = silx.io.url.DataUrl(scheme="silx", file_path=filename, data_path="/image").path()
dialog.selectUrl(path)
# test
- self.assertTrue(dialog._selectedData().shape, (100, 100))
+ self.assertEqual(dialog._selectedData().shape, (100, 100))
self.assertSamePath(dialog.selectedFile(), filename)
self.assertSamePath(dialog.selectedUrl(), path)
@@ -479,11 +479,12 @@ class TestDataFileDialogInteraction(testutils.TestCaseQt, _UtilsMixin):
self.qWaitForPendingActions(dialog)
browser = testutils.findChildren(dialog, qt.QWidget, name="browser")[0]
filename = _tmpDirectory + "/badformat.h5"
- index = browser.rootIndex().model().index(filename)
+ index = browser.model().index(filename)
+ browser.selectIndex(index)
browser.activated.emit(index)
self.qWaitForPendingActions(dialog)
# test
- self.assertTrue(dialog.selectedUrl(), filename)
+ self.assertSamePath(dialog.selectedUrl(), filename)
def _countSelectableItems(self, model, rootIndex):
selectable = 0
@@ -853,7 +854,7 @@ class TestDataFileDialogApi(testutils.TestCaseQt, _UtilsMixin):
dialog2 = self.createDialog()
result = dialog2.restoreState(state)
self.assertTrue(result)
- self.assertNotEquals(dialog2.directory(), directory)
+ self.assertNotEqual(dialog2.directory(), directory)
def testHistory(self):
dialog = self.createDialog()
diff --git a/silx/gui/dialog/test/test_imagefiledialog.py b/silx/gui/dialog/test/test_imagefiledialog.py
index 068dcb9..c019afb 100644
--- a/silx/gui/dialog/test/test_imagefiledialog.py
+++ b/silx/gui/dialog/test/test_imagefiledialog.py
@@ -26,7 +26,7 @@
__authors__ = ["V. Valls"]
__license__ = "MIT"
-__date__ = "05/10/2018"
+__date__ = "08/03/2019"
import unittest
@@ -70,24 +70,24 @@ def setUpModule():
image.write(filename)
filename = _tmpDirectory + "/data.h5"
- f = h5py.File(filename, "w")
- f["scalar"] = 10
- f["image"] = data
- f["cube"] = [data, data + 1, data + 2]
- f["complex_image"] = data * 1j
- f["group/image"] = data
- f.close()
+ with h5py.File(filename, "w") as f:
+ f["scalar"] = 10
+ f["image"] = data
+ f["cube"] = [data, data + 1, data + 2]
+ f["single_frame"] = [data + 5]
+ f["complex_image"] = data * 1j
+ f["group/image"] = data
directory = os.path.join(_tmpDirectory, "data")
os.mkdir(directory)
filename = os.path.join(directory, "data.h5")
- f = h5py.File(filename, "w")
- f["scalar"] = 10
- f["image"] = data
- f["cube"] = [data, data + 1, data + 2]
- f["complex_image"] = data * 1j
- f["group/image"] = data
- f.close()
+ with h5py.File(filename, "w") as f:
+ f["scalar"] = 10
+ f["image"] = data
+ f["cube"] = [data, data + 1, data + 2]
+ f["single_frame"] = [data + 5]
+ f["complex_image"] = data * 1j
+ f["group/image"] = data
filename = _tmpDirectory + "/badformat.edf"
with io.open(filename, "wb") as f:
@@ -137,7 +137,7 @@ class _UtilsMixin(object):
path2_ = os.path.normcase(path2)
if path1_ == path2_:
# Use the unittest API to log and display error
- self.assertNotEquals(path1, path2)
+ self.assertNotEqual(path1, path2)
class TestImageFileDialogInteraction(testutils.TestCaseQt, _UtilsMixin):
@@ -373,7 +373,7 @@ class TestImageFileDialogInteraction(testutils.TestCaseQt, _UtilsMixin):
filename = _tmpDirectory + "/singleimage.edf"
path = filename
dialog.selectUrl(path)
- self.assertTrue(dialog.selectedImage().shape, (100, 100))
+ self.assertEqual(dialog.selectedImage().shape, (100, 100))
self.assertSamePath(dialog.selectedFile(), filename)
path = silx.io.url.DataUrl(scheme="fabio", file_path=filename).path()
self.assertSamePath(dialog.selectedUrl(), path)
@@ -396,7 +396,7 @@ class TestImageFileDialogInteraction(testutils.TestCaseQt, _UtilsMixin):
browser.activated.emit(index)
self.qWaitForPendingActions(dialog)
# test
- self.assertTrue(dialog.selectedImage().shape, (100, 100))
+ self.assertEqual(dialog.selectedImage().shape, (100, 100))
self.assertSamePath(dialog.selectedFile(), filename)
self.assertSamePath(dialog.selectedUrl(), path)
@@ -411,8 +411,8 @@ class TestImageFileDialogInteraction(testutils.TestCaseQt, _UtilsMixin):
dialog.selectUrl(path)
# test
image = dialog.selectedImage()
- self.assertTrue(image.shape, (100, 100))
- self.assertTrue(image[0, 0], 1)
+ self.assertEqual(image.shape, (100, 100))
+ self.assertEqual(image[0, 0], 1)
self.assertSamePath(dialog.selectedFile(), filename)
self.assertSamePath(dialog.selectedUrl(), path)
@@ -426,7 +426,7 @@ class TestImageFileDialogInteraction(testutils.TestCaseQt, _UtilsMixin):
path = silx.io.url.DataUrl(scheme="fabio", file_path=filename).path()
dialog.selectUrl(path)
# test
- self.assertTrue(dialog.selectedImage().shape, (100, 100))
+ self.assertEqual(dialog.selectedImage().shape, (100, 100))
self.assertSamePath(dialog.selectedFile(), filename)
self.assertSamePath(dialog.selectedUrl(), path)
@@ -440,7 +440,7 @@ class TestImageFileDialogInteraction(testutils.TestCaseQt, _UtilsMixin):
path = silx.io.url.DataUrl(scheme="silx", file_path=filename, data_path="/image").path()
dialog.selectUrl(path)
# test
- self.assertTrue(dialog.selectedImage().shape, (100, 100))
+ self.assertEqual(dialog.selectedImage().shape, (100, 100))
self.assertSamePath(dialog.selectedFile(), filename)
self.assertSamePath(dialog.selectedUrl(), path)
@@ -474,8 +474,23 @@ class TestImageFileDialogInteraction(testutils.TestCaseQt, _UtilsMixin):
path = silx.io.url.DataUrl(scheme="silx", file_path=filename, data_path="/cube", data_slice=(1, )).path()
dialog.selectUrl(path)
# test
- self.assertTrue(dialog.selectedImage().shape, (100, 100))
- self.assertTrue(dialog.selectedImage()[0, 0], 1)
+ self.assertEqual(dialog.selectedImage().shape, (100, 100))
+ self.assertEqual(dialog.selectedImage()[0, 0], 1)
+ self.assertSamePath(dialog.selectedFile(), filename)
+ self.assertSamePath(dialog.selectedUrl(), path)
+
+ def testSelectSingleFrameFromH5(self):
+ dialog = self.createDialog()
+ dialog.show()
+ self.qWaitForWindowExposed(dialog)
+
+ # init state
+ filename = _tmpDirectory + "/data.h5"
+ path = silx.io.url.DataUrl(scheme="silx", file_path=filename, data_path="/single_frame", data_slice=(0, )).path()
+ dialog.selectUrl(path)
+ # test
+ self.assertEqual(dialog.selectedImage().shape, (100, 100))
+ self.assertEqual(dialog.selectedImage()[0, 0], 5)
self.assertSamePath(dialog.selectedFile(), filename)
self.assertSamePath(dialog.selectedUrl(), path)
@@ -489,11 +504,12 @@ class TestImageFileDialogInteraction(testutils.TestCaseQt, _UtilsMixin):
self.qWaitForPendingActions(dialog)
browser = testutils.findChildren(dialog, qt.QWidget, name="browser")[0]
filename = _tmpDirectory + "/badformat.edf"
- index = browser.rootIndex().model().index(filename)
+ index = browser.model().index(filename)
+ browser.selectIndex(index)
browser.activated.emit(index)
self.qWaitForPendingActions(dialog)
# test
- self.assertTrue(dialog.selectedUrl(), filename)
+ self.assertSamePath(dialog.selectedUrl(), filename)
def _countSelectableItems(self, model, rootIndex):
selectable = 0
@@ -549,7 +565,7 @@ class TestImageFileDialogApi(testutils.TestCaseQt, _UtilsMixin):
result = dialog2.restoreState(state)
self.qWaitForPendingActions(dialog2)
self.assertTrue(result)
- self.assertTrue(dialog2.colormap().getNormalization(), "log")
+ self.assertEqual(dialog2.colormap().getNormalization(), "log")
def printState(self):
"""
@@ -646,7 +662,7 @@ class TestImageFileDialogApi(testutils.TestCaseQt, _UtilsMixin):
result = dialog.restoreState(state)
self.assertTrue(result)
colormap = dialog.colormap()
- self.assertTrue(colormap.getNormalization(), "log")
+ self.assertEqual(colormap.getNormalization(), "log")
def testRestoreRobusness(self):
"""What's happen if you try to open a config file with a different
@@ -672,7 +688,7 @@ class TestImageFileDialogApi(testutils.TestCaseQt, _UtilsMixin):
dialog2 = self.createDialog()
result = dialog2.restoreState(state)
self.assertTrue(result)
- self.assertNotEquals(dialog2.directory(), directory)
+ self.assertNotEqual(dialog2.directory(), directory)
def testHistory(self):
dialog = self.createDialog()
diff --git a/silx/gui/hdf5/test/test_hdf5.py b/silx/gui/hdf5/test/test_hdf5.py
index f22d4ae..0ab4dc4 100644
--- a/silx/gui/hdf5/test/test_hdf5.py
+++ b/silx/gui/hdf5/test/test_hdf5.py
@@ -1,7 +1,7 @@
# coding: utf-8
# /*##########################################################################
#
-# Copyright (c) 2016 European Synchrotron Radiation Facility
+# Copyright (c) 2016-2019 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -224,7 +224,7 @@ class TestHdf5TreeModel(TestCaseQt):
def testSupportedDrop(self):
model = hdf5.Hdf5TreeModel()
- self.assertNotEquals(model.supportedDropActions(), 0)
+ self.assertNotEqual(model.supportedDropActions(), 0)
model.setFileMoveEnabled(False)
model.setFileDropEnabled(False)
@@ -232,11 +232,11 @@ class TestHdf5TreeModel(TestCaseQt):
model.setFileMoveEnabled(False)
model.setFileDropEnabled(True)
- self.assertNotEquals(model.supportedDropActions(), 0)
+ self.assertNotEqual(model.supportedDropActions(), 0)
model.setFileMoveEnabled(True)
model.setFileDropEnabled(False)
- self.assertNotEquals(model.supportedDropActions(), 0)
+ self.assertNotEqual(model.supportedDropActions(), 0)
def testCloseFile(self):
"""A file inserted as a filename is open and closed internally."""
diff --git a/silx/gui/plot/CompareImages.py b/silx/gui/plot/CompareImages.py
index f7c4899..3875be4 100644
--- a/silx/gui/plot/CompareImages.py
+++ b/silx/gui/plot/CompareImages.py
@@ -1,7 +1,7 @@
# coding: utf-8
# /*##########################################################################
#
-# Copyright (c) 2018 European Synchrotron Radiation Facility
+# Copyright (c) 2018-2019 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -48,7 +48,11 @@ _logger = logging.getLogger(__name__)
from silx.opencl import ocl
if ocl is not None:
- from silx.opencl import sift
+ try:
+ from silx.opencl import sift
+ except ImportError:
+ # sift module is not available (e.g., in official Debian packages)
+ sift = None
else: # No OpenCL device or no pyopencl
sift = None
@@ -62,6 +66,7 @@ class VisualizationMode(enum.Enum):
HORIZONTAL_LINE = 'hline'
COMPOSITE_RED_BLUE_GRAY = "rbgchannel"
COMPOSITE_RED_BLUE_GRAY_NEG = "rbgnegchannel"
+ COMPOSITE_A_MINUS_B = "aminusb"
@enum.unique
@@ -161,6 +166,16 @@ class CompareImagesToolBar(qt.QToolBar):
self.__ycChannelModeAction = action
self.__visualizationGroup.addAction(action)
+ icon = icons.getQIcon("compare-mode-a-minus-b")
+ action = qt.QAction(icon, "Raw A minus B compare mode", self)
+ action.setIconVisibleInMenu(True)
+ action.setCheckable(True)
+ action.setShortcut(qt.QKeySequence(qt.Qt.Key_W))
+ action.setProperty("mode", VisualizationMode.COMPOSITE_A_MINUS_B)
+ menu.addAction(action)
+ self.__ycChannelModeAction = action
+ self.__visualizationGroup.addAction(action)
+
menu = qt.QMenu(self)
self.__alignmentAction = qt.QAction(self)
self.__alignmentAction.setMenu(menu)
@@ -539,6 +554,11 @@ class CompareImages(qt.QMainWindow):
def __init__(self, parent=None, backend=None):
qt.QMainWindow.__init__(self, parent)
+ self._resetZoomActive = True
+ self._colormap = Colormap()
+ """Colormap shared by all modes, except the compose images (rgb image)"""
+ self._colormapKeyPoints = Colormap('spring')
+ """Colormap used for sift keypoints"""
if parent is None:
self.setWindowTitle('Compare images')
@@ -553,6 +573,7 @@ class CompareImages(qt.QMainWindow):
self.__previousSeparatorPosition = None
self.__plot = plot.PlotWidget(parent=self, backend=backend)
+ self.__plot.setDefaultColormap(self._colormap)
self.__plot.getXAxis().setLabel('Columns')
self.__plot.getYAxis().setLabel('Rows')
if silx.config.DEFAULT_PLOT_IMAGE_Y_AXIS_ORIENTATION == 'downward':
@@ -630,6 +651,14 @@ class CompareImages(qt.QMainWindow):
"""
return self.__plot
+ def getColormap(self):
+ """
+
+ :return: colormap used for compare image
+ :rtype: silx.gui.colors.Colormap
+ """
+ return self._colormap
+
def getRawPixelData(self, x, y):
"""Return the raw pixel of each image data from axes positions.
@@ -835,7 +864,8 @@ class CompareImages(qt.QMainWindow):
self.__raw1 = image1
self.__raw2 = image2
self.__updateData()
- self.__plot.resetZoom()
+ if self.isAutoResetZoom():
+ self.__plot.resetZoom()
def setImage1(self, image1):
"""Set image1 to be compared.
@@ -850,7 +880,8 @@ class CompareImages(qt.QMainWindow):
"""
self.__raw1 = image1
self.__updateData()
- self.__plot.resetZoom()
+ if self.isAutoResetZoom():
+ self.__plot.resetZoom()
def setImage2(self, image2):
"""Set image2 to be compared.
@@ -865,7 +896,8 @@ class CompareImages(qt.QMainWindow):
"""
self.__raw2 = image2
self.__updateData()
- self.__plot.resetZoom()
+ if self.isAutoResetZoom():
+ self.__plot.resetZoom()
def __updateKeyPoints(self):
"""Update the displayed keypoints using cached keypoints.
@@ -878,11 +910,11 @@ class CompareImages(qt.QMainWindow):
y=data[1],
z=1,
value=data[2],
- legend="keypoints",
- colormap=Colormap("spring"))
+ colormap=self._colormapKeyPoints,
+ legend="keypoints")
def __updateData(self):
- """Compute aligned image when the alignement mode changes.
+ """Compute aligned image when the alignment mode changes.
This function cache input images which are used when
vertical/horizontal separators moves.
@@ -943,6 +975,9 @@ class CompareImages(qt.QMainWindow):
elif mode == VisualizationMode.COMPOSITE_RED_BLUE_GRAY:
data1 = self.__composeImage(data1, data2, mode)
data2 = numpy.empty((0, 0))
+ elif mode == VisualizationMode.COMPOSITE_A_MINUS_B:
+ data1 = self.__composeImage(data1, data2, mode)
+ data2 = numpy.empty((0, 0))
elif mode == VisualizationMode.ONLY_A:
data2 = numpy.empty((0, 0))
elif mode == VisualizationMode.ONLY_B:
@@ -977,7 +1012,8 @@ class CompareImages(qt.QMainWindow):
else:
vmin = min(self.__data1.min(), self.__data2.min())
vmax = max(self.__data1.max(), self.__data2.max())
- colormap = Colormap(vmin=vmin, vmax=vmax)
+ colormap = self.getColormap()
+ colormap.setVRange(vmin=vmin, vmax=vmax)
self.__image1.setColormap(colormap)
self.__image2.setColormap(colormap)
@@ -1025,6 +1061,13 @@ class CompareImages(qt.QMainWindow):
:rtype: numpy.ndarray
"""
assert(data1.shape[0:2] == data2.shape[0:2])
+ if mode == VisualizationMode.COMPOSITE_A_MINUS_B:
+ # TODO: this calculation has no interest of generating a 'composed'
+ # rgb image, this could be moved in an other function or doc
+ # should be modified
+ _type = data1.dtype
+ result = data1.astype(numpy.float64) - data2.astype(numpy.float64)
+ return result
mode1 = self.__getImageMode(data1)
if mode1 in ["rgb", "rgba"]:
intensity1 = self.__luminosityImage(data1)
@@ -1188,3 +1231,19 @@ class CompareImages(qt.QMainWindow):
data2 = result["result"]
self.__transformation = self.__toAffineTransformation(result)
return data1, data2
+
+ def setAutoResetZoom(self, activate=True):
+ """
+
+ :param bool activate: True if we want to activate the automatic
+ plot reset zoom when setting images.
+ """
+ self._resetZoomActive = activate
+
+ def isAutoResetZoom(self):
+ """
+
+ :return: True if the automatic call to resetzoom is activated
+ :rtype: bool
+ """
+ return self._resetZoomActive
diff --git a/silx/gui/plot/ComplexImageView.py b/silx/gui/plot/ComplexImageView.py
index 2523cde..c8470ab 100644
--- a/silx/gui/plot/ComplexImageView.py
+++ b/silx/gui/plot/ComplexImageView.py
@@ -39,6 +39,7 @@ import logging
import collections
import numpy
+from ...utils.deprecation import deprecated
from .. import qt, icons
from .PlotWindow import Plot2D
from . import items
@@ -170,16 +171,16 @@ class _ComplexDataToolButton(qt.QToolButton):
"""
_MODES = collections.OrderedDict([
- (ImageComplexData.Mode.ABSOLUTE, ('math-amplitude', 'Amplitude')),
- (ImageComplexData.Mode.SQUARE_AMPLITUDE,
+ (ImageComplexData.ComplexMode.ABSOLUTE, ('math-amplitude', 'Amplitude')),
+ (ImageComplexData.ComplexMode.SQUARE_AMPLITUDE,
('math-square-amplitude', 'Square amplitude')),
- (ImageComplexData.Mode.PHASE, ('math-phase', 'Phase')),
- (ImageComplexData.Mode.REAL, ('math-real', 'Real part')),
- (ImageComplexData.Mode.IMAGINARY,
+ (ImageComplexData.ComplexMode.PHASE, ('math-phase', 'Phase')),
+ (ImageComplexData.ComplexMode.REAL, ('math-real', 'Real part')),
+ (ImageComplexData.ComplexMode.IMAGINARY,
('math-imaginary', 'Imaginary part')),
- (ImageComplexData.Mode.AMPLITUDE_PHASE,
+ (ImageComplexData.ComplexMode.AMPLITUDE_PHASE,
('math-phase-color', 'Amplitude and Phase')),
- (ImageComplexData.Mode.LOG10_AMPLITUDE_PHASE,
+ (ImageComplexData.ComplexMode.LOG10_AMPLITUDE_PHASE,
('math-phase-color-log', 'Log10(Amp.) and Phase'))
])
@@ -208,7 +209,7 @@ class _ComplexDataToolButton(qt.QToolButton):
self.setPopupMode(qt.QToolButton.InstantPopup)
- self._modeChanged(self._plot2DComplex.getVisualizationMode())
+ self._modeChanged(self._plot2DComplex.getComplexMode())
self._plot2DComplex.sigVisualizationModeChanged.connect(
self._modeChanged)
@@ -217,7 +218,8 @@ class _ComplexDataToolButton(qt.QToolButton):
icon, text = self._MODES[mode]
self.setIcon(icons.getQIcon(icon))
self.setToolTip('Display the ' + text.lower())
- self._rangeDialogAction.setEnabled(mode == ImageComplexData.Mode.LOG10_AMPLITUDE_PHASE)
+ self._rangeDialogAction.setEnabled(
+ mode == ImageComplexData.ComplexMode.LOG10_AMPLITUDE_PHASE)
def _triggered(self, action):
"""Handle triggering of menu actions"""
@@ -244,8 +246,8 @@ class _ComplexDataToolButton(qt.QToolButton):
else: # update mode
mode = action.data()
- if isinstance(mode, ImageComplexData.Mode):
- self._plot2DComplex.setVisualizationMode(mode)
+ if isinstance(mode, ImageComplexData.ComplexMode):
+ self._plot2DComplex.setComplexMode(mode)
def _rangeChanged(self, range_):
"""Handle updates of range in the dialog"""
@@ -258,8 +260,8 @@ class ComplexImageView(qt.QWidget):
:param parent: See :class:`QMainWindow`
"""
- Mode = ImageComplexData.Mode
- """Also expose the modes inside the class"""
+ ComplexMode = ImageComplexData.ComplexMode
+ """Complex Modes enumeration"""
sigDataChanged = qt.Signal()
"""Signal emitted when data has changed."""
@@ -301,7 +303,7 @@ class ComplexImageView(qt.QWidget):
if event is items.ItemChangedType.DATA:
self.sigDataChanged.emit()
elif event is items.ItemChangedType.VISUALIZATION_MODE:
- mode = self.getVisualizationMode()
+ mode = self.getComplexMode()
self.sigVisualizationModeChanged.emit(mode)
def getPlot(self):
@@ -344,15 +346,34 @@ class ComplexImageView(qt.QWidget):
False to return internal data (do not modify!)
:rtype: numpy.ndarray of float with 2 dims or RGBA image (uint8).
"""
- mode = self.getVisualizationMode()
- if mode in (self.Mode.AMPLITUDE_PHASE,
- self.Mode.LOG10_AMPLITUDE_PHASE):
+ mode = self.getComplexMode()
+ if mode in (self.ComplexMode.AMPLITUDE_PHASE,
+ self.ComplexMode.LOG10_AMPLITUDE_PHASE):
return self._plotImage.getRgbaImageData(copy=copy)
else:
return self._plotImage.getData(copy=copy)
+ # Backward compatibility
+
+ Mode = ComplexMode
+
+ @classmethod
+ @deprecated(replacement='supportedComplexModes', since_version='0.11.0')
+ def getSupportedVisualizationModes(cls):
+ return cls.supportedComplexModes()
+
+ @deprecated(replacement='setComplexMode', since_version='0.11.0')
+ def setVisualizationMode(self, mode):
+ return self.setComplexMode(mode)
+
+ @deprecated(replacement='getComplexMode', since_version='0.11.0')
+ def getVisualizationMode(self):
+ return self.getComplexMode()
+
+ # Image item proxy
+
@staticmethod
- def getSupportedVisualizationModes():
+ def supportedComplexModes():
"""Returns the supported visualization modes.
Supported visualization modes are:
@@ -365,31 +386,33 @@ class ComplexImageView(qt.QWidget):
- log10_amplitude_phase:
Color-coded phase with log10(amplitude) as alpha.
- :rtype: List[Mode]
+ :rtype: List[ComplexMode]
"""
- return tuple(ImageComplexData.Mode)
+ return ImageComplexData.supportedComplexModes()
- def setVisualizationMode(self, mode):
+ def setComplexMode(self, mode):
"""Set the mode of visualization of the complex data.
- See :meth:`getSupportedVisualizationModes` for the list of
+ See :meth:`supportedComplexModes` for the list of
supported modes.
How-to change visualization mode::
widget = ComplexImageView()
- widget.setVisualizationMode(ComplexImageView.Mode.PHASE)
+ widget.setComplexMode(ComplexImageView.ComplexMode.PHASE)
+ # or
+ widget.setComplexMode('phase')
- :param Mode mode: The mode to use.
+ :param Unions[ComplexMode,str] mode: The mode to use.
"""
- self._plotImage.setVisualizationMode(mode)
+ self._plotImage.setComplexMode(mode)
- def getVisualizationMode(self):
+ def getComplexMode(self):
"""Get the current visualization mode of the complex data.
- :rtype: Mode
+ :rtype: ComplexMode
"""
- return self._plotImage.getVisualizationMode()
+ return self._plotImage.getComplexMode()
def _setAmplitudeRangeInfo(self, max_=None, delta=2):
"""Set the amplitude range to display for 'log10_amplitude_phase' mode.
@@ -407,8 +430,6 @@ class ComplexImageView(qt.QWidget):
:rtype: 2-tuple"""
return self._plotImage._getAmplitudeRangeInfo()
- # Image item proxy
-
def setColormap(self, colormap, mode=None):
"""Set the colormap to use for amplitude, phase, real or imaginary.
@@ -416,14 +437,14 @@ class ComplexImageView(qt.QWidget):
amplitude and phase.
:param ~silx.gui.colors.Colormap colormap: The colormap
- :param Mode mode: If specified, set the colormap of this specific mode
+ :param ComplexMode mode: If specified, set the colormap of this specific mode
"""
self._plotImage.setColormap(colormap, mode)
def getColormap(self, mode=None):
"""Returns the colormap used to display the data.
- :param Mode mode: If specified, set the colormap of this specific mode
+ :param ComplexMode mode: If specified, set the colormap of this specific mode
:rtype: ~silx.gui.colors.Colormap
"""
return self._plotImage.getColormap(mode=mode)
diff --git a/silx/gui/plot/CurvesROIWidget.py b/silx/gui/plot/CurvesROIWidget.py
index b426a23..050b344 100644
--- a/silx/gui/plot/CurvesROIWidget.py
+++ b/silx/gui/plot/CurvesROIWidget.py
@@ -75,14 +75,19 @@ class CurvesROIWidget(qt.QWidget):
"""
sigROISignal = qt.Signal(object)
- """Deprecated signal for backward compatibility with silx < 0.7.
- Prefer connecting directly to :attr:`CurvesRoiWidget.sigRoiSignal`
- """
def __init__(self, parent=None, name=None, plot=None):
super(CurvesROIWidget, self).__init__(parent)
if name is not None:
self.setWindowTitle(name)
+ self.__lastSigROISignal = None
+ """Store the last value emitted for the sigRoiSignal. In the case the
+ active curve change we need to add this extra step in order to make
+ sure we won't send twice the sigROISignal.
+ This come from the fact sigROISignal is connected to the
+ activeROIChanged signal which is emitted when raw and net counts
+ values are changing but are not embed in the sigROISignal.
+ """
assert plot is not None
self._plotRef = weakref.ref(plot)
self._showAllMarkers = False
@@ -91,12 +96,12 @@ class CurvesROIWidget(qt.QWidget):
layout = qt.QVBoxLayout(self)
layout.setContentsMargins(0, 0, 0, 0)
layout.setSpacing(0)
- ##############
+
self.headerLabel = qt.QLabel(self)
self.headerLabel.setAlignment(qt.Qt.AlignHCenter)
self.setHeader()
layout.addWidget(self.headerLabel)
- ##############
+
widgetAllCheckbox = qt.QWidget(parent=self)
self._showAllCheckBox = qt.QCheckBox("show all ROI",
parent=widgetAllCheckbox)
@@ -106,14 +111,13 @@ class CurvesROIWidget(qt.QWidget):
widgetAllCheckbox.layout().addWidget(spacer)
widgetAllCheckbox.layout().addWidget(self._showAllCheckBox)
layout.addWidget(widgetAllCheckbox)
- ##############
+
self.roiTable = ROITable(self, plot=plot)
rheight = self.roiTable.horizontalHeader().sizeHint().height()
self.roiTable.setMinimumHeight(4 * rheight)
layout.addWidget(self.roiTable)
self._roiFileDir = qt.QDir.home().absolutePath()
self._showAllCheckBox.toggled.connect(self.roiTable.showAllMarkers)
- #################
hbox = qt.QWidget(self)
hboxlayout = qt.QHBoxLayout(hbox)
@@ -216,7 +220,6 @@ class CurvesROIWidget(qt.QWidget):
i += 1
newroi = "newroi %d" % i
return newroi
-
roi = ROI(name=getNextRoiName())
if roi.getName() == "ICR":
@@ -231,7 +234,6 @@ class CurvesROIWidget(qt.QWidget):
fromdata, dummy0, todata, dummy1 = self._getAllLimits()
roi.setFrom(fromdata)
roi.setTo(todata)
-
self.roiTable.addRoi(roi)
# back compatibility pymca roi signals
@@ -257,7 +259,9 @@ class CurvesROIWidget(qt.QWidget):
def _reset(self):
"""Reset button clicked handler"""
self.roiTable.clear()
+ old = self.blockSignals(True) # avoid several sigROISignal emission
self._add()
+ self.blockSignals(old)
# back compatibility pymca roi signals
ddict = {}
@@ -402,7 +406,9 @@ class CurvesROIWidget(qt.QWidget):
if visible:
# if no ROI existing yet, add the default one
if self.roiTable.rowCount() is 0:
+ old = self.blockSignals(True) # avoid several sigROISignal emission
self._add()
+ self.blockSignals(old)
self.calculateRois()
def fillFromROIDict(self, *args, **kwargs):
@@ -416,7 +422,10 @@ class CurvesROIWidget(qt.QWidget):
ddict['current'] = self.roiTable.activeRoi.getName()
else:
ddict['current'] = None
- self.sigROISignal.emit(ddict)
+
+ if self.__lastSigROISignal != ddict:
+ self.__lastSigROISignal = ddict
+ self.sigROISignal.emit(ddict)
@property
def currentRoi(self):
@@ -563,8 +572,11 @@ class ROITable(TableWidget):
# backward compatibility since 0.10.0
if isinstance(rois, dict):
for roiName, roi in rois.items():
- roi['name'] = roiName
- _roi = ROI._fromDict(roi)
+ if isinstance(roi, ROI):
+ _roi = roi
+ else:
+ roi['name'] = roiName
+ _roi = ROI._fromDict(roi)
self.addRoi(_roi)
else:
for roi in rois:
@@ -688,12 +700,14 @@ class ROITable(TableWidget):
activeItems = self.selectedItems()
if len(activeItems) is 0:
return
+ old = self.blockSignals(True) # avoid several emission of sigROISignal
roiToRm = set()
for item in activeItems:
row = item.row()
itemID = self.item(row, self.COLUMNS_INDEX['ID'])
roiToRm.add(self._roiDict[int(itemID.text())])
[self.removeROI(roi) for roi in roiToRm]
+ self.blockSignals(old)
self.setActiveRoi(None)
def removeROI(self, roi):
@@ -730,7 +744,10 @@ class ROITable(TableWidget):
else:
assert isinstance(roi, ROI)
if roi and roi.getID() in self._roiToItems.keys():
+ # avoid several call back to setActiveROI
+ old = self.blockSignals(True)
self.selectRow(self._roiToItems[roi.getID()].row())
+ self.blockSignals(old)
self._markersHandler.setActiveRoi(roi)
self.activeROIChanged.emit()
@@ -931,9 +948,12 @@ class ROITable(TableWidget):
if ddict['event'] == 'markerMoved':
label = ddict['label']
roiID = self._markersHandler.getRoiID(markerID=label)
- if roiID:
+ if roiID is not None:
+ # avoid several emission of sigROISignal
+ old = self.blockSignals(True)
self._markersHandler.changePosition(markerID=label,
x=ddict['x'])
+ self.blockSignals(old)
self._updateRoiInfo(roiID)
def showEvent(self, event):
diff --git a/silx/gui/plot/PlotToolButtons.py b/silx/gui/plot/PlotToolButtons.py
index bf6b8ce..cd1a43f 100644
--- a/silx/gui/plot/PlotToolButtons.py
+++ b/silx/gui/plot/PlotToolButtons.py
@@ -47,7 +47,7 @@ from .. import icons
from .. import qt
from ... import config
-from .items import SymbolMixIn
+from .items import SymbolMixIn, Scatter
_logger = logging.getLogger(__name__)
@@ -352,23 +352,22 @@ class ProfileToolButton(PlotToolButton):
self._profileDimensionChanged(2)
-class SymbolToolButton(PlotToolButton):
- """A tool button with a drop-down menu to control symbol size and marker.
+
+class _SymbolToolButtonBase(PlotToolButton):
+ """Base class for PlotToolButton setting marker and size.
:param parent: See QWidget
:param plot: The `~silx.gui.plot.PlotWidget` to control
"""
def __init__(self, parent=None, plot=None):
- super(SymbolToolButton, self).__init__(parent=parent, plot=plot)
+ super(_SymbolToolButtonBase, self).__init__(parent=parent, plot=plot)
- self.setToolTip('Set symbol size and marker')
- self.setIcon(icons.getQIcon('plot-symbols'))
-
- menu = qt.QMenu(self)
-
- # Size slider
+ def _addSizeSliderToMenu(self, menu):
+ """Add a slider to set size to the given menu
+ :param QMenu menu:
+ """
slider = qt.QSlider(qt.Qt.Horizontal)
slider.setRange(1, 20)
slider.setValue(config.DEFAULT_PLOT_SYMBOL_SIZE)
@@ -378,10 +377,11 @@ class SymbolToolButton(PlotToolButton):
widgetAction.setDefaultWidget(slider)
menu.addAction(widgetAction)
- menu.addSeparator()
-
- # Marker actions
+ def _addSymbolsToMenu(self, menu):
+ """Add symbols to the given menu
+ :param QMenu menu:
+ """
for marker, name in zip(SymbolMixIn.getSupportedSymbols(),
SymbolMixIn.getSupportedSymbolNames()):
action = qt.QAction(name, menu)
@@ -390,9 +390,6 @@ class SymbolToolButton(PlotToolButton):
functools.partial(self._markerChanged, marker))
menu.addAction(action)
- self.setMenu(menu)
- self.setPopupMode(qt.QToolButton.InstantPopup)
-
def _sizeChanged(self, value):
"""Manage slider value changed
@@ -418,3 +415,78 @@ class SymbolToolButton(PlotToolButton):
for item in plot._getItems(withhidden=True):
if isinstance(item, SymbolMixIn):
item.setSymbol(marker)
+
+
+class SymbolToolButton(_SymbolToolButtonBase):
+ """A tool button with a drop-down menu to control symbol size and marker.
+
+ :param parent: See QWidget
+ :param plot: The `~silx.gui.plot.PlotWidget` to control
+ """
+
+ def __init__(self, parent=None, plot=None):
+ super(SymbolToolButton, self).__init__(parent=parent, plot=plot)
+
+ self.setToolTip('Set symbol size and marker')
+ self.setIcon(icons.getQIcon('plot-symbols'))
+
+ menu = qt.QMenu(self)
+ self._addSizeSliderToMenu(menu)
+ menu.addSeparator()
+ self._addSymbolsToMenu(menu)
+
+ self.setMenu(menu)
+ self.setPopupMode(qt.QToolButton.InstantPopup)
+
+
+class ScatterVisualizationToolButton(_SymbolToolButtonBase):
+ """QToolButton to select the visualization mode of scatter plot
+
+ :param parent: See QWidget
+ :param plot: The `~silx.gui.plot.PlotWidget` to control
+ """
+
+ def __init__(self, parent=None, plot=None):
+ super(ScatterVisualizationToolButton, self).__init__(
+ parent=parent, plot=plot)
+
+ self.setToolTip(
+ 'Set scatter visualization mode, symbol marker and size')
+ self.setIcon(icons.getQIcon('eye'))
+
+ menu = qt.QMenu(self)
+
+ # Add visualization modes
+
+ for mode in Scatter.supportedVisualizations():
+ name = mode.value.capitalize()
+ action = qt.QAction(name, menu)
+ action.setCheckable(False)
+ action.triggered.connect(
+ functools.partial(self._visualizationChanged, mode))
+ menu.addAction(action)
+
+ menu.addSeparator()
+
+ submenu = menu.addMenu(icons.getQIcon('plot-symbols'), "Symbol")
+ self._addSymbolsToMenu(submenu)
+
+ submenu = menu.addMenu(icons.getQIcon('plot-symbols'), "Symbol Size")
+ self._addSizeSliderToMenu(submenu)
+
+ self.setMenu(menu)
+ self.setPopupMode(qt.QToolButton.InstantPopup)
+
+ def _visualizationChanged(self, mode):
+ """Handle change of visualization mode.
+
+ :param ScatterVisualizationMixIn.Visualization mode:
+ The visualization mode to use for scatter
+ """
+ plot = self.plot()
+ if plot is None:
+ return
+
+ for item in plot._getItems(withhidden=True):
+ if isinstance(item, Scatter):
+ item.setVisualization(mode)
diff --git a/silx/gui/plot/PlotWidget.py b/silx/gui/plot/PlotWidget.py
index cfe39fa..9b9b4d2 100644
--- a/silx/gui/plot/PlotWidget.py
+++ b/silx/gui/plot/PlotWidget.py
@@ -33,12 +33,20 @@ __authors__ = ["V.A. Sole", "T. Vincent"]
__license__ = "MIT"
__date__ = "21/12/2018"
+import logging
+
+_logger = logging.getLogger(__name__)
+
from collections import OrderedDict, namedtuple
+try:
+ from collections import abc
+except ImportError: # Python2 support
+ import collections as abc
from contextlib import contextmanager
import datetime as dt
import itertools
-import logging
+import warnings
import numpy
@@ -46,8 +54,11 @@ import silx
from silx.utils.weakref import WeakMethodProxy
from silx.utils.property import classproperty
from silx.utils.deprecation import deprecated
-# Import matplotlib backend here to init matplotlib our way
-from .backends.BackendMatplotlib import BackendMatplotlibQt
+try:
+ # Import matplotlib now to init matplotlib our way
+ from . import matplotlib
+except ImportError:
+ _logger.debug("matplotlib not available")
from ..colors import Colormap
from .. import colors
@@ -64,7 +75,6 @@ from .. import qt
from ._utils.panzoom import ViewConstraints
from ...gui.plot._utils.dtime_ticklayout import timestamp
-_logger = logging.getLogger(__name__)
_COLORDICT = colors.COLORDICT
@@ -287,33 +297,68 @@ class PlotWidget(qt.QMainWindow):
self._foregroundColorsUpdated()
self._backgroundColorsUpdated()
+ def __getBackendClass(self, backend):
+ """Returns backend class corresponding to backend.
+
+ If multiple backends are provided, the first available one is used.
+
+ :param Union[str,BackendBase,Iterable] backend:
+ The name of the backend or its class or an iterable of those.
+ :rtype: BackendBase
+ :raise ValueError: In case the backend is not supported
+ :raise RuntimeError: If a backend is not available
+ """
+ if callable(backend):
+ return backend
+
+ elif isinstance(backend, str):
+ backend = backend.lower()
+ if backend in ('matplotlib', 'mpl'):
+ try:
+ from .backends.BackendMatplotlib import \
+ BackendMatplotlibQt as backendClass
+ except ImportError:
+ _logger.debug("Backtrace", exc_info=True)
+ raise ImportError("matplotlib backend is not available")
+
+ elif backend in ('gl', 'opengl'):
+ try:
+ from .backends.BackendOpenGL import \
+ BackendOpenGL as backendClass
+ except ImportError:
+ _logger.debug("Backtrace", exc_info=True)
+ raise ImportError("OpenGL backend is not available")
+
+ elif backend == 'none':
+ from .backends.BackendBase import BackendBase as backendClass
+
+ else:
+ raise ValueError("Backend not supported %s" % backend)
+
+ return backendClass
+
+ elif isinstance(backend, abc.Iterable):
+ for b in backend:
+ try:
+ return self.__getBackendClass(b)
+ except ImportError:
+ pass
+ else: # No backend was found
+ raise ValueError("No supported backend was found")
+
+ raise ValueError("Backend not supported %s" % str(backend))
+
def _setBackend(self, backend):
- """Setup a new backend"""
+ """Setup a new backend
+
+ :param backend: Either a str defining the backend to use
+ """
assert(self._backend is None)
if backend is None:
backend = silx.config.DEFAULT_PLOT_BACKEND
- if hasattr(backend, "__call__"):
- backend = backend(self, self)
-
- elif hasattr(backend, "lower"):
- lowerCaseString = backend.lower()
- if lowerCaseString in ("matplotlib", "mpl"):
- backendClass = BackendMatplotlibQt
- elif lowerCaseString in ('gl', 'opengl'):
- from .backends.BackendOpenGL import BackendOpenGL
- backendClass = BackendOpenGL
- elif lowerCaseString == 'none':
- from .backends.BackendBase import BackendBase as backendClass
- else:
- raise ValueError("Backend not supported %s" % backend)
- backend = backendClass(self, self)
-
- else:
- raise ValueError("Backend not supported %s" % str(backend))
-
- self._backend = backend
+ self._backend = self.__getBackendClass(backend)(self, self)
# TODO: Can be removed for silx 0.10
@staticmethod
@@ -456,7 +501,7 @@ class PlotWidget(qt.QMainWindow):
return qt.QColor.fromRgbF(*self._dataBackgroundColor)
def setDataBackgroundColor(self, color):
- """Set the background color of this widget.
+ """Set the background color of the plot area.
Set to None or an invalid QColor to use the background color.
@@ -499,16 +544,25 @@ class PlotWidget(qt.QMainWindow):
if item.isVisible():
bounds = item.getBounds()
if bounds is not None:
- xMin = numpy.nanmin([xMin, bounds[0]])
- xMax = numpy.nanmax([xMax, bounds[1]])
+ with warnings.catch_warnings():
+ warnings.simplefilter('ignore', category=RuntimeWarning)
+ # Ignore All-NaN slice encountered
+ xMin = numpy.nanmin([xMin, bounds[0]])
+ xMax = numpy.nanmax([xMax, bounds[1]])
# Take care of right axis
if (isinstance(item, items.YAxisMixIn) and
item.getYAxis() == 'right'):
- yMinRight = numpy.nanmin([yMinRight, bounds[2]])
- yMaxRight = numpy.nanmax([yMaxRight, bounds[3]])
+ with warnings.catch_warnings():
+ warnings.simplefilter('ignore', category=RuntimeWarning)
+ # Ignore All-NaN slice encountered
+ yMinRight = numpy.nanmin([yMinRight, bounds[2]])
+ yMaxRight = numpy.nanmax([yMaxRight, bounds[3]])
else:
- yMinLeft = numpy.nanmin([yMinLeft, bounds[2]])
- yMaxLeft = numpy.nanmax([yMaxLeft, bounds[3]])
+ with warnings.catch_warnings():
+ warnings.simplefilter('ignore', category=RuntimeWarning)
+ # Ignore All-NaN slice encountered
+ yMinLeft = numpy.nanmin([yMinLeft, bounds[2]])
+ yMaxLeft = numpy.nanmax([yMaxLeft, bounds[3]])
def lGetRange(x, y):
return None if numpy.isnan(x) and numpy.isnan(y) else (x, y)
@@ -2665,9 +2719,11 @@ class PlotWidget(qt.QMainWindow):
xmin, xmax = (1., 100.) if ranges.x is None else ranges.x
ymin, ymax = (1., 100.) if ranges.y is None else ranges.y
if ranges.yright is None:
- ymin2, ymax2 = None, None
+ ymin2, ymax2 = ymin, ymax
else:
ymin2, ymax2 = ranges.yright
+ if ranges.y is None:
+ ymin, ymax = ranges.yright
# Add margins around data inside the plot area
newLimits = list(_utils.addMarginsToLimits(
diff --git a/silx/gui/plot/PlotWindow.py b/silx/gui/plot/PlotWindow.py
index b44a512..a39430e 100644
--- a/silx/gui/plot/PlotWindow.py
+++ b/silx/gui/plot/PlotWindow.py
@@ -29,15 +29,19 @@ The :class:`PlotWindow` is a subclass of :class:`.PlotWidget`.
__authors__ = ["V.A. Sole", "T. Vincent"]
__license__ = "MIT"
-__date__ = "21/12/2018"
+__date__ = "12/04/2019"
-import collections
+try:
+ from collections import abc
+except ImportError: # Python2 support
+ import collections as abc
import logging
import weakref
import silx
from silx.utils.weakref import WeakMethodProxy
from silx.utils.deprecation import deprecated
+from silx.utils.proxy import docstring
from . import PlotWidget
from . import actions
@@ -128,53 +132,53 @@ class PlotWindow(PlotWidget):
self.group.setExclusive(False)
self.resetZoomAction = self.group.addAction(
- actions.control.ResetZoomAction(self))
+ actions.control.ResetZoomAction(self, parent=self))
self.resetZoomAction.setVisible(resetzoom)
self.addAction(self.resetZoomAction)
- self.zoomInAction = actions.control.ZoomInAction(self)
+ self.zoomInAction = actions.control.ZoomInAction(self, parent=self)
self.addAction(self.zoomInAction)
- self.zoomOutAction = actions.control.ZoomOutAction(self)
+ self.zoomOutAction = actions.control.ZoomOutAction(self, parent=self)
self.addAction(self.zoomOutAction)
self.xAxisAutoScaleAction = self.group.addAction(
- actions.control.XAxisAutoScaleAction(self))
+ actions.control.XAxisAutoScaleAction(self, parent=self))
self.xAxisAutoScaleAction.setVisible(autoScale)
self.addAction(self.xAxisAutoScaleAction)
self.yAxisAutoScaleAction = self.group.addAction(
- actions.control.YAxisAutoScaleAction(self))
+ actions.control.YAxisAutoScaleAction(self, parent=self))
self.yAxisAutoScaleAction.setVisible(autoScale)
self.addAction(self.yAxisAutoScaleAction)
self.xAxisLogarithmicAction = self.group.addAction(
- actions.control.XAxisLogarithmicAction(self))
+ actions.control.XAxisLogarithmicAction(self, parent=self))
self.xAxisLogarithmicAction.setVisible(logScale)
self.addAction(self.xAxisLogarithmicAction)
self.yAxisLogarithmicAction = self.group.addAction(
- actions.control.YAxisLogarithmicAction(self))
+ actions.control.YAxisLogarithmicAction(self, parent=self))
self.yAxisLogarithmicAction.setVisible(logScale)
self.addAction(self.yAxisLogarithmicAction)
self.gridAction = self.group.addAction(
- actions.control.GridAction(self, gridMode='both'))
+ actions.control.GridAction(self, gridMode='both', parent=self))
self.gridAction.setVisible(grid)
self.addAction(self.gridAction)
self.curveStyleAction = self.group.addAction(
- actions.control.CurveStyleAction(self))
+ actions.control.CurveStyleAction(self, parent=self))
self.curveStyleAction.setVisible(curveStyle)
self.addAction(self.curveStyleAction)
self.colormapAction = self.group.addAction(
- actions.control.ColormapAction(self))
+ actions.control.ColormapAction(self, parent=self))
self.colormapAction.setVisible(colormap)
self.addAction(self.colormapAction)
self.colorbarAction = self.group.addAction(
- actions_control.ColorBarAction(self, self))
+ actions_control.ColorBarAction(self, parent=self))
self.colorbarAction.setVisible(False)
self.addAction(self.colorbarAction)
self._colorbar.setVisible(False)
@@ -194,18 +198,18 @@ class PlotWindow(PlotWidget):
self.getMaskAction().setVisible(mask)
self._intensityHistoAction = self.group.addAction(
- actions_histogram.PixelIntensitiesHistoAction(self))
+ actions_histogram.PixelIntensitiesHistoAction(self, parent=self))
self._intensityHistoAction.setVisible(False)
self._medianFilter2DAction = self.group.addAction(
- actions_medfilt.MedianFilter2DAction(self))
+ actions_medfilt.MedianFilter2DAction(self, parent=self))
self._medianFilter2DAction.setVisible(False)
self._medianFilter1DAction = self.group.addAction(
- actions_medfilt.MedianFilter1DAction(self))
+ actions_medfilt.MedianFilter1DAction(self, parent=self))
self._medianFilter1DAction.setVisible(False)
- self.fitAction = self.group.addAction(actions_fit.FitAction(self))
+ self.fitAction = self.group.addAction(actions_fit.FitAction(self, parent=self))
self.fitAction.setVisible(fit)
self.addAction(self.fitAction)
@@ -250,7 +254,7 @@ class PlotWindow(PlotWidget):
hbox.addWidget(self.controlButton)
if position: # Add PositionInfo widget to the bottom of the plot
- if isinstance(position, collections.Iterable):
+ if isinstance(position, abc.Iterable):
# Use position as a set of converters
converters = position
else:
@@ -278,7 +282,7 @@ class PlotWindow(PlotWidget):
parent=self, plot=self)
self.addToolBar(self._interactiveModeToolBar)
- self._toolbar = self._createToolBar(title='Plot', parent=None)
+ self._toolbar = self._createToolBar(title='Plot', parent=self)
self.addToolBar(self._toolbar)
self._outputToolBar = tools.OutputToolBar(parent=self, plot=self)
@@ -292,24 +296,21 @@ class PlotWindow(PlotWidget):
for action in toolbar.actions():
self.addAction(action)
+ @docstring(PlotWidget)
def setBackgroundColor(self, color):
super(PlotWindow, self).setBackgroundColor(color)
self._updateColorBarBackground()
- setBackgroundColor.__doc__ = PlotWidget.setBackgroundColor.__doc__
-
+ @docstring(PlotWidget)
def setDataBackgroundColor(self, color):
super(PlotWindow, self).setDataBackgroundColor(color)
self._updateColorBarBackground()
- setDataBackgroundColor.__doc__ = PlotWidget.setDataBackgroundColor.__doc__
-
+ @docstring(PlotWidget)
def setForegroundColor(self, color):
super(PlotWindow, self).setForegroundColor(color)
self._updateColorBarBackground()
- setForegroundColor.__doc__ = PlotWidget.setForegroundColor.__doc__
-
def _updateColorBarBackground(self):
"""Update the colorbar background according to the state of the plot"""
if self._isAxesDisplayed():
@@ -824,7 +825,9 @@ class Plot2D(PlotWindow):
posInfo = [
('X', lambda x, y: x),
('Y', lambda x, y: y),
- ('Data', WeakMethodProxy(self._getImageValue))]
+ ('Data', WeakMethodProxy(self._getImageValue)),
+ ('Dims', WeakMethodProxy(self._getImageDims)),
+ ]
super(Plot2D, self).__init__(parent=parent, backend=backend,
resetzoom=True, autoScale=False,
@@ -924,6 +927,15 @@ class Plot2D(PlotWindow):
return value, "Masked"
return value
+ def _getImageDims(self, *args):
+ activeImage = self.getActiveImage()
+ if (activeImage is not None and
+ activeImage.getData(copy=False) is not None):
+ dims = activeImage.getData(copy=False).shape[1::-1]
+ return 'x'.join(str(dim) for dim in dims)
+ else:
+ return '-'
+
def getProfileToolbar(self):
"""Profile tools attached to this plot
diff --git a/silx/gui/plot/Profile.py b/silx/gui/plot/Profile.py
index 46e4523..e2aa5a7 100644
--- a/silx/gui/plot/Profile.py
+++ b/silx/gui/plot/Profile.py
@@ -28,7 +28,7 @@ and stacks of images"""
__authors__ = ["V.A. Sole", "T. Vincent", "P. Knobel", "H. Payno"]
__license__ = "MIT"
-__date__ = "24/07/2018"
+__date__ = "12/04/2019"
import weakref
@@ -419,39 +419,40 @@ class ProfileToolBar(qt.QToolBar):
"""
if self._profileWindow is None:
- self._profileMainWindow = ProfileMainWindow(self)
+ backend = type(plot._backend)
+ self._profileMainWindow = ProfileMainWindow(self, backend=backend)
# Actions
self._browseAction = actions.mode.ZoomModeAction(self.plot, parent=self)
self._browseAction.setVisible(False)
- self.hLineAction = qt.QAction(
- icons.getQIcon('shape-horizontal'),
- 'Horizontal Profile Mode', None)
+ self.hLineAction = qt.QAction(icons.getQIcon('shape-horizontal'),
+ 'Horizontal Profile Mode',
+ self)
self.hLineAction.setToolTip(
'Enables horizontal profile selection mode')
self.hLineAction.setCheckable(True)
self.hLineAction.toggled[bool].connect(self._hLineActionToggled)
- self.vLineAction = qt.QAction(
- icons.getQIcon('shape-vertical'),
- 'Vertical Profile Mode', None)
+ self.vLineAction = qt.QAction(icons.getQIcon('shape-vertical'),
+ 'Vertical Profile Mode',
+ self)
self.vLineAction.setToolTip(
'Enables vertical profile selection mode')
self.vLineAction.setCheckable(True)
self.vLineAction.toggled[bool].connect(self._vLineActionToggled)
- self.lineAction = qt.QAction(
- icons.getQIcon('shape-diagonal'),
- 'Free Line Profile Mode', None)
+ self.lineAction = qt.QAction(icons.getQIcon('shape-diagonal'),
+ 'Free Line Profile Mode',
+ self)
self.lineAction.setToolTip(
'Enables line profile selection mode')
self.lineAction.setCheckable(True)
self.lineAction.toggled[bool].connect(self._lineActionToggled)
- self.clearAction = qt.QAction(
- icons.getQIcon('profile-clear'),
- 'Clear Profile', None)
+ self.clearAction = qt.QAction(icons.getQIcon('profile-clear'),
+ 'Clear Profile',
+ self)
self.clearAction.setToolTip(
'Clear the profile Region of interest')
self.clearAction.setCheckable(False)
diff --git a/silx/gui/plot/ProfileMainWindow.py b/silx/gui/plot/ProfileMainWindow.py
index caa076c..39830d8 100644
--- a/silx/gui/plot/ProfileMainWindow.py
+++ b/silx/gui/plot/ProfileMainWindow.py
@@ -35,8 +35,15 @@ __date__ = "21/02/2017"
class ProfileMainWindow(qt.QMainWindow):
"""QMainWindow providing 2 plot widgets specialized in
1D and 2D plotting, with different toolbars.
+
Only one of the plots is visible at any given time.
+
+ :param qt.QWidget parent: The parent of this widget or None (default).
+ :param Union[str,Class] backend: The backend to use, in:
+ 'matplotlib' (default), 'mpl', 'opengl', 'gl', 'none'
+ or a :class:`BackendBase.BackendBase` class
"""
+
sigProfileDimensionsChanged = qt.Signal(int)
"""This signal is emitted when :meth:`setProfileDimensions` is called.
It carries the number of dimensions for the profile data (1 or 2).
@@ -51,13 +58,14 @@ class ProfileMainWindow(qt.QMainWindow):
"""Emitted when the method to compute the profile changed (for now can be
sum or mean)"""
- def __init__(self, parent=None):
+ def __init__(self, parent=None, backend=None):
qt.QMainWindow.__init__(self, parent=parent)
self.setWindowTitle('Profile window')
# plots are created on demand, in self.setProfileDimensions()
self._plot1D = None
self._plot2D = None
+ self._backend = backend
# by default, profile is assumed to be a 1D curve
self._profileType = None
self.setProfileType("1D")
@@ -76,7 +84,7 @@ class ProfileMainWindow(qt.QMainWindow):
if self._plot2D is not None:
self._plot2D.setParent(None) # necessary to avoid widget destruction
if self._plot1D is None:
- self._plot1D = Plot1D()
+ self._plot1D = Plot1D(backend=self._backend)
self._plot1D.setGraphYLabel('Profile')
self._plot1D.setGraphXLabel('')
self.setCentralWidget(self._plot1D)
@@ -84,7 +92,7 @@ class ProfileMainWindow(qt.QMainWindow):
if self._plot1D is not None:
self._plot1D.setParent(None) # necessary to avoid widget destruction
if self._plot2D is None:
- self._plot2D = Plot2D()
+ self._plot2D = Plot2D(backend=self._backend)
self.setCentralWidget(self._plot2D)
else:
raise ValueError("Profile type must be '1D' or '2D'")
diff --git a/silx/gui/plot/ScatterView.py b/silx/gui/plot/ScatterView.py
index 5fc66ef..1d015d4 100644
--- a/silx/gui/plot/ScatterView.py
+++ b/silx/gui/plot/ScatterView.py
@@ -47,6 +47,8 @@ from .ScatterMaskToolsWidget import ScatterMaskToolsWidget
from ..widgets.BoxLayoutDockWidget import BoxLayoutDockWidget
from .. import qt, icons
+from ...utils.proxy import docstring
+from ...utils.weakref import WeakMethodProxy
_logger = logging.getLogger(__name__)
@@ -92,10 +94,10 @@ class ScatterView(qt.QMainWindow):
self.__pickingCache = None
self._positionInfo = tools.PositionInfo(
plot=plot,
- converters=(('X', lambda x, y: x),
- ('Y', lambda x, y: y),
- ('Data', lambda x, y: self._getScatterValue(x, y)),
- ('Index', lambda x, y: self._getScatterIndex(x, y))))
+ converters=(('X', WeakMethodProxy(self._getPickedX)),
+ ('Y', WeakMethodProxy(self._getPickedY)),
+ ('Data', WeakMethodProxy(self._getPickedValue)),
+ ('Index', WeakMethodProxy(self._getPickedIndex))))
# Combine plot, position info and colorbar into central widget
gridLayout = qt.QGridLayout()
@@ -167,32 +169,52 @@ class ScatterView(qt.QMainWindow):
dataIndex = indices[-1]
self.__pickingCache = (
dataIndex,
+ item.getXData(copy=False)[dataIndex],
+ item.getYData(copy=False)[dataIndex],
item.getValueData(copy=False)[dataIndex])
break
return self.__pickingCache
- def _getScatterValue(self, x, y):
- """Get data value of top most scatter plot at position (x, y)
+ def _getPickedIndex(self, x, y):
+ """Get data index of top most scatter plot at position (x, y)
:param float x: X position in plot coordinates
:param float y: Y position in plot coordinates
- :return: The data value at that point or '-'
+ :return: The data index at that point or '-'
"""
picking = self._pickScatterData(x, y)
- return '-' if picking is None else picking[1]
+ return '-' if picking is None else picking[0]
- def _getScatterIndex(self, x, y):
- """Get data index of top most scatter plot at position (x, y)
+ def _getPickedX(self, x, y):
+ """Returns X position snapped to scatter plot when close enough
+
+ :param float x:
+ :param float y:
+ :rtype: float
+ """
+ picking = self._pickScatterData(x, y)
+ return x if picking is None else picking[1]
+
+ def _getPickedY(self, x, y):
+ """Returns Y position snapped to scatter plot when close enough
+
+ :param float x:
+ :param float y:
+ :rtype: float
+ """
+ picking = self._pickScatterData(x, y)
+ return y if picking is None else picking[2]
+
+ def _getPickedValue(self, x, y):
+ """Get data value of top most scatter plot at position (x, y)
:param float x: X position in plot coordinates
:param float y: Y position in plot coordinates
- :return: The data index at that point or '-'
+ :return: The data value at that point or '-'
"""
picking = self._pickScatterData(x, y)
- return '-' if picking is None else picking[0]
-
- _PICK_OFFSET = 3 # Offset in pixel used for picking
+ return '-' if picking is None else picking[3]
def _mouseInPlotArea(self, x, y):
"""Clip mouse coordinates to plot area coordinates
@@ -307,11 +329,10 @@ class ScatterView(qt.QMainWindow):
self.getScatterItem().setData(
x=x, y=y, value=value, xerror=xerror, yerror=yerror, alpha=alpha, copy=copy)
+ @docstring(items.Scatter)
def getData(self, *args, **kwargs):
return self.getScatterItem().getData(*args, **kwargs)
- getData.__doc__ = items.Scatter.getData.__doc__
-
def getScatterItem(self):
"""Returns the plot item displaying the scatter data.
@@ -329,37 +350,30 @@ class ScatterView(qt.QMainWindow):
# Convenient proxies
+ @docstring(PlotWidget)
def getXAxis(self, *args, **kwargs):
return self.getPlotWidget().getXAxis(*args, **kwargs)
- getXAxis.__doc__ = PlotWidget.getXAxis.__doc__
-
+ @docstring(PlotWidget)
def getYAxis(self, *args, **kwargs):
return self.getPlotWidget().getYAxis(*args, **kwargs)
- getYAxis.__doc__ = PlotWidget.getYAxis.__doc__
-
+ @docstring(PlotWidget)
def setGraphTitle(self, *args, **kwargs):
return self.getPlotWidget().setGraphTitle(*args, **kwargs)
- setGraphTitle.__doc__ = PlotWidget.setGraphTitle.__doc__
-
+ @docstring(PlotWidget)
def getGraphTitle(self, *args, **kwargs):
return self.getPlotWidget().getGraphTitle(*args, **kwargs)
- getGraphTitle.__doc__ = PlotWidget.getGraphTitle.__doc__
-
+ @docstring(PlotWidget)
def resetZoom(self, *args, **kwargs):
return self.getPlotWidget().resetZoom(*args, **kwargs)
- resetZoom.__doc__ = PlotWidget.resetZoom.__doc__
-
+ @docstring(ScatterMaskToolsWidget)
def getSelectionMask(self, *args, **kwargs):
return self.getMaskToolsWidget().getSelectionMask(*args, **kwargs)
- getSelectionMask.__doc__ = ScatterMaskToolsWidget.getSelectionMask.__doc__
-
+ @docstring(ScatterMaskToolsWidget)
def setSelectionMask(self, *args, **kwargs):
return self.getMaskToolsWidget().setSelectionMask(*args, **kwargs)
-
- setSelectionMask.__doc__ = ScatterMaskToolsWidget.setSelectionMask.__doc__
diff --git a/silx/gui/plot/StatsWidget.py b/silx/gui/plot/StatsWidget.py
index 4ba4fab..5e2dc58 100644
--- a/silx/gui/plot/StatsWidget.py
+++ b/silx/gui/plot/StatsWidget.py
@@ -35,9 +35,11 @@ from collections import OrderedDict
from contextlib import contextmanager
import logging
import weakref
-
+import functools
import numpy
-
+import enum
+from silx.utils.proxy import docstring
+from silx.utils.enum import Enum as _Enum
from silx.gui import qt
from silx.gui import icons
from silx.gui.plot import stats as statsmdl
@@ -52,8 +54,15 @@ from . import items as plotitems
_logger = logging.getLogger(__name__)
+@enum.unique
+class UpdateMode(_Enum):
+ AUTO = 'auto'
+ MANUAL = 'manual'
+
+
# Helper class to handle specific calls to PlotWidget and SceneWidget
+
class _Wrapper(qt.QObject):
"""Base class for connection with PlotWidget and SceneWidget.
@@ -319,10 +328,12 @@ class _StatsWidgetBase(object):
"""
Base class for all widgets which want to display statistics
"""
+
def __init__(self, statsOnVisibleData, displayOnlyActItem):
self._displayOnlyActItem = displayOnlyActItem
self._statsOnVisibleData = statsOnVisibleData
self._statsHandler = None
+ self._updateMode = UpdateMode.AUTO
self.__default_skipped_events = (
ItemChangedType.ALPHA,
@@ -503,6 +514,29 @@ class _StatsWidgetBase(object):
"""
return event in self.__default_skipped_events
+ def setUpdateMode(self, mode):
+ """Set the way to update the displayed statistics.
+
+ :param mode: mode requested for update
+ :type mode: Union[str,UpdateMode]
+ """
+ mode = UpdateMode.from_value(mode)
+ if mode != self._updateMode:
+ self._updateMode = mode
+ self._updateModeHasChanged()
+
+ def getUpdateMode(self):
+ """Returns update mode (See :meth:`setUpdateMode`).
+
+ :return: update mode
+ :rtype: UpdateMode
+ """
+ return self._updateMode
+
+ def _updateModeHasChanged(self):
+ """callback when the update mode has changed"""
+ pass
+
class StatsTable(_StatsWidgetBase, TableWidget):
"""
@@ -522,6 +556,9 @@ class StatsTable(_StatsWidgetBase, TableWidget):
_LEGEND_HEADER_DATA = 'legend'
_KIND_HEADER_DATA = 'kind'
+ sigUpdateModeChanged = qt.Signal(object)
+ """Signal emitted when the update mode changed"""
+
def __init__(self, parent=None, plot=None):
TableWidget.__init__(self, parent)
_StatsWidgetBase.__init__(self, statsOnVisibleData=False,
@@ -606,6 +643,8 @@ class StatsTable(_StatsWidgetBase, TableWidget):
def _updateItemObserve(self, *args):
"""Reload table depending on mode"""
+ if self.getUpdateMode() is UpdateMode.MANUAL:
+ return
self._removeAllItems()
# Get selected or all items from the plot
@@ -678,11 +717,19 @@ class StatsTable(_StatsWidgetBase, TableWidget):
:param event:
"""
+ if self.getUpdateMode() is UpdateMode.MANUAL:
+ return
if self._skipPlotItemChangedEvent(event) is True:
return
else:
item = self.sender()
self._updateStats(item)
+ # deal with stat items visibility
+ if event is ItemChangedType.VISIBLE:
+ if len(self._itemToTableItems(item).items()) > 0:
+ item_0 = list(self._itemToTableItems(item).values())[0]
+ row_index = item_0.row()
+ self.setRowHidden(row_index, not item.isVisible())
def _addItem(self, item):
"""Add a plot item to the table
@@ -810,8 +857,13 @@ class StatsTable(_StatsWidgetBase, TableWidget):
else:
tableItem.setText(str(value))
- def _updateAllStats(self):
- """Update stats for all rows in the table"""
+ def _updateAllStats(self, is_request=False):
+ """Update stats for all rows in the table
+
+ :param bool is_request: True if come from a manual request
+ """
+ if self.getUpdateMode() is UpdateMode.MANUAL and not is_request:
+ return
with self._disableSorting():
for row in range(self.rowCount()):
tableItem = self.item(row, 0)
@@ -851,10 +903,103 @@ class StatsTable(_StatsWidgetBase, TableWidget):
else:
self.setSelectionMode(qt.QAbstractItemView.NoSelection)
+ def _updateModeHasChanged(self):
+ self.sigUpdateModeChanged.emit(self._updateMode)
-class _OptionsWidget(qt.QToolBar):
+
+class UpdateModeWidget(qt.QWidget):
+ """Widget used to select the mode of update"""
+ sigUpdateModeChanged = qt.Signal(object)
+ """signal emitted when the mode for update changed"""
+ sigUpdateRequested = qt.Signal()
+ """signal emitted when an manual request for example is activate"""
def __init__(self, parent=None):
+ qt.QWidget.__init__(self, parent)
+ self.setLayout(qt.QHBoxLayout())
+ self._buttonGrp = qt.QButtonGroup(parent=self)
+ self._buttonGrp.setExclusive(True)
+
+ spacer = qt.QSpacerItem(20, 20,
+ qt.QSizePolicy.Expanding,
+ qt.QSizePolicy.Minimum)
+ self.layout().addItem(spacer)
+
+ self._autoRB = qt.QRadioButton('auto', parent=self)
+ self.layout().addWidget(self._autoRB)
+ self._buttonGrp.addButton(self._autoRB)
+
+ self._manualRB = qt.QRadioButton('manual', parent=self)
+ self.layout().addWidget(self._manualRB)
+ self._buttonGrp.addButton(self._manualRB)
+ self._manualRB.setChecked(True)
+
+ refresh_icon = icons.getQIcon('view-refresh')
+ self._updatePB = qt.QPushButton(refresh_icon, '', parent=self)
+ self.layout().addWidget(self._updatePB)
+
+ # connect signal / SLOT
+ self._updatePB.clicked.connect(self._updateRequested)
+ self._manualRB.toggled.connect(self._manualButtonToggled)
+ self._autoRB.toggled.connect(self._autoButtonToggled)
+
+ def _manualButtonToggled(self, checked):
+ if checked:
+ self.setUpdateMode(UpdateMode.MANUAL)
+ self.sigUpdateModeChanged.emit(self.getUpdateMode())
+
+ def _autoButtonToggled(self, checked):
+ if checked:
+ self.setUpdateMode(UpdateMode.AUTO)
+ self.sigUpdateModeChanged.emit(self.getUpdateMode())
+
+ def _updateRequested(self):
+ if self.getUpdateMode() is UpdateMode.MANUAL:
+ self.sigUpdateRequested.emit()
+
+ def setUpdateMode(self, mode):
+ """Set the way to update the displayed statistics.
+
+ :param mode: mode requested for update
+ :type mode: Union[str,UpdateMode]
+ """
+ mode = UpdateMode.from_value(mode)
+
+ if mode is UpdateMode.AUTO:
+ if not self._autoRB.isChecked():
+ self._autoRB.setChecked(True)
+ elif mode is UpdateMode.MANUAL:
+ if not self._manualRB.isChecked():
+ self._manualRB.setChecked(True)
+ else:
+ raise ValueError('mode', mode, 'is not recognized')
+
+ def getUpdateMode(self):
+ """Returns update mode (See :meth:`setUpdateMode`).
+
+ :return: the active update mode
+ :rtype: UpdateMode
+ """
+ if self._manualRB.isChecked():
+ return UpdateMode.MANUAL
+ elif self._autoRB.isChecked():
+ return UpdateMode.AUTO
+ else:
+ raise RuntimeError("No mode selected")
+
+ def showRadioButtons(self, show):
+ """show / hide the QRadioButtons
+
+ :param bool show: if True make RadioButton visible
+ """
+ self._autoRB.setVisible(show)
+ self._manualRB.setVisible(show)
+
+
+class _OptionsWidget(qt.QToolBar):
+
+ def __init__(self, parent=None, updateMode=None, displayOnlyActItem=False):
+ assert updateMode is not None
qt.QToolBar.__init__(self, parent)
self.setIconSize(qt.QSize(16, 16))
@@ -863,7 +1008,7 @@ class _OptionsWidget(qt.QToolBar):
action.setText("Active items only")
action.setToolTip("Display stats for active items only.")
action.setCheckable(True)
- action.setChecked(True)
+ action.setChecked(displayOnlyActItem)
self.__displayActiveItems = action
action = qt.QAction(self)
@@ -909,9 +1054,26 @@ class _OptionsWidget(qt.QToolBar):
self.dataRangeSelection.addAction(self.__useWholeData)
self.dataRangeSelection.addAction(self.__useVisibleData)
+ self.__updateStatsAction = qt.QAction(self)
+ self.__updateStatsAction.setIcon(icons.getQIcon("view-refresh"))
+ self.__updateStatsAction.setText("update statistics")
+ self.__updateStatsAction.setToolTip("update statistics")
+ self.__updateStatsAction.setCheckable(False)
+ self._updateStatsSep = self.addSeparator()
+ self.addAction(self.__updateStatsAction)
+
+ self._setUpdateMode(mode=updateMode)
+
+ # expose API
+ self.sigUpdateStats = self.__updateStatsAction.triggered
+
def isActiveItemMode(self):
return self.itemSelection.checkedAction() is self.__displayActiveItems
+ def setDisplayActiveItems(self, only_active):
+ self.__displayActiveItems.setChecked(only_active)
+ self.__displayWholeItems.setChecked(not only_active)
+
def isVisibleDataRangeMode(self):
return self.dataRangeSelection.checkedAction() is self.__useVisibleData
@@ -925,6 +1087,18 @@ class _OptionsWidget(qt.QToolBar):
if not enabled:
self.__useWholeData.setChecked(True)
+ def _setUpdateMode(self, mode):
+ self.__updateStatsAction.setVisible(mode == UpdateMode.MANUAL)
+ self._updateStatsSep.setVisible(mode == UpdateMode.MANUAL)
+
+ def getUpdateStatsAction(self):
+ """
+
+ :return: the action for the automatic mode
+ :rtype: QAction
+ """
+ return self.__updateStatsAction
+
class StatsWidget(qt.QWidget):
"""
@@ -954,19 +1128,26 @@ class StatsWidget(qt.QWidget):
qt.QWidget.__init__(self, parent)
self.setLayout(qt.QVBoxLayout())
self.layout().setContentsMargins(0, 0, 0, 0)
- self._options = _OptionsWidget(parent=self)
+ self._options = _OptionsWidget(parent=self, updateMode=UpdateMode.MANUAL)
self.layout().addWidget(self._options)
self._statsTable = StatsTable(parent=self, plot=plot)
+ self._statsTable.setDisplayOnlyActiveItem(self._options.isActiveItemMode())
+ self._options._setUpdateMode(mode=self._statsTable.getUpdateMode())
self.setStats(stats)
self.layout().addWidget(self._statsTable)
+ old = self._statsTable.blockSignals(True)
self._options.itemSelection.triggered.connect(
self._optSelectionChanged)
self._options.dataRangeSelection.triggered.connect(
self._optDataRangeChanged)
- self._optSelectionChanged()
self._optDataRangeChanged()
+ self._statsTable.blockSignals(old)
+
+ self._statsTable.sigUpdateModeChanged.connect(self._options._setUpdateMode)
+ callback = functools.partial(self._getStatsTable()._updateAllStats, is_request=True)
+ self._options.sigUpdateStats.connect(callback)
def _getStatsTable(self):
"""Returns the :class:`StatsTable` used by this widget.
@@ -993,33 +1174,40 @@ class StatsWidget(qt.QWidget):
# Proxy methods
+ @docstring(StatsTable)
def setStats(self, statsHandler):
return self._getStatsTable().setStats(statsHandler=statsHandler)
- setStats.__doc__ = StatsTable.setStats.__doc__
-
+ @docstring(StatsTable)
def setPlot(self, plot):
self._options.setVisibleDataRangeModeEnabled(
plot is None or isinstance(plot, PlotWidget))
return self._getStatsTable().setPlot(plot=plot)
- setPlot.__doc__ = StatsTable.setPlot.__doc__
-
+ @docstring(StatsTable)
def getPlot(self):
return self._getStatsTable().getPlot()
- getPlot.__doc__ = StatsTable.getPlot.__doc__
-
+ @docstring(StatsTable)
def setDisplayOnlyActiveItem(self, displayOnlyActItem):
+ old = self._options.blockSignals(True)
+ # update the options
+ self._options.setDisplayActiveItems(displayOnlyActItem)
+ self._options.blockSignals(old)
return self._getStatsTable().setDisplayOnlyActiveItem(
displayOnlyActItem=displayOnlyActItem)
- setDisplayOnlyActiveItem.__doc__ = StatsTable.setDisplayOnlyActiveItem.__doc__
-
+ @docstring(StatsTable)
def setStatsOnVisibleData(self, b):
return self._getStatsTable().setStatsOnVisibleData(b=b)
- setStatsOnVisibleData.__doc__ = StatsTable.setStatsOnVisibleData.__doc__
+ @docstring(StatsTable)
+ def getUpdateMode(self):
+ return self._statsTable.getUpdateMode()
+
+ @docstring(StatsTable)
+ def setUpdateMode(self, mode):
+ self._statsTable.setUpdateMode(mode)
DEFAULT_STATS = StatsHandler((
@@ -1050,13 +1238,13 @@ class BasicStatsWidget(StatsWidget):
from silx.gui.plot import Plot1D
from silx.gui.plot.StatsWidget import BasicStatsWidget
-
+
plot = Plot1D()
x = range(100)
y = x
plot.addCurve(x, y, legend='curve_0')
plot.setActiveCurve('curve_0')
-
+
widget = BasicStatsWidget(plot=plot)
widget.show()
"""
@@ -1067,9 +1255,9 @@ class BasicStatsWidget(StatsWidget):
class _BaseLineStatsWidget(_StatsWidgetBase, qt.QWidget):
"""
- Widget made to display stats into a QLayout with for all stat a couple
- (QLabel, QLineEdit) created.
- The the layout can be defined prior of adding any statistic.
+ Widget made to display stats into a QLayout with couple (QLabel, QLineEdit)
+ created for each stats.
+ The layout can be defined prior of adding any statistic.
:param QWidget parent: Qt parent
:param Union[PlotWidget,SceneWidget] plot:
@@ -1081,6 +1269,9 @@ class _BaseLineStatsWidget(_StatsWidgetBase, qt.QWidget):
only visible ones.
"""
+ sigUpdateModeChanged = qt.Signal(object)
+ """Signal emitted when the update mode changed"""
+
def __init__(self, parent=None, plot=None, kind='curve', stats=None,
statsOnVisibleData=False):
self._item_kind = kind
@@ -1141,6 +1332,8 @@ class _BaseLineStatsWidget(_StatsWidgetBase, qt.QWidget):
self._updateAllStats()
def _activeItemChanged(self, kind, previous, current):
+ if self.getUpdateMode() is UpdateMode.MANUAL:
+ return
if kind == self._item_kind:
self._updateAllStats()
@@ -1148,9 +1341,9 @@ class _BaseLineStatsWidget(_StatsWidgetBase, qt.QWidget):
plot = self.getPlot()
if plot is not None:
_items = self._plotWrapper.getSelectedItems()
+
def kind_filter(_item):
return self._plotWrapper.getKind(_item) == self.getKind()
-
items = list(filter(kind_filter, _items))
assert len(items) in (0, 1)
if len(items) is 1:
@@ -1186,8 +1379,11 @@ class _BaseLineStatsWidget(_StatsWidgetBase, qt.QWidget):
self._statQlineEdit[statName].setText(statVal)
def _updateItemObserve(self, *argv):
+ if self.getUpdateMode() is UpdateMode.MANUAL:
+ return
assert self._displayOnlyActItem
_items = self._plotWrapper.getSelectedItems()
+
def kind_filter(_item):
return self._plotWrapper.getKind(_item) == self.getKind()
items = list(filter(kind_filter, _items))
@@ -1208,22 +1404,11 @@ class _BaseLineStatsWidget(_StatsWidgetBase, qt.QWidget):
def _plotCurrentChanged(selfself, current):
raise NotImplementedError('Display only the active item')
+ def _updateModeHasChanged(self):
+ self.sigUpdateModeChanged.emit(self._updateMode)
-class BasicLineStatsWidget(_BaseLineStatsWidget):
- """
- Widget defining a simple set of :class:`Stat` to be displayed on a
- :class:`LineStatsWidget`.
-
- :param QWidget parent: Qt parent
- :param Union[PlotWidget,SceneWidget] plot:
- The plot containing items on which we want statistics.
- :param str kind: the kind of plotitems we want to display
- :param StatsHandler stats:
- Set the statistics to be displayed and how to format them using
- :param bool statsOnVisibleData: compute statistics for the whole data or
- only visible ones.
- """
+class _BasicLineStatsWidget(_BaseLineStatsWidget):
def __init__(self, parent=None, plot=None, kind='curve',
stats=DEFAULT_STATS, statsOnVisibleData=False):
_BaseLineStatsWidget.__init__(self, parent=parent, kind=kind,
@@ -1246,38 +1431,84 @@ class BasicLineStatsWidget(_BaseLineStatsWidget):
self.layout().addWidget(widget)
+ def _addOptionsWidget(self, widget):
+ self.layout().addWidget(widget)
+
-class BasicGridStatsWidget(_BaseLineStatsWidget):
+class BasicLineStatsWidget(qt.QWidget):
"""
- pymca design like widget
-
+ Widget defining a simple set of :class:`Stat` to be displayed on a
+ :class:`LineStatsWidget`.
+
:param QWidget parent: Qt parent
:param Union[PlotWidget,SceneWidget] plot:
The plot containing items on which we want statistics.
+ :param str kind: the kind of plotitems we want to display
:param StatsHandler stats:
Set the statistics to be displayed and how to format them using
- :param str kind: the kind of plotitems we want to display
:param bool statsOnVisibleData: compute statistics for the whole data or
only visible ones.
- :param int statsPerLine: number of statistic to be displayed per line
+ """
+ def __init__(self, parent=None, plot=None, kind='curve',
+ stats=DEFAULT_STATS, statsOnVisibleData=False):
+ qt.QWidget.__init__(self, parent)
+ self.setLayout(qt.QHBoxLayout())
+ self.layout().setSpacing(0)
+ self.layout().setContentsMargins(0, 0, 0, 0)
+ self._lineStatsWidget = _BasicLineStatsWidget(parent=self, plot=plot,
+ kind=kind, stats=stats,
+ statsOnVisibleData=statsOnVisibleData)
+ self.layout().addWidget(self._lineStatsWidget)
+
+ self._options = UpdateModeWidget()
+ self._options.setUpdateMode(self._lineStatsWidget.getUpdateMode())
+ self._options.showRadioButtons(False)
+ self.layout().addWidget(self._options)
- .. snapshotqt:: img/BasicGridStatsWidget.png
- :width: 600px
- :align: center
+ # connect Signal ? SLOT
+ self._lineStatsWidget.sigUpdateModeChanged.connect(self._options.setUpdateMode)
+ self._options.sigUpdateModeChanged.connect(self._lineStatsWidget.setUpdateMode)
+ self._options.sigUpdateRequested.connect(self._lineStatsWidget._updateAllStats)
- from silx.gui.plot import Plot1D
- from silx.gui.plot.StatsWidget import BasicGridStatsWidget
-
- plot = Plot1D()
- x = range(100)
- y = x
- plot.addCurve(x, y, legend='curve_0')
- plot.setActiveCurve('curve_0')
-
- widget = BasicGridStatsWidget(plot=plot, kind='curve')
- widget.show()
- """
+ def showControl(self, visible):
+ self._options.setVisible(visible)
+
+ # Proxy methods
+
+ @docstring(_BasicLineStatsWidget)
+ def setUpdateMode(self, mode):
+ self._lineStatsWidget.setUpdateMode(mode=mode)
+
+ @docstring(_BasicLineStatsWidget)
+ def getUpdateMode(self):
+ return self._lineStatsWidget.getUpdateMode()
+
+ @docstring(_BasicLineStatsWidget)
+ def setPlot(self, plot):
+ self._lineStatsWidget.setPlot(plot=plot)
+ @docstring(_BasicLineStatsWidget)
+ def setStats(self, statsHandler):
+ self._lineStatsWidget.setStats(statsHandler=statsHandler)
+
+ @docstring(_BasicLineStatsWidget)
+ def setKind(self, kind):
+ self._lineStatsWidget.setKind(kind=kind)
+
+ @docstring(_BasicLineStatsWidget)
+ def getKind(self):
+ return self._lineStatsWidget.getKind()
+
+ @docstring(_BasicLineStatsWidget)
+ def setStatsOnVisibleData(self, b):
+ self._lineStatsWidget.setStatsOnVisibleData(b)
+
+ @docstring(UpdateModeWidget)
+ def showRadioButtons(self, show):
+ self._options.showRadioButtons(show=show)
+
+
+class _BasicGridStatsWidget(_BaseLineStatsWidget):
def __init__(self, parent=None, plot=None, kind='curve',
stats=DEFAULT_STATS, statsOnVisibleData=False,
statsPerLine=4):
@@ -1294,3 +1525,94 @@ class BasicGridStatsWidget(_BaseLineStatsWidget):
def _createLayout(self):
return qt.QGridLayout()
+
+
+class BasicGridStatsWidget(qt.QWidget):
+ """
+ pymca design like widget
+
+ :param QWidget parent: Qt parent
+ :param Union[PlotWidget,SceneWidget] plot:
+ The plot containing items on which we want statistics.
+ :param StatsHandler stats:
+ Set the statistics to be displayed and how to format them using
+ :param str kind: the kind of plotitems we want to display
+ :param bool statsOnVisibleData: compute statistics for the whole data or
+ only visible ones.
+ :param int statsPerLine: number of statistic to be displayed per line
+
+ .. snapshotqt:: img/_BasicGridStatsWidget.png
+ :width: 600px
+ :align: center
+
+ from silx.gui.plot import Plot1D
+ from silx.gui.plot.StatsWidget import _BasicGridStatsWidget
+
+ plot = Plot1D()
+ x = range(100)
+ y = x
+ plot.addCurve(x, y, legend='curve_0')
+ plot.setActiveCurve('curve_0')
+
+ widget = _BasicGridStatsWidget(plot=plot, kind='curve')
+ widget.show()
+ """
+
+ def __init__(self, parent=None, plot=None, kind='curve',
+ stats=DEFAULT_STATS, statsOnVisibleData=False):
+ qt.QWidget.__init__(self, parent)
+ self.setLayout(qt.QVBoxLayout())
+ self.layout().setSpacing(0)
+ self.layout().setContentsMargins(0, 0, 0, 0)
+
+ self._options = UpdateModeWidget()
+ self._options.showRadioButtons(False)
+ self.layout().addWidget(self._options)
+
+ self._lineStatsWidget = _BasicGridStatsWidget(parent=self, plot=plot,
+ kind=kind, stats=stats,
+ statsOnVisibleData=statsOnVisibleData)
+ self.layout().addWidget(self._lineStatsWidget)
+
+ # tune options
+ self._options.setUpdateMode(self._lineStatsWidget.getUpdateMode())
+
+ # connect Signal ? SLOT
+ self._lineStatsWidget.sigUpdateModeChanged.connect(self._options.setUpdateMode)
+ self._options.sigUpdateModeChanged.connect(self._lineStatsWidget.setUpdateMode)
+ self._options.sigUpdateRequested.connect(self._lineStatsWidget._updateAllStats)
+
+ def showControl(self, visible):
+ self._options.setVisible(visible)
+
+ @docstring(_BasicGridStatsWidget)
+ def setUpdateMode(self, mode):
+ self._lineStatsWidget.setUpdateMode(mode=mode)
+
+ @docstring(_BasicGridStatsWidget)
+ def getUpdateMode(self):
+ return self._lineStatsWidget.getUpdateMode()
+
+ @docstring(_BasicGridStatsWidget)
+ def setPlot(self, plot):
+ self._lineStatsWidget.setPlot(plot=plot)
+
+ @docstring(_BasicGridStatsWidget)
+ def setStats(self, statsHandler):
+ self._lineStatsWidget.setStats(statsHandler=statsHandler)
+
+ @docstring(_BasicGridStatsWidget)
+ def setKind(self, kind):
+ self._lineStatsWidget.setKind(kind=kind)
+
+ @docstring(_BasicGridStatsWidget)
+ def getKind(self):
+ return self._lineStatsWidget.getKind()
+
+ @docstring(_BasicGridStatsWidget)
+ def setStatsOnVisibleData(self, b):
+ self._lineStatsWidget.setStatsOnVisibleData(b)
+
+ @docstring(UpdateModeWidget)
+ def showRadioButtons(self, show):
+ self._options.showRadioButtons(show=show)
diff --git a/silx/gui/plot/_BaseMaskToolsWidget.py b/silx/gui/plot/_BaseMaskToolsWidget.py
index 0d11f17..d8e9fb5 100644
--- a/silx/gui/plot/_BaseMaskToolsWidget.py
+++ b/silx/gui/plot/_BaseMaskToolsWidget.py
@@ -29,7 +29,7 @@ from __future__ import division
__authors__ = ["T. Vincent", "P. Knobel"]
__license__ = "MIT"
-__date__ = "15/02/2019"
+__date__ = "12/04/2019"
import os
import weakref
@@ -519,7 +519,7 @@ class BaseMaskToolsWidget(qt.QWidget):
def _initTransparencyWidget(self):
""" Init the mask transparency widget """
- transparencyWidget = qt.QWidget(self)
+ transparencyWidget = qt.QWidget(parent=self)
grid = qt.QGridLayout()
grid.setContentsMargins(0, 0, 0, 0)
self.transparencySlider = qt.QSlider(qt.Qt.Horizontal, parent=transparencyWidget)
@@ -619,8 +619,9 @@ class BaseMaskToolsWidget(qt.QWidget):
self.addAction(self.browseAction)
# Draw tools
- self.rectAction = qt.QAction(
- icons.getQIcon('shape-rectangle'), 'Rectangle selection', None)
+ self.rectAction = qt.QAction(icons.getQIcon('shape-rectangle'),
+ 'Rectangle selection',
+ self)
self.rectAction.setToolTip(
'Rectangle selection tool: (Un)Mask a rectangular region <b>R</b>')
self.rectAction.setShortcut(qt.QKeySequence(qt.Qt.Key_R))
@@ -628,8 +629,9 @@ class BaseMaskToolsWidget(qt.QWidget):
self.rectAction.triggered.connect(self._activeRectMode)
self.addAction(self.rectAction)
- self.ellipseAction = qt.QAction(
- icons.getQIcon('shape-ellipse'), 'Circle selection', None)
+ self.ellipseAction = qt.QAction(icons.getQIcon('shape-ellipse'),
+ 'Circle selection',
+ self)
self.ellipseAction.setToolTip(
'Rectangle selection tool: (Un)Mask a circle region <b>R</b>')
self.ellipseAction.setShortcut(qt.QKeySequence(qt.Qt.Key_R))
@@ -637,8 +639,9 @@ class BaseMaskToolsWidget(qt.QWidget):
self.ellipseAction.triggered.connect(self._activeEllipseMode)
self.addAction(self.ellipseAction)
- self.polygonAction = qt.QAction(
- icons.getQIcon('shape-polygon'), 'Polygon selection', None)
+ self.polygonAction = qt.QAction(icons.getQIcon('shape-polygon'),
+ 'Polygon selection',
+ self)
self.polygonAction.setShortcut(qt.QKeySequence(qt.Qt.Key_S))
self.polygonAction.setToolTip(
'Polygon selection tool: (Un)Mask a polygonal region <b>S</b><br>'
@@ -648,8 +651,9 @@ class BaseMaskToolsWidget(qt.QWidget):
self.polygonAction.triggered.connect(self._activePolygonMode)
self.addAction(self.polygonAction)
- self.pencilAction = qt.QAction(
- icons.getQIcon('draw-pencil'), 'Pencil tool', None)
+ self.pencilAction = qt.QAction(icons.getQIcon('draw-pencil'),
+ 'Pencil tool',
+ self)
self.pencilAction.setShortcut(qt.QKeySequence(qt.Qt.Key_P))
self.pencilAction.setToolTip(
'Pencil tool: (Un)Mask using a pencil <b>P</b>')
@@ -733,21 +737,24 @@ class BaseMaskToolsWidget(qt.QWidget):
def _initThresholdGroupBox(self):
"""Init thresholding widgets"""
- self.belowThresholdAction = qt.QAction(
- icons.getQIcon('plot-roi-below'), 'Mask below threshold', None)
+ self.belowThresholdAction = qt.QAction(icons.getQIcon('plot-roi-below'),
+ 'Mask below threshold',
+ self)
self.belowThresholdAction.setToolTip(
'Mask image where values are below given threshold')
self.belowThresholdAction.setCheckable(True)
self.belowThresholdAction.setChecked(True)
- self.betweenThresholdAction = qt.QAction(
- icons.getQIcon('plot-roi-between'), 'Mask within range', None)
+ self.betweenThresholdAction = qt.QAction(icons.getQIcon('plot-roi-between'),
+ 'Mask within range',
+ self)
self.betweenThresholdAction.setToolTip(
'Mask image where values are within given range')
self.betweenThresholdAction.setCheckable(True)
- self.aboveThresholdAction = qt.QAction(
- icons.getQIcon('plot-roi-above'), 'Mask above threshold', None)
+ self.aboveThresholdAction = qt.QAction(icons.getQIcon('plot-roi-above'),
+ 'Mask above threshold',
+ self)
self.aboveThresholdAction.setToolTip(
'Mask image where values are above given threshold')
self.aboveThresholdAction.setCheckable(True)
@@ -760,8 +767,9 @@ class BaseMaskToolsWidget(qt.QWidget):
self.thresholdActionGroup.triggered.connect(
self._thresholdActionGroupTriggered)
- self.loadColormapRangeAction = qt.QAction(
- icons.getQIcon('view-refresh'), 'Set min-max from colormap', None)
+ self.loadColormapRangeAction = qt.QAction(icons.getQIcon('view-refresh'),
+ 'Set min-max from colormap',
+ self)
self.loadColormapRangeAction.setToolTip(
'Set min and max values from current colormap range')
self.loadColormapRangeAction.setCheckable(False)
@@ -774,7 +782,7 @@ class BaseMaskToolsWidget(qt.QWidget):
btn.setDefaultAction(action)
widgets.append(btn)
- spacer = qt.QWidget()
+ spacer = qt.QWidget(parent=self)
spacer.setSizePolicy(qt.QSizePolicy.Expanding,
qt.QSizePolicy.Preferred)
widgets.append(spacer)
@@ -1059,7 +1067,7 @@ class BaseMaskToolsWidget(qt.QWidget):
self.maxLineLabel.setVisible(False)
self.minLineEdit.setVisible(True)
self.maxLineEdit.setVisible(False)
- self.applyMaskBtn.setText("Mask bellow")
+ self.applyMaskBtn.setText("Mask below")
elif triggeredAction is self.betweenThresholdAction:
self.minLineLabel.setVisible(True)
self.maxLineLabel.setVisible(True)
diff --git a/silx/sx/test/__init__.py b/silx/gui/plot/_utils/delaunay.py
index c9401b6..49ad05f 100644
--- a/silx/sx/test/__init__.py
+++ b/silx/gui/plot/_utils/delaunay.py
@@ -1,6 +1,7 @@
# coding: utf-8
# /*##########################################################################
-# Copyright (C) 2018 European Synchrotron Radiation Facility
+#
+# Copyright (c) 2019 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -20,19 +21,42 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#
-# ############################################################################*/
+# ###########################################################################*/
+"""Wrapper over Delaunay implementation"""
__authors__ = ["T. Vincent"]
__license__ = "MIT"
-__date__ = "06/03/2018"
+__date__ = "02/05/2019"
+
+
+import logging
+import sys
+
+import numpy
+
+
+_logger = logging.getLogger(__name__)
-import unittest
+def delaunay(x, y):
+ """Returns Delaunay instance for x, y points
-from . import test_sx
+ :param numpy.ndarray x:
+ :param numpy.ndarray y:
+ :rtype: Union[None,scipy.spatial.Delaunay]
+ """
+ # Lazy-loading of Delaunay
+ try:
+ from scipy.spatial import Delaunay as _Delaunay
+ except ImportError: # Fallback using local Delaunay
+ from silx.third_party.scipy_spatial import Delaunay as _Delaunay
+ points = numpy.array((x, y)).T
+ try:
+ delaunay = _Delaunay(points)
+ except (RuntimeError, ValueError):
+ _logger.error("Delaunay tesselation failed: %s",
+ sys.exc_info()[1])
+ delaunay = None
-def suite():
- test_suite = unittest.TestSuite()
- test_suite.addTest(test_sx.suite())
- return test_suite
+ return delaunay
diff --git a/silx/gui/plot/actions/control.py b/silx/gui/plot/actions/control.py
index 2d01ef1..ec4a3de 100644
--- a/silx/gui/plot/actions/control.py
+++ b/silx/gui/plot/actions/control.py
@@ -35,6 +35,7 @@ The following QAction are available:
- :class:`KeepAspectRatioAction`
- :class:`PanWithArrowKeysAction`
- :class:`ResetZoomAction`
+- :class:`ShowAxisAction`
- :class:`XAxisLogarithmicAction`
- :class:`XAxisAutoScaleAction`
- :class:`YAxisInvertedAction`
@@ -43,7 +44,6 @@ The following QAction are available:
- :class:`ZoomBackAction`
- :class:`ZoomInAction`
- :class:`ZoomOutAction`
-- :class:'ShowAxisAction'
"""
from __future__ import division
@@ -377,11 +377,11 @@ class ColormapAction(PlotAction):
# Specific init for complex images
colormap = image.getColormap()
- mode = image.getVisualizationMode()
- if mode in (items.ImageComplexData.Mode.AMPLITUDE_PHASE,
- items.ImageComplexData.Mode.LOG10_AMPLITUDE_PHASE):
+ mode = image.getComplexMode()
+ if mode in (items.ImageComplexData.ComplexMode.AMPLITUDE_PHASE,
+ items.ImageComplexData.ComplexMode.LOG10_AMPLITUDE_PHASE):
data = image.getData(
- copy=False, mode=items.ImageComplexData.Mode.PHASE)
+ copy=False, mode=items.ImageComplexData.ComplexMode.PHASE)
else:
data = image.getData(copy=False)
diff --git a/silx/gui/plot/backends/BackendBase.py b/silx/gui/plot/backends/BackendBase.py
index 0514c85..af37543 100644
--- a/silx/gui/plot/backends/BackendBase.py
+++ b/silx/gui/plot/backends/BackendBase.py
@@ -170,6 +170,23 @@ class BackendBase(object):
"""
return legend
+ def addTriangles(self, x, y, triangles, legend,
+ color, z, selectable, alpha):
+ """Add a set of triangles.
+
+ :param numpy.ndarray x: The data corresponding to the x axis
+ :param numpy.ndarray y: The data corresponding to the y axis
+ :param numpy.ndarray triangles: The indices to make triangles
+ as a (Ntriangle, 3) array
+ :param str legend: The legend to be associated to the curve
+ :param numpy.ndarray color: color(s) as (npoints, 4) array
+ :param int z: Layer on which to draw the cuve
+ :param bool selectable: indicate if the curve can be selected
+ :param float alpha: Opacity as a float in [0., 1.]
+ :returns: The triangles' unique identifier used by the backend
+ """
+ return legend
+
def addItem(self, x, y, legend, shape, color, fill, overlay, z,
linestyle, linewidth, linebgcolor):
"""Add an item (i.e. a shape) to the plot.
diff --git a/silx/gui/plot/backends/BackendMatplotlib.py b/silx/gui/plot/backends/BackendMatplotlib.py
index 726a839..7739329 100644
--- a/silx/gui/plot/backends/BackendMatplotlib.py
+++ b/silx/gui/plot/backends/BackendMatplotlib.py
@@ -54,7 +54,8 @@ from matplotlib.backend_bases import MouseEvent
from matplotlib.lines import Line2D
from matplotlib.collections import PathCollection, LineCollection
from matplotlib.ticker import Formatter, ScalarFormatter, Locator
-
+from matplotlib.tri import Triangulation
+from matplotlib.collections import TriMesh
from . import BackendBase
from .._utils import FLOAT32_MINPOS
@@ -359,9 +360,12 @@ class BackendMatplotlib(BackendBase.BackendBase):
else:
errorbarColor = color
- # On Debian 7 at least, Nx1 array yerr does not seems supported
+ # Nx1 error array deprecated in matplotlib >=3.1 (removed in 3.3)
+ if (isinstance(xerror, numpy.ndarray) and xerror.ndim == 2 and
+ xerror.shape[1] == 1):
+ xerror = numpy.ravel(xerror)
if (isinstance(yerror, numpy.ndarray) and yerror.ndim == 2 and
- yerror.shape[1] == 1 and len(x) != 1):
+ yerror.shape[1] == 1):
yerror = numpy.ravel(yerror)
errorbars = axes.errorbar(x, y, label=legend,
@@ -477,6 +481,32 @@ class BackendMatplotlib(BackendBase.BackendBase):
self.ax.add_artist(image)
return image
+ def addTriangles(self, x, y, triangles, legend,
+ color, z, selectable, alpha):
+ for parameter in (x, y, triangles, legend, color,
+ z, selectable, alpha):
+ assert parameter is not None
+
+ # 0 enables picking on filled triangle
+ picker = 0 if selectable else None
+
+ color = numpy.array(color, copy=False)
+ assert color.ndim == 2 and len(color) == len(x)
+
+ if color.dtype not in [numpy.float32, numpy.float]:
+ color = color.astype(numpy.float32) / 255.
+
+ collection = TriMesh(
+ Triangulation(x, y, triangles),
+ label=legend,
+ alpha=alpha,
+ picker=picker,
+ zorder=z)
+ collection.set_color(color)
+ self.ax.add_collection(collection)
+
+ return collection
+
def addItem(self, x, y, legend, shape, color, fill, overlay, z,
linestyle, linewidth, linebgcolor):
if (linebgcolor is not None and
@@ -1100,6 +1130,22 @@ class BackendMatplotlibQt(FigureCanvasQTAgg, BackendMatplotlib):
elif label.startswith('__IMAGE__'):
self._picked.append({'kind': 'image', 'legend': label[9:]})
+ elif isinstance(event.artist, TriMesh):
+ # Convert selected triangle to data point indices
+ triangulation = event.artist._triangulation
+ indices = triangulation.get_masked_triangles()[event.ind[0]]
+
+ # Sort picked triangle points by distance to mouse
+ # from furthest to closest to put closest point last
+ # This is to be somewhat consistent with last scatter point
+ # being the top one.
+ dists = ((triangulation.x[indices] - event.mouseevent.xdata) ** 2 +
+ (triangulation.y[indices] - event.mouseevent.ydata) ** 2)
+ indices = indices[numpy.flip(numpy.argsort(dists))]
+
+ self._picked.append({'kind': 'curve', 'legend': label,
+ 'indices': indices})
+
else: # it's a curve, item have no picker for now
if not isinstance(event.artist, (PathCollection, Line2D)):
_logger.info('Unsupported artist, ignored')
diff --git a/silx/gui/plot/backends/BackendOpenGL.py b/silx/gui/plot/backends/BackendOpenGL.py
index e33d03c..0420aa9 100644
--- a/silx/gui/plot/backends/BackendOpenGL.py
+++ b/silx/gui/plot/backends/BackendOpenGL.py
@@ -31,8 +31,9 @@ __license__ = "MIT"
__date__ = "21/12/2018"
from collections import OrderedDict, namedtuple
-from ctypes import c_void_p
import logging
+import warnings
+import weakref
import numpy
@@ -44,7 +45,7 @@ from ... import qt
from ..._glutils import gl
from ... import _glutils as glu
from .glutils import (
- GLLines2D,
+ GLLines2D, GLPlotTriangles,
GLPlotCurve2D, GLPlotColormap, GLPlotRGBAImage, GLPlotFrame2D,
mat4Ortho, mat4Identity,
LEFT, RIGHT, BOTTOM, TOP,
@@ -106,7 +107,7 @@ class PlotDataContent(object):
This class is only meant to work with _OpenGLPlotCanvas.
"""
- _PRIMITIVE_TYPES = 'curve', 'image'
+ _PRIMITIVE_TYPES = 'curve', 'image', 'triangles'
def __init__(self):
self._primitives = OrderedDict() # For images and curves
@@ -124,6 +125,8 @@ class PlotDataContent(object):
primitiveType = 'curve'
elif isinstance(primitive, (GLPlotColormap, GLPlotRGBAImage)):
primitiveType = 'image'
+ elif isinstance(primitive, GLPlotTriangles):
+ primitiveType = 'triangles'
else:
raise RuntimeError('Unsupported object type: %s', primitive)
@@ -304,16 +307,8 @@ _texFragShd = """
}
"""
-
# BackendOpenGL ###############################################################
-_current_context = None
-
-
-def _getContext():
- assert _current_context is not None
- return _current_context
-
class BackendOpenGL(BackendBase.BackendBase, glu.OpenGLWidget):
"""OpenGL-based Plot backend.
@@ -348,7 +343,7 @@ class BackendOpenGL(BackendBase.BackendBase, glu.OpenGLWidget):
_baseVertShd, _baseFragShd, attrib0='position')
self._progTex = glu.Program(
_texVertShd, _texFragShd, attrib0='position')
- self._plotFBOs = {}
+ self._plotFBOs = weakref.WeakKeyDictionary()
self._keepDataAspectRatio = False
@@ -386,6 +381,8 @@ class BackendOpenGL(BackendBase.BackendBase, glu.OpenGLWidget):
return qt.QSize(8 * 80, 6 * 80) # Mimic MatplotlibBackend
def mousePressEvent(self, event):
+ if event.button() not in self._MOUSE_BTNS:
+ return super(BackendOpenGL, self).mousePressEvent(event)
xPixel = event.x() * self.getDevicePixelRatio()
yPixel = event.y() * self.getDevicePixelRatio()
btn = self._MOUSE_BTNS[event.button()]
@@ -411,6 +408,8 @@ class BackendOpenGL(BackendBase.BackendBase, glu.OpenGLWidget):
event.accept()
def mouseReleaseEvent(self, event):
+ if event.button() not in self._MOUSE_BTNS:
+ return super(BackendOpenGL, self).mouseReleaseEvent(event)
xPixel = event.x() * self.getDevicePixelRatio()
yPixel = event.y() * self.getDevicePixelRatio()
@@ -462,15 +461,17 @@ class BackendOpenGL(BackendBase.BackendBase, glu.OpenGLWidget):
self._renderOverlayGL()
def _paintFBOGL(self):
- context = glu.getGLContext()
+ context = glu.Context.getCurrent()
plotFBOTex = self._plotFBOs.get(context)
if (self._plot._getDirtyPlot() or self._plotFrame.isDirty or
plotFBOTex is None):
- self._plotVertices = numpy.array(((-1., -1., 0., 0.),
- (1., -1., 1., 0.),
- (-1., 1., 0., 1.),
- (1., 1., 1., 1.)),
- dtype=numpy.float32)
+ self._plotVertices = (
+ # Vertex coordinates
+ numpy.array(((-1., -1.), (1., -1.), (-1., 1.), (1., 1.)),
+ dtype=numpy.float32),
+ # Texture coordinates
+ numpy.array(((0., 0.), (1., 0.), (0., 1.), (1., 1.)),
+ dtype=numpy.float32))
if plotFBOTex is None or \
plotFBOTex.shape[1] != self._plotFrame.size[0] or \
plotFBOTex.shape[0] != self._plotFrame.size[1]:
@@ -502,53 +503,45 @@ class BackendOpenGL(BackendBase.BackendBase, glu.OpenGLWidget):
gl.glUniformMatrix4fv(self._progTex.uniforms['matrix'], 1, gl.GL_TRUE,
mat4Identity().astype(numpy.float32))
- stride = self._plotVertices.shape[-1] * self._plotVertices.itemsize
gl.glEnableVertexAttribArray(self._progTex.attributes['position'])
gl.glVertexAttribPointer(self._progTex.attributes['position'],
2,
gl.GL_FLOAT,
gl.GL_FALSE,
- stride, self._plotVertices)
+ 0,
+ self._plotVertices[0])
- texCoordsPtr = c_void_p(self._plotVertices.ctypes.data +
- 2 * self._plotVertices.itemsize) # Better way?
gl.glEnableVertexAttribArray(self._progTex.attributes['texCoords'])
gl.glVertexAttribPointer(self._progTex.attributes['texCoords'],
2,
gl.GL_FLOAT,
gl.GL_FALSE,
- stride, texCoordsPtr)
+ 0,
+ self._plotVertices[1])
with plotFBOTex.texture:
- gl.glDrawArrays(gl.GL_TRIANGLE_STRIP, 0, len(self._plotVertices))
+ gl.glDrawArrays(gl.GL_TRIANGLE_STRIP, 0, len(self._plotVertices[0]))
self._renderMarkersGL()
self._renderOverlayGL()
def paintGL(self):
- global _current_context
- _current_context = self.context()
-
- glu.setGLContextGetter(_getContext)
-
- # Release OpenGL resources
- for item in self._glGarbageCollector:
- item.discard()
- self._glGarbageCollector = []
-
- gl.glClearColor(*self._backgroundColor)
- gl.glClear(gl.GL_COLOR_BUFFER_BIT | gl.GL_STENCIL_BUFFER_BIT)
+ with glu.Context.current(self.context()):
+ # Release OpenGL resources
+ for item in self._glGarbageCollector:
+ item.discard()
+ self._glGarbageCollector = []
- # Check if window is large enough
- plotWidth, plotHeight = self.getPlotBoundsInPixels()[2:]
- if plotWidth <= 2 or plotHeight <= 2:
- return
+ gl.glClearColor(*self._backgroundColor)
+ gl.glClear(gl.GL_COLOR_BUFFER_BIT | gl.GL_STENCIL_BUFFER_BIT)
- # self._paintDirectGL()
- self._paintFBOGL()
+ # Check if window is large enough
+ plotWidth, plotHeight = self.getPlotBoundsInPixels()[2:]
+ if plotWidth <= 2 or plotHeight <= 2:
+ return
- glu.setGLContextGetter()
- _current_context = None
+ # self._paintDirectGL()
+ self._paintFBOGL()
def _renderMarkersGL(self):
if len(self._markers) == 0:
@@ -892,7 +885,10 @@ class BackendOpenGL(BackendBase.BackendBase, glu.OpenGLWidget):
xErrorMinus, xErrorPlus = xerror[0], xerror[1]
else:
xErrorMinus, xErrorPlus = xerror, xerror
- xErrorMinus = logX - numpy.log10(x - xErrorMinus)
+ with warnings.catch_warnings():
+ warnings.simplefilter('ignore', category=RuntimeWarning)
+ # Ignore divide by zero, invalid value encountered in log10
+ xErrorMinus = logX - numpy.log10(x - xErrorMinus)
xErrorPlus = numpy.log10(x + xErrorPlus) - logX
xerror = numpy.array((xErrorMinus, xErrorPlus),
dtype=numpy.float32)
@@ -912,7 +908,10 @@ class BackendOpenGL(BackendBase.BackendBase, glu.OpenGLWidget):
yErrorMinus, yErrorPlus = yerror[0], yerror[1]
else:
yErrorMinus, yErrorPlus = yerror, yerror
- yErrorMinus = logY - numpy.log10(y - yErrorMinus)
+ with warnings.catch_warnings():
+ warnings.simplefilter('ignore', category=RuntimeWarning)
+ # Ignore divide by zero, invalid value encountered in log10
+ yErrorMinus = logY - numpy.log10(y - yErrorMinus)
yErrorPlus = numpy.log10(y + yErrorPlus) - logY
yerror = numpy.array((yErrorMinus, yErrorPlus),
dtype=numpy.float32)
@@ -1043,6 +1042,25 @@ class BackendOpenGL(BackendBase.BackendBase, glu.OpenGLWidget):
return legend, 'image'
+ def addTriangles(self, x, y, triangles, legend,
+ color, z, selectable, alpha):
+
+ # Handle axes log scale: convert data
+ if self._plotFrame.xAxis.isLog:
+ x = numpy.log10(x)
+ if self._plotFrame.yAxis.isLog:
+ y = numpy.log10(y)
+
+ triangles = GLPlotTriangles(x, y, color, triangles, alpha)
+ triangles.info = {
+ 'legend': legend,
+ 'zOrder': z,
+ 'behaviors': set(['selectable']) if selectable else set(),
+ }
+ self._plotContent.add(triangles)
+
+ return legend, 'triangles'
+
def addItem(self, x, y, legend, shape, color, fill, overlay, z,
linestyle, linewidth, linebgcolor):
# TODO handle overlay
@@ -1132,10 +1150,10 @@ class BackendOpenGL(BackendBase.BackendBase, glu.OpenGLWidget):
self._glGarbageCollector.append(curve)
- elif kind == 'image':
- image = self._plotContent.pop('image', legend)
- if image is not None:
- self._glGarbageCollector.append(image)
+ elif kind in ('image', 'triangles'):
+ item = self._plotContent.pop(kind, legend)
+ if item is not None:
+ self._glGarbageCollector.append(item)
elif kind == 'marker':
self._markers.pop(legend, False)
@@ -1188,6 +1206,60 @@ class BackendOpenGL(BackendBase.BackendBase, glu.OpenGLWidget):
self._plotFrame.size[1] - self._plotFrame.margins.bottom - 1)
return xPlot, yPlot
+ def __pickCurves(self, item, x, y):
+ """Perform picking on a curve item.
+
+ :param GLPlotCurve2D item:
+ :param float x: X position of the mouse in widget coordinates
+ :param float y: Y position of the mouse in widget coordinates
+ :return: List of indices of picked points
+ :rtype: List[int]
+ """
+ offset = self._PICK_OFFSET
+ if item.marker is not None:
+ offset = max(item.markerSize / 2., offset)
+ if item.lineStyle is not None:
+ offset = max(item.lineWidth / 2., offset)
+
+ yAxis = item.info['yAxis']
+
+ inAreaPos = self._mouseInPlotArea(x - offset, y - offset)
+ dataPos = self.pixelToData(inAreaPos[0], inAreaPos[1],
+ axis=yAxis, check=True)
+ if dataPos is None:
+ return []
+ xPick0, yPick0 = dataPos
+
+ inAreaPos = self._mouseInPlotArea(x + offset, y + offset)
+ dataPos = self.pixelToData(inAreaPos[0], inAreaPos[1],
+ axis=yAxis, check=True)
+ if dataPos is None:
+ return []
+ xPick1, yPick1 = dataPos
+
+ if xPick0 < xPick1:
+ xPickMin, xPickMax = xPick0, xPick1
+ else:
+ xPickMin, xPickMax = xPick1, xPick0
+
+ if yPick0 < yPick1:
+ yPickMin, yPickMax = yPick0, yPick1
+ else:
+ yPickMin, yPickMax = yPick1, yPick0
+
+ # Apply log scale if axis is log
+ if self._plotFrame.xAxis.isLog:
+ xPickMin = numpy.log10(xPickMin)
+ xPickMax = numpy.log10(xPickMax)
+
+ if (yAxis == 'left' and self._plotFrame.yAxis.isLog) or (
+ yAxis == 'right' and self._plotFrame.y2Axis.isLog):
+ yPickMin = numpy.log10(yPickMin)
+ yPickMax = numpy.log10(yPickMax)
+
+ return item.pick(xPickMin, yPickMin,
+ xPickMax, yPickMax)
+
def pickItems(self, x, y, kinds):
picked = []
@@ -1236,56 +1308,20 @@ class BackendOpenGL(BackendBase.BackendBase, glu.OpenGLWidget):
picked.append(dict(kind='image',
legend=item.info['legend']))
- elif 'curve' in kinds and isinstance(item, GLPlotCurve2D):
- offset = self._PICK_OFFSET
- if item.marker is not None:
- offset = max(item.markerSize / 2., offset)
- if item.lineStyle is not None:
- offset = max(item.lineWidth / 2., offset)
-
- yAxis = item.info['yAxis']
-
- inAreaPos = self._mouseInPlotArea(x - offset, y - offset)
- dataPos = self.pixelToData(inAreaPos[0], inAreaPos[1],
- axis=yAxis, check=True)
- if dataPos is None:
- continue
- xPick0, yPick0 = dataPos
-
- inAreaPos = self._mouseInPlotArea(x + offset, y + offset)
- dataPos = self.pixelToData(inAreaPos[0], inAreaPos[1],
- axis=yAxis, check=True)
- if dataPos is None:
- continue
- xPick1, yPick1 = dataPos
-
- if xPick0 < xPick1:
- xPickMin, xPickMax = xPick0, xPick1
- else:
- xPickMin, xPickMax = xPick1, xPick0
-
- if yPick0 < yPick1:
- yPickMin, yPickMax = yPick0, yPick1
- else:
- yPickMin, yPickMax = yPick1, yPick0
-
- # Apply log scale if axis is log
- if self._plotFrame.xAxis.isLog:
- xPickMin = numpy.log10(xPickMin)
- xPickMax = numpy.log10(xPickMax)
-
- if (yAxis == 'left' and self._plotFrame.yAxis.isLog) or (
- yAxis == 'right' and self._plotFrame.y2Axis.isLog):
- yPickMin = numpy.log10(yPickMin)
- yPickMax = numpy.log10(yPickMax)
-
- pickedIndices = item.pick(xPickMin, yPickMin,
- xPickMax, yPickMax)
- if pickedIndices:
- picked.append(dict(kind='curve',
- legend=item.info['legend'],
- indices=pickedIndices))
-
+ elif 'curve' in kinds:
+ if isinstance(item, GLPlotCurve2D):
+ pickedIndices = self.__pickCurves(item, x, y)
+ if pickedIndices:
+ picked.append(dict(kind='curve',
+ legend=item.info['legend'],
+ indices=pickedIndices))
+
+ elif isinstance(item, GLPlotTriangles):
+ pickedIndices = item.pick(*dataPos)
+ if pickedIndices:
+ picked.append(dict(kind='curve',
+ legend=item.info['legend'],
+ indices=pickedIndices))
return picked
# Update curve
diff --git a/silx/gui/plot/backends/glutils/GLPlotTriangles.py b/silx/gui/plot/backends/glutils/GLPlotTriangles.py
new file mode 100644
index 0000000..c756749
--- /dev/null
+++ b/silx/gui/plot/backends/glutils/GLPlotTriangles.py
@@ -0,0 +1,193 @@
+# coding: utf-8
+# /*##########################################################################
+#
+# Copyright (c) 2019 European Synchrotron Radiation Facility
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+#
+# ############################################################################*/
+"""
+This module provides a class to render a set of 2D triangles
+"""
+
+__authors__ = ["T. Vincent"]
+__license__ = "MIT"
+__date__ = "03/04/2017"
+
+
+import ctypes
+
+import numpy
+
+from .....math.combo import min_max
+from .... import _glutils as glutils
+from ...._glutils import gl
+
+
+class GLPlotTriangles(object):
+ """Handle rendering of a set of colored triangles"""
+
+ _PROGRAM = glutils.Program(
+ vertexShader="""
+ #version 120
+
+ uniform mat4 matrix;
+ attribute float xPos;
+ attribute float yPos;
+ attribute vec4 color;
+
+ varying vec4 vColor;
+
+ void main(void) {
+ gl_Position = matrix * vec4(xPos, yPos, 0.0, 1.0);
+ vColor = color;
+ }
+ """,
+ fragmentShader="""
+ #version 120
+
+ uniform float alpha;
+ varying vec4 vColor;
+
+ void main(void) {
+ gl_FragColor = vColor;
+ gl_FragColor.a *= alpha;
+ }
+ """,
+ attrib0='xPos')
+
+ def __init__(self, x, y, color, triangles, alpha=1.):
+ """
+
+ :param numpy.ndarray x: X coordinates of triangle corners
+ :param numpy.ndarray y: Y coordinates of triangle corners
+ :param numpy.ndarray color: color for each point
+ :param numpy.ndarray triangles: (N, 3) array of indices of triangles
+ :param float alpha: Opacity in [0, 1]
+ """
+ # Check and convert input data
+ x = numpy.ravel(numpy.array(x, dtype=numpy.float32))
+ y = numpy.ravel(numpy.array(y, dtype=numpy.float32))
+ color = numpy.array(color, copy=False)
+ # Cast to uint32
+ triangles = numpy.array(triangles, copy=False, dtype=numpy.uint32)
+
+ assert x.size == y.size
+ assert x.size == len(color)
+ assert color.ndim == 2 and color.shape[1] in (3, 4)
+ if numpy.issubdtype(color.dtype, numpy.floating):
+ color = numpy.array(color, dtype=numpy.float32, copy=False)
+ elif numpy.issubdtype(color.dtype, numpy.integer):
+ color = numpy.array(color, dtype=numpy.uint8, copy=False)
+ else:
+ raise ValueError('Unsupported color type')
+ assert triangles.ndim == 2 and triangles.shape[1] == 3
+
+ self.__x_y_color = x, y, color
+ self.xMin, self.xMax = min_max(x, finite=True)
+ self.yMin, self.yMax = min_max(y, finite=True)
+ self.__triangles = triangles
+ self.__alpha = numpy.clip(float(alpha), 0., 1.)
+ self.__vbos = None
+ self.__indicesVbo = None
+ self.__picking_triangles = None
+
+ def pick(self, x, y):
+ """Perform picking
+
+ :param float x: X coordinates in plot data frame
+ :param float y: Y coordinates in plot data frame
+ :return: List of picked data point indices
+ :rtype: numpy.ndarray
+ """
+ if (x < self.xMin or x > self.xMax or
+ y < self.yMin or y > self.yMax):
+ return ()
+ xPts, yPts = self.__x_y_color[:2]
+ if self.__picking_triangles is None:
+ self.__picking_triangles = numpy.zeros(
+ self.__triangles.shape + (3,), dtype=numpy.float32)
+ self.__picking_triangles[:, :, 0] = xPts[self.__triangles]
+ self.__picking_triangles[:, :, 1] = yPts[self.__triangles]
+
+ segment = numpy.array(((x, y, -1), (x, y, 1)), dtype=numpy.float32)
+ # Picked triangle indices
+ indices = glutils.segmentTrianglesIntersection(
+ segment, self.__picking_triangles)[0]
+ # Point indices
+ indices = numpy.unique(numpy.ravel(self.__triangles[indices]))
+
+ # Sorted from furthest to closest point
+ dists = (xPts[indices] - x) ** 2 + (yPts[indices] - y) ** 2
+ indices = indices[numpy.flip(numpy.argsort(dists))]
+
+ return tuple(indices)
+
+ def discard(self):
+ """Release resources on the GPU"""
+ if self.__vbos is not None:
+ self.__vbos[0].vbo.discard()
+ self.__vbos = None
+ self.__indicesVbo.discard()
+ self.__indicesVbo = None
+
+ def prepare(self):
+ """Allocate resources on the GPU"""
+ if self.__vbos is None:
+ self.__vbos = glutils.vertexBuffer(self.__x_y_color)
+ # Normalization is need for color
+ self.__vbos[-1].normalization = True
+
+ if self.__indicesVbo is None:
+ self.__indicesVbo = glutils.VertexBuffer(
+ numpy.ravel(self.__triangles),
+ usage=gl.GL_STATIC_DRAW,
+ target=gl.GL_ELEMENT_ARRAY_BUFFER)
+
+ def render(self, matrix, isXLog, isYLog):
+ """Perform rendering
+
+ :param numpy.ndarray matrix: 4x4 transform matrix to use
+ :param bool isXLog:
+ :param bool isYLog:
+ """
+ self.prepare()
+
+ if self.__vbos is None or self.__indicesVbo is None:
+ return # Nothing to display
+
+ self._PROGRAM.use()
+
+ gl.glUniformMatrix4fv(self._PROGRAM.uniforms['matrix'],
+ 1,
+ gl.GL_TRUE,
+ matrix.astype(numpy.float32))
+
+ gl.glUniform1f(self._PROGRAM.uniforms['alpha'], self.__alpha)
+
+ for index, name in enumerate(('xPos', 'yPos', 'color')):
+ attr = self._PROGRAM.attributes[name]
+ gl.glEnableVertexAttribArray(attr)
+ self.__vbos[index].setVertexAttrib(attr)
+
+ with self.__indicesVbo:
+ gl.glDrawElements(gl.GL_TRIANGLES,
+ self.__triangles.size,
+ glutils.numpyToGLType(self.__triangles.dtype),
+ ctypes.c_void_p(0))
diff --git a/silx/gui/plot/backends/glutils/GLText.py b/silx/gui/plot/backends/glutils/GLText.py
index 3d262bc..725c12c 100644
--- a/silx/gui/plot/backends/glutils/GLText.py
+++ b/silx/gui/plot/backends/glutils/GLText.py
@@ -1,7 +1,7 @@
# coding: utf-8
# /*##########################################################################
#
-# Copyright (c) 2014-2018 European Synchrotron Radiation Facility
+# Copyright (c) 2014-2019 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -33,9 +33,11 @@ __date__ = "03/04/2017"
from collections import OrderedDict
+import weakref
+
import numpy
-from ...._glutils import font, gl, getGLContext, Program, Texture
+from ...._glutils import font, gl, Context, Program, Texture
from .GLSupport import mat4Translate
@@ -128,7 +130,7 @@ class Text2D(object):
attrib0='position')
# Discard texture objects when removed from the cache
- _textures = _Cache(callback=lambda key, value: value[0].discard())
+ _textures = weakref.WeakKeyDictionary()
"""Cache already created textures"""
_sizes = _Cache()
@@ -159,15 +161,20 @@ class Text2D(object):
self._rotate = numpy.radians(rotate)
def _getTexture(self, text):
- key = getGLContext(), text
-
- if key not in self._textures:
+ # Retrieve/initialize texture cache for current context
+ context = Context.getCurrent()
+ if context not in self._textures:
+ self._textures[context] = _Cache(
+ callback=lambda key, value: value[0].discard())
+ textures = self._textures[context]
+
+ if text not in textures:
image, offset = font.rasterText(text,
font.getDefaultFontFamily())
if text not in self._sizes:
self._sizes[text] = image.shape[1], image.shape[0]
- self._textures[key] = (
+ textures[text] = (
Texture(gl.GL_RED,
data=image,
minFilter=gl.GL_NEAREST,
@@ -176,7 +183,7 @@ class Text2D(object):
gl.GL_CLAMP_TO_EDGE)),
offset)
- return self._textures[key]
+ return textures[text]
@property
def text(self):
diff --git a/silx/gui/plot/backends/glutils/GLTexture.py b/silx/gui/plot/backends/glutils/GLTexture.py
index 25dd9f1..118a36f 100644
--- a/silx/gui/plot/backends/glutils/GLTexture.py
+++ b/silx/gui/plot/backends/glutils/GLTexture.py
@@ -1,7 +1,7 @@
# coding: utf-8
# /*##########################################################################
#
-# Copyright (c) 2014-2017 European Synchrotron Radiation Facility
+# Copyright (c) 2014-2019 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -163,7 +163,6 @@ class Image(object):
data[yOrig:yOrig+hData,
xOrig:xOrig+wData],
format_,
- shape=(hData, wData),
texUnit=texUnit,
minFilter=self._MIN_FILTER,
magFilter=self._MAG_FILTER,
diff --git a/silx/gui/plot/backends/glutils/__init__.py b/silx/gui/plot/backends/glutils/__init__.py
index 771de39..d58c084 100644
--- a/silx/gui/plot/backends/glutils/__init__.py
+++ b/silx/gui/plot/backends/glutils/__init__.py
@@ -1,7 +1,7 @@
# coding: utf-8
# /*##########################################################################
#
-# Copyright (c) 2014-2017 European Synchrotron Radiation Facility
+# Copyright (c) 2014-2019 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -39,6 +39,7 @@ _logger = logging.getLogger(__name__)
from .GLPlotCurve import * # noqa
from .GLPlotFrame import * # noqa
from .GLPlotImage import * # noqa
+from .GLPlotTriangles import GLPlotTriangles # noqa
from .GLSupport import * # noqa
from .GLText import * # noqa
from .GLTexture import * # noqa
diff --git a/silx/gui/plot/items/__init__.py b/silx/gui/plot/items/__init__.py
index f829f78..f3a36db 100644
--- a/silx/gui/plot/items/__init__.py
+++ b/silx/gui/plot/items/__init__.py
@@ -1,7 +1,7 @@
# coding: utf-8
# /*##########################################################################
#
-# Copyright (c) 2017-2018 European Synchrotron Radiation Facility
+# Copyright (c) 2017-2019 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -34,14 +34,15 @@ __date__ = "22/06/2017"
from .core import (Item, LabelsMixIn, DraggableMixIn, ColormapMixIn, # noqa
SymbolMixIn, ColorMixIn, YAxisMixIn, FillMixIn, # noqa
- AlphaMixIn, LineMixIn, ItemChangedType) # noqa
+ AlphaMixIn, LineMixIn, ScatterVisualizationMixIn, # noqa
+ ComplexMixIn, ItemChangedType, PointsBase) # noqa
from .complex import ImageComplexData # noqa
from .curve import Curve, CurveStyle # noqa
from .histogram import Histogram # noqa
from .image import ImageBase, ImageData, ImageRgba, MaskImageData # noqa
from .shape import Shape # noqa
from .scatter import Scatter # noqa
-from .marker import Marker, XMarker, YMarker # noqa
+from .marker import MarkerBase, Marker, XMarker, YMarker # noqa
from .axis import Axis, XAxis, YAxis, YRightAxis
DATA_ITEMS = ImageComplexData, Curve, Histogram, ImageBase, Scatter
diff --git a/silx/gui/plot/items/complex.py b/silx/gui/plot/items/complex.py
index 7fffd77..3869a05 100644
--- a/silx/gui/plot/items/complex.py
+++ b/silx/gui/plot/items/complex.py
@@ -33,12 +33,13 @@ __date__ = "14/06/2018"
import logging
-import enum
import numpy
+from ....utils.proxy import docstring
+from ....utils.deprecation import deprecated
from ...colors import Colormap
-from .core import ColormapMixIn, ItemChangedType
+from .core import ColormapMixIn, ComplexMixIn, ItemChangedType
from .image import ImageBase
@@ -105,29 +106,19 @@ def _complex2rgbalin(phaseColormap, data, gamma=1.0, smax=None):
return rgba
-class ImageComplexData(ImageBase, ColormapMixIn):
+class ImageComplexData(ImageBase, ColormapMixIn, ComplexMixIn):
"""Specific plot item to force colormap when using complex colormap.
This is returning the specific colormap when displaying
colored phase + amplitude.
"""
- class Mode(enum.Enum):
- """Identify available display mode for complex"""
- ABSOLUTE = 'absolute'
- PHASE = 'phase'
- REAL = 'real'
- IMAGINARY = 'imaginary'
- AMPLITUDE_PHASE = 'amplitude_phase'
- LOG10_AMPLITUDE_PHASE = 'log10_amplitude_phase'
- SQUARE_AMPLITUDE = 'square_amplitude'
-
def __init__(self):
ImageBase.__init__(self)
ColormapMixIn.__init__(self)
+ ComplexMixIn.__init__(self)
self._data = numpy.zeros((0, 0), dtype=numpy.complex64)
self._dataByModesCache = {}
- self._mode = self.Mode.ABSOLUTE
self._amplitudeRangeInfo = None, 2
# Use default from ColormapMixIn
@@ -139,13 +130,13 @@ class ImageComplexData(ImageBase, ColormapMixIn):
vmax=numpy.pi)
self._colormaps = { # Default colormaps for all modes
- self.Mode.ABSOLUTE: colormap,
- self.Mode.PHASE: phaseColormap,
- self.Mode.REAL: colormap,
- self.Mode.IMAGINARY: colormap,
- self.Mode.AMPLITUDE_PHASE: phaseColormap,
- self.Mode.LOG10_AMPLITUDE_PHASE: phaseColormap,
- self.Mode.SQUARE_AMPLITUDE: colormap,
+ self.ComplexMode.ABSOLUTE: colormap,
+ self.ComplexMode.PHASE: phaseColormap,
+ self.ComplexMode.REAL: colormap,
+ self.ComplexMode.IMAGINARY: colormap,
+ self.ComplexMode.AMPLITUDE_PHASE: phaseColormap,
+ self.ComplexMode.LOG10_AMPLITUDE_PHASE: phaseColormap,
+ self.ComplexMode.SQUARE_AMPLITUDE: colormap,
}
def _addBackendRenderer(self, backend):
@@ -156,9 +147,9 @@ class ImageComplexData(ImageBase, ColormapMixIn):
# Do not render with non linear scales
return None
- mode = self.getVisualizationMode()
- if mode in (self.Mode.AMPLITUDE_PHASE,
- self.Mode.LOG10_AMPLITUDE_PHASE):
+ mode = self.getComplexMode()
+ if mode in (self.ComplexMode.AMPLITUDE_PHASE,
+ self.ComplexMode.LOG10_AMPLITUDE_PHASE):
# For those modes, compute RGBA image here
colormap = None
data = self.getRgbaImageData(copy=False)
@@ -179,33 +170,21 @@ class ImageComplexData(ImageBase, ColormapMixIn):
colormap=colormap,
alpha=self.getAlpha())
- def setVisualizationMode(self, mode):
- """Set the visualization mode to use.
-
- :param Mode mode:
- """
- assert isinstance(mode, self.Mode)
- assert mode in self._colormaps
-
- if mode != self._mode:
- self._mode = mode
-
+ @docstring(ComplexMixIn)
+ def setComplexMode(self, mode):
+ changed = super(ImageComplexData, self).setComplexMode(mode)
+ if changed:
+ # Backward compatibility
self._updated(ItemChangedType.VISUALIZATION_MODE)
# Send data updated as value returned by getData has changed
self._updated(ItemChangedType.DATA)
# Update ColormapMixIn colormap
- colormap = self._colormaps[self._mode]
+ colormap = self._colormaps[self.getComplexMode()]
if colormap is not super(ImageComplexData, self).getColormap():
super(ImageComplexData, self).setColormap(colormap)
-
- def getVisualizationMode(self):
- """Returns the visualization mode in use.
-
- :rtype: Mode
- """
- return self._mode
+ return changed
def _setAmplitudeRangeInfo(self, max_=None, delta=2):
"""Set the amplitude range to display for 'log10_amplitude_phase' mode.
@@ -228,15 +207,17 @@ class ImageComplexData(ImageBase, ColormapMixIn):
"""Set the colormap for this specific mode.
:param ~silx.gui.colors.Colormap colormap: The colormap
- :param Mode mode:
+ :param Union[ComplexMode,str] mode:
If specified, set the colormap of this specific mode.
Default: current mode.
"""
if mode is None:
- mode = self.getVisualizationMode()
+ mode = self.getComplexMode()
+ else:
+ mode = self.ComplexMode.from_value(mode)
self._colormaps[mode] = colormap
- if mode is self.getVisualizationMode():
+ if mode is self.getComplexMode():
super(ImageComplexData, self).setColormap(colormap)
else:
self._updated(ItemChangedType.COLORMAP)
@@ -244,13 +225,15 @@ class ImageComplexData(ImageBase, ColormapMixIn):
def getColormap(self, mode=None):
"""Get the colormap for the (current) mode.
- :param Mode mode:
+ :param Union[ComplexMode,str] mode:
If specified, get the colormap of this specific mode.
Default: current mode.
:rtype: ~silx.gui.colors.Colormap
"""
if mode is None:
- mode = self.getVisualizationMode()
+ mode = self.getComplexMode()
+ else:
+ mode = self.ComplexMode.from_value(mode)
return self._colormaps[mode]
@@ -296,28 +279,30 @@ class ImageComplexData(ImageBase, ColormapMixIn):
:param bool copy: True (Default) to get a copy,
False to use internal representation (do not modify!)
- :param Mode mode:
+ :param Union[ComplexMode,str] mode:
If specified, get data corresponding to the mode.
Default: Current mode.
:rtype: numpy.ndarray of float
"""
if mode is None:
- mode = self.getVisualizationMode()
+ mode = self.getComplexMode()
+ else:
+ mode = self.ComplexMode.from_value(mode)
if mode not in self._dataByModesCache:
# Compute data for mode and store it in cache
complexData = self.getComplexData(copy=False)
- if mode is self.Mode.PHASE:
+ if mode is self.ComplexMode.PHASE:
data = numpy.angle(complexData)
- elif mode is self.Mode.REAL:
+ elif mode is self.ComplexMode.REAL:
data = numpy.real(complexData)
- elif mode is self.Mode.IMAGINARY:
+ elif mode is self.ComplexMode.IMAGINARY:
data = numpy.imag(complexData)
- elif mode in (self.Mode.ABSOLUTE,
- self.Mode.LOG10_AMPLITUDE_PHASE,
- self.Mode.AMPLITUDE_PHASE):
+ elif mode in (self.ComplexMode.ABSOLUTE,
+ self.ComplexMode.LOG10_AMPLITUDE_PHASE,
+ self.ComplexMode.AMPLITUDE_PHASE):
data = numpy.absolute(complexData)
- elif mode is self.Mode.SQUARE_AMPLITUDE:
+ elif mode is self.ComplexMode.SQUARE_AMPLITUDE:
data = numpy.absolute(complexData) ** 2
else:
_logger.error(
@@ -333,22 +318,36 @@ class ImageComplexData(ImageBase, ColormapMixIn):
"""Get the displayed RGB(A) image for (current) mode
:param bool copy: Ignored for this class
- :param Mode mode:
+ :param Union[ComplexMode,str] mode:
If specified, get data corresponding to the mode.
Default: Current mode.
:rtype: numpy.ndarray of uint8 of shape (height, width, 4)
"""
if mode is None:
- mode = self.getVisualizationMode()
+ mode = self.getComplexMode()
+ else:
+ mode = self.ComplexMode.from_value(mode)
colormap = self.getColormap(mode=mode)
- if mode is self.Mode.AMPLITUDE_PHASE:
+ if mode is self.ComplexMode.AMPLITUDE_PHASE:
data = self.getComplexData(copy=False)
return _complex2rgbalin(colormap, data)
- elif mode is self.Mode.LOG10_AMPLITUDE_PHASE:
+ elif mode is self.ComplexMode.LOG10_AMPLITUDE_PHASE:
data = self.getComplexData(copy=False)
max_, delta = self._getAmplitudeRangeInfo()
return _complex2rgbalog(colormap, data, dlogs=delta, smax=max_)
else:
data = self.getData(copy=False, mode=mode)
return colormap.applyToData(data)
+
+ # Backward compatibility
+
+ Mode = ComplexMixIn.ComplexMode
+
+ @deprecated(replacement='setComplexMode', since_version='0.11.0')
+ def setVisualizationMode(self, mode):
+ return self.setComplexMode(mode)
+
+ @deprecated(replacement='getComplexMode', since_version='0.11.0')
+ def getVisualizationMode(self):
+ return self.getComplexMode()
diff --git a/silx/gui/plot/items/core.py b/silx/gui/plot/items/core.py
index bf3b719..e7342b0 100644
--- a/silx/gui/plot/items/core.py
+++ b/silx/gui/plot/items/core.py
@@ -30,6 +30,10 @@ __license__ = "MIT"
__date__ = "29/01/2019"
import collections
+try:
+ from collections import abc
+except ImportError: # Python2 support
+ import collections as abc
from copy import deepcopy
import logging
import enum
@@ -39,6 +43,7 @@ import weakref
import numpy
import six
+from ....utils.enum import Enum as _Enum
from ... import qt
from ... import colors
from ...colors import Colormap
@@ -128,6 +133,9 @@ class ItemChangedType(enum.Enum):
VISUALIZATION_MODE = 'visualizationModeChanged'
"""Item's visualization mode changed flag."""
+ COMPLEX_MODE = 'complexModeChanged'
+ """Item's complex data visualization mode changed flag."""
+
class Item(qt.QObject):
"""Description of an item of the plot"""
@@ -404,6 +412,14 @@ class DraggableMixIn(ItemMixInBase):
"""
self._draggable = bool(draggable)
+ def drag(self, from_, to):
+ """Perform a drag of the item.
+
+ :param List[float] from_: (x, y) previous position in data coordinates
+ :param List[float] to: (x, y) current position in data coordinates
+ """
+ raise NotImplementedError("Must be implemented in subclass")
+
class ColormapMixIn(ItemMixInBase):
"""Mix-in class for items with colormap"""
@@ -757,7 +773,164 @@ class AlphaMixIn(ItemMixInBase):
self._updated(ItemChangedType.ALPHA)
-class Points(Item, SymbolMixIn, AlphaMixIn):
+class ComplexMixIn(ItemMixInBase):
+ """Mix-in class for complex data mode"""
+
+ _SUPPORTED_COMPLEX_MODES = None
+ """Override to only support a subset of all ComplexMode"""
+
+ class ComplexMode(_Enum):
+ """Identify available display mode for complex"""
+ ABSOLUTE = 'amplitude'
+ PHASE = 'phase'
+ REAL = 'real'
+ IMAGINARY = 'imaginary'
+ AMPLITUDE_PHASE = 'amplitude_phase'
+ LOG10_AMPLITUDE_PHASE = 'log10_amplitude_phase'
+ SQUARE_AMPLITUDE = 'square_amplitude'
+
+ def __init__(self):
+ self.__complex_mode = self.ComplexMode.ABSOLUTE
+
+ def getComplexMode(self):
+ """Returns the current complex visualization mode.
+
+ :rtype: ComplexMode
+ """
+ return self.__complex_mode
+
+ def setComplexMode(self, mode):
+ """Set the complex visualization mode.
+
+ :param ComplexMode mode: The visualization mode in:
+ 'real', 'imaginary', 'phase', 'amplitude'
+ :return: True if value was set, False if is was already set
+ :rtype: bool
+ """
+ mode = self.ComplexMode.from_value(mode)
+ assert mode in self.supportedComplexModes()
+
+ if mode != self.__complex_mode:
+ self.__complex_mode = mode
+ self._updated(ItemChangedType.COMPLEX_MODE)
+ return True
+ else:
+ return False
+
+ def _convertComplexData(self, data, mode=None):
+ """Convert complex data to the specific mode.
+
+ :param Union[ComplexMode,None] mode:
+ The kind of value to compute.
+ If None (the default), the current complex mode is used.
+ :return: The converted dataset
+ :rtype: Union[numpy.ndarray[float],None]
+ """
+ if data is None:
+ return None
+
+ if mode is None:
+ mode = self.getComplexMode()
+
+ if mode is self.ComplexMode.REAL:
+ return numpy.real(data)
+ elif mode is self.ComplexMode.IMAGINARY:
+ return numpy.imag(data)
+ elif mode is self.ComplexMode.ABSOLUTE:
+ return numpy.absolute(data)
+ elif mode is self.ComplexMode.PHASE:
+ return numpy.angle(data)
+ elif mode is self.ComplexMode.SQUARE_AMPLITUDE:
+ return numpy.absolute(data) ** 2
+ else:
+ raise ValueError('Unsupported conversion mode: %s', str(mode))
+
+ @classmethod
+ def supportedComplexModes(cls):
+ """Returns the list of supported complex visualization modes.
+
+ See :class:`ComplexMode` and :meth:`setComplexMode`.
+
+ :rtype: List[ComplexMode]
+ """
+ if cls._SUPPORTED_COMPLEX_MODES is None:
+ return cls.ComplexMode.members()
+ else:
+ return cls._SUPPORTED_COMPLEX_MODES
+
+
+class ScatterVisualizationMixIn(ItemMixInBase):
+ """Mix-in class for scatter plot visualization modes"""
+
+ _SUPPORTED_SCATTER_VISUALIZATION = None
+ """Allows to override supported Visualizations"""
+
+ @enum.unique
+ class Visualization(_Enum):
+ """Different modes of scatter plot visualizations"""
+
+ POINTS = 'points'
+ """Display scatter plot as a point cloud"""
+
+ LINES = 'lines'
+ """Display scatter plot as a wireframe.
+
+ This is based on Delaunay triangulation
+ """
+
+ SOLID = 'solid'
+ """Display scatter plot as a set of filled triangles.
+
+ This is based on Delaunay triangulation
+ """
+
+ def __init__(self):
+ self.__visualization = self.Visualization.POINTS
+
+ @classmethod
+ def supportedVisualizations(cls):
+ """Returns the list of supported scatter visualization modes.
+
+ See :meth:`setVisualization`
+
+ :rtype: List[Visualization]
+ """
+ if cls._SUPPORTED_SCATTER_VISUALIZATION is None:
+ return cls.Visualization.members()
+ else:
+ return cls._SUPPORTED_SCATTER_VISUALIZATION
+
+ def setVisualization(self, mode):
+ """Set the scatter plot visualization mode to use.
+
+ See :class:`Visualization` for all possible values,
+ and :meth:`supportedVisualizations` for supported ones.
+
+ :param Union[str,Visualization] mode:
+ The visualization mode to use.
+ :return: True if value was set, False if is was already set
+ :rtype: bool
+ """
+ mode = self.Visualization.from_value(mode)
+ assert mode in self.supportedVisualizations()
+
+ if mode != self.__visualization:
+ self.__visualization = mode
+
+ self._updated(ItemChangedType.VISUALIZATION_MODE)
+ return True
+ else:
+ return False
+
+ def getVisualization(self):
+ """Returns the scatter plot visualization mode in use.
+
+ :rtype: Visualization
+ """
+ return self.__visualization
+
+
+class PointsBase(Item, SymbolMixIn, AlphaMixIn):
"""Base class for :class:`Curve` and :class:`Scatter`"""
# note: _logFilterData must be overloaded if you overload
# getData to change its signature
@@ -906,8 +1079,7 @@ class Points(Item, SymbolMixIn, AlphaMixIn):
if (xPositive, yPositive) not in self._boundsCache:
# use the getData class method because instance method can be
# overloaded to return additional arrays
- data = Points.getData(self, copy=False,
- displayed=True)
+ data = PointsBase.getData(self, copy=False, displayed=True)
if len(data) == 5:
# hack to avoid duplicating caching mechanism in Scatter
# (happens when cached data is used, caching done using
@@ -916,12 +1088,15 @@ class Points(Item, SymbolMixIn, AlphaMixIn):
else:
x, y, _xerror, _yerror = data
- self._boundsCache[(xPositive, yPositive)] = (
- numpy.nanmin(x),
- numpy.nanmax(x),
- numpy.nanmin(y),
- numpy.nanmax(y)
- )
+ with warnings.catch_warnings():
+ warnings.simplefilter('ignore', category=RuntimeWarning)
+ # Ignore All-NaN slice encountered
+ self._boundsCache[(xPositive, yPositive)] = (
+ numpy.nanmin(x),
+ numpy.nanmax(x),
+ numpy.nanmin(y),
+ numpy.nanmax(y)
+ )
return self._boundsCache[(xPositive, yPositive)]
def _getCachedData(self):
@@ -1026,12 +1201,12 @@ class Points(Item, SymbolMixIn, AlphaMixIn):
assert x.ndim == y.ndim == 1
if xerror is not None:
- if isinstance(xerror, collections.Iterable):
+ if isinstance(xerror, abc.Iterable):
xerror = numpy.array(xerror, copy=copy)
else:
xerror = float(xerror)
if yerror is not None:
- if isinstance(yerror, collections.Iterable):
+ if isinstance(yerror, abc.Iterable):
yerror = numpy.array(yerror, copy=copy)
else:
yerror = float(yerror)
diff --git a/silx/gui/plot/items/curve.py b/silx/gui/plot/items/curve.py
index 79def55..439af33 100644
--- a/silx/gui/plot/items/curve.py
+++ b/silx/gui/plot/items/curve.py
@@ -37,7 +37,7 @@ import six
from ....utils.deprecation import deprecated
from ... import colors
-from .core import (Points, LabelsMixIn, ColorMixIn, YAxisMixIn,
+from .core import (PointsBase, LabelsMixIn, ColorMixIn, YAxisMixIn,
FillMixIn, LineMixIn, SymbolMixIn, ItemChangedType)
@@ -151,7 +151,7 @@ class CurveStyle(object):
return False
-class Curve(Points, ColorMixIn, YAxisMixIn, FillMixIn, LabelsMixIn, LineMixIn):
+class Curve(PointsBase, ColorMixIn, YAxisMixIn, FillMixIn, LabelsMixIn, LineMixIn):
"""Description of a curve"""
_DEFAULT_Z_LAYER = 1
@@ -170,7 +170,7 @@ class Curve(Points, ColorMixIn, YAxisMixIn, FillMixIn, LabelsMixIn, LineMixIn):
"""Default highlight style of the item"""
def __init__(self):
- Points.__init__(self)
+ PointsBase.__init__(self)
ColorMixIn.__init__(self)
YAxisMixIn.__init__(self)
FillMixIn.__init__(self)
diff --git a/silx/gui/plot/items/image.py b/silx/gui/plot/items/image.py
index 99a916a..d74f4d3 100644
--- a/silx/gui/plot/items/image.py
+++ b/silx/gui/plot/items/image.py
@@ -1,7 +1,7 @@
# coding: utf-8
# /*##########################################################################
#
-# Copyright (c) 2017 European Synchrotron Radiation Facility
+# Copyright (c) 2017-2019 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -31,11 +31,15 @@ __license__ = "MIT"
__date__ = "20/10/2017"
-from collections import Sequence
+try:
+ from collections import abc
+except ImportError: # Python2 support
+ import collections as abc
import logging
import numpy
+from ....utils.proxy import docstring
from .core import (Item, LabelsMixIn, DraggableMixIn, ColormapMixIn,
AlphaMixIn, ItemChangedType)
@@ -170,6 +174,12 @@ class ImageBase(Item, LabelsMixIn, DraggableMixIn, AlphaMixIn):
else:
return xmin, xmax, ymin, ymax
+ @docstring(DraggableMixIn)
+ def drag(self, from_, to):
+ origin = self.getOrigin()
+ self.setOrigin((origin[0] + to[0] - from_[0],
+ origin[1] + to[1] - from_[1]))
+
def getData(self, copy=True):
"""Returns the image data
@@ -199,7 +209,7 @@ class ImageBase(Item, LabelsMixIn, DraggableMixIn, AlphaMixIn):
:param origin: (ox, oy) Offset from origin
:type origin: float or 2-tuple of float
"""
- if isinstance(origin, Sequence):
+ if isinstance(origin, abc.Sequence):
origin = float(origin[0]), float(origin[1])
else: # single value origin
origin = float(origin), float(origin)
@@ -227,7 +237,7 @@ class ImageBase(Item, LabelsMixIn, DraggableMixIn, AlphaMixIn):
:param scale: (sx, sy) Scale of the image
:type scale: float or 2-tuple of float
"""
- if isinstance(scale, Sequence):
+ if isinstance(scale, abc.Sequence):
scale = float(scale[0]), float(scale[1])
else: # single value scale
scale = float(scale), float(scale)
@@ -252,6 +262,7 @@ class ImageData(ImageBase, ColormapMixIn):
ColormapMixIn.__init__(self)
self._data = numpy.zeros((0, 0), dtype=numpy.float32)
self._alternativeImage = None
+ self.__alpha = None
def _addBackendRenderer(self, backend):
"""Update backend renderer"""
@@ -261,8 +272,9 @@ class ImageData(ImageBase, ColormapMixIn):
# Do not render with non linear scales
return None
- if self.getAlternativeImageData(copy=False) is not None:
- dataToUse = self.getAlternativeImageData(copy=False)
+ if (self.getAlternativeImageData(copy=False) is not None or
+ self.getAlphaData(copy=False) is not None):
+ dataToUse = self.getRgbaImageData(copy=False)
else:
dataToUse = self.getData(copy=False)
@@ -293,37 +305,56 @@ class ImageData(ImageBase, ColormapMixIn):
def getRgbaImageData(self, copy=True):
"""Get the displayed RGB(A) image
- :returns: numpy.ndarray of uint8 of shape (height, width, 4)
+ :returns: Array of uint8 of shape (height, width, 4)
+ :rtype: numpy.ndarray
"""
- if self._alternativeImage is not None:
- return _convertImageToRgba32(
- self.getAlternativeImageData(copy=False), copy=copy)
+ alternative = self.getAlternativeImageData(copy=False)
+ if alternative is not None:
+ return _convertImageToRgba32(alternative, copy=copy)
else:
# Apply colormap, in this case an new array is always returned
colormap = self.getColormap()
image = colormap.applyToData(self.getData(copy=False))
+ alphaImage = self.getAlphaData(copy=False)
+ if alphaImage is not None:
+ # Apply transparency
+ image[:, :, 3] = image[:, :, 3] * alphaImage
return image
def getAlternativeImageData(self, copy=True):
"""Get the optional RGBA image that is displayed instead of the data
- :param copy: True (Default) to get a copy,
- False to use internal representation (do not modify!)
- :returns: None or numpy.ndarray
- :rtype: numpy.ndarray or None
+ :param bool copy: True (Default) to get a copy,
+ False to use internal representation (do not modify!)
+ :rtype: Union[None,numpy.ndarray]
"""
if self._alternativeImage is None:
return None
else:
return numpy.array(self._alternativeImage, copy=copy)
- def setData(self, data, alternative=None, copy=True):
+ def getAlphaData(self, copy=True):
+ """Get the optional transparency image applied on the data
+
+ :param bool copy: True (Default) to get a copy,
+ False to use internal representation (do not modify!)
+ :rtype: Union[None,numpy.ndarray]
+ """
+ if self.__alpha is None:
+ return None
+ else:
+ return numpy.array(self.__alpha, copy=copy)
+
+ def setData(self, data, alternative=None, alpha=None, copy=True):
""""Set the image data and optionally an alternative RGB(A) representation
:param numpy.ndarray data: Data array with 2 dimensions (h, w)
:param alternative: RGB(A) image to display instead of data,
shape: (h, w, 3 or 4)
- :type alternative: None or numpy.ndarray
+ :type alternative: Union[None,numpy.ndarray]
+ :param alpha: An array of transparency value in [0, 1] to use for
+ display with shape: (h, w)
+ :type alpha: Union[None,numpy.ndarray]
:param bool copy: True (Default) to get a copy,
False to use internal representation (do not modify!)
"""
@@ -346,6 +377,15 @@ class ImageData(ImageBase, ColormapMixIn):
assert alternative.shape[:2] == data.shape[:2]
self._alternativeImage = alternative
+ if alpha is not None:
+ alpha = numpy.array(alpha, copy=copy)
+ assert alpha.shape == data.shape
+ if alpha.dtype.kind != 'f':
+ alpha = alpha.astype(numpy.float32)
+ if numpy.any(numpy.logical_or(alpha < 0., alpha > 1.)):
+ alpha = numpy.clip(alpha, 0., 1.)
+ self.__alpha = alpha
+
# TODO hackish data range implementation
if self.isVisible():
plot = self.getPlot()
diff --git a/silx/gui/plot/items/marker.py b/silx/gui/plot/items/marker.py
index 09767a5..80ca0b6 100644
--- a/silx/gui/plot/items/marker.py
+++ b/silx/gui/plot/items/marker.py
@@ -1,7 +1,7 @@
# coding: utf-8
# /*##########################################################################
#
-# Copyright (c) 2017-2018 European Synchrotron Radiation Facility
+# Copyright (c) 2017-2019 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -32,6 +32,7 @@ __date__ = "06/03/2017"
import logging
+from ....utils.proxy import docstring
from .core import (Item, DraggableMixIn, ColorMixIn, LineMixIn, SymbolMixIn,
ItemChangedType)
@@ -39,7 +40,7 @@ from .core import (Item, DraggableMixIn, ColorMixIn, LineMixIn, SymbolMixIn,
_logger = logging.getLogger(__name__)
-class _BaseMarker(Item, DraggableMixIn, ColorMixIn):
+class MarkerBase(Item, DraggableMixIn, ColorMixIn):
"""Base class for markers"""
_DEFAULT_COLOR = (0., 0., 0., 1.)
@@ -75,6 +76,10 @@ class _BaseMarker(Item, DraggableMixIn, ColorMixIn):
"""Update backend renderer"""
raise NotImplementedError()
+ @docstring(DraggableMixIn)
+ def drag(self, from_, to):
+ self.setPosition(to[0], to[1])
+
def isOverlay(self):
"""Return true if marker is drawn as an overlay.
@@ -166,14 +171,14 @@ class _BaseMarker(Item, DraggableMixIn, ColorMixIn):
return args
-class Marker(_BaseMarker, SymbolMixIn):
+class Marker(MarkerBase, SymbolMixIn):
"""Description of a marker"""
_DEFAULT_SYMBOL = '+'
"""Default symbol of the marker"""
def __init__(self):
- _BaseMarker.__init__(self)
+ MarkerBase.__init__(self)
SymbolMixIn.__init__(self)
self._x = 0.
@@ -204,11 +209,11 @@ class Marker(_BaseMarker, SymbolMixIn):
return x, self.getYPosition()
-class _LineMarker(_BaseMarker, LineMixIn):
+class _LineMarker(MarkerBase, LineMixIn):
"""Base class for line markers"""
def __init__(self):
- _BaseMarker.__init__(self)
+ MarkerBase.__init__(self)
LineMixIn.__init__(self)
def _addBackendRenderer(self, backend):
diff --git a/silx/gui/plot/items/roi.py b/silx/gui/plot/items/roi.py
index 0169439..65831be 100644
--- a/silx/gui/plot/items/roi.py
+++ b/silx/gui/plot/items/roi.py
@@ -73,6 +73,7 @@ class RegionOfInterest(qt.QObject):
self._label = ''
self._labelItem = None
self._editable = False
+ self._visible = True
def __del__(self):
# Clean-up plot items
@@ -176,6 +177,34 @@ class RegionOfInterest(qt.QObject):
# This can be avoided once marker.setDraggable is public
self._createPlotItems()
+ def isVisible(self):
+ """Returns whether the ROI is visible in the plot.
+
+ .. note::
+ This does not take into account whether or not the plot
+ widget itself is visible (unlike :meth:`QWidget.isVisible` which
+ checks the visibility of all its parent widgets up to the window)
+
+ :rtype: bool
+ """
+ return self._visible
+
+ def setVisible(self, visible):
+ """Set whether the plot items associated with this ROI are
+ visible in the plot.
+
+ :param bool visible: True to show the ROI in the plot, False to
+ hide it.
+ """
+ visible = bool(visible)
+ if self._visible == visible:
+ return
+ self._visible = visible
+ if self._labelItem is not None:
+ self._labelItem.setVisible(visible)
+ for item in self._items + self._editAnchors:
+ item.setVisible(visible)
+
def _getControlPoints(self):
"""Returns the current ROI control points.
@@ -292,12 +321,14 @@ class RegionOfInterest(qt.QObject):
if self._labelItem is not None:
self._labelItem._setLegend(legendPrefix + "label")
plot._add(self._labelItem)
+ self._labelItem.setVisible(self.isVisible())
self._items = WeakList()
plotItems = self._createShapeItems(controlPoints)
for item in plotItems:
item._setLegend(legendPrefix + str(itemIndex))
plot._add(item)
+ item.setVisible(self.isVisible())
self._items.append(item)
itemIndex += 1
@@ -309,6 +340,7 @@ class RegionOfInterest(qt.QObject):
for index, item in enumerate(plotItems):
item._setLegend(legendPrefix + str(itemIndex))
item.setColor(color)
+ item.setVisible(self.isVisible())
plot._add(item)
item.sigItemChanged.connect(functools.partial(
self._controlPointAnchorChanged, index))
@@ -512,10 +544,10 @@ class LineROI(RegionOfInterest, items.LineMixIn):
return controlPoints
def setEndPoints(self, startPoint, endPoint):
- """Set this line location using the endding points
+ """Set this line location using the ending points
:param numpy.ndarray startPoint: Staring bounding point of the line
- :param numpy.ndarray endPoint: Endding bounding point of the line
+ :param numpy.ndarray endPoint: Ending bounding point of the line
"""
assert(startPoint.shape == (2,) and endPoint.shape == (2,))
shapePoints = numpy.array([startPoint, endPoint])
@@ -1261,13 +1293,13 @@ class ArcROI(RegionOfInterest, items.LineMixIn):
def getGeometry(self):
"""Returns a tuple containing the geometry of this ROI
- It is a symetric fonction of :meth:`setGeometry`.
+ It is a symmetric function of :meth:`setGeometry`.
If `startAngle` is smaller than `endAngle` the rotation is clockwise,
else the rotation is anticlockwise.
:rtype: Tuple[numpy.ndarray,float,float,float,float]
- :raise ValueError: In case the ROI can't be representaed as section of
+ :raise ValueError: In case the ROI can't be represented as section of
a circle
"""
geometry = self._getInternalGeometry()
diff --git a/silx/gui/plot/items/scatter.py b/silx/gui/plot/items/scatter.py
index 707dd3d..b2f087b 100644
--- a/silx/gui/plot/items/scatter.py
+++ b/silx/gui/plot/items/scatter.py
@@ -31,26 +31,79 @@ __date__ = "29/03/2017"
import logging
-
+import threading
import numpy
-from .core import Points, ColormapMixIn
+from collections import defaultdict
+from concurrent.futures import ThreadPoolExecutor, CancelledError
+
+from ....utils.weakref import WeakList
+from .._utils.delaunay import delaunay
+from .core import PointsBase, ColormapMixIn, ScatterVisualizationMixIn
+from .axis import Axis
_logger = logging.getLogger(__name__)
-class Scatter(Points, ColormapMixIn):
+class _GreedyThreadPoolExecutor(ThreadPoolExecutor):
+ """:class:`ThreadPoolExecutor` with an extra :meth:`submit_greedy` method.
+ """
+
+ def __init__(self, *args, **kwargs):
+ super(_GreedyThreadPoolExecutor, self).__init__(*args, **kwargs)
+ self.__futures = defaultdict(WeakList)
+ self.__lock = threading.RLock()
+
+ def submit_greedy(self, queue, fn, *args, **kwargs):
+ """Same as :meth:`submit` but cancel previous tasks in given queue.
+
+ This means that when a new task is submitted for a given queue,
+ all other pending tasks of that queue are cancelled.
+
+ :param queue: Identifier of the queue. This must be hashable.
+ :param callable fn: The callable to call with provided extra arguments
+ :return: Future corresponding to this task
+ :rtype: concurrent.futures.Future
+ """
+ with self.__lock:
+ # Cancel previous tasks in given queue
+ for future in self.__futures.pop(queue, []):
+ if not future.done():
+ future.cancel()
+
+ future = super(_GreedyThreadPoolExecutor, self).submit(
+ fn, *args, **kwargs)
+ self.__futures[queue].append(future)
+
+ return future
+
+
+class Scatter(PointsBase, ColormapMixIn, ScatterVisualizationMixIn):
"""Description of a scatter"""
_DEFAULT_SELECTABLE = True
"""Default selectable state for scatter plots"""
+ _SUPPORTED_SCATTER_VISUALIZATION = (
+ ScatterVisualizationMixIn.Visualization.POINTS,
+ ScatterVisualizationMixIn.Visualization.SOLID)
+ """Overrides supported Visualizations"""
+
def __init__(self):
- Points.__init__(self)
+ PointsBase.__init__(self)
ColormapMixIn.__init__(self)
+ ScatterVisualizationMixIn.__init__(self)
self._value = ()
self.__alpha = None
+ # Cache Delaunay triangulation future object
+ self.__delaunayFuture = None
+ # Cache interpolator future object
+ self.__interpolatorFuture = None
+ self.__executor = None
+
+ # Cache triangles: x, y, indices
+ self.__cacheTriangles = None, None, None
def _addBackendRenderer(self, backend):
"""Update backend renderer"""
@@ -58,28 +111,154 @@ class Scatter(Points, ColormapMixIn):
xFiltered, yFiltered, valueFiltered, xerror, yerror = self.getData(
copy=False, displayed=True)
+ # Remove not finite numbers (this includes filtered out x, y <= 0)
+ mask = numpy.logical_and(numpy.isfinite(xFiltered), numpy.isfinite(yFiltered))
+ xFiltered = xFiltered[mask]
+ yFiltered = yFiltered[mask]
+
if len(xFiltered) == 0:
return None # No data to display, do not add renderer to backend
+ # Compute colors
cmap = self.getColormap()
rgbacolors = cmap.applyToData(self._value)
if self.__alpha is not None:
rgbacolors[:, -1] = (rgbacolors[:, -1] * self.__alpha).astype(numpy.uint8)
- return backend.addCurve(xFiltered, yFiltered, self.getLegend(),
- color=rgbacolors,
- symbol=self.getSymbol(),
- linewidth=0,
- linestyle="",
- yaxis='left',
- xerror=xerror,
- yerror=yerror,
- z=self.getZValue(),
- selectable=self.isSelectable(),
- fill=False,
- alpha=self.getAlpha(),
- symbolsize=self.getSymbolSize())
+ # Apply mask to colors
+ rgbacolors = rgbacolors[mask]
+
+ if self.getVisualization() is self.Visualization.POINTS:
+ return backend.addCurve(xFiltered, yFiltered, self.getLegend(),
+ color=rgbacolors,
+ symbol=self.getSymbol(),
+ linewidth=0,
+ linestyle="",
+ yaxis='left',
+ xerror=xerror,
+ yerror=yerror,
+ z=self.getZValue(),
+ selectable=self.isSelectable(),
+ fill=False,
+ alpha=self.getAlpha(),
+ symbolsize=self.getSymbolSize())
+
+ else: # 'solid'
+ plot = self.getPlot()
+ if (plot is None or
+ plot.getXAxis().getScale() != Axis.LINEAR or
+ plot.getYAxis().getScale() != Axis.LINEAR):
+ # Solid visualization is not available with log scaled axes
+ return None
+
+ triangulation = self._getDelaunay().result()
+ if triangulation is None:
+ return None
+ else:
+ triangles = triangulation.simplices.astype(numpy.int32)
+ return backend.addTriangles(xFiltered,
+ yFiltered,
+ triangles,
+ legend=self.getLegend(),
+ color=rgbacolors,
+ z=self.getZValue(),
+ selectable=self.isSelectable(),
+ alpha=self.getAlpha())
+
+ def __getExecutor(self):
+ """Returns async greedy executor
+
+ :rtype: _GreedyThreadPoolExecutor
+ """
+ if self.__executor is None:
+ self.__executor = _GreedyThreadPoolExecutor(max_workers=2)
+ return self.__executor
+
+ def _getDelaunay(self):
+ """Returns a :class:`Future` which result is the Delaunay object.
+
+ :rtype: concurrent.futures.Future
+ """
+ if self.__delaunayFuture is None or self.__delaunayFuture.cancelled():
+ # Need to init a new delaunay
+ x, y = self.getData(copy=False)[:2]
+ # Remove not finite points
+ mask = numpy.logical_and(numpy.isfinite(x), numpy.isfinite(y))
+
+ self.__delaunayFuture = self.__getExecutor().submit_greedy(
+ 'delaunay', delaunay, x[mask], y[mask])
+
+ return self.__delaunayFuture
+
+ @staticmethod
+ def __initInterpolator(delaunayFuture, values):
+ """Returns an interpolator for the given data points
+
+ :param concurrent.futures.Future delaunayFuture:
+ Future object which result is a Delaunay object
+ :param numpy.ndarray values: The data value of valid points.
+ :rtype: Union[callable,None]
+ """
+ # Wait for Delaunay to complete
+ try:
+ triangulation = delaunayFuture.result()
+ except CancelledError:
+ triangulation = None
+
+ if triangulation is None:
+ interpolator = None # Error case
+ else:
+ # Lazy-loading of interpolator
+ try:
+ from scipy.interpolate import LinearNDInterpolator
+ except ImportError:
+ LinearNDInterpolator = None
+
+ if LinearNDInterpolator is not None:
+ interpolator = LinearNDInterpolator(triangulation, values)
+
+ # First call takes a while, do it here
+ interpolator([(0., 0.)])
+
+ else:
+ # Fallback using matplotlib interpolator
+ import matplotlib.tri
+
+ x, y = triangulation.points.T
+ tri = matplotlib.tri.Triangulation(
+ x, y, triangles=triangulation.simplices)
+ mplInterpolator = matplotlib.tri.LinearTriInterpolator(
+ tri, values)
+
+ # Wrap interpolator to have same API as scipy's one
+ def interpolator(points):
+ return mplInterpolator(*points.T)
+
+ return interpolator
+
+ def _getInterpolator(self):
+ """Returns a :class:`Future` which result is the interpolator.
+
+ The interpolator is a callable taking an array Nx2 of points
+ as a single argument.
+ The :class:`Future` result is None in case the interpolator cannot
+ be initialized.
+
+ :rtype: concurrent.futures.Future
+ """
+ if (self.__interpolatorFuture is None or
+ self.__interpolatorFuture.cancelled()):
+ # Need to init a new interpolator
+ x, y, values = self.getData(copy=False)[:3]
+ # Remove not finite points
+ mask = numpy.logical_and(numpy.isfinite(x), numpy.isfinite(y))
+ x, y, values = x[mask], y[mask], values[mask]
+
+ self.__interpolatorFuture = self.__getExecutor().submit_greedy(
+ 'interpolator',
+ self.__initInterpolator, self._getDelaunay(), values)
+ return self.__interpolatorFuture
def _logFilterData(self, xPositive, yPositive):
"""Filter out values with x or y <= 0 on log axes
@@ -89,7 +268,7 @@ class Scatter(Points, ColormapMixIn):
:return: The filtered arrays or unchanged object if not filtering needed
:rtype: (x, y, value, xerror, yerror)
"""
- # overloaded from Points to filter also value.
+ # overloaded from PointsBase to filter also value.
value = self.getValueData(copy=False)
if xPositive or yPositive:
@@ -100,7 +279,7 @@ class Scatter(Points, ColormapMixIn):
value = numpy.array(value, copy=True, dtype=numpy.float)
value[clipped] = numpy.nan
- x, y, xerror, yerror = Points._logFilterData(self, xPositive, yPositive)
+ x, y, xerror, yerror = PointsBase._logFilterData(self, xPositive, yPositive)
return x, y, value, xerror, yerror
@@ -146,7 +325,7 @@ class Scatter(Points, ColormapMixIn):
self.getXErrorData(copy),
self.getYErrorData(copy))
- # reimplemented from Points to handle `value`
+ # reimplemented from PointsBase to handle `value`
def setData(self, x, y, value, xerror=None, yerror=None, alpha=None, copy=True):
"""Set the data of the scatter.
@@ -171,6 +350,14 @@ class Scatter(Points, ColormapMixIn):
assert value.ndim == 1
assert len(x) == len(value)
+ # Reset triangulation and interpolator
+ if self.__delaunayFuture is not None:
+ self.__delaunayFuture.cancel()
+ self.__delaunayFuture = None
+ if self.__interpolatorFuture is not None:
+ self.__interpolatorFuture.cancel()
+ self.__interpolatorFuture = None
+
self._value = value
if alpha is not None:
@@ -183,8 +370,8 @@ class Scatter(Points, ColormapMixIn):
if numpy.any(numpy.logical_or(alpha < 0., alpha > 1.)):
alpha = numpy.clip(alpha, 0., 1.)
self.__alpha = alpha
-
+
# set x, y, xerror, yerror
# call self._updated + plot._invalidateDataRange()
- Points.setData(self, x, y, xerror, yerror, copy)
+ PointsBase.setData(self, x, y, xerror, yerror, copy)
diff --git a/silx/gui/plot/matplotlib/__init__.py b/silx/gui/plot/matplotlib/__init__.py
index a4dc235..7298866 100644
--- a/silx/gui/plot/matplotlib/__init__.py
+++ b/silx/gui/plot/matplotlib/__init__.py
@@ -1,7 +1,7 @@
# coding: utf-8
# /*##########################################################################
#
-# Copyright (c) 2016-2017 European Synchrotron Radiation Facility
+# Copyright (c) 2016-2019 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -25,7 +25,7 @@
from __future__ import absolute_import
-"""This module inits matplotlib and setups the backend to use.
+"""This module initializes matplotlib and sets-up the backend to use.
It MUST be imported prior to any other import of matplotlib.
@@ -38,64 +38,34 @@ __license__ = "MIT"
__date__ = "02/05/2018"
-import sys
-import logging
+from pkg_resources import parse_version
+import matplotlib
+from ... import qt
-_logger = logging.getLogger(__name__)
-_matplotlib_already_loaded = 'matplotlib' in sys.modules
-"""If true, matplotlib was already loaded"""
+def _matplotlib_use(backend, warn, force):
+ """Wrapper of `matplotlib.use` to set-up backend.
-import matplotlib
-from ... import qt
+ It adds extra initialization for PySide and PySide2 with matplotlib < 2.2.
+ """
+ # This is kept for compatibility with matplotlib < 2.2
+ if parse_version(matplotlib.__version__) < parse_version('2.2'):
+ if qt.BINDING == 'PySide':
+ matplotlib.rcParams['backend.qt4'] = 'PySide'
+ if qt.BINDING == 'PySide2':
+ matplotlib.rcParams['backend.qt5'] = 'PySide2'
+ matplotlib.use(backend, warn=warn, force=force)
-def _configure(backend, backend_qt4=None, backend_qt5=None, check=False):
- """Configure matplotlib using a specific backend.
- It initialize `matplotlib.rcParams` using the requested backend, or check
- if it is already configured as requested.
+if qt.BINDING in ('PyQt4', 'PySide'):
+ _matplotlib_use('Qt4Agg', warn=True, force=False)
+ from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg # noqa
- :param bool check: If true, the function only check that matplotlib
- is already initialized as request. If not a warning is emitted.
- If `check` is false, matplotlib is initialized.
- """
- if check:
- valid = matplotlib.rcParams['backend'] == backend
- if backend_qt4 is not None:
- valid = valid and matplotlib.rcParams['backend.qt4'] == backend_qt4
- if backend_qt5 is not None:
- valid = valid and matplotlib.rcParams['backend.qt5'] == backend_qt5
-
- if not valid:
- _logger.warning('matplotlib already loaded, setting its backend may not work')
- else:
- matplotlib.rcParams['backend'] = backend
- if backend_qt4 is not None:
- matplotlib.rcParams['backend.qt4'] = backend_qt4
- if backend_qt5 is not None:
- matplotlib.rcParams['backend.qt5'] = backend_qt5
-
-
-if qt.BINDING == 'PySide':
- _configure('Qt4Agg', backend_qt4='PySide', check=_matplotlib_already_loaded)
- import matplotlib.backends.backend_qt4agg as backend
-
-elif qt.BINDING == 'PyQt4':
- _configure('Qt4Agg', check=_matplotlib_already_loaded)
- import matplotlib.backends.backend_qt4agg as backend
-
-elif qt.BINDING == 'PySide2':
- _configure('Qt5Agg', backend_qt5="PySide2", check=_matplotlib_already_loaded)
- import matplotlib.backends.backend_qt5agg as backend
-
-elif qt.BINDING == 'PyQt5':
- _configure('Qt5Agg', check=_matplotlib_already_loaded)
- import matplotlib.backends.backend_qt5agg as backend
+elif qt.BINDING in ('PyQt5', 'PySide2'):
+ _matplotlib_use('Qt5Agg', warn=True, force=False)
+ from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg # noqa
else:
- backend = None
-
-if backend is not None:
- FigureCanvasQTAgg = backend.FigureCanvasQTAgg # noqa
+ raise ImportError("Unsupported Qt binding: %s" % qt.BINDING)
diff --git a/silx/gui/plot/test/testAlphaSlider.py b/silx/gui/plot/test/testAlphaSlider.py
index 63de441..01e6969 100644
--- a/silx/gui/plot/test/testAlphaSlider.py
+++ b/silx/gui/plot/test/testAlphaSlider.py
@@ -1,7 +1,7 @@
# coding: utf-8
# /*##########################################################################
#
-# Copyright (c) 2017 European Synchrotron Radiation Facility
+# Copyright (c) 2017-2019 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -37,9 +37,6 @@ from silx.gui.utils.testutils import TestCaseQt
from silx.gui.plot import PlotWidget
from silx.gui.plot import AlphaSlider
-# Makes sure a QApplication exists
-_qapp = qt.QApplication.instance() or qt.QApplication([])
-
class TestActiveImageAlphaSlider(TestCaseQt):
def setUp(self):
diff --git a/silx/gui/plot/test/testComplexImageView.py b/silx/gui/plot/test/testComplexImageView.py
index 1933a95..051ec4d 100644
--- a/silx/gui/plot/test/testComplexImageView.py
+++ b/silx/gui/plot/test/testComplexImageView.py
@@ -1,7 +1,7 @@
# coding: utf-8
# /*##########################################################################
#
-# Copyright (c) 2017 European Synchrotron Radiation Facility
+# Copyright (c) 2017-2019 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -63,10 +63,10 @@ class TestComplexImageView(PlotWidgetTestCase, ParametricTestCase):
self.qWait(100)
# Test all modes
- modes = self.plot.getSupportedVisualizationModes()
+ modes = self.plot.supportedComplexModes()
for mode in modes:
with self.subTest(mode=mode):
- self.plot.setVisualizationMode(mode)
+ self.plot.setComplexMode(mode)
self.qWait(100)
# Test origin and scale API
diff --git a/silx/gui/plot/test/testCurvesROIWidget.py b/silx/gui/plot/test/testCurvesROIWidget.py
index 5bcabd8..5886456 100644
--- a/silx/gui/plot/test/testCurvesROIWidget.py
+++ b/silx/gui/plot/test/testCurvesROIWidget.py
@@ -34,11 +34,15 @@ import os.path
import unittest
from collections import OrderedDict
import numpy
+
from silx.gui import qt
+from silx.gui.plot import Plot1D
from silx.test.utils import temp_dir
from silx.gui.utils.testutils import TestCaseQt, SignalListener
from silx.gui.plot import PlotWindow, CurvesROIWidget
-
+from silx.gui.plot.CurvesROIWidget import ROITable
+from silx.gui.utils.testutils import getQToolButtonFromAction
+from silx.gui.plot.PlotInteraction import ItemsInteraction
_logger = logging.getLogger(__name__)
@@ -68,6 +72,18 @@ class TestCurvesROIWidget(TestCaseQt):
super(TestCurvesROIWidget, self).tearDown()
+ def testDummyAPI(self):
+ """Simple test of the getRois and setRois API"""
+ roi_neg = CurvesROIWidget.ROI(name='negative', fromdata=-20,
+ todata=-10, type_='X')
+ roi_pos = CurvesROIWidget.ROI(name='positive', fromdata=10,
+ todata=20, type_='X')
+
+ self.widget.roiWidget.setRois((roi_pos, roi_neg))
+
+ rois_defs = self.widget.roiWidget.getRois()
+ self.widget.roiWidget.setRois(rois=rois_defs)
+
def testWithCurves(self):
"""Plot with curves: test all ROI widget buttons"""
for offset in range(2):
@@ -301,7 +317,7 @@ class TestCurvesROIWidget(TestCaseQt):
self.widget.roiWidget.setRois((roi,))
self.widget.roiWidget.roiTable.setActiveRoi(None)
- self.assertTrue(len(self.widget.roiWidget.roiTable.selectedItems()) is 0)
+ self.assertEqual(len(self.widget.roiWidget.roiTable.selectedItems()), 0)
self.widget.roiWidget.setRois((roi,))
self.plot.setActiveCurve(legend='linearCurve')
self.widget.calculateROIs()
@@ -314,14 +330,128 @@ class TestCurvesROIWidget(TestCaseQt):
self.widget.roiWidget.sigROISignal.connect(signalListener.partial())
self.widget.show()
self.qapp.processEvents()
- self.assertTrue(signalListener.callCount() is 0)
+ self.assertEqual(signalListener.callCount(), 0)
self.assertTrue(self.widget.roiWidget.roiTable.activeRoi is roi)
roi.setFrom(0.0)
self.qapp.processEvents()
- self.assertTrue(signalListener.callCount() is 0)
+ self.assertEqual(signalListener.callCount(), 0)
roi.setFrom(0.3)
self.qapp.processEvents()
- self.assertTrue(signalListener.callCount() is 1)
+ self.assertEqual(signalListener.callCount(), 1)
+
+
+class TestRoiWidgetSignals(TestCaseQt):
+ """Test Signals emitted by the RoiWidgetSignals"""
+
+ def setUp(self):
+ self.plot = Plot1D()
+ x = range(20)
+ y = range(20)
+ self.plot.addCurve(x, y, legend='curve0')
+ self.listener = SignalListener()
+ self.curves_roi_widget = self.plot.getCurvesRoiWidget()
+ self.curves_roi_widget.sigROISignal.connect(self.listener)
+ assert self.curves_roi_widget.isVisible() is False
+ assert self.listener.callCount() == 0
+ self.plot.show()
+ self.qWaitForWindowExposed(self.plot)
+
+ toolButton = getQToolButtonFromAction(self.plot.getRoiAction())
+ self.mouseClick(widget=toolButton, button=qt.Qt.LeftButton)
+
+ self.curves_roi_widget.show()
+ self.qWaitForWindowExposed(self.curves_roi_widget)
+
+ def tearDown(self):
+ self.plot = None
+
+ def testSigROISignalAddRmRois(self):
+ """Test SigROISignal when adding and removing ROIS"""
+ print(self.listener.callCount())
+ self.assertEqual(self.listener.callCount(), 1)
+ self.listener.clear()
+
+ roi1 = CurvesROIWidget.ROI(name='linear', fromdata=0, todata=5)
+ self.curves_roi_widget.roiTable.addRoi(roi1)
+ self.assertEqual(self.listener.callCount(), 1)
+ self.assertTrue(self.listener.arguments()[0][0]['current'] == 'linear')
+ self.listener.clear()
+
+ roi2 = CurvesROIWidget.ROI(name='linear2', fromdata=0, todata=5)
+ self.curves_roi_widget.roiTable.addRoi(roi2)
+ self.assertEqual(self.listener.callCount(), 1)
+ self.assertTrue(self.listener.arguments()[0][0]['current'] == 'linear2')
+ self.listener.clear()
+
+ self.curves_roi_widget.roiTable.removeROI(roi2)
+ self.assertEqual(self.listener.callCount(), 1)
+ self.assertTrue(self.curves_roi_widget.roiTable.activeRoi == roi1)
+ self.assertTrue(self.listener.arguments()[0][0]['current'] == 'linear')
+ self.listener.clear()
+
+ self.curves_roi_widget.roiTable.deleteActiveRoi()
+ self.assertEqual(self.listener.callCount(), 1)
+ self.assertTrue(self.curves_roi_widget.roiTable.activeRoi is None)
+ self.assertTrue(self.listener.arguments()[0][0]['current'] is None)
+ self.listener.clear()
+
+ self.curves_roi_widget.roiTable.addRoi(roi1)
+ self.assertEqual(self.listener.callCount(), 1)
+ self.assertTrue(self.listener.arguments()[0][0]['current'] == 'linear')
+ self.assertTrue(self.curves_roi_widget.roiTable.activeRoi == roi1)
+ self.listener.clear()
+ self.qapp.processEvents()
+
+ self.curves_roi_widget.roiTable.removeROI(roi1)
+ self.qapp.processEvents()
+ self.assertEqual(self.listener.callCount(), 1)
+ self.assertTrue(self.listener.arguments()[0][0]['current'] == 'ICR')
+ self.listener.clear()
+
+ def testSigROISignalModifyROI(self):
+ """Test SigROISignal when modifying it"""
+ self.curves_roi_widget.roiTable.setMiddleROIMarkerFlag(True)
+ roi1 = CurvesROIWidget.ROI(name='linear', fromdata=2, todata=5)
+ self.curves_roi_widget.roiTable.addRoi(roi1)
+ self.curves_roi_widget.roiTable.setActiveRoi(roi1)
+
+ # test modify the roi2 object
+ self.listener.clear()
+ roi1.setFrom(0.56)
+ self.assertEqual(self.listener.callCount(), 1)
+ self.listener.clear()
+ roi1.setTo(2.56)
+ self.assertEqual(self.listener.callCount(), 1)
+ self.listener.clear()
+ roi1.setName('linear2')
+ self.assertEqual(self.listener.callCount(), 1)
+ self.listener.clear()
+ roi1.setType('new type')
+ self.assertEqual(self.listener.callCount(), 1)
+
+ # modify roi limits (from the gui)
+ roi_marker_handler = self.curves_roi_widget.roiTable._markersHandler.getMarkerHandler(roi1.getID())
+ for marker_type in ('min', 'max', 'middle'):
+ with self.subTest(marker_type=marker_type):
+ self.listener.clear()
+ marker = roi_marker_handler.getMarker(marker_type)
+ self.qapp.processEvents()
+ items_interaction = ItemsInteraction(plot=self.plot)
+ x_pix, y_pix = self.plot.dataToPixel(marker.getXPosition(), 1)
+ items_interaction.beginDrag(x_pix, y_pix)
+ self.qapp.processEvents()
+ items_interaction.endDrag(x_pix+10, y_pix)
+ self.qapp.processEvents()
+ self.assertEqual(self.listener.callCount(), 1)
+
+ def testSetActiveCurve(self):
+ """Test sigRoiSignal when set an active curve"""
+ roi1 = CurvesROIWidget.ROI(name='linear', fromdata=2, todata=5)
+ self.curves_roi_widget.roiTable.addRoi(roi1)
+ self.curves_roi_widget.roiTable.setActiveRoi(roi1)
+ self.listener.clear()
+ self.plot.setActiveCurve('curve0')
+ self.assertEqual(self.listener.callCount(), 0)
def suite():
diff --git a/silx/gui/plot/test/testItem.py b/silx/gui/plot/test/testItem.py
index 993cce7..c864545 100644
--- a/silx/gui/plot/test/testItem.py
+++ b/silx/gui/plot/test/testItem.py
@@ -1,7 +1,7 @@
# coding: utf-8
# /*##########################################################################
#
-# Copyright (c) 2017 European Synchrotron Radiation Facility
+# Copyright (c) 2017-2019 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -54,7 +54,7 @@ class TestSigItemChangedSignal(PlotWidgetTestCase):
curve.setVisible(True)
curve.setZValue(100)
- # Test for signals in Points class
+ # Test for signals in PointsBase class
curve.setData(numpy.arange(100), numpy.arange(100))
# SymbolMixIn
@@ -194,14 +194,17 @@ class TestSigItemChangedSignal(PlotWidgetTestCase):
# ColormapMixIn
scatter.getColormap().setName('viridis')
- data2 = data + 10
# Test of signals in Scatter class
- scatter.setData(data2, data2, data2)
+ scatter.setData((0, 1, 2), (1, 0, 2), (0, 1, 2))
+
+ # Visualization mode changed
+ scatter.setVisualization(scatter.Visualization.SOLID)
self.assertEqual(listener.arguments(),
[(ItemChangedType.COLORMAP,),
- (ItemChangedType.DATA,)])
+ (ItemChangedType.DATA,),
+ (ItemChangedType.VISUALIZATION_MODE,)])
def testShapeChanged(self):
"""Test sigItemChanged for shape"""
diff --git a/silx/gui/plot/test/testPlotWidget.py b/silx/gui/plot/test/testPlotWidget.py
index 9d7c093..7449c12 100644
--- a/silx/gui/plot/test/testPlotWidget.py
+++ b/silx/gui/plot/test/testPlotWidget.py
@@ -386,6 +386,16 @@ class TestPlotImage(PlotWidgetTestCase, ParametricTestCase):
self.assertTrue(numpy.all(numpy.equal(retrievedData, data)))
self.assertIs(retrievedData.dtype.type, numpy.int8)
+ def testPlotAlphaImage(self):
+ """Test with an alpha image layer"""
+ data = numpy.random.random((10, 10))
+ alpha = numpy.linspace(0, 1, 100).reshape(10, 10)
+ self.plot.addImage(data, legend='image')
+ image = self.plot.getActiveImage()
+ image.setData(data, alpha=alpha)
+ self.qapp.processEvents()
+ self.assertTrue(numpy.array_equal(alpha, image.getAlphaData()))
+
class TestPlotCurve(PlotWidgetTestCase):
"""Basic tests for addCurve."""
@@ -463,7 +473,34 @@ class TestPlotCurve(PlotWidgetTestCase):
self.plot.addCurve(self.xData, self.yData,
legend="curve 2",
replace=False, resetzoom=False,
- color=color, symbol='o')
+ color=color, symbol='o')
+
+
+class TestPlotScatter(PlotWidgetTestCase, ParametricTestCase):
+ """Basic tests for addScatter"""
+
+ def testScatter(self):
+ x = numpy.arange(100)
+ y = numpy.arange(100)
+ value = numpy.arange(100)
+ self.plot.addScatter(x, y, value)
+ self.plot.resetZoom()
+
+ def testScatterVisualization(self):
+ self.plot.addScatter((0, 1, 2, 3), (2, 0, 2, 1), (0, 1, 2, 3))
+ self.plot.resetZoom()
+ self.qapp.processEvents()
+
+ scatter = self.plot.getItems()[0]
+
+ for visualization in ('solid',
+ 'points',
+ scatter.Visualization.SOLID,
+ scatter.Visualization.POINTS):
+ with self.subTest(visualization=visualization):
+ scatter.setVisualization(visualization)
+ self.qapp.processEvents()
+
class TestPlotMarker(PlotWidgetTestCase):
"""Basic tests for add*Marker"""
@@ -1524,11 +1561,19 @@ class TestPlotItemLog(PlotWidgetTestCase):
def suite():
- testClasses = (TestPlotWidget, TestPlotImage, TestPlotCurve,
- TestPlotMarker, TestPlotItem, TestPlotAxes,
+ testClasses = (TestPlotWidget,
+ TestPlotImage,
+ TestPlotCurve,
+ TestPlotScatter,
+ TestPlotMarker,
+ TestPlotItem,
+ TestPlotAxes,
TestPlotActiveCurveImage,
- TestPlotEmptyLog, TestPlotCurveLog, TestPlotImageLog,
- TestPlotMarkerLog, TestPlotItemLog)
+ TestPlotEmptyLog,
+ TestPlotCurveLog,
+ TestPlotImageLog,
+ TestPlotMarkerLog,
+ TestPlotItemLog)
test_suite = unittest.TestSuite()
diff --git a/silx/gui/plot/test/testPlotWindow.py b/silx/gui/plot/test/testPlotWindow.py
index 6d3eb8f..0a7d108 100644
--- a/silx/gui/plot/test/testPlotWindow.py
+++ b/silx/gui/plot/test/testPlotWindow.py
@@ -1,7 +1,7 @@
# coding: utf-8
# /*##########################################################################
#
-# Copyright (c) 2016 European Synchrotron Radiation Facility
+# Copyright (c) 2016-2019 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -38,32 +38,6 @@ from silx.gui import qt
from silx.gui.plot import PlotWindow
-# Test of the docstrings #
-
-# Makes sure a QApplication exists
-_qapp = qt.QApplication.instance() or qt.QApplication([])
-
-
-def _tearDownQt(docTest):
- """Tear down to use for test from docstring.
-
- Checks that plt widget is displayed
- """
- _qapp.processEvents()
- for obj in docTest.globs.values():
- if isinstance(obj, PlotWindow):
- # Commented out as it takes too long
- # qWaitForWindowExposedAndActivate(obj)
- obj.setAttribute(qt.Qt.WA_DeleteOnClose)
- obj.close()
- del obj
-
-
-plotWindowDocTestSuite = doctest.DocTestSuite('silx.gui.plot.PlotWindow',
- tearDown=_tearDownQt)
-"""Test suite of tests from the module's docstrings."""
-
-
class TestPlotWindow(TestCaseQt):
"""Base class for tests of PlotWindow."""
@@ -128,7 +102,6 @@ class TestPlotWindow(TestCaseQt):
def suite():
test_suite = unittest.TestSuite()
- test_suite.addTest(plotWindowDocTestSuite)
test_suite.addTest(
unittest.defaultTestLoader.loadTestsFromTestCase(TestPlotWindow))
return test_suite
diff --git a/silx/gui/plot/test/testProfile.py b/silx/gui/plot/test/testProfile.py
index 847f404..cf40f76 100644
--- a/silx/gui/plot/test/testProfile.py
+++ b/silx/gui/plot/test/testProfile.py
@@ -1,7 +1,7 @@
# coding: utf-8
# /*##########################################################################
#
-# Copyright (c) 2016-2017 European Synchrotron Radiation Facility
+# Copyright (c) 2016-2019 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -39,10 +39,6 @@ from silx.gui.plot import PlotWindow, Plot1D, Plot2D, Profile
from silx.gui.plot.StackView import StackView
-# Makes sure a QApplication exists
-_qapp = qt.QApplication.instance() or qt.QApplication([])
-
-
class TestProfileToolBar(TestCaseQt, ParametricTestCase):
"""Tests for ProfileToolBar widget."""
diff --git a/silx/gui/plot/test/testStackView.py b/silx/gui/plot/test/testStackView.py
index a5f649c..80c85d6 100644
--- a/silx/gui/plot/test/testStackView.py
+++ b/silx/gui/plot/test/testStackView.py
@@ -1,7 +1,7 @@
# coding: utf-8
# /*##########################################################################
#
-# Copyright (c) 2016-2018 European Synchrotron Radiation Facility
+# Copyright (c) 2016-2019 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -41,10 +41,6 @@ from silx.gui.plot.StackView import StackViewMainWindow
from silx.utils.array_like import ListOfImages
-# Makes sure a QApplication exists
-_qapp = qt.QApplication.instance() or qt.QApplication([])
-
-
class TestStackView(TestCaseQt):
"""Base class for tests of StackView."""
diff --git a/silx/gui/plot/test/testStats.py b/silx/gui/plot/test/testStats.py
index 7fbc247..4bc2144 100644
--- a/silx/gui/plot/test/testStats.py
+++ b/silx/gui/plot/test/testStats.py
@@ -33,8 +33,9 @@ from silx.gui import qt
from silx.gui.plot.stats import stats
from silx.gui.plot import StatsWidget
from silx.gui.plot.stats import statshandler
-from silx.gui.utils.testutils import TestCaseQt
+from silx.gui.utils.testutils import TestCaseQt, SignalListener
from silx.gui.plot import Plot1D, Plot2D
+from silx.utils.testutils import ParametricTestCase
import unittest
import logging
import numpy
@@ -350,7 +351,7 @@ class TestStatsHandler(unittest.TestCase):
statshandler.StatsHandler(('name'))
-class TestStatsWidgetWithCurves(TestCaseQt):
+class TestStatsWidgetWithCurves(TestCaseQt, ParametricTestCase):
"""Basic test for StatsWidget with curves"""
def setUp(self):
TestCaseQt.setUp(self)
@@ -363,7 +364,8 @@ class TestStatsWidgetWithCurves(TestCaseQt):
self.plot.addCurve(x, y, legend='curve1')
y = range(-2, 18)
self.plot.addCurve(x, y, legend='curve2')
- self.widget = StatsWidget.StatsTable(plot=self.plot)
+ self.widget = StatsWidget.StatsWidget(plot=self.plot)
+ self.statsTable = self.widget._statsTable
mystats = statshandler.StatsHandler((
stats.StatMin(),
@@ -376,67 +378,170 @@ class TestStatsWidgetWithCurves(TestCaseQt):
stats.StatCOM()
))
- self.widget.setStats(mystats)
+ self.statsTable.setStats(mystats)
def tearDown(self):
self.plot.setAttribute(qt.Qt.WA_DeleteOnClose)
self.plot.close()
+ self.statsTable = None
self.widget.setAttribute(qt.Qt.WA_DeleteOnClose)
self.widget.close()
self.widget = None
self.plot = None
TestCaseQt.tearDown(self)
+ def testDisplayActiveItemsSyncOptions(self):
+ """
+ Test that the several option of the sync options are well
+ synchronized between the different object"""
+ widget = StatsWidget.StatsWidget(plot=self.plot)
+ table = StatsWidget.StatsTable(plot=self.plot)
+
+ def check_display_only_active_item(only_active):
+ # check internal value
+ self.assertTrue(widget._statsTable._displayOnlyActItem is only_active)
+ # self.assertTrue(table._displayOnlyActItem is only_active)
+ # check gui display
+ self.assertTrue(widget._options.isActiveItemMode() is only_active)
+
+ for displayOnlyActiveItems in (True, False):
+ with self.subTest(displayOnlyActiveItems=displayOnlyActiveItems):
+ widget.setDisplayOnlyActiveItem(displayOnlyActiveItems)
+ # table.setDisplayOnlyActiveItem(displayOnlyActiveItems)
+ check_display_only_active_item(displayOnlyActiveItems)
+
+ check_display_only_active_item(only_active=False)
+ widget.setAttribute(qt.Qt.WA_DeleteOnClose)
+ table.setAttribute(qt.Qt.WA_DeleteOnClose)
+ widget.close()
+ table.close()
+
def testInit(self):
"""Make sure all the curves are registred on initialization"""
- self.assertEqual(self.widget.rowCount(), 3)
+ self.assertEqual(self.statsTable.rowCount(), 3)
def testRemoveCurve(self):
"""Make sure the Curves stats take into account the curve removal from
plot"""
self.plot.removeCurve('curve2')
- self.assertEqual(self.widget.rowCount(), 2)
+ self.assertEqual(self.statsTable.rowCount(), 2)
for iRow in range(2):
- self.assertTrue(self.widget.item(iRow, 0).text() in ('curve0', 'curve1'))
+ self.assertTrue(self.statsTable.item(iRow, 0).text() in ('curve0', 'curve1'))
self.plot.removeCurve('curve0')
- self.assertEqual(self.widget.rowCount(), 1)
+ self.assertEqual(self.statsTable.rowCount(), 1)
self.plot.removeCurve('curve1')
- self.assertEqual(self.widget.rowCount(), 0)
+ self.assertEqual(self.statsTable.rowCount(), 0)
def testAddCurve(self):
"""Make sure the Curves stats take into account the add curve action"""
self.plot.addCurve(legend='curve3', x=range(10), y=range(10))
- self.assertEqual(self.widget.rowCount(), 4)
+ self.assertEqual(self.statsTable.rowCount(), 4)
def testUpdateCurveFromAddCurve(self):
"""Make sure the stats of the cuve will be removed after updating a
curve"""
self.plot.addCurve(legend='curve0', x=range(10), y=range(10))
self.qapp.processEvents()
- self.assertEqual(self.widget.rowCount(), 3)
+ self.assertEqual(self.statsTable.rowCount(), 3)
curve = self.plot._getItem(kind='curve', legend='curve0')
- tableItems = self.widget._itemToTableItems(curve)
+ tableItems = self.statsTable._itemToTableItems(curve)
self.assertEqual(tableItems['max'].text(), '9')
def testUpdateCurveFromCurveObj(self):
self.plot.getCurve('curve0').setData(x=range(4), y=range(4))
self.qapp.processEvents()
- self.assertEqual(self.widget.rowCount(), 3)
+ self.assertEqual(self.statsTable.rowCount(), 3)
curve = self.plot._getItem(kind='curve', legend='curve0')
- tableItems = self.widget._itemToTableItems(curve)
+ tableItems = self.statsTable._itemToTableItems(curve)
self.assertEqual(tableItems['max'].text(), '3')
def testSetAnotherPlot(self):
plot2 = Plot1D()
plot2.addCurve(x=range(26), y=range(26), legend='new curve')
- self.widget.setPlot(plot2)
- self.assertEqual(self.widget.rowCount(), 1)
+ self.statsTable.setPlot(plot2)
+ self.assertEqual(self.statsTable.rowCount(), 1)
self.qapp.processEvents()
plot2.setAttribute(qt.Qt.WA_DeleteOnClose)
plot2.close()
plot2 = None
+ def testUpdateMode(self):
+ """Make sure the update modes are well take into account"""
+ self.plot.setActiveCurve('curve0')
+ for display_only_active in (True, False):
+ with self.subTest(display_only_active=display_only_active):
+ self.widget.setDisplayOnlyActiveItem(display_only_active)
+ self.plot.getCurve('curve0').setData(x=range(4), y=range(4))
+ self.widget.setUpdateMode(StatsWidget.UpdateMode.AUTO)
+ update_stats_action = self.widget._options.getUpdateStatsAction()
+ # test from api
+ self.assertTrue(self.widget.getUpdateMode() is StatsWidget.UpdateMode.AUTO)
+ self.widget.show()
+ # check stats change in auto mode
+ self.plot.getCurve('curve0').setData(x=range(4), y=range(-1, 3))
+ self.qapp.processEvents()
+ tableItems = self.statsTable._itemToTableItems(self.plot.getCurve('curve0'))
+ curve0_min = tableItems['min'].text()
+ print(curve0_min)
+ self.assertTrue(float(curve0_min) == -1.)
+
+ self.plot.getCurve('curve0').setData(x=range(4), y=range(1, 5))
+ self.qapp.processEvents()
+ tableItems = self.statsTable._itemToTableItems(self.plot.getCurve('curve0'))
+ curve0_min = tableItems['min'].text()
+ self.assertTrue(float(curve0_min) == 1.)
+
+ # check stats change in manual mode only if requested
+ self.widget.setUpdateMode(StatsWidget.UpdateMode.MANUAL)
+ self.assertTrue(self.widget.getUpdateMode() is StatsWidget.UpdateMode.MANUAL)
+
+ self.plot.getCurve('curve0').setData(x=range(4), y=range(2, 6))
+ self.qapp.processEvents()
+ tableItems = self.statsTable._itemToTableItems(self.plot.getCurve('curve0'))
+ curve0_min = tableItems['min'].text()
+ self.assertTrue(float(curve0_min) == 1.)
+
+ update_stats_action.trigger()
+ tableItems = self.statsTable._itemToTableItems(self.plot.getCurve('curve0'))
+ curve0_min = tableItems['min'].text()
+ self.assertTrue(float(curve0_min) == 2.)
+
+ def testItemHidden(self):
+ """Test if an item is hide, then the associated stats item is also
+ hide"""
+ curve0 = self.plot.getCurve('curve0')
+ curve1 = self.plot.getCurve('curve1')
+ curve2 = self.plot.getCurve('curve2')
+
+ self.plot.show()
+ self.widget.show()
+ self.qWaitForWindowExposed(self.widget)
+ self.assertFalse(self.statsTable.isRowHidden(0))
+ self.assertFalse(self.statsTable.isRowHidden(1))
+ self.assertFalse(self.statsTable.isRowHidden(2))
+
+ curve0.setVisible(False)
+ self.qapp.processEvents()
+ self.assertTrue(self.statsTable.isRowHidden(0))
+ curve0.setVisible(True)
+ self.qapp.processEvents()
+ self.assertFalse(self.statsTable.isRowHidden(0))
+ curve1.setVisible(False)
+ self.qapp.processEvents()
+ self.assertTrue(self.statsTable.isRowHidden(1))
+ tableItems = self.statsTable._itemToTableItems(curve2)
+ curve2_min = tableItems['min'].text()
+ self.assertTrue(float(curve2_min) == -2.)
+
+ curve0.setVisible(False)
+ curve1.setVisible(False)
+ curve2.setVisible(False)
+ self.qapp.processEvents()
+ self.assertTrue(self.statsTable.isRowHidden(0))
+ self.assertTrue(self.statsTable.isRowHidden(1))
+ self.assertTrue(self.statsTable.isRowHidden(2))
+
class TestStatsWidgetWithImages(TestCaseQt):
"""Basic test for StatsWidget with images"""
@@ -487,6 +592,17 @@ class TestStatsWidgetWithImages(TestCaseQt):
self.assertEqual(tableItems['coords min'].text(), '0.0, 0.0')
self.assertEqual(tableItems['coords max'].text(), '127.0, 127.0')
+ def testItemHidden(self):
+ """Test if an item is hide, then the associated stats item is also
+ hide"""
+ self.widget.show()
+ self.plot.show()
+ self.qWaitForWindowExposed(self.widget)
+ self.assertFalse(self.widget.isRowHidden(0))
+ self.plot.getImage(self.IMAGE_LEGEND).setVisible(False)
+ self.qapp.processEvents()
+ self.assertTrue(self.widget.isRowHidden(0))
+
class TestStatsWidgetWithScatters(TestCaseQt):
@@ -556,13 +672,13 @@ class TestLineWidget(TestCaseQt):
self.plot = Plot1D()
self.plot.show()
- x = range(20)
- y = range(20)
- self.plot.addCurve(x, y, legend='curve0')
- y = range(12, 32)
- self.plot.addCurve(x, y, legend='curve1')
- y = range(-2, 18)
- self.plot.addCurve(x, y, legend='curve2')
+ self.x = range(20)
+ self.y0 = range(20)
+ self.curve0 = self.plot.addCurve(self.x, self.y0, legend='curve0')
+ self.y1 = range(12, 32)
+ self.plot.addCurve(self.x, self.y1, legend='curve1')
+ self.y2 = range(-2, 18)
+ self.plot.addCurve(self.x, self.y2, legend='curve2')
self.widget = StatsWidget.BasicGridStatsWidget(plot=self.plot,
kind='curve',
stats=mystats)
@@ -572,33 +688,112 @@ class TestLineWidget(TestCaseQt):
self.plot.setAttribute(qt.Qt.WA_DeleteOnClose)
self.plot.close()
self.widget.setPlot(None)
- self.widget._statQlineEdit.clear()
+ self.widget._lineStatsWidget._statQlineEdit.clear()
self.widget.setAttribute(qt.Qt.WA_DeleteOnClose)
self.widget.close()
self.widget = None
self.plot = None
TestCaseQt.tearDown(self)
- def test(self):
- self.widget.setStatsOnVisibleData(False)
+ def testProcessing(self):
+ self.widget._lineStatsWidget.setStatsOnVisibleData(False)
self.qapp.processEvents()
self.plot.setActiveCurve(legend='curve0')
- self.assertTrue(self.widget._statQlineEdit['min'].text() == '0.000')
+ self.assertTrue(self.widget._lineStatsWidget._statQlineEdit['min'].text() == '0.000')
self.plot.setActiveCurve(legend='curve1')
- self.assertTrue(self.widget._statQlineEdit['min'].text() == '12.000')
+ self.assertTrue(self.widget._lineStatsWidget._statQlineEdit['min'].text() == '12.000')
self.plot.getXAxis().setLimitsConstraints(minPos=2, maxPos=5)
self.widget.setStatsOnVisibleData(True)
self.qapp.processEvents()
- self.assertTrue(self.widget._statQlineEdit['min'].text() == '14.000')
+ self.assertTrue(self.widget._lineStatsWidget._statQlineEdit['min'].text() == '14.000')
self.plot.setActiveCurve(None)
self.assertTrue(self.plot.getActiveCurve() is None)
self.widget.setStatsOnVisibleData(False)
self.qapp.processEvents()
- self.assertFalse(self.widget._statQlineEdit['min'].text() == '14.000')
+ self.assertFalse(self.widget._lineStatsWidget._statQlineEdit['min'].text() == '14.000')
self.widget.setKind('image')
self.plot.addImage(numpy.arange(100*100).reshape(100, 100) + 0.312)
self.qapp.processEvents()
- self.assertTrue(self.widget._statQlineEdit['min'].text() == '0.312')
+ self.assertTrue(self.widget._lineStatsWidget._statQlineEdit['min'].text() == '0.312')
+
+ def testUpdateMode(self):
+ """Make sure the update modes are well take into account"""
+ self.plot.setActiveCurve(self.curve0)
+ _autoRB = self.widget._options._autoRB
+ _manualRB = self.widget._options._manualRB
+ # test from api
+ self.widget.setUpdateMode(StatsWidget.UpdateMode.AUTO)
+ self.assertTrue(_autoRB.isChecked())
+ self.assertFalse(_manualRB.isChecked())
+
+ # check stats change in auto mode
+ curve0_min = self.widget._lineStatsWidget._statQlineEdit['min'].text()
+ new_y = numpy.array(self.y0) - 2.56
+ self.plot.addCurve(x=self.x, y=new_y, legend=self.curve0)
+ curve0_min2 = self.widget._lineStatsWidget._statQlineEdit['min'].text()
+ self.assertTrue(curve0_min != curve0_min2)
+
+ # check stats change in manual mode only if requested
+ self.widget.setUpdateMode(StatsWidget.UpdateMode.MANUAL)
+ self.assertFalse(_autoRB.isChecked())
+ self.assertTrue(_manualRB.isChecked())
+
+ new_y = numpy.array(self.y0) - 1.2
+ self.plot.addCurve(x=self.x, y=new_y, legend=self.curve0)
+ curve0_min3 = self.widget._lineStatsWidget._statQlineEdit['min'].text()
+ self.assertTrue(curve0_min3 == curve0_min2)
+ self.widget._options._updateRequested()
+ curve0_min3 = self.widget._lineStatsWidget._statQlineEdit['min'].text()
+ self.assertTrue(curve0_min3 != curve0_min2)
+
+ # test from gui
+ self.widget.showRadioButtons(True)
+ self.widget._options._autoRB.toggle()
+ self.assertTrue(_autoRB.isChecked())
+ self.assertFalse(_manualRB.isChecked())
+
+ self.widget._options._manualRB.toggle()
+ self.assertFalse(_autoRB.isChecked())
+ self.assertTrue(_manualRB.isChecked())
+
+
+class TestUpdateModeWidget(TestCaseQt):
+ """Test UpdateModeWidget"""
+ def setUp(self):
+ TestCaseQt.setUp(self)
+ self.widget = StatsWidget.UpdateModeWidget(parent=None)
+
+ def tearDown(self):
+ self.widget.setAttribute(qt.Qt.WA_DeleteOnClose)
+ self.widget.close()
+ self.widget = None
+ TestCaseQt.tearDown(self)
+
+ def testSignals(self):
+ """Test the signal emission of the widget"""
+ self.widget.setUpdateMode(StatsWidget.UpdateMode.AUTO)
+ modeChangedListener = SignalListener()
+ manualUpdateListener = SignalListener()
+ self.widget.sigUpdateModeChanged.connect(modeChangedListener)
+ self.widget.sigUpdateRequested.connect(manualUpdateListener)
+ self.widget.setUpdateMode(StatsWidget.UpdateMode.AUTO)
+ self.assertTrue(self.widget.getUpdateMode() is StatsWidget.UpdateMode.AUTO)
+ self.assertTrue(modeChangedListener.callCount() is 0)
+ self.qapp.processEvents()
+
+ self.widget.setUpdateMode(StatsWidget.UpdateMode.MANUAL)
+ self.assertTrue(self.widget.getUpdateMode() is StatsWidget.UpdateMode.MANUAL)
+ self.qapp.processEvents()
+ self.assertTrue(modeChangedListener.callCount() is 1)
+ self.assertTrue(manualUpdateListener.callCount() is 0)
+ self.widget._updatePB.click()
+ self.widget._updatePB.click()
+ self.assertTrue(manualUpdateListener.callCount() is 2)
+
+ self.widget._autoRB.setChecked(True)
+ self.assertTrue(modeChangedListener.callCount() is 2)
+ self.widget._updatePB.click()
+ self.assertTrue(manualUpdateListener.callCount() is 2)
def suite():
@@ -606,7 +801,7 @@ def suite():
for TestClass in (TestStats, TestStatsHandler, TestStatsWidgetWithScatters,
TestStatsWidgetWithImages, TestStatsWidgetWithCurves,
TestStatsFormatter, TestEmptyStatsWidget,
- TestLineWidget):
+ TestLineWidget, TestUpdateModeWidget):
test_suite.addTest(
unittest.defaultTestLoader.loadTestsFromTestCase(TestClass))
return test_suite
diff --git a/silx/gui/plot/tools/profile/ScatterProfileToolBar.py b/silx/gui/plot/tools/profile/ScatterProfileToolBar.py
index fd21515..0d30651 100644
--- a/silx/gui/plot/tools/profile/ScatterProfileToolBar.py
+++ b/silx/gui/plot/tools/profile/ScatterProfileToolBar.py
@@ -1,7 +1,7 @@
# coding: utf-8
# /*##########################################################################
#
-# Copyright (c) 2018 European Synchrotron Radiation Facility
+# Copyright (c) 2018-2019 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -31,196 +31,18 @@ __date__ = "28/06/2018"
import logging
-import threading
-import time
+import weakref
import numpy
-try:
- from scipy.interpolate import LinearNDInterpolator
-except ImportError:
- LinearNDInterpolator = None
-
- # Fallback using local Delaunay and matplotlib interpolator
- from silx.third_party.scipy_spatial import Delaunay
- import matplotlib.tri
-
from ._BaseProfileToolBar import _BaseProfileToolBar
-from .... import qt
from ... import items
+from ....utils.concurrent import submitToQtMainThread
_logger = logging.getLogger(__name__)
-# TODO support log scale
-
-
-class _InterpolatorInitThread(qt.QThread):
- """Thread building a scatter interpolator
-
- This works in greedy mode in that the signal is only emitted
- when no other request is pending
- """
-
- sigInterpolatorReady = qt.Signal(object)
- """Signal emitted whenever an interpolator is ready
-
- It provides a 3-tuple (points, values, interpolator)
- """
-
- _RUNNING_THREADS_TO_DELETE = []
- """Store reference of no more used threads but still running"""
-
- def __init__(self):
- super(_InterpolatorInitThread, self).__init__()
- self._lock = threading.RLock()
- self._pendingData = None
- self._firstFallbackRun = True
-
- def discard(self, obj=None):
- """Wait for pending thread to complete and delete then
-
- Connect this to the destroyed signal of widget using this thread
- """
- if self.isRunning():
- self.cancel()
- self._RUNNING_THREADS_TO_DELETE.append(self) # Keep a reference
- self.finished.connect(self.__finished)
-
- def __finished(self):
- """Handle finished signal of threads to delete"""
- try:
- self._RUNNING_THREADS_TO_DELETE.remove(self)
- except ValueError:
- _logger.warning('Finished thread no longer in reference list')
-
- def request(self, points, values):
- """Request new initialisation of interpolator
-
- :param numpy.ndarray points: Point coordinates (N, D)
- :param numpy.ndarray values: Values the N points (1D array)
- """
- with self._lock:
- # Possibly replace already pending data
- self._pendingData = points, values
-
- if not self.isRunning():
- self.start()
-
- def cancel(self):
- """Cancel any running/pending requests"""
- with self._lock:
- self._pendingData = 'cancelled'
-
- def run(self):
- """Run the init of the scatter interpolator"""
- if LinearNDInterpolator is None:
- self.run_matplotlib()
- else:
- self.run_scipy()
-
- def run_matplotlib(self):
- """Run the init of the scatter interpolator"""
- if self._firstFallbackRun:
- self._firstFallbackRun = False
- _logger.warning(
- "scipy.spatial.LinearNDInterpolator not available: "
- "Scatter plot interpolator initialisation can freeze the GUI.")
-
- while True:
- with self._lock:
- data = self._pendingData
- self._pendingData = None
-
- if data in (None, 'cancelled'):
- return
-
- points, values = data
-
- startTime = time.time()
- try:
- delaunay = Delaunay(points)
- except:
- _logger.warning(
- "Cannot triangulate scatter data")
- else:
- with self._lock:
- data = self._pendingData
-
- if data is not None: # Break point
- _logger.info('Interpolator discarded after %f s',
- time.time() - startTime)
- else:
-
- x, y = points.T
- triangulation = matplotlib.tri.Triangulation(
- x, y, triangles=delaunay.simplices)
-
- interpolator = matplotlib.tri.LinearTriInterpolator(
- triangulation, values)
-
- with self._lock:
- data = self._pendingData
-
- if data is not None:
- _logger.info('Interpolator discarded after %f s',
- time.time() - startTime)
- else:
- # No other processing requested: emit the signal
- _logger.info("Interpolator initialised in %f s",
- time.time() - startTime)
-
- # Wrap interpolator to have same API as scipy's one
- def wrapper(points):
- return interpolator(*points.T)
-
- self.sigInterpolatorReady.emit(
- (points, values, wrapper))
-
- def run_scipy(self):
- """Run the init of the scatter interpolator"""
- while True:
- with self._lock:
- data = self._pendingData
- self._pendingData = None
-
- if data in (None, 'cancelled'):
- return
-
- points, values = data
-
- startTime = time.time()
- try:
- interpolator = LinearNDInterpolator(points, values)
- except:
- _logger.warning(
- "Cannot initialise scatter profile interpolator")
- else:
- with self._lock:
- data = self._pendingData
-
- if data is not None: # Break point
- _logger.info('Interpolator discarded after %f s',
- time.time() - startTime)
- else:
- # First call takes a while, do it here
- interpolator([(0., 0.)])
-
- with self._lock:
- data = self._pendingData
-
- if data is not None:
- _logger.info('Interpolator discarded after %f s',
- time.time() - startTime)
- else:
- # No other processing requested: emit the signal
- _logger.info("Interpolator initialised in %f s",
- time.time() - startTime)
- self.sigInterpolatorReady.emit(
- (points, values, interpolator))
-
-
class ScatterProfileToolBar(_BaseProfileToolBar):
"""QToolBar providing scatter plot profiling tools
@@ -233,49 +55,13 @@ class ScatterProfileToolBar(_BaseProfileToolBar):
super(ScatterProfileToolBar, self).__init__(parent, plot, title)
self.__nPoints = 1024
- self.__interpolator = None
- self.__interpolatorCache = None # points, values, interpolator
-
- self.__initThread = _InterpolatorInitThread()
- self.destroyed.connect(self.__initThread.discard)
- self.__initThread.sigInterpolatorReady.connect(
- self.__interpolatorReady)
-
- roiManager = self._getRoiManager()
- if roiManager is None:
- _logger.error(
- "Error during scatter profile toolbar initialisation")
- else:
- roiManager.sigInteractiveModeStarted.connect(
- self.__interactionStarted)
- roiManager.sigInteractiveModeFinished.connect(
- self.__interactionFinished)
- if roiManager.isStarted():
- self.__interactionStarted(roiManager.getCurrentInteractionModeRoiClass())
-
- def __interactionStarted(self, roiClass):
- """Handle start of ROI interaction"""
- plot = self.getPlotWidget()
- if plot is None:
- return
-
- plot.sigActiveScatterChanged.connect(self.__activeScatterChanged)
-
- scatter = plot._getActiveItem(kind='scatter')
- legend = None if scatter is None else scatter.getLegend()
- self.__activeScatterChanged(None, legend)
+ self.__scatterRef = None
+ self.__futureInterpolator = None
- def __interactionFinished(self):
- """Handle end of ROI interaction"""
plot = self.getPlotWidget()
- if plot is None:
- return
-
- plot.sigActiveScatterChanged.disconnect(self.__activeScatterChanged)
-
- scatter = plot._getActiveItem(kind='scatter')
- legend = None if scatter is None else scatter.getLegend()
- self.__activeScatterChanged(legend, None)
+ if plot is not None:
+ self._setScatterItem(plot._getActiveItem(kind='scatter'))
+ plot.sigActiveScatterChanged.connect(self.__activeScatterChanged)
def __activeScatterChanged(self, previous, legend):
"""Handle change of active scatter
@@ -283,35 +69,37 @@ class ScatterProfileToolBar(_BaseProfileToolBar):
:param Union[str,None] previous:
:param Union[str,None] legend:
"""
- self.__initThread.cancel()
+ plot = self.getPlotWidget()
+ if plot is None or legend is None:
+ scatter = None
+ else:
+ scatter = plot.getScatter(legend)
+ self._setScatterItem(scatter)
- # Reset interpolator
- self.__interpolator = None
+ def _getScatterItem(self):
+ """Returns the scatter item currently handled by this tool.
- plot = self.getPlotWidget()
- if plot is None:
- _logger.error("Associated PlotWidget no longer exists")
+ :rtype: ~silx.gui.plot.items.Scatter
+ """
+ return None if self.__scatterRef is None else self.__scatterRef()
+ def _setScatterItem(self, scatter):
+ """Set the scatter tracked by this tool
+
+ :param Union[None,silx.gui.plot.items.Scatter] scatter:
+ """
+ self.__futureInterpolator = None # Reset currently expected future
+
+ previousScatter = self._getScatterItem()
+ if previousScatter is not None:
+ previousScatter.sigItemChanged.disconnect(
+ self.__scatterItemChanged)
+
+ if scatter is None:
+ self.__scatterRef = None
else:
- if previous is not None: # Disconnect signal
- scatter = plot.getScatter(previous)
- if scatter is not None:
- scatter.sigItemChanged.disconnect(
- self.__scatterItemChanged)
-
- if legend is not None:
- scatter = plot.getScatter(legend)
- if scatter is None:
- _logger.error("Cannot retrieve active scatter")
-
- else:
- scatter.sigItemChanged.connect(self.__scatterItemChanged)
- points = numpy.transpose(numpy.array((
- scatter.getXData(copy=False),
- scatter.getYData(copy=False))))
- values = scatter.getValueData(copy=False)
-
- self.__updateInterpolator(points, values)
+ self.__scatterRef = weakref.ref(scatter)
+ scatter.sigItemChanged.connect(self.__scatterItemChanged)
# Refresh profile
self.updateProfile()
@@ -322,49 +110,15 @@ class ScatterProfileToolBar(_BaseProfileToolBar):
:param ItemChangedType event:
"""
if event == items.ItemChangedType.DATA:
- self.__interpolator = None
- scatter = self.sender()
- if scatter is None:
- _logger.error("Cannot retrieve updated scatter item")
-
- else:
- points = numpy.transpose(numpy.array((
- scatter.getXData(copy=False),
- scatter.getYData(copy=False))))
- values = scatter.getValueData(copy=False)
-
- self.__updateInterpolator(points, values)
-
- # Handle interpolator init thread
-
- def __updateInterpolator(self, points, values):
- """Update used interpolator with new data"""
- if (self.__interpolatorCache is not None and
- len(points) == len(self.__interpolatorCache[0]) and
- numpy.all(numpy.equal(self.__interpolatorCache[0], points)) and
- numpy.all(numpy.equal(self.__interpolatorCache[1], values))):
- # Reuse previous interpolator
- _logger.info(
- 'Scatter changed: Reuse previous interpolator')
- self.__interpolator = self.__interpolatorCache[2]
-
- else:
- # Interpolator needs update: Start background processing
- _logger.info(
- 'Scatter changed: Rebuild interpolator')
- self.__interpolator = None
- self.__interpolatorCache = None
- self.__initThread.request(points, values)
-
- def __interpolatorReady(self, data):
- """Handle end of init interpolator thread"""
- points, values, interpolator = data
- self.__interpolator = interpolator
- self.__interpolatorCache = None if interpolator is None else data
- self.updateProfile()
+ self.updateProfile() # Refresh profile
def hasPendingOperations(self):
- return self.__initThread.isRunning()
+ """Returns True if waiting for an interpolator to be ready
+
+ :rtype: bool
+ """
+ return (self.__futureInterpolator is not None and
+ not self.__futureInterpolator.done())
# Number of points
@@ -383,8 +137,9 @@ class ScatterProfileToolBar(_BaseProfileToolBar):
npoints = int(npoints)
if npoints < 1:
raise ValueError("Unsupported number of points: %d" % npoints)
- else:
+ elif npoints != self.__nPoints:
self.__nPoints = npoints
+ self.updateProfile()
# Overridden methods
@@ -400,11 +155,16 @@ class ScatterProfileToolBar(_BaseProfileToolBar):
"""
if self.hasPendingOperations():
return 'Pre-processing data...'
-
else:
return super(ScatterProfileToolBar, self).computeProfileTitle(
x0, y0, x1, y1)
+ def __futureDone(self, future):
+ """Handle completion of the interpolator creation"""
+ if future is self.__futureInterpolator:
+ # Only handle future callbacks for the current one
+ submitToQtMainThread(self.updateProfile)
+
def computeProfile(self, x0, y0, x1, y1):
"""Compute corresponding profile
@@ -414,16 +174,32 @@ class ScatterProfileToolBar(_BaseProfileToolBar):
:param float y1: Profile end point Y coord
:return: (points, values) profile data or None
"""
- if self.__interpolator is None:
+ scatter = self._getScatterItem()
+ if scatter is None or self.hasPendingOperations():
return None
- nPoints = self.getNPoints()
+ # Lazy async request of the interpolator
+ future = scatter._getInterpolator()
+ if future is not self.__futureInterpolator:
+ # First time we request this interpolator
+ self.__futureInterpolator = future
+ if not future.done():
+ future.add_done_callback(self.__futureDone)
+ return None
+
+ if future.cancelled() or future.exception() is not None:
+ return None # Something went wrong
+ interpolator = future.result()
+ if interpolator is None:
+ return None # Cannot init an interpolator
+
+ nPoints = self.getNPoints()
points = numpy.transpose((
numpy.linspace(x0, x1, nPoints, endpoint=True),
numpy.linspace(y0, y1, nPoints, endpoint=True)))
- values = self.__interpolator(points)
+ values = interpolator(points)
if not numpy.any(numpy.isfinite(values)):
return None # Profile outside convex hull
diff --git a/silx/gui/plot/tools/roi.py b/silx/gui/plot/tools/roi.py
index 98295ba..eb933a0 100644
--- a/silx/gui/plot/tools/roi.py
+++ b/silx/gui/plot/tools/roi.py
@@ -106,6 +106,9 @@ class RegionOfInterestManager(qt.QObject):
self._rois = [] # List of ROIs
self._drawnROI = None # New ROI being currently drawn
+ # Handle unique selection of interaction mode action
+ self._actionGroup = qt.QActionGroup(self)
+
self._roiClass = None
self._color = rgba('red')
@@ -158,6 +161,8 @@ class RegionOfInterestManager(qt.QObject):
action.setChecked(self.getCurrentInteractionModeRoiClass() is roiClass)
action.setToolTip(text)
+ self._actionGroup.addAction(action)
+
action.triggered[bool].connect(functools.partial(
WeakMethodProxy(self._modeActionTriggered), roiClass=roiClass))
self._modeActions[roiClass] = action
@@ -171,9 +176,6 @@ class RegionOfInterestManager(qt.QObject):
"""
if checked:
self.start(roiClass)
- else: # Keep action checked
- action = self.sender()
- action.setChecked(True)
def _updateModeActions(self):
"""Check/Uncheck action corresponding to current mode"""
@@ -781,9 +783,9 @@ class RegionOfInterestTableWidget(qt.QTableWidget):
super(RegionOfInterestTableWidget, self).__init__(parent)
self._roiManagerRef = None
- self.setColumnCount(5)
- self.setHorizontalHeaderLabels(
- ['Label', 'Edit', 'Kind', 'Coordinates', ''])
+ headers = ['Label', 'Edit', 'Kind', 'Coordinates', '']
+ self.setColumnCount(len(headers))
+ self.setHorizontalHeaderLabels(headers)
horizontalHeader = self.horizontalHeader()
horizontalHeader.setDefaultAlignment(qt.Qt.AlignLeft)
@@ -815,9 +817,10 @@ class RegionOfInterestTableWidget(qt.QTableWidget):
manager = self.getRegionOfInterestManager()
roi = manager.getRois()[index]
else:
- roi = None
+ return
if column == 0:
+ roi.setVisible(item.checkState() == qt.Qt.Checked)
roi.setLabel(item.text())
elif column == 1:
roi.setEditable(
@@ -884,11 +887,13 @@ class RegionOfInterestTableWidget(qt.QTableWidget):
for index, roi in enumerate(rois):
baseFlags = qt.Qt.ItemIsSelectable | qt.Qt.ItemIsEnabled
- # Label
+ # Label and visible
label = roi.getLabel()
item = qt.QTableWidgetItem(label)
- item.setFlags(baseFlags | qt.Qt.ItemIsEditable)
+ item.setFlags(baseFlags | qt.Qt.ItemIsEditable | qt.Qt.ItemIsUserCheckable)
item.setData(qt.Qt.UserRole, index)
+ item.setCheckState(
+ qt.Qt.Checked if roi.isVisible() else qt.Qt.Unchecked)
self.setItem(index, 0, item)
# Editable
diff --git a/silx/gui/plot/tools/test/testScatterProfileToolBar.py b/silx/gui/plot/tools/test/testScatterProfileToolBar.py
index 0f4b668..714746a 100644
--- a/silx/gui/plot/tools/test/testScatterProfileToolBar.py
+++ b/silx/gui/plot/tools/test/testScatterProfileToolBar.py
@@ -101,6 +101,7 @@ class TestScatterProfileToolBar(TestCaseQt, ParametricTestCase):
self.qWait(200)
if not self.profile.hasPendingOperations():
break
+ self.qapp.processEvents()
self.assertIsNotNone(self.profile.getProfileValues())
points = self.profile.getProfilePoints()
diff --git a/silx/gui/plot/tools/test/testTools.py b/silx/gui/plot/tools/test/testTools.py
index f4adda0..70c8105 100644
--- a/silx/gui/plot/tools/test/testTools.py
+++ b/silx/gui/plot/tools/test/testTools.py
@@ -1,7 +1,7 @@
# coding: utf-8
# /*##########################################################################
#
-# Copyright (c) 2016-2018 European Synchrotron Radiation Facility
+# Copyright (c) 2016-2019 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -41,34 +41,6 @@ from silx.gui.plot import tools
from silx.gui.plot.test.utils import PlotWidgetTestCase
-# Makes sure a QApplication exists
-_qapp = qt.QApplication.instance() or qt.QApplication([])
-
-
-def _tearDownDocTest(docTest):
- """Tear down to use for test from docstring.
-
- Checks that plot widget is displayed
- """
- plot = docTest.globs['plot']
- qWaitForWindowExposedAndActivate(plot)
- plot.setAttribute(qt.Qt.WA_DeleteOnClose)
- plot.close()
- del plot
-
-# Disable doctest because of
-# "NameError: name 'numpy' is not defined"
-#
-# import doctest
-# positionInfoTestSuite = doctest.DocTestSuite(
-# PlotTools, tearDown=_tearDownDocTest,
-# optionflags=doctest.ELLIPSIS)
-# """Test suite of tests from PlotTools docstrings.
-#
-# Test PositionInfo and ProfileToolBar docstrings.
-# """
-
-
class TestPositionInfo(PlotWidgetTestCase):
"""Tests for PositionInfo widget."""
diff --git a/silx/gui/plot/tools/toolbars.py b/silx/gui/plot/tools/toolbars.py
index 28fb7f9..04d0cfc 100644
--- a/silx/gui/plot/tools/toolbars.py
+++ b/silx/gui/plot/tools/toolbars.py
@@ -1,7 +1,7 @@
# coding: utf-8
# /*##########################################################################
#
-# Copyright (c) 2018 European Synchrotron Radiation Facility
+# Copyright (c) 2018-2019 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -34,6 +34,7 @@ from ... import qt
from .. import actions
from ..PlotWidget import PlotWidget
from .. import PlotToolButtons
+from ....utils.deprecation import deprecated
class InteractiveModeToolBar(qt.QToolBar):
@@ -302,9 +303,9 @@ class ScatterToolBar(qt.QToolBar):
parent=self, plot=plot)
self.addAction(self._colormapAction)
- self._symbolToolButton = PlotToolButtons.SymbolToolButton(
- parent=self, plot=plot)
- self.addWidget(self._symbolToolButton)
+ self._visualizationToolButton = \
+ PlotToolButtons.ScatterVisualizationToolButton(parent=self, plot=plot)
+ self.addWidget(self._visualizationToolButton)
def getResetZoomAction(self):
"""Returns the QAction to reset the zoom.
@@ -341,16 +342,21 @@ class ScatterToolBar(qt.QToolBar):
"""
return self._colormapAction
- def getSymbolToolButton(self):
- """Returns the QToolButton controlling symbol size and marker.
-
- :rtype: SymbolToolButton
- """
- return self._symbolToolButton
-
def getKeepDataAspectRatioButton(self):
"""Returns the QToolButton controlling data aspect ratio.
:rtype: QToolButton
"""
return self._keepDataAspectRatioButton
+
+ def getScatterVisualizationToolButton(self):
+ """Returns the QToolButton controlling the visualization mode.
+
+ :rtype: ScatterVisualizationToolButton
+ """
+ return self._visualizationToolButton
+
+ @deprecated(replacement='getScatterVisualizationToolButton',
+ since_version='0.11.0')
+ def getSymbolToolButton(self):
+ return self.getScatterVisualizationToolButton()
diff --git a/silx/gui/plot3d/Plot3DWidget.py b/silx/gui/plot3d/Plot3DWidget.py
index eed4438..f512cd8 100644
--- a/silx/gui/plot3d/Plot3DWidget.py
+++ b/silx/gui/plot3d/Plot3DWidget.py
@@ -1,7 +1,7 @@
# coding: utf-8
# /*##########################################################################
#
-# Copyright (c) 2015-2018 European Synchrotron Radiation Facility
+# Copyright (c) 2015-2019 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -31,11 +31,14 @@ __license__ = "MIT"
__date__ = "24/04/2018"
+import enum
import logging
from silx.gui import qt
from silx.gui.colors import rgba
from . import actions
+
+from ...utils.enum import Enum as _Enum
from ..utils.image import convertArrayToQImage
from .. import _glutils as glu
@@ -106,6 +109,22 @@ class Plot3DWidget(glu.OpenGLWidget):
It provides the updated property.
"""
+ sigSceneClicked = qt.Signal(float, float)
+ """Signal emitted when the scene is clicked with the left mouse button.
+
+ It provides the (x, y) clicked mouse position
+ """
+
+ @enum.unique
+ class FogMode(_Enum):
+ """Different mode to render the scene with fog"""
+
+ NONE = 'none'
+ """No fog effect"""
+
+ LINEAR = 'linear'
+ """Linear fog through the whole scene"""
+
def __init__(self, parent=None, f=qt.Qt.WindowFlags()):
self._firstRender = True
@@ -146,6 +165,11 @@ class Plot3DWidget(glu.OpenGLWidget):
self.eventHandler = None
self.setInteractiveMode('rotate')
+ def __clickHandler(self, *args):
+ """Handle interaction state machine click"""
+ x, y = args[0][:2]
+ self.sigSceneClicked.emit(x, y)
+
def setInteractiveMode(self, mode):
"""Set the interactive mode.
@@ -163,7 +187,7 @@ class Plot3DWidget(glu.OpenGLWidget):
orbitAroundCenter=False,
mode='position',
scaleTransform=self._sceneScale,
- selectCB=None)
+ selectCB=self.__clickHandler)
elif mode == 'pan':
self.eventHandler = interaction.PanCameraControl(
@@ -171,7 +195,7 @@ class Plot3DWidget(glu.OpenGLWidget):
orbitAroundCenter=False,
mode='position',
scaleTransform=self._sceneScale,
- selectCB=None)
+ selectCB=self.__clickHandler)
elif isinstance(mode, interaction.StateMachine):
self.eventHandler = mode
@@ -244,6 +268,28 @@ class Plot3DWidget(glu.OpenGLWidget):
"""Returns the RGBA background color (QColor)."""
return qt.QColor.fromRgbF(*self.viewport.background)
+ def setFogMode(self, mode):
+ """Set the kind of fog to use for the whole scene.
+
+ :param Union[str,FogMode] mode: The mode to use
+ :raise ValueError: If mode is not supported
+ """
+ mode = self.FogMode.from_value(mode)
+ if mode != self.getFogMode():
+ self.viewport.fog.isOn = mode is self.FogMode.LINEAR
+ self.sigStyleChanged.emit('fogMode')
+
+ def getFogMode(self):
+ """Returns the kind of fog in use
+
+ :return: The kind of fog in use
+ :rtype: FogMode
+ """
+ if self.viewport.fog.isOn:
+ return self.FogMode.LINEAR
+ else:
+ return self.FogMode.NONE
+
def isOrientationIndicatorVisible(self):
"""Returns True if the orientation indicator is displayed.
diff --git a/silx/gui/plot3d/Plot3DWindow.py b/silx/gui/plot3d/Plot3DWindow.py
index 331eca2..470b966 100644
--- a/silx/gui/plot3d/Plot3DWindow.py
+++ b/silx/gui/plot3d/Plot3DWindow.py
@@ -1,7 +1,7 @@
# coding: utf-8
# /*##########################################################################
#
-# Copyright (c) 2015-2017 European Synchrotron Radiation Facility
+# Copyright (c) 2015-2019 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -32,6 +32,7 @@ __license__ = "MIT"
__date__ = "26/01/2017"
+from silx.utils.proxy import docstring
from silx.gui import qt
from .Plot3DWidget import Plot3DWidget
@@ -62,32 +63,26 @@ class Plot3DWindow(qt.QMainWindow):
# Proxy to Plot3DWidget
+ @docstring(Plot3DWidget)
def setProjection(self, projection):
return self._plot3D.setProjection(projection)
- setProjection.__doc__ = Plot3DWidget.setProjection.__doc__
-
+ @docstring(Plot3DWidget)
def getProjection(self):
return self._plot3D.getProjection()
- getProjection.__doc__ = Plot3DWidget.getProjection.__doc__
-
+ @docstring(Plot3DWidget)
def centerScene(self):
return self._plot3D.centerScene()
- centerScene.__doc__ = Plot3DWidget.centerScene.__doc__
-
+ @docstring(Plot3DWidget)
def resetZoom(self):
return self._plot3D.resetZoom()
- resetZoom.__doc__ = Plot3DWidget.resetZoom.__doc__
-
+ @docstring(Plot3DWidget)
def getBackgroundColor(self):
return self._plot3D.getBackgroundColor()
- getBackgroundColor.__doc__ = Plot3DWidget.getBackgroundColor.__doc__
-
+ @docstring(Plot3DWidget)
def setBackgroundColor(self, color):
return self._plot3D.setBackgroundColor(color)
-
- setBackgroundColor.__doc__ = Plot3DWidget.setBackgroundColor.__doc__
diff --git a/silx/gui/plot3d/SceneWidget.py b/silx/gui/plot3d/SceneWidget.py
index e60dcfc..883f5e7 100644
--- a/silx/gui/plot3d/SceneWidget.py
+++ b/silx/gui/plot3d/SceneWidget.py
@@ -45,7 +45,6 @@ from .scene import interaction
from ._model import SceneModel, visitQAbstractItemModel
from ._model.items import Item3DRow
-
__all__ = ['items', 'SceneWidget']
@@ -268,7 +267,7 @@ class SceneSelection(qt.QObject):
assert isinstance(parent, SceneWidget)
if item.root() != parent.getSceneGroup():
- self.setSelectedItem(None)
+ self.setCurrentItem(None)
# Synchronization with QItemSelectionModel
@@ -482,27 +481,37 @@ class SceneWidget(Plot3DWidget):
# Add/remove items
- def add3DScalarField(self, data, copy=True, index=None):
- """Add 3D scalar data volume to :class:`SceneWidget` content.
+ def addVolume(self, data, copy=True, index=None):
+ """Add 3D data volume of scalar or complex to :class:`SceneWidget` content.
Dataset order is zyx (i.e., first dimension is z).
- :param data: 3D array
- :type data: 3D numpy.ndarray of float32 with shape at least (2, 2, 2)
+ :param data: 3D array of complex with shape at least (2, 2, 2)
+ :type data: numpy.ndarray[Union[numpy.complex64,numpy.float32]]
:param bool copy:
True (default) to make a copy,
False to avoid copy (DO NOT MODIFY data afterwards)
:param int index: The index at which to place the item.
By default it is appended to the end of the list.
- :return: The newly created scalar volume item
- :rtype: ~silx.gui.plot3d.items.volume.ScalarField3D
+ :return: The newly created 3D volume item
+ :rtype: Union[ScalarField3D,ComplexField3D]
"""
- volume = items.ScalarField3D()
+ if data is not None:
+ data = numpy.array(data, copy=False)
+
+ if numpy.iscomplexobj(data):
+ volume = items.ComplexField3D()
+ else:
+ volume = items.ScalarField3D()
volume.setData(data, copy=copy)
self.addItem(volume, index)
return volume
+ def add3DScalarField(self, data, copy=True, index=None):
+ # TODO deprecate in the future
+ return self.addVolume(data, copy=copy, index=index)
+
def add3DScatter(self, x, y, z, value, copy=True, index=None):
"""Add 3D scatter data to :class:`SceneWidget` content.
diff --git a/silx/gui/plot3d/SceneWindow.py b/silx/gui/plot3d/SceneWindow.py
index 56fb21f..052a4dc 100644
--- a/silx/gui/plot3d/SceneWindow.py
+++ b/silx/gui/plot3d/SceneWindow.py
@@ -1,7 +1,7 @@
# coding: utf-8
# /*##########################################################################
#
-# Copyright (c) 2017-2018 European Synchrotron Radiation Facility
+# Copyright (c) 2017-2019 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -33,11 +33,13 @@ __date__ = "29/11/2017"
from ...gui import qt, icons
+from ...gui.widgets.BoxLayoutDockWidget import BoxLayoutDockWidget
from .actions.mode import InteractiveModeAction
from .SceneWidget import SceneWidget
from .tools import OutputToolBar, InteractiveModeToolBar, ViewpointToolBar
from .tools.GroupPropertiesWidget import GroupPropertiesWidget
+from .tools.PositionInfoWidget import PositionInfoWidget
from .ParamTreeView import ParamTreeView
@@ -118,8 +120,19 @@ class SceneWindow(qt.QMainWindow):
self._sceneWidget = SceneWidget()
self.setCentralWidget(self._sceneWidget)
+ # Add PositionInfoWidget to display picking info
+ self._positionInfo = PositionInfoWidget()
+ self._positionInfo.setSceneWidget(self._sceneWidget)
+
+ dock = BoxLayoutDockWidget()
+ dock.setWindowTitle("Selection Info")
+ dock.setWidget(self._positionInfo)
+ self.addDockWidget(qt.Qt.BottomDockWidgetArea, dock)
+
self._interactiveModeToolBar = InteractiveModeToolBar(parent=self)
panPlaneAction = _PanPlaneAction(self, plot3d=self._sceneWidget)
+ self._interactiveModeToolBar.addAction(
+ self._positionInfo.toggleAction())
self._interactiveModeToolBar.addAction(panPlaneAction)
self._viewpointToolBar = ViewpointToolBar(parent=self)
@@ -197,3 +210,10 @@ class SceneWindow(qt.QMainWindow):
:rtype: ~silx.gui.plot3d.tools.OutputToolBar
"""
return self._outputToolBar
+
+ def getPositionInfoWidget(self):
+ """Returns the widget displaying selected position information.
+
+ :rtype: ~silx.gui.plot3d.tools.PositionInfoWidget.PositionInfoWidget
+ """
+ return self._positionInfo
diff --git a/silx/gui/plot3d/_model/items.py b/silx/gui/plot3d/_model/items.py
index 7e58d14..9fe3e51 100644
--- a/silx/gui/plot3d/_model/items.py
+++ b/silx/gui/plot3d/_model/items.py
@@ -33,6 +33,7 @@ __license__ = "MIT"
__date__ = "24/04/2018"
+from collections import OrderedDict
import functools
import logging
import weakref
@@ -45,6 +46,7 @@ from ...colors import preferredColormaps
from ... import qt, icons
from .. import items
from ..items.volume import Isosurface, CutPlane
+from ..Plot3DWidget import Plot3DWidget
from .core import AngleDegreeRow, BaseRow, ColorProxyRow, ProxyRow, StaticRow
@@ -53,6 +55,76 @@ from .core import AngleDegreeRow, BaseRow, ColorProxyRow, ProxyRow, StaticRow
_logger = logging.getLogger(__name__)
+class ItemProxyRow(ProxyRow):
+ """Provides a node to proxy a data accessible through functions.
+
+ It listens on sigItemChanged to trigger the update.
+
+ Warning: Only weak reference are kept on fget and fset.
+
+ :param Item3D item: The item to
+ :param str name: The name of this node
+ :param callable fget: A callable returning the data
+ :param callable fset:
+ An optional callable setting the data with data as a single argument.
+ :param events:
+ An optional event kind or list of event kinds to react upon.
+ :param callable toModelData:
+ An optional callable to convert from fget
+ callable to data returned by the model.
+ :param callable fromModelData:
+ An optional callable converting data provided to the model to
+ data for fset.
+ :param editorHint: Data to provide as UserRole for editor selection/setup
+ """
+
+ def __init__(self,
+ item,
+ name='',
+ fget=None,
+ fset=None,
+ events=None,
+ toModelData=None,
+ fromModelData=None,
+ editorHint=None):
+ super(ItemProxyRow, self).__init__(
+ name=name,
+ fget=fget,
+ fset=fset,
+ notify=None,
+ toModelData=toModelData,
+ fromModelData=fromModelData,
+ editorHint=editorHint)
+
+ if isinstance(events, (items.ItemChangedType,
+ items.Item3DChangedType)):
+ events = (events,)
+ self.__events = events
+ item.sigItemChanged.connect(self.__itemChanged)
+
+ def __itemChanged(self, event):
+ """Handle item changed
+
+ :param Union[ItemChangedType,Item3DChangedType] event:
+ """
+ if self.__events is None or event in self.__events:
+ self._notified()
+
+
+class ItemColorProxyRow(ColorProxyRow, ItemProxyRow):
+ """Combines :class:`ColorProxyRow` and :class:`ItemProxyRow`"""
+
+ def __init__(self, *args, **kwargs):
+ ItemProxyRow.__init__(self, *args, **kwargs)
+
+
+class ItemAngleDegreeRow(AngleDegreeRow, ItemProxyRow):
+ """Combines :class:`AngleDegreeRow` and :class:`ItemProxyRow`"""
+
+ def __init__(self, *args, **kwargs):
+ ItemProxyRow.__init__(self, *args, **kwargs)
+
+
class _DirectionalLightProxy(qt.QObject):
"""Proxy to handle directional light with angles rather than vector.
"""
@@ -67,8 +139,8 @@ class _DirectionalLightProxy(qt.QObject):
super(_DirectionalLightProxy, self).__init__()
self._light = light
light.addListener(self._directionUpdated)
- self._azimuth = 0.
- self._altitude = 0.
+ self._azimuth = 0
+ self._altitude = 0
def getAzimuthAngle(self):
"""Returns the signed angle in the horizontal plane.
@@ -76,7 +148,7 @@ class _DirectionalLightProxy(qt.QObject):
Unit: degrees.
The 0 angle corresponds to the axis perpendicular to the screen.
- :rtype: float
+ :rtype: int
"""
return self._azimuth
@@ -86,15 +158,16 @@ class _DirectionalLightProxy(qt.QObject):
Unit: degrees.
Range: [-90, +90]
- :rtype: float
+ :rtype: int
"""
return self._altitude
def setAzimuthAngle(self, angle):
"""Set the horizontal angle.
- :param float angle: Angle from -z axis in zx plane in degrees.
+ :param int angle: Angle from -z axis in zx plane in degrees.
"""
+ angle = int(round(angle))
if angle != self._azimuth:
self._azimuth = angle
self._updateLight()
@@ -103,8 +176,9 @@ class _DirectionalLightProxy(qt.QObject):
def setAltitudeAngle(self, angle):
"""Set the horizontal angle.
- :param float angle: Angle from -z axis in zy plane in degrees.
+ :param int angle: Angle from -z axis in zy plane in degrees.
"""
+ angle = int(round(angle))
if angle != self._altitude:
self._altitude = angle
self._updateLight()
@@ -117,20 +191,21 @@ class _DirectionalLightProxy(qt.QObject):
x, y, z = - self._light.direction
# Horizontal plane is plane xz
- azimuth = numpy.degrees(numpy.arctan2(x, z))
- altitude = numpy.degrees(numpy.pi/2. - numpy.arccos(y))
+ azimuth = int(round(numpy.degrees(numpy.arctan2(x, z))))
+ altitude = int(round(numpy.degrees(numpy.pi/2. - numpy.arccos(y))))
- if (abs(azimuth - self.getAzimuthAngle()) > 0.01 and
- abs(abs(altitude) - 90.) >= 0.001): # Do not update when at zenith
+ if azimuth != self.getAzimuthAngle():
self.setAzimuthAngle(azimuth)
- if abs(altitude - self.getAltitudeAngle()) > 0.01:
+ if altitude != self.getAltitudeAngle():
self.setAltitudeAngle(altitude)
def _updateLight(self):
"""Update light direction in the scene"""
azimuth = numpy.radians(self._azimuth)
delta = numpy.pi/2. - numpy.radians(self._altitude)
+ if delta == 0.: # Avoids zenith position
+ delta = 0.0001
z = - numpy.sin(delta) * numpy.cos(azimuth)
x = - numpy.sin(delta) * numpy.sin(azimuth)
y = - numpy.cos(delta)
@@ -195,9 +270,18 @@ class Settings(StaticRow):
lightDirection = StaticRow(('Light Direction', None),
children=(azimuthNode, altitudeNode))
+ # Fog
+ fog = ProxyRow(
+ name='Fog',
+ fget=sceneWidget.getFogMode,
+ fset=sceneWidget.setFogMode,
+ notify=sceneWidget.sigStyleChanged,
+ toModelData=lambda mode: mode is Plot3DWidget.FogMode.LINEAR,
+ fromModelData=lambda mode: Plot3DWidget.FogMode.LINEAR if mode else Plot3DWidget.FogMode.NONE)
+
# Settings row
children = (background, foreground, text, highlight,
- axesIndicator, lightDirection)
+ axesIndicator, lightDirection, fog)
super(Settings, self).__init__(('Settings', None), children=children)
@@ -208,6 +292,9 @@ class Item3DRow(BaseRow):
:param str name: The optional name of the item
"""
+ _EVENTS = items.ItemChangedType.VISIBLE, items.Item3DChangedType.LABEL
+ """Events for which to update the first column in the tree"""
+
def __init__(self, item, name=None):
self.__name = None if name is None else six.text_type(name)
super(Item3DRow, self).__init__()
@@ -221,12 +308,11 @@ class Item3DRow(BaseRow):
item.sigItemChanged.connect(self._itemChanged)
def _itemChanged(self, event):
- """Handle visibility change"""
- if event in (items.ItemChangedType.VISIBLE,
- items.Item3DChangedType.LABEL):
+ """Handle model update upon change"""
+ if event in self._EVENTS:
model = self.model()
if model is not None:
- index = self.index(column=1)
+ index = self.index(column=0)
model.dataChanged.emit(index, index)
def item(self):
@@ -268,7 +354,7 @@ class Item3DRow(BaseRow):
return 2
-class DataItem3DBoundingBoxRow(ProxyRow):
+class DataItem3DBoundingBoxRow(ItemProxyRow):
"""Represents :class:`DataItem3D` bounding box visibility
:param DataItem3D item: The item for which to display/control bounding box
@@ -276,13 +362,14 @@ class DataItem3DBoundingBoxRow(ProxyRow):
def __init__(self, item):
super(DataItem3DBoundingBoxRow, self).__init__(
+ item=item,
name='Bounding box',
fget=item.isBoundingBoxVisible,
fset=item.setBoundingBoxVisible,
- notify=item.sigItemChanged)
+ events=items.Item3DChangedType.BOUNDING_BOX_VISIBLE)
-class MatrixProxyRow(ProxyRow):
+class MatrixProxyRow(ItemProxyRow):
"""Proxy for a row of a DataItem3D 3x3 matrix transform
:param DataItem3D item:
@@ -294,10 +381,11 @@ class MatrixProxyRow(ProxyRow):
self._index = index
super(MatrixProxyRow, self).__init__(
+ item=item,
name='',
fget=self._getMatrixRow,
fset=self._setMatrixRow,
- notify=item.sigItemChanged)
+ events=items.Item3DChangedType.TRANSFORM)
def _getMatrixRow(self):
"""Returns the matrix row.
@@ -344,11 +432,13 @@ class DataItem3DTransformRow(StaticRow):
super(DataItem3DTransformRow, self).__init__(('Transform', None))
self._item = weakref.ref(item)
- translation = ProxyRow(name='Translation',
- fget=item.getTranslation,
- fset=self._setTranslation,
- notify=item.sigItemChanged,
- toModelData=lambda data: qt.QVector3D(*data))
+ translation = ItemProxyRow(
+ item=item,
+ name='Translation',
+ fget=item.getTranslation,
+ fset=self._setTranslation,
+ events=items.Item3DChangedType.TRANSFORM,
+ toModelData=lambda data: qt.QVector3D(*data))
self.addRow(translation)
# Here to keep a reference
@@ -359,51 +449,60 @@ class DataItem3DTransformRow(StaticRow):
rotateCenter = StaticRow(
('Center', None),
children=(
- ProxyRow(name='X axis',
- fget=item.getRotationCenter,
- fset=self._xSetCenter,
- notify=item.sigItemChanged,
- toModelData=functools.partial(
- self._centerToModelData, index=0),
- editorHint=self._ROTATION_CENTER_OPTIONS),
- ProxyRow(name='Y axis',
- fget=item.getRotationCenter,
- fset=self._ySetCenter,
- notify=item.sigItemChanged,
- toModelData=functools.partial(
- self._centerToModelData, index=1),
- editorHint=self._ROTATION_CENTER_OPTIONS),
- ProxyRow(name='Z axis',
- fget=item.getRotationCenter,
- fset=self._zSetCenter,
- notify=item.sigItemChanged,
- toModelData=functools.partial(
- self._centerToModelData, index=2),
- editorHint=self._ROTATION_CENTER_OPTIONS),
+ ItemProxyRow(item=item,
+ name='X axis',
+ fget=item.getRotationCenter,
+ fset=self._xSetCenter,
+ events=items.Item3DChangedType.TRANSFORM,
+ toModelData=functools.partial(
+ self._centerToModelData, index=0),
+ editorHint=self._ROTATION_CENTER_OPTIONS),
+ ItemProxyRow(item=item,
+ name='Y axis',
+ fget=item.getRotationCenter,
+ fset=self._ySetCenter,
+ events=items.Item3DChangedType.TRANSFORM,
+ toModelData=functools.partial(
+ self._centerToModelData, index=1),
+ editorHint=self._ROTATION_CENTER_OPTIONS),
+ ItemProxyRow(item=item,
+ name='Z axis',
+ fget=item.getRotationCenter,
+ fset=self._zSetCenter,
+ events=items.Item3DChangedType.TRANSFORM,
+ toModelData=functools.partial(
+ self._centerToModelData, index=2),
+ editorHint=self._ROTATION_CENTER_OPTIONS),
))
rotate = StaticRow(
('Rotation', None),
children=(
- AngleDegreeRow(name='Angle',
- fget=item.getRotation,
- fset=self._setAngle,
- notify=item.sigItemChanged,
- toModelData=lambda data: data[0]),
- ProxyRow(name='Axis',
- fget=item.getRotation,
- fset=self._setAxis,
- notify=item.sigItemChanged,
- toModelData=lambda data: qt.QVector3D(*data[1])),
+ ItemAngleDegreeRow(
+ item=item,
+ name='Angle',
+ fget=item.getRotation,
+ fset=self._setAngle,
+ events=items.Item3DChangedType.TRANSFORM,
+ toModelData=lambda data: data[0]),
+ ItemProxyRow(
+ item=item,
+ name='Axis',
+ fget=item.getRotation,
+ fset=self._setAxis,
+ events=items.Item3DChangedType.TRANSFORM,
+ toModelData=lambda data: qt.QVector3D(*data[1])),
rotateCenter
))
self.addRow(rotate)
- scale = ProxyRow(name='Scale',
- fget=item.getScale,
- fset=self._setScale,
- notify=item.sigItemChanged,
- toModelData=lambda data: qt.QVector3D(*data))
+ scale = ItemProxyRow(
+ item=item,
+ name='Scale',
+ fget=item.getScale,
+ fset=self._setScale,
+ events=items.Item3DChangedType.TRANSFORM,
+ toModelData=lambda data: qt.QVector3D(*data))
self.addRow(scale)
matrix = StaticRow(
@@ -545,7 +644,7 @@ class GroupItemRow(Item3DRow):
raise RuntimeError("Model does not correspond to scene content")
-class InterpolationRow(ProxyRow):
+class InterpolationRow(ItemProxyRow):
"""Represents :class:`InterpolationMixIn` property.
:param Item3D item: Scene item with interpolation property
@@ -554,10 +653,11 @@ class InterpolationRow(ProxyRow):
def __init__(self, item):
modes = [mode.title() for mode in item.INTERPOLATION_MODES]
super(InterpolationRow, self).__init__(
+ item=item,
name='Interpolation',
fget=item.getInterpolation,
fset=item.setInterpolation,
- notify=item.sigItemChanged,
+ events=items.Item3DChangedType.INTERPOLATION,
toModelData=lambda mode: mode.title(),
fromModelData=lambda mode: mode.lower(),
editorHint=modes)
@@ -817,7 +917,7 @@ class ColormapRow(_ColormapBaseProxyRow):
return super(ColormapRow, self).data(column, role)
-class SymbolRow(ProxyRow):
+class SymbolRow(ItemProxyRow):
"""Represents :class:`SymbolMixIn` symbol property.
:param Item3D item: Scene item with symbol property
@@ -826,14 +926,15 @@ class SymbolRow(ProxyRow):
def __init__(self, item):
names = [item.getSymbolName(s) for s in item.getSupportedSymbols()]
super(SymbolRow, self).__init__(
- name='Marker',
- fget=item.getSymbolName,
- fset=item.setSymbol,
- notify=item.sigItemChanged,
- editorHint=names)
+ item=item,
+ name='Marker',
+ fget=item.getSymbolName,
+ fset=item.setSymbol,
+ events=items.ItemChangedType.SYMBOL,
+ editorHint=names)
-class SymbolSizeRow(ProxyRow):
+class SymbolSizeRow(ItemProxyRow):
"""Represents :class:`SymbolMixIn` symbol size property.
:param Item3D item: Scene item with symbol size property
@@ -841,25 +942,27 @@ class SymbolSizeRow(ProxyRow):
def __init__(self, item):
super(SymbolSizeRow, self).__init__(
+ item=item,
name='Marker size',
fget=item.getSymbolSize,
fset=item.setSymbolSize,
- notify=item.sigItemChanged,
+ events=items.ItemChangedType.SYMBOL_SIZE,
editorHint=(1, 20)) # TODO link with OpenGL max point size
-class PlaneRow(ProxyRow):
- """Represents :class:`PlaneMixIn` property.
+class PlaneEquationRow(ItemProxyRow):
+ """Represents :class:`PlaneMixIn` as plane equation.
:param Item3D item: Scene item with plane equation property
"""
def __init__(self, item):
- super(PlaneRow, self).__init__(
+ super(PlaneEquationRow, self).__init__(
+ item=item,
name='Equation',
fget=item.getParameters,
fset=item.setParameters,
- notify=item.sigItemChanged,
+ events=items.ItemChangedType.POSITION,
toModelData=lambda data: qt.QVector4D(*data),
fromModelData=lambda data: (data.x(), data.y(), data.z(), data.w()))
self._item = weakref.ref(item)
@@ -871,7 +974,99 @@ class PlaneRow(ProxyRow):
params = item.getParameters()
return ('%gx %+gy %+gz %+g = 0' %
(params[0], params[1], params[2], params[3]))
- return super(PlaneRow, self).data(column, role)
+ return super(PlaneEquationRow, self).data(column, role)
+
+
+class PlaneRow(ItemProxyRow):
+ """Represents :class:`PlaneMixIn` property.
+
+ :param Item3D item: Scene item with plane equation property
+ """
+
+ _PLANES = OrderedDict((('Plane 0', (1., 0., 0.)),
+ ('Plane 1', (0., 1., 0.)),
+ ('Plane 2', (0., 0., 1.)),
+ ('-', None)))
+ """Mapping of plane names to normals"""
+
+ _PLANE_ICONS = {'Plane 0': '3d-plane-normal-x',
+ 'Plane 1': '3d-plane-normal-y',
+ 'Plane 2': '3d-plane-normal-z',
+ '-': '3d-plane'}
+ """Mapping of plane names to normals"""
+
+ def __init__(self, item):
+ super(PlaneRow, self).__init__(
+ item=item,
+ name='Plane',
+ fget=self.__getPlaneName,
+ fset=self.__setPlaneName,
+ events=items.ItemChangedType.POSITION,
+ editorHint=tuple(self._PLANES.keys()))
+ self._item = weakref.ref(item)
+ self._lastName = None
+
+ self.addRow(PlaneEquationRow(item))
+
+ def _notified(self, *args, **kwargs):
+ """Handle notification of modification
+
+ Here only send if plane name actually changed
+ """
+ if self._lastName != self.__getPlaneName():
+ super(PlaneRow, self)._notified()
+
+ def __getPlaneName(self):
+ """Returns name of plane // to axes or '-'
+
+ :rtype: str
+ """
+ item = self._item()
+ planeNormal = item.getNormal() if item is not None else None
+
+ for name, normal in self._PLANES.items():
+ if numpy.array_equal(planeNormal, normal):
+ return name
+ return '-'
+
+ def __setPlaneName(self, data):
+ """Set plane normal according to given plane name
+
+ :param str data: Selected plane name
+ """
+ item = self._item()
+ if item is not None:
+ for name, normal in self._PLANES.items():
+ if data == name and normal is not None:
+ item.setNormal(normal)
+
+ def data(self, column, role):
+ if column == 1 and role == qt.Qt.DecorationRole:
+ return icons.getQIcon(self._PLANE_ICONS[self.__getPlaneName()])
+ data = super(PlaneRow, self).data(column, role)
+ if column == 1 and role == qt.Qt.DisplayRole:
+ self._lastName = data
+ return data
+
+
+class ComplexModeRow(ItemProxyRow):
+ """Represents :class:`items.ComplexMixIn` symbol property.
+
+ :param Item3D item: Scene item with symbol property
+ """
+
+ def __init__(self, item):
+ names = [m.value.replace('_', ' ').title()
+ for m in item.supportedComplexModes()]
+ super(ComplexModeRow, self).__init__(
+ item=item,
+ name='Mode',
+ fget=item.getComplexMode,
+ fset=item.setComplexMode,
+ events=items.ItemChangedType.COMPLEX_MODE,
+ toModelData=lambda data: data.value.replace('_', ' ').title(),
+ fromModelData=lambda data: data.lower().replace(' ', '_'),
+ editorHint=names)
class RemoveIsosurfaceRow(BaseRow):
@@ -923,9 +1118,9 @@ class RemoveIsosurfaceRow(BaseRow):
"""Handle Delete button clicked"""
isosurface = self.isosurface()
if isosurface is not None:
- scalarField3D = isosurface.parent()
- if scalarField3D is not None:
- scalarField3D.removeIsosurface(isosurface)
+ volume = isosurface.parent()
+ if volume is not None:
+ volume.removeIsosurface(isosurface)
class IsosurfaceRow(Item3DRow):
@@ -937,6 +1132,9 @@ class IsosurfaceRow(Item3DRow):
_LEVEL_SLIDER_RANGE = 0, 1000
"""Range given as editor hint"""
+ _EVENTS = items.ItemChangedType.VISIBLE, items.ItemChangedType.COLOR
+ """Events for which to update the first column in the tree"""
+
def __init__(self, item):
super(IsosurfaceRow, self).__init__(item, name=item.getLevel())
@@ -944,24 +1142,27 @@ class IsosurfaceRow(Item3DRow):
item.sigItemChanged.connect(self._levelChanged)
- self.addRow(ProxyRow(
+ self.addRow(ItemProxyRow(
+ item=item,
name='Level',
fget=self._getValueForLevelSlider,
fset=self._setLevelFromSliderValue,
- notify=item.sigItemChanged,
+ events=items.Item3DChangedType.ISO_LEVEL,
editorHint=self._LEVEL_SLIDER_RANGE))
- self.addRow(ColorProxyRow(
+ self.addRow(ItemColorProxyRow(
+ item=item,
name='Color',
fget=self._rgbColor,
fset=self._setRgbColor,
- notify=item.sigItemChanged))
+ events=items.ItemChangedType.COLOR))
- self.addRow(ProxyRow(
+ self.addRow(ItemProxyRow(
+ item=item,
name='Opacity',
fget=self._opacity,
fset=self._setOpacity,
- notify=item.sigItemChanged,
+ events=items.ItemChangedType.COLOR,
editorHint=(0, 255)))
self.addRow(RemoveIsosurfaceRow(item))
@@ -973,12 +1174,15 @@ class IsosurfaceRow(Item3DRow):
"""
item = self.item()
if item is not None:
- scalarField3D = item.parent()
- if scalarField3D is not None:
- dataRange = scalarField3D.getDataRange()
+ volume = item.parent()
+ if volume is not None:
+ dataRange = volume.getDataRange()
if dataRange is not None:
dataMin, dataMax = dataRange[0], dataRange[-1]
- offset = (item.getLevel() - dataMin) / (dataMax - dataMin)
+ if dataMax != dataMin:
+ offset = (item.getLevel() - dataMin) / (dataMax - dataMin)
+ else:
+ offset = 0.
sliderMin, sliderMax = self._LEVEL_SLIDER_RANGE
value = sliderMin + (sliderMax - sliderMin) * offset
@@ -992,9 +1196,9 @@ class IsosurfaceRow(Item3DRow):
"""
item = self.item()
if item is not None:
- scalarField3D = item.parent()
- if scalarField3D is not None:
- dataRange = scalarField3D.getDataRange()
+ volume = item.parent()
+ if volume is not None:
+ dataRange = volume.getDataRange()
if dataRange is not None:
sliderMin, sliderMax = self._LEVEL_SLIDER_RANGE
offset = (value - sliderMin) / (sliderMax - sliderMin)
@@ -1082,13 +1286,13 @@ class IsosurfaceRow(Item3DRow):
class AddIsosurfaceRow(BaseRow):
"""Class for Isosurface create button
- :param ScalarField3D scalarField3D:
- The ScalarField3D item to attach the button to.
+ :param Union[ScalarField3D,ComplexField3D] volume:
+ The volume item to attach the button to.
"""
- def __init__(self, scalarField3D):
+ def __init__(self, volume):
super(AddIsosurfaceRow, self).__init__()
- self._scalarField3D = weakref.ref(scalarField3D)
+ self._volume = weakref.ref(volume)
def createEditor(self):
"""Specific editor factory provided to the model"""
@@ -1106,12 +1310,12 @@ class AddIsosurfaceRow(BaseRow):
layout.addStretch(1)
return editor
- def scalarField3D(self):
- """Returns the controlled ScalarField3D
+ def volume(self):
+ """Returns the controlled volume item
- :rtype: ScalarField3D
+ :rtype: Union[ScalarField3D,ComplexField3D]
"""
- return self._scalarField3D()
+ return self._volume()
def data(self, column, role):
if column == 0 and role == qt.Qt.UserRole: # editor hint
@@ -1127,53 +1331,59 @@ class AddIsosurfaceRow(BaseRow):
def _addClicked(self):
"""Handle Delete button clicked"""
- scalarField3D = self.scalarField3D()
- if scalarField3D is not None:
- dataRange = scalarField3D.getDataRange()
+ volume = self.volume()
+ if volume is not None:
+ dataRange = volume.getDataRange()
if dataRange is None:
dataRange = 0., 1.
- scalarField3D.addIsosurface(
+ volume.addIsosurface(
numpy.mean((dataRange[0], dataRange[-1])),
'#0000FF')
-class ScalarField3DIsoSurfacesRow(StaticRow):
+class VolumeIsoSurfacesRow(StaticRow):
"""Represents :class:`ScalarFieldView`'s isosurfaces
- :param ScalarFieldView scalarField3D: ScalarFieldView to control
+ :param Union[ScalarField3D,ComplexField3D] volume:
+ Volume item to control
"""
- def __init__(self, scalarField3D):
- super(ScalarField3DIsoSurfacesRow, self).__init__(
+ def __init__(self, volume):
+ super(VolumeIsoSurfacesRow, self).__init__(
('Isosurfaces', None))
- self._scalarField3D = weakref.ref(scalarField3D)
+ self._volume = weakref.ref(volume)
- scalarField3D.sigIsosurfaceAdded.connect(self._isosurfaceAdded)
- scalarField3D.sigIsosurfaceRemoved.connect(self._isosurfaceRemoved)
+ volume.sigIsosurfaceAdded.connect(self._isosurfaceAdded)
+ volume.sigIsosurfaceRemoved.connect(self._isosurfaceRemoved)
- for item in scalarField3D.getIsosurfaces():
+ if isinstance(volume, items.ComplexMixIn):
+ self.addRow(ComplexModeRow(volume))
+
+ for item in volume.getIsosurfaces():
self.addRow(nodeFromItem(item))
- self.addRow(AddIsosurfaceRow(scalarField3D))
+ self.addRow(AddIsosurfaceRow(volume))
- def scalarField3D(self):
- """Returns the controlled ScalarField3D
+ def volume(self):
+ """Returns the controlled volume item
- :rtype: ScalarField3D
+ :rtype: Union[ScalarField3D,ComplexField3D]
"""
- return self._scalarField3D()
+ return self._volume()
def _isosurfaceAdded(self, item):
"""Handle isosurface addition
:param Isosurface item: added isosurface
"""
- scalarField3D = self.scalarField3D()
- if scalarField3D is None:
+ volume = self.volume()
+ if volume is None:
return
- row = scalarField3D.getIsosurfaces().index(item)
+ row = volume.getIsosurfaces().index(item)
+ if isinstance(volume, items.ComplexMixIn):
+ row += 1 # Offset for the ComplexModeRow
self.addRow(nodeFromItem(item), row)
def _isosurfaceRemoved(self, item):
@@ -1181,13 +1391,13 @@ class ScalarField3DIsoSurfacesRow(StaticRow):
:param Isosurface item: removed isosurface
"""
- scalarField3D = self.scalarField3D()
- if scalarField3D is None:
+ volume = self.volume()
+ if volume is None:
return
# Find item
for row in self.children():
- if row.item() is item:
+ if isinstance(row, IsosurfaceRow) and row.item() is item:
self.removeRow(row)
break # Got it
else:
@@ -1267,7 +1477,7 @@ class Scatter2DSymbolSizeRow(Scatter2DPropertyMixInRow, SymbolSizeRow):
Scatter2DPropertyMixInRow.__init__(self, item, 'symbolSize')
-class Scatter2DLineWidth(Scatter2DPropertyMixInRow, ProxyRow):
+class Scatter2DLineWidth(Scatter2DPropertyMixInRow, ItemProxyRow):
"""Specific class for Scatter2D symbol size.
It is enabled/disabled according to visualization mode.
@@ -1277,12 +1487,13 @@ class Scatter2DLineWidth(Scatter2DPropertyMixInRow, ProxyRow):
def __init__(self, item):
# TODO link editorHint with OpenGL max line width
- ProxyRow.__init__(self,
- name='Line width',
- fget=item.getLineWidth,
- fset=item.setLineWidth,
- notify=item.sigItemChanged,
- editorHint=(1, 10))
+ ItemProxyRow.__init__(self,
+ item=item,
+ name='Line width',
+ fget=item.getLineWidth,
+ fset=item.setLineWidth,
+ events=items.ItemChangedType.LINE_WIDTH,
+ editorHint=(1, 10))
Scatter2DPropertyMixInRow.__init__(self, item, 'lineWidth')
@@ -1292,20 +1503,22 @@ def initScatter2DNode(node, item):
:param Item3DRow node: The model node to setup
:param Scatter2D item: The Scatter2D the node is representing
"""
- node.addRow(ProxyRow(
+ node.addRow(ItemProxyRow(
+ item=item,
name='Mode',
fget=item.getVisualization,
fset=item.setVisualization,
- notify=item.sigItemChanged,
- editorHint=[m.title() for m in item.supportedVisualizations()],
- toModelData=lambda data: data.title(),
+ events=items.ItemChangedType.VISUALIZATION_MODE,
+ editorHint=[m.value.title() for m in item.supportedVisualizations()],
+ toModelData=lambda data: data.value.title(),
fromModelData=lambda data: data.lower()))
- node.addRow(ProxyRow(
+ node.addRow(ItemProxyRow(
+ item=item,
name='Height map',
fget=item.isHeightMap,
fset=item.setHeightMap,
- notify=item.sigItemChanged))
+ events=items.Item3DChangedType.HEIGHT_MAP))
node.addRow(ColormapRow(item))
@@ -1315,39 +1528,44 @@ def initScatter2DNode(node, item):
node.addRow(Scatter2DLineWidth(item))
-def initScalarField3DNode(node, item):
- """Specific node init for ScalarField3D
+def initVolumeNode(node, item):
+ """Specific node init for volume items
:param Item3DRow node: The model node to setup
- :param ScalarField3D item: The ScalarField3D the node is representing
+ :param Union[ScalarField3D,ComplexField3D] item:
+ The volume item represented by the node
"""
node.addRow(nodeFromItem(item.getCutPlanes()[0])) # Add cut plane
- node.addRow(ScalarField3DIsoSurfacesRow(item))
+ node.addRow(VolumeIsoSurfacesRow(item))
-def initScalarField3DCutPlaneNode(node, item):
- """Specific node init for ScalarField3D CutPlane
+def initVolumeCutPlaneNode(node, item):
+ """Specific node init for volume CutPlane
:param Item3DRow node: The model node to setup
:param CutPlane item: The CutPlane the node is representing
"""
+ if isinstance(item, items.ComplexMixIn):
+ node.addRow(ComplexModeRow(item))
+
node.addRow(PlaneRow(item))
node.addRow(ColormapRow(item))
- node.addRow(ProxyRow(
- name='Values<=Min',
+ node.addRow(ItemProxyRow(
+ item=item,
+ name='Show <=Min',
fget=item.getDisplayValuesBelowMin,
fset=item.setDisplayValuesBelowMin,
- notify=item.sigItemChanged))
+ events=items.ItemChangedType.ALPHA))
node.addRow(InterpolationRow(item))
NODE_SPECIFIC_INIT = [ # class, init(node, item)
(items.Scatter2D, initScatter2DNode),
- (items.ScalarField3D, initScalarField3DNode),
- (CutPlane, initScalarField3DCutPlaneNode),
+ (items.ScalarField3D, initVolumeNode),
+ (CutPlane, initVolumeCutPlaneNode),
]
"""List of specific node init for different item class"""
diff --git a/silx/gui/plot3d/actions/mode.py b/silx/gui/plot3d/actions/mode.py
index b591290..ce09b4c 100644
--- a/silx/gui/plot3d/actions/mode.py
+++ b/silx/gui/plot3d/actions/mode.py
@@ -1,7 +1,7 @@
# coding: utf-8
# /*##########################################################################
#
-# Copyright (c) 2017-2018 European Synchrotron Radiation Facility
+# Copyright (c) 2017-2019 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -24,7 +24,8 @@
# ###########################################################################*/
"""This module provides Plot3DAction related to interaction modes.
-It provides QAction to rotate or pan a Plot3DWidget.
+It provides QAction to rotate or pan a Plot3DWidget
+as well as toggle a picking mode.
"""
from __future__ import absolute_import, division
@@ -36,7 +37,9 @@ __date__ = "06/09/2017"
import logging
-from silx.gui.icons import getQIcon
+from ....utils.proxy import docstring
+from ... import qt
+from ...icons import getQIcon
from .Plot3DAction import Plot3DAction
@@ -69,6 +72,7 @@ class InteractiveModeAction(Plot3DAction):
plot3d.setInteractiveMode(self._interaction)
self.setChecked(True)
+ @docstring(Plot3DAction)
def setPlot3DWidget(self, widget):
# Disconnect from previous Plot3DWidget
plot3d = self.getPlot3DWidget()
@@ -86,9 +90,6 @@ class InteractiveModeAction(Plot3DAction):
widget.sigInteractiveModeChanged.connect(
self._interactiveModeChanged)
- # Reuse docstring from super class
- setPlot3DWidget.__doc__ = Plot3DAction.setPlot3DWidget.__doc__
-
def _interactiveModeChanged(self):
plot3d = self.getPlot3DWidget()
if plot3d is None:
@@ -127,3 +128,51 @@ class PanAction(InteractiveModeAction):
self.setIcon(getQIcon('pan'))
self.setText('Pan')
self.setToolTip('Pan the view. Press <b>Ctrl</b> to rotate.')
+
+
+class PickingModeAction(Plot3DAction):
+ """QAction to toggle picking moe on a Plot3DWidget
+
+ :param parent: See :class:`QAction`
+ :param ~silx.gui.plot3d.Plot3DWidget.Plot3DWidget plot3d:
+ Plot3DWidget the action is associated with
+ """
+
+ sigSceneClicked = qt.Signal(float, float)
+ """Signal emitted when the scene is clicked with the left mouse button.
+
+ This signal is only emitted when the action is checked.
+
+ It provides the (x, y) clicked mouse position
+ """
+
+ def __init__(self, parent, plot3d=None):
+ super(PickingModeAction, self).__init__(parent, plot3d)
+ self.setIcon(getQIcon('pointing-hand'))
+ self.setText('Picking')
+ self.setToolTip('Toggle picking with left button click')
+ self.setCheckable(True)
+ self.triggered[bool].connect(self._triggered)
+
+ def _triggered(self, checked=False):
+ plot3d = self.getPlot3DWidget()
+ if plot3d is not None:
+ if checked:
+ plot3d.sigSceneClicked.connect(self.sigSceneClicked)
+ else:
+ plot3d.sigSceneClicked.disconnect(self.sigSceneClicked)
+
+ @docstring(Plot3DAction)
+ def setPlot3DWidget(self, widget):
+ # Disconnect from previous Plot3DWidget
+ plot3d = self.getPlot3DWidget()
+ if plot3d is not None and self.isChecked():
+ plot3d.sigSceneClicked.disconnect(self.sigSceneClicked)
+
+ super(PickingModeAction, self).setPlot3DWidget(widget)
+
+ # Connect to new Plot3DWidget
+ if widget is None:
+ self.setChecked(False)
+ elif self.isChecked():
+ widget.sigSceneClicked.connect(self.sigSceneClicked)
diff --git a/silx/gui/plot3d/items/__init__.py b/silx/gui/plot3d/items/__init__.py
index 58eee9c..5810618 100644
--- a/silx/gui/plot3d/items/__init__.py
+++ b/silx/gui/plot3d/items/__init__.py
@@ -34,10 +34,10 @@ __date__ = "15/11/2017"
from .core import DataItem3D, Item3D, GroupItem, GroupWithAxesItem # noqa
from .core import ItemChangedType, Item3DChangedType # noqa
-from .mixins import (ColormapMixIn, InterpolationMixIn, # noqa
+from .mixins import (ColormapMixIn, ComplexMixIn, InterpolationMixIn, # noqa
PlaneMixIn, SymbolMixIn) # noqa
from .clipplane import ClipPlane # noqa
from .image import ImageData, ImageRgba # noqa
from .mesh import Mesh, ColormapMesh, Box, Cylinder, Hexagon # noqa
from .scatter import Scatter2D, Scatter3D # noqa
-from .volume import ScalarField3D # noqa
+from .volume import ComplexField3D, ScalarField3D # noqa
diff --git a/silx/gui/plot3d/items/mesh.py b/silx/gui/plot3d/items/mesh.py
index d3f5e38..3577dbf 100644
--- a/silx/gui/plot3d/items/mesh.py
+++ b/silx/gui/plot3d/items/mesh.py
@@ -35,6 +35,7 @@ __date__ = "17/07/2018"
import logging
import numpy
+from ... import _glutils as glu
from ..scene import primitives, utils, function
from ..scene.transform import Rotate
from .core import DataItem3D, ItemChangedType
@@ -168,7 +169,7 @@ class _MeshBase(DataItem3D):
_logger.warning("Unsupported draw mode: %s" % mode)
return None
- trianglesIndices, t, barycentric = utils.segmentTrianglesIntersection(
+ trianglesIndices, t, barycentric = glu.segmentTrianglesIntersection(
rayObject, triangles)
if len(trianglesIndices) == 0:
@@ -494,7 +495,7 @@ class _CylindricalVolume(DataItem3D):
positions = self._mesh.getAttribute('position', copy=False)
triangles = positions.reshape(-1, 3, 3) # 'triangle' draw mode
- trianglesIndices, t = utils.segmentTrianglesIntersection(
+ trianglesIndices, t = glu.segmentTrianglesIntersection(
rayObject, triangles)[:2]
if len(trianglesIndices) == 0:
diff --git a/silx/gui/plot3d/items/mixins.py b/silx/gui/plot3d/items/mixins.py
index 40b8438..b355627 100644
--- a/silx/gui/plot3d/items/mixins.py
+++ b/silx/gui/plot3d/items/mixins.py
@@ -38,6 +38,7 @@ from silx.math.combo import min_max
from ...plot.items.core import ItemMixInBase
from ...plot.items.core import ColormapMixIn as _ColormapMixIn
from ...plot.items.core import SymbolMixIn as _SymbolMixIn
+from ...plot.items.core import ComplexMixIn as _ComplexMixIn
from ...colors import rgba
from ..scene import primitives
@@ -139,8 +140,9 @@ class ColormapMixIn(_ColormapMixIn):
self._dataRange = dataRange
- if self.getColormap().isAutoscale():
- self._syncSceneColormap()
+ colormap = self.getColormap()
+ if None in (colormap.getVMin(), colormap.getVMax()):
+ self._colormapChanged()
def _getDataRange(self):
"""Returns the data range as used in the scene for colormap
@@ -173,6 +175,18 @@ class ColormapMixIn(_ColormapMixIn):
self.__sceneColormap.range_ = range_
+class ComplexMixIn(_ComplexMixIn):
+ __doc__ = _ComplexMixIn.__doc__ # Reuse docstring
+
+ _SUPPORTED_COMPLEX_MODES = (
+ _ComplexMixIn.ComplexMode.REAL,
+ _ComplexMixIn.ComplexMode.IMAGINARY,
+ _ComplexMixIn.ComplexMode.ABSOLUTE,
+ _ComplexMixIn.ComplexMode.PHASE,
+ _ComplexMixIn.ComplexMode.SQUARE_AMPLITUDE)
+ """Overrides supported ComplexMode"""
+
+
class SymbolMixIn(_SymbolMixIn):
"""Mix-in class for symbol and symbolSize properties for Item3D"""
diff --git a/silx/gui/plot3d/items/scatter.py b/silx/gui/plot3d/items/scatter.py
index b7bcd09..e8ffee1 100644
--- a/silx/gui/plot3d/items/scatter.py
+++ b/silx/gui/plot3d/items/scatter.py
@@ -31,14 +31,19 @@ __authors__ = ["T. Vincent"]
__license__ = "MIT"
__date__ = "15/11/2017"
-import collections
+try:
+ from collections import abc
+except ImportError: # Python2 support
+ import collections as abc
import logging
-import sys
import numpy
from ....utils.deprecation import deprecated
+from ... import _glutils as glu
+from ...plot._utils.delaunay import delaunay
from ..scene import function, primitives, utils
+from ...plot.items import ScatterVisualizationMixIn
from .core import DataItem3D, Item3DChangedType, ItemChangedType
from .mixins import ColormapMixIn, SymbolMixIn
from ._pick import PickingResult
@@ -213,16 +218,19 @@ class Scatter3D(DataItem3D, ColormapMixIn, SymbolMixIn):
return None
-class Scatter2D(DataItem3D, ColormapMixIn, SymbolMixIn):
+class Scatter2D(DataItem3D, ColormapMixIn, SymbolMixIn,
+ ScatterVisualizationMixIn):
"""2D scatter data with settable visualization mode.
:param parent: The View widget this item belongs to.
"""
_VISUALIZATION_PROPERTIES = {
- 'points': ('symbol', 'symbolSize'),
- 'lines': ('lineWidth',),
- 'solid': (),
+ ScatterVisualizationMixIn.Visualization.POINTS:
+ ('symbol', 'symbolSize'),
+ ScatterVisualizationMixIn.Visualization.LINES:
+ ('lineWidth',),
+ ScatterVisualizationMixIn.Visualization.SOLID: (),
}
"""Dict {visualization mode: property names used in this mode}"""
@@ -230,8 +238,8 @@ class Scatter2D(DataItem3D, ColormapMixIn, SymbolMixIn):
DataItem3D.__init__(self, parent=parent)
ColormapMixIn.__init__(self)
SymbolMixIn.__init__(self)
+ ScatterVisualizationMixIn.__init__(self)
- self._visualizationMode = 'points'
self._heightMap = False
self._lineWidth = 1.
@@ -254,48 +262,14 @@ class Scatter2D(DataItem3D, ColormapMixIn, SymbolMixIn):
child.marker = symbol
child.setAttribute('size', size, copy=True)
- elif event == ItemChangedType.VISIBLE:
+ elif event is ItemChangedType.VISIBLE:
# TODO smart update?, need dirty flags
self._updateScene()
- super(Scatter2D, self)._updated(event)
-
- def supportedVisualizations(self):
- """Returns the list of supported visualization modes.
-
- See :meth:`setVisualizationModes`
-
- :rtype: tuple of str
- """
- return tuple(self._VISUALIZATION_PROPERTIES.keys())
-
- def setVisualization(self, mode):
- """Set the visualization mode of the data.
-
- Supported visualization modes are:
-
- - 'points': For scatter plot representation
- - 'lines': For Delaunay tessellation-based wireframe representation
- - 'solid': For Delaunay tessellation-based solid surface representation
-
- :param str mode: Mode of representation to use
- """
- mode = str(mode)
- assert mode in self.supportedVisualizations()
-
- if mode != self.getVisualization():
- self._visualizationMode = mode
+ elif event is ItemChangedType.VISUALIZATION_MODE:
self._updateScene()
- self._updated(ItemChangedType.VISUALIZATION_MODE)
- def getVisualization(self):
- """Returns the current visualization mode.
-
- See :meth:`setVisualization`
-
- :rtype: str
- """
- return self._visualizationMode
+ super(Scatter2D, self)._updated(event)
def isPropertyEnabled(self, name, visualization=None):
"""Returns true if the property is used with visualization mode.
@@ -374,7 +348,7 @@ class Scatter2D(DataItem3D, ColormapMixIn, SymbolMixIn):
y, copy=copy, dtype=numpy.float32, order='C').reshape(-1)
assert len(x) == len(y)
- if isinstance(value, collections.Iterable):
+ if isinstance(value, abc.Iterable):
value = numpy.array(
value, copy=copy, dtype=numpy.float32, order='C').reshape(-1)
assert len(value) == len(x)
@@ -503,7 +477,7 @@ class Scatter2D(DataItem3D, ColormapMixIn, SymbolMixIn):
trianglesIndices = self._cachedTrianglesIndices.reshape(-1, 3)
triangles = points[trianglesIndices, :3]
- selectedIndices, t, barycentric = utils.segmentTrianglesIntersection(
+ selectedIndices, t, barycentric = glu.segmentTrianglesIntersection(
rayObject, triangles)
closest = numpy.argmax(barycentric, axis=1)
@@ -542,14 +516,14 @@ class Scatter2D(DataItem3D, ColormapMixIn, SymbolMixIn):
numpy.ones_like(xData)))
mode = self.getVisualization()
- if mode == 'points':
+ if mode is self.Visualization.POINTS:
# TODO issue with symbol size: using pixel instead of points
# Get "corrected" symbol size
_, threshold = self._getSceneSymbol()
return self._pickPoints(
context, points, threshold=max(3., threshold))
- elif mode == 'lines':
+ elif mode is self.Visualization.LINES:
# Picking only at point
return self._pickPoints(context, points, threshold=5.)
@@ -569,7 +543,7 @@ class Scatter2D(DataItem3D, ColormapMixIn, SymbolMixIn):
mode = self.getVisualization()
heightMap = self.isHeightMap()
- if mode == 'points':
+ if mode is self.Visualization.POINTS:
z = value if heightMap else 0.
symbol, size = self._getSceneSymbol()
primitive = primitives.Points(
@@ -582,35 +556,19 @@ class Scatter2D(DataItem3D, ColormapMixIn, SymbolMixIn):
# TODO run delaunay in a thread
# Compute lines/triangles indices if not cached
if self._cachedTrianglesIndices is None:
- coordinates = numpy.array((x, y)).T
-
- if len(coordinates) > 3:
- # Enough points to try a Delaunay tesselation
-
- # Lazy loading of Delaunay
- from silx.third_party.scipy_spatial import Delaunay as _Delaunay
-
- try:
- tri = _Delaunay(coordinates)
- except RuntimeError:
- _logger.error("Delaunay tesselation failed: %s",
- sys.exc_info()[1])
- return None
-
- self._cachedTrianglesIndices = numpy.ravel(
- tri.simplices.astype(numpy.uint32))
-
- else:
- # 3 or less points: Draw one triangle
- self._cachedTrianglesIndices = \
- numpy.arange(3, dtype=numpy.uint32) % len(coordinates)
-
- if mode == 'lines' and self._cachedLinesIndices is None:
+ triangulation = delaunay(x, y)
+ if triangulation is None:
+ return None
+ self._cachedTrianglesIndices = numpy.ravel(
+ triangulation.simplices.astype(numpy.uint32))
+
+ if (mode is self.Visualization.LINES and
+ self._cachedLinesIndices is None):
# Compute line indices
self._cachedLinesIndices = utils.triangleToLineIndices(
self._cachedTrianglesIndices, unicity=True)
- if mode == 'lines':
+ if mode is self.Visualization.LINES:
indices = self._cachedLinesIndices
renderMode = 'lines'
else:
@@ -627,7 +585,7 @@ class Scatter2D(DataItem3D, ColormapMixIn, SymbolMixIn):
# TODO option to enable/disable light, cache normals
# TODO smooth surface
- if mode == 'solid':
+ if mode is self.Visualization.SOLID:
if heightMap:
coordinates = coordinates[indices]
if len(value) > 1:
diff --git a/silx/gui/plot3d/items/volume.py b/silx/gui/plot3d/items/volume.py
index 08ad02a..ae91e82 100644
--- a/silx/gui/plot3d/items/volume.py
+++ b/silx/gui/plot3d/items/volume.py
@@ -38,13 +38,15 @@ import numpy
from silx.math.combo import min_max
from silx.math.marchingcubes import MarchingCubes
+from ....utils.proxy import docstring
+from ... import _glutils as glu
from ... import qt
from ...colors import rgba
from ..scene import cutplane, primitives, transform, utils
from .core import BaseNodeItem, Item3D, ItemChangedType, Item3DChangedType
-from .mixins import ColormapMixIn, InterpolationMixIn, PlaneMixIn
+from .mixins import ColormapMixIn, ComplexMixIn, InterpolationMixIn, PlaneMixIn
from ._pick import PickingResult
@@ -60,12 +62,13 @@ class CutPlane(Item3D, ColormapMixIn, InterpolationMixIn, PlaneMixIn):
def __init__(self, parent):
plane = cutplane.CutPlane(normal=(0, 1, 0))
- Item3D.__init__(self, parent=parent)
+ Item3D.__init__(self, parent=None)
ColormapMixIn.__init__(self)
InterpolationMixIn.__init__(self)
PlaneMixIn.__init__(self, plane=plane)
self._dataRange = None
+ self._data = None
self._getScenePrimitive().children = [plane]
@@ -73,20 +76,53 @@ class CutPlane(Item3D, ColormapMixIn, InterpolationMixIn, PlaneMixIn):
ColormapMixIn._setSceneColormap(self, plane.colormap)
InterpolationMixIn._setPrimitive(self, plane)
- parent.sigItemChanged.connect(self._parentChanged)
+ self.setParent(parent)
+
+ def _updateData(self, data, range_):
+ """Update used dataset
+
+ No copy is made.
+
+ :param Union[numpy.ndarray[float],None] data: The dataset
+ :param Union[List[float],None] range_:
+ (min, min positive, max) values
+ """
+ self._data = None if data is None else numpy.array(data, copy=False)
+ self._getPlane().setData(self._data, copy=False)
+
+ # Store data range info as 3-tuple of values
+ self._dataRange = range_
+ self._setRangeFromData(
+ None if self._dataRange is None else numpy.array(self._dataRange))
+
+ self._updated(ItemChangedType.DATA)
+
+ def _syncDataWithParent(self):
+ """Synchronize this instance data with that of its parent"""
+ parent = self.parent()
+ if parent is None:
+ data, range_ = None, None
+ else:
+ data = parent.getData(copy=False)
+ range_ = parent.getDataRange()
+ self._updateData(data, range_)
def _parentChanged(self, event):
"""Handle data change in the parent this plane belongs to"""
if event == ItemChangedType.DATA:
- data = self.sender().getData(copy=False)
- self._getPlane().setData(data, copy=False)
+ self._syncDataWithParent()
+
+ def setParent(self, parent):
+ oldParent = self.parent()
+ if isinstance(oldParent, Item3D):
+ oldParent.sigItemChanged.disconnect(self._parentChanged)
- # Store data range info as 3-tuple of values
- self._dataRange = self.sender().getDataRange()
- self._setRangeFromData(
- None if self._dataRange is None else numpy.array(self._dataRange))
+ super(CutPlane, self).setParent(parent)
- self._updated(ItemChangedType.DATA)
+ if isinstance(parent, Item3D):
+ parent.sigItemChanged.connect(self._parentChanged)
+
+ self._syncDataWithParent()
# Colormap
@@ -114,8 +150,9 @@ class CutPlane(Item3D, ColormapMixIn, InterpolationMixIn, PlaneMixIn):
positive min is NaN if no data is positive.
:return: (min, positive min, max) or None.
+ :rtype: Union[List[float],None]
"""
- return self._dataRange
+ return None if self._dataRange is None else tuple(self._dataRange)
def getData(self, copy=True):
"""Return 3D dataset.
@@ -125,8 +162,10 @@ class CutPlane(Item3D, ColormapMixIn, InterpolationMixIn, PlaneMixIn):
False to get the internal data (DO NOT modify!)
:return: The data set (or None if not set)
"""
- parent = self.parent()
- return None if parent is None else parent.getData(copy=copy)
+ if self._data is None:
+ return None
+ else:
+ return numpy.array(self._data, copy=copy)
def _pickFull(self, context):
"""Perform picking in this item at given widget position.
@@ -172,18 +211,38 @@ class Isosurface(Item3D):
"""
def __init__(self, parent):
- Item3D.__init__(self, parent=parent)
- assert isinstance(parent, ScalarField3D)
- parent.sigItemChanged.connect(self._scalarField3DChanged)
+ Item3D.__init__(self, parent=None)
+ self._data = None
self._level = float('nan')
self._autoLevelFunction = None
self._color = rgba('#FFD700FF')
+ self.setParent(parent)
+
+ def _syncDataWithParent(self):
+ """Synchronize this instance data with that of its parent"""
+ parent = self.parent()
+ if parent is None:
+ self._data = None
+ else:
+ self._data = parent.getData(copy=False)
self._updateScenePrimitive()
- def _scalarField3DChanged(self, event):
- """Handle parent's ScalarField3D sigItemChanged"""
+ def _parentChanged(self, event):
+ """Handle data change in the parent this isosurface belongs to"""
if event == ItemChangedType.DATA:
- self._updateScenePrimitive()
+ self._syncDataWithParent()
+
+ def setParent(self, parent):
+ oldParent = self.parent()
+ if isinstance(oldParent, Item3D):
+ oldParent.sigItemChanged.disconnect(self._parentChanged)
+
+ super(Isosurface, self).setParent(parent)
+
+ if isinstance(parent, Item3D):
+ parent.sigItemChanged.connect(self._parentChanged)
+
+ self._syncDataWithParent()
def getData(self, copy=True):
"""Return 3D dataset.
@@ -193,8 +252,10 @@ class Isosurface(Item3D):
False to get the internal data (DO NOT modify!)
:return: The data set (or None if not set)
"""
- parent = self.parent()
- return None if parent is None else parent.getData(copy=copy)
+ if self._data is None:
+ return None
+ else:
+ return numpy.array(self._data, copy=copy)
def getLevel(self):
"""Return the level of this iso-surface (float)"""
@@ -349,7 +410,7 @@ class Isosurface(Item3D):
mc = MarchingCubes(data.reshape(2, 2, 2), isolevel=level)
points = mc.get_vertices() + currentBin
triangles = points[mc.get_indices()]
- t = utils.segmentTrianglesIntersection(rayObject, triangles)[1]
+ t = glu.segmentTrianglesIntersection(rayObject, triangles)[1]
t = numpy.unique(t) # Duplicates happen on triangle edges
if len(t) != 0:
# Compute intersection points and get closest data point
@@ -372,6 +433,12 @@ class ScalarField3D(BaseNodeItem):
:param parent: The View widget this item belongs to.
"""
+ _CutPlane = CutPlane
+ """CutPlane class associated to this class"""
+
+ _Isosurface = Isosurface
+ """Isosurface classe associated to this class"""
+
def __init__(self, parent=None):
BaseNodeItem.__init__(self, parent=parent)
@@ -385,7 +452,7 @@ class ScalarField3D(BaseNodeItem):
self._data = None
self._dataRange = None
- self._cutPlane = CutPlane(parent=self)
+ self._cutPlane = self._CutPlane(parent=self)
self._cutPlane.setVisible(False)
self._isogroup = primitives.GroupDepthOffset()
@@ -405,6 +472,26 @@ class ScalarField3D(BaseNodeItem):
self._cutPlane._getScenePrimitive(),
self._isogroup]
+ @staticmethod
+ def _computeRangeFromData(data):
+ """Compute range info (min, min positive, max) from data
+
+ :param Union[numpy.ndarray,None] data:
+ :return: Union[List[float],None]
+ """
+ if data is None:
+ return None
+
+ dataRange = min_max(data, min_positive=True, finite=True)
+ if dataRange.minimum is None: # Only non-finite data
+ return None
+
+ if dataRange is not None:
+ min_positive = dataRange.min_positive
+ if min_positive is None:
+ min_positive = float('nan')
+ return dataRange.minimum, min_positive, dataRange.maximum
+
def setData(self, data, copy=True):
"""Set the 3D scalar data represented by this item.
@@ -418,7 +505,6 @@ class ScalarField3D(BaseNodeItem):
"""
if data is None:
self._data = None
- self._dataRange = None
self._boundedGroup.shape = None
else:
@@ -427,21 +513,9 @@ class ScalarField3D(BaseNodeItem):
assert min(data.shape) >= 2
self._data = data
-
- # Store data range info
- dataRange = min_max(self._data, min_positive=True, finite=True)
- if dataRange.minimum is None: # Only non-finite data
- dataRange = None
-
- if dataRange is not None:
- min_positive = dataRange.min_positive
- if min_positive is None:
- min_positive = float('nan')
- dataRange = dataRange.minimum, min_positive, dataRange.maximum
- self._dataRange = dataRange
-
self._boundedGroup.shape = self._data.shape
+ self._dataRange = self._computeRangeFromData(self._data)
self._updated(ItemChangedType.DATA)
def getData(self, copy=True):
@@ -506,7 +580,7 @@ class ScalarField3D(BaseNodeItem):
:return: isosurface object
:rtype: ~silx.gui.plot3d.items.volume.Isosurface
"""
- isosurface = Isosurface(parent=self)
+ isosurface = self._Isosurface(parent=self)
isosurface.setColor(color)
if callable(level):
isosurface.setAutoLevelFunction(level)
@@ -561,8 +635,164 @@ class ScalarField3D(BaseNodeItem):
# BaseNodeItem
def getItems(self):
- """Returns the list of items currently present in the ScalarField3D.
+ """Returns the list of items currently present in this item.
:rtype: tuple
"""
return self.getCutPlanes() + self.getIsosurfaces()
+
+
+##################
+# ComplexField3D #
+##################
+
+class ComplexCutPlane(CutPlane, ComplexMixIn):
+ """Class representing a cutting plane in a :class:`ComplexField3D` item.
+
+ :param parent: 3D Data set in which the cut plane is applied.
+ """
+
+ def __init__(self, parent):
+ ComplexMixIn.__init__(self)
+ CutPlane.__init__(self, parent=parent)
+
+ def _syncDataWithParent(self):
+ """Synchronize this instance data with that of its parent"""
+ parent = self.parent()
+ if parent is None:
+ data, range_ = None, None
+ else:
+ mode = self.getComplexMode()
+ data = parent.getData(mode=mode, copy=False)
+ range_ = parent.getDataRange(mode=mode)
+ self._updateData(data, range_)
+
+ def _updated(self, event=None):
+ """Handle update of the cut plane (and take care of mode change
+
+ :param Union[None,ItemChangedType] event: The kind of update
+ """
+ if event == ItemChangedType.COMPLEX_MODE:
+ self._syncDataWithParent()
+ super(ComplexCutPlane, self)._updated(event)
+
+
+class ComplexIsosurface(Isosurface):
+ """Class representing an iso-surface in a :class:`ComplexField3D` item.
+
+ :param parent: The DataItem3D this iso-surface belongs to
+ """
+
+ def __init__(self, parent):
+ super(ComplexIsosurface, self).__init__(parent)
+
+ def _syncDataWithParent(self):
+ """Synchronize this instance data with that of its parent"""
+ parent = self.parent()
+ if parent is None:
+ self._data = None
+ else:
+ self._data = parent.getData(
+ mode=parent.getComplexMode(), copy=False)
+ self._updateScenePrimitive()
+
+ def _parentChanged(self, event):
+ """Handle data change in the parent this isosurface belongs to"""
+ if event == ItemChangedType.COMPLEX_MODE:
+ self._syncDataWithParent()
+ super(ComplexIsosurface, self)._parentChanged(event)
+
+
+class ComplexField3D(ScalarField3D, ComplexMixIn):
+ """3D complex field on a regular grid.
+
+ :param parent: The View widget this item belongs to.
+ """
+
+ _CutPlane = ComplexCutPlane
+ _Isosurface = ComplexIsosurface
+
+ def __init__(self, parent=None):
+ self._dataRangeCache = None
+
+ ComplexMixIn.__init__(self)
+ ScalarField3D.__init__(self, parent=parent)
+
+ @docstring(ComplexMixIn)
+ def setComplexMode(self, mode):
+ if mode != self.getComplexMode():
+ self.clearIsosurfaces() # Reset isosurfaces
+ ComplexMixIn.setComplexMode(self, mode)
+
+ def setData(self, data, copy=True):
+ """Set the 3D complex data represented by this item.
+
+ Dataset order is zyx (i.e., first dimension is z).
+
+ :param data: 3D array
+ :type data: 3D numpy.ndarray of float32 with shape at least (2, 2, 2)
+ :param bool copy:
+ True (default) to make a copy,
+ False to avoid copy (DO NOT MODIFY data afterwards)
+ """
+ if data is None:
+ self._data = None
+ self._dataRangeCache = None
+ self._boundedGroup.shape = None
+
+ else:
+ data = numpy.array(data, copy=copy, dtype=numpy.complex64, order='C')
+ assert data.ndim == 3
+ assert min(data.shape) >= 2
+
+ self._data = data
+ self._dataRangeCache = {}
+ self._boundedGroup.shape = self._data.shape
+
+ self._updated(ItemChangedType.DATA)
+
+ def getData(self, copy=True, mode=None):
+ """Return 3D dataset.
+
+ This method does not cache data converted to a specific mode,
+ it computes it for each request.
+
+ :param bool copy:
+ True (default) to get a copy,
+ False to get the internal data (DO NOT modify!)
+ :param Union[None,Mode] mode:
+ The kind of data to retrieve.
+ If None (the default), it returns the complex data,
+ else it computes the requested scalar data.
+ :return: The data set (or None if not set)
+ :rtype: Union[numpy.ndarray,None]
+ """
+ if mode is None:
+ return super(ComplexField3D, self).getData(copy=copy)
+ else:
+ return self._convertComplexData(self._data, mode)
+
+ def getDataRange(self, mode=None):
+ """Return the range of the requested data as a 3-tuple of values.
+
+ Positive min is NaN if no data is positive.
+
+ :param Union[None,Mode] mode:
+ The kind of data for which to get the range information.
+ If None (the default), it returns the data range for the current mode,
+ else it returns the data range for the requested mode.
+ :return: (min, positive min, max) or None.
+ :rtype: Union[None,List[float]]
+ """
+ if self._dataRangeCache is None:
+ return None
+
+ if mode is None:
+ mode = self.getComplexMode()
+
+ if mode not in self._dataRangeCache:
+ # Compute it and store it in cache
+ data = self.getData(copy=False, mode=mode)
+ self._dataRangeCache[mode] = self._computeRangeFromData(data)
+
+ return self._dataRangeCache[mode]
diff --git a/silx/gui/plot3d/scene/camera.py b/silx/gui/plot3d/scene/camera.py
index acc5899..90de7ed 100644
--- a/silx/gui/plot3d/scene/camera.py
+++ b/silx/gui/plot3d/scene/camera.py
@@ -292,6 +292,8 @@ class Camera(transform.Transform):
center = 0.5 * (bounds[0] + bounds[1])
radius = numpy.linalg.norm(0.5 * (bounds[1] - bounds[0]))
+ if radius == 0.: # bounds are all collapsed
+ radius = 1.
if isinstance(self.intrinsic, transform.Perspective):
# Get the viewpoint distance from the bounds center
diff --git a/silx/gui/plot3d/scene/core.py b/silx/gui/plot3d/scene/core.py
index a293f28..43838fe 100644
--- a/silx/gui/plot3d/scene/core.py
+++ b/silx/gui/plot3d/scene/core.py
@@ -1,7 +1,7 @@
# coding: utf-8
# /*##########################################################################
#
-# Copyright (c) 2015-2017 European Synchrotron Radiation Facility
+# Copyright (c) 2015-2019 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -112,6 +112,15 @@ class Base(event.Notifier):
return root if isinstance(root, Viewport) else None
@property
+ def root(self):
+ """The root node of the scene.
+
+ If attached to a :class:`Viewport`, this is the item right under it
+ """
+ path = self.path
+ return path[1] if isinstance(path[0], Viewport) else path[0]
+
+ @property
def objectToNDCTransform(self):
"""Transform from object to normalized device coordinates.
diff --git a/silx/gui/plot3d/scene/cutplane.py b/silx/gui/plot3d/scene/cutplane.py
index 08a9899..81c74c7 100644
--- a/silx/gui/plot3d/scene/cutplane.py
+++ b/silx/gui/plot3d/scene/cutplane.py
@@ -1,7 +1,7 @@
# coding: utf-8
# /*##########################################################################
#
-# Copyright (c) 2016-2018 European Synchrotron Radiation Facility
+# Copyright (c) 2016-2019 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -79,19 +79,20 @@ class ColormapMesh3D(Geometry):
uniform float alpha;
$colormapDecl
-
- $clippingDecl
+ $sceneDecl
$lightingFunction
void main(void)
{
+ $scenePreCall(vCameraPosition);
+
float value = texture3D(data, vTexCoords).r;
vec4 color = $colormapCall(value);
color.a = alpha;
- $clippingCall(vCameraPosition);
-
gl_FragColor = $lightingCall(color, vPosition, vNormal);
+
+ $scenePostCall(vCameraPosition);
}
"""))
@@ -186,8 +187,9 @@ class ColormapMesh3D(Geometry):
def renderGL2(self, ctx):
fragment = self._shaders[1].substitute(
- clippingDecl=ctx.clipper.fragDecl,
- clippingCall=ctx.clipper.fragCall,
+ sceneDecl=ctx.fragDecl,
+ scenePreCall=ctx.fragCallPre,
+ scenePostCall=ctx.fragCallPost,
lightingFunction=ctx.viewport.light.fragmentDef,
lightingCall=ctx.viewport.light.fragmentCall,
colormapDecl=self.colormap.decl,
@@ -216,7 +218,7 @@ class ColormapMesh3D(Geometry):
gl.glUniform1i(program.uniforms['data'], self._texture.texUnit)
- ctx.clipper.setupProgram(ctx, program)
+ ctx.setupProgram(program)
self._texture.bind()
self._draw(program)
diff --git a/silx/gui/plot3d/scene/function.py b/silx/gui/plot3d/scene/function.py
index 2921d48..7651f75 100644
--- a/silx/gui/plot3d/scene/function.py
+++ b/silx/gui/plot3d/scene/function.py
@@ -1,7 +1,7 @@
# coding: utf-8
# /*##########################################################################
#
-# Copyright (c) 2015-2017 European Synchrotron Radiation Facility
+# Copyright (c) 2015-2019 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -60,6 +60,91 @@ class ProgramFunction(object):
pass
+class Fog(event.Notifier, ProgramFunction):
+ """Linear fog over the whole scene content.
+
+ The background of the viewport is used as fog color,
+ otherwise it defaults to white.
+ """
+ # TODO: add more controls (set fog range), add more fog modes
+
+ _fragDecl = """
+ /* (1/(far - near) or 0, near) z in [0 (camera), -inf[ */
+ uniform vec2 fogExtentInfo;
+
+ /* Color to use as fog color */
+ uniform vec3 fogColor;
+
+ vec4 fog(vec4 color, vec4 cameraPosition) {
+ /* d = (pos - near) / (far - near) */
+ float distance = fogExtentInfo.x * (cameraPosition.z/cameraPosition.w - fogExtentInfo.y);
+ float fogFactor = clamp(distance, 0.0, 1.0);
+ vec3 rgb = mix(color.rgb, fogColor, fogFactor);
+ return vec4(rgb.r, rgb.g, rgb.b, color.a);
+ }
+ """
+
+ _fragDeclNoop = """
+ vec4 fog(vec4 color, vec4 cameraPosition) {
+ return color;
+ }
+ """
+
+ def __init__(self):
+ super(Fog, self).__init__()
+ self._isOn = True
+
+ @property
+ def isOn(self):
+ """True to enable fog, False to disable (bool)"""
+ return self._isOn
+
+ @isOn.setter
+ def isOn(self, isOn):
+ isOn = bool(isOn)
+ if self._isOn != isOn:
+ self._isOn = bool(isOn)
+ self.notify()
+
+ @property
+ def fragDecl(self):
+ return self._fragDecl if self.isOn else self._fragDeclNoop
+
+ @property
+ def fragCall(self):
+ return "fog"
+
+ @staticmethod
+ def _zExtentCamera(viewport):
+ """Return (far, near) planes Z in camera coordinates.
+
+ :param Viewport viewport:
+ :return: (far, near) position in camera coords (from 0 to -inf)
+ """
+ # Provide scene z extent in camera coords
+ bounds = viewport.camera.extrinsic.transformBounds(
+ viewport.scene.bounds(transformed=True, dataBounds=True))
+ return bounds[:, 2]
+
+ def setupProgram(self, context, program):
+ if not self.isOn:
+ return
+
+ far, near = context.cache(key='zExtentCamera',
+ factory=self._zExtentCamera,
+ viewport=context.viewport)
+ extent = far - near
+ gl.glUniform2f(program.uniforms['fogExtentInfo'],
+ 0.9/extent if extent != 0. else 0.,
+ near)
+
+ # Use background color as fog color
+ bgColor = context.viewport.background
+ if bgColor is None:
+ bgColor = 1., 1., 1.
+ gl.glUniform3f(program.uniforms['fogColor'], *bgColor[:3])
+
+
class ClippingPlane(ProgramFunction):
"""Description of a clipping plane and rendering.
diff --git a/silx/gui/plot3d/scene/interaction.py b/silx/gui/plot3d/scene/interaction.py
index e5cfb6d..14a54dc 100644
--- a/silx/gui/plot3d/scene/interaction.py
+++ b/silx/gui/plot3d/scene/interaction.py
@@ -1,7 +1,7 @@
# coding: utf-8
# /*##########################################################################
#
-# Copyright (c) 2015-2018 European Synchrotron Radiation Facility
+# Copyright (c) 2015-2019 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -43,11 +43,11 @@ from . import transform
_logger = logging.getLogger(__name__)
-# ClickOrDrag #################################################################
-
-# TODO merge with silx.gui.plot.Interaction.ClickOrDrag
class ClickOrDrag(StateMachine):
- """Click or drag interaction for a given button."""
+ """Click or drag interaction for a given button.
+
+ """
+ #TODO: merge this class with silx.gui.plot.Interaction.ClickOrDrag
DRAG_THRESHOLD_SQUARE_DIST = 5 ** 2
@@ -126,23 +126,29 @@ class ClickOrDrag(StateMachine):
pass
-# CameraRotate ################################################################
-
-class CameraRotate(ClickOrDrag):
+class CameraSelectRotate(ClickOrDrag):
"""Camera rotation using an arcball-like interaction."""
- def __init__(self, viewport, orbitAroundCenter=True, button=RIGHT_BTN):
+ def __init__(self, viewport, orbitAroundCenter=True, button=RIGHT_BTN,
+ selectCB=None):
self._viewport = viewport
self._orbitAroundCenter = orbitAroundCenter
+ self._selectCB = selectCB
self._reset()
- super(CameraRotate, self).__init__(button)
+ super(CameraSelectRotate, self).__init__(button)
def _reset(self):
self._origin, self._center = None, None
self._startExtrinsic = None
def click(self, x, y):
- pass # No interaction yet
+ if self._selectCB is not None:
+ ndcZ = self._viewport._pickNdcZGL(x, y)
+ position = self._viewport._getXZYGL(x, y)
+ # This assume no object lie on the far plane
+ # Alternative, change the depth range so that far is < 1
+ if ndcZ != 1. and position is not None:
+ self._selectCB((x, y, ndcZ), position)
def beginDrag(self, x, y):
centerPos = None
@@ -205,8 +211,6 @@ class CameraRotate(ClickOrDrag):
self._reset()
-# CameraSelectPan #############################################################
-
class CameraSelectPan(ClickOrDrag):
"""Picking on click and pan camera on drag."""
@@ -259,8 +263,6 @@ class CameraSelectPan(ClickOrDrag):
self._lastPosNdc = None
-# CameraWheel #################################################################
-
class CameraWheel(object):
"""StateMachine like class, just handling wheel events."""
@@ -371,8 +373,6 @@ class CameraWheel(object):
return True
-# FocusManager ################################################################
-
class FocusManager(StateMachine):
"""Manages focus across multiple event handlers
@@ -449,8 +449,6 @@ class FocusManager(StateMachine):
handler.cancel()
-# CameraControl ###############################################################
-
class RotateCameraControl(FocusManager):
"""Combine wheel and rotate state machine for left button
and pan when ctrl is pressed
@@ -460,7 +458,8 @@ class RotateCameraControl(FocusManager):
mode='center', scaleTransform=None,
selectCB=None):
handlers = (CameraWheel(viewport, mode, scaleTransform),
- CameraRotate(viewport, orbitAroundCenter, LEFT_BTN))
+ CameraSelectRotate(
+ viewport, orbitAroundCenter, LEFT_BTN, selectCB))
ctrlHandlers = (CameraWheel(viewport, mode, scaleTransform),
CameraSelectPan(viewport, LEFT_BTN, selectCB))
super(RotateCameraControl, self).__init__(handlers, ctrlHandlers)
@@ -476,7 +475,8 @@ class PanCameraControl(FocusManager):
handlers = (CameraWheel(viewport, mode, scaleTransform),
CameraSelectPan(viewport, LEFT_BTN, selectCB))
ctrlHandlers = (CameraWheel(viewport, mode, scaleTransform),
- CameraRotate(viewport, orbitAroundCenter, LEFT_BTN))
+ CameraSelectRotate(
+ viewport, orbitAroundCenter, LEFT_BTN, selectCB))
super(PanCameraControl, self).__init__(handlers, ctrlHandlers)
@@ -488,12 +488,11 @@ class CameraControl(FocusManager):
selectCB=None):
handlers = (CameraWheel(viewport, mode, scaleTransform),
CameraSelectPan(viewport, LEFT_BTN, selectCB),
- CameraRotate(viewport, orbitAroundCenter, RIGHT_BTN))
+ CameraSelectRotate(
+ viewport, orbitAroundCenter, RIGHT_BTN, selectCB))
super(CameraControl, self).__init__(handlers)
-# PlaneRotate #################################################################
-
class PlaneRotate(ClickOrDrag):
"""Plane rotation using arcball interaction.
@@ -603,8 +602,6 @@ class PlaneRotate(ClickOrDrag):
self._reset()
-# PlanePan ###################################################################
-
class PlanePan(ClickOrDrag):
"""Pan a plane along its normal on drag."""
@@ -668,8 +665,6 @@ class PlanePan(ClickOrDrag):
self._beginPlanePoint = None
-# PlaneControl ################################################################
-
class PlaneControl(FocusManager):
"""Combine wheel, selectPan and rotate state machine for plane control."""
def __init__(self, viewport, plane,
@@ -686,9 +681,9 @@ class PanPlaneRotateCameraControl(FocusManager):
mode='center', scaleTransform=None):
handlers = (CameraWheel(viewport, mode, scaleTransform),
PlanePan(viewport, plane, LEFT_BTN),
- CameraRotate(viewport,
- orbitAroundCenter=False,
- button=RIGHT_BTN))
+ CameraSelectRotate(viewport,
+ orbitAroundCenter=False,
+ button=RIGHT_BTN))
super(PanPlaneRotateCameraControl, self).__init__(handlers)
@@ -701,5 +696,6 @@ class PanPlaneZoomOnWheelControl(FocusManager):
handlers = (CameraWheel(viewport, mode, scaleTransform),
PlanePan(viewport, plane, LEFT_BTN))
ctrlHandlers = (CameraWheel(viewport, mode, scaleTransform),
- CameraRotate(viewport, orbitAroundCenter, LEFT_BTN))
+ CameraSelectRotate(
+ viewport, orbitAroundCenter, LEFT_BTN))
super(PanPlaneZoomOnWheelControl, self).__init__(handlers, ctrlHandlers)
diff --git a/silx/gui/plot3d/scene/primitives.py b/silx/gui/plot3d/scene/primitives.py
index ca06e30..08724ba 100644
--- a/silx/gui/plot3d/scene/primitives.py
+++ b/silx/gui/plot3d/scene/primitives.py
@@ -29,8 +29,10 @@ __authors__ = ["T. Vincent"]
__license__ = "MIT"
__date__ = "24/04/2018"
-
-import collections
+try:
+ from collections import abc
+except ImportError: # Python2 support
+ import collections as abc
import ctypes
from functools import reduce
import logging
@@ -47,7 +49,7 @@ from . import event
from . import core
from . import transform
from . import utils
-from .function import Colormap
+from .function import Colormap, Fog
_logger = logging.getLogger(__name__)
@@ -146,7 +148,7 @@ class Geometry(core.Elem):
:param bool copy: True to make a copy of the array, False to use as is
"""
# Convert single value (int, float, numpy types) to tuple
- if not isinstance(array, collections.Iterable):
+ if not isinstance(array, abc.Iterable):
array = (array, )
# Makes sure it is an array
@@ -361,9 +363,11 @@ class Geometry(core.Elem):
if attribute.ndim == 1: # Single value
min_ = attribute
max_ = attribute
- else: # Array of values, compute min/max
+ elif len(attribute) > 0: # Array of values, compute min/max
min_ = numpy.nanmin(attribute, axis=0)
max_ = numpy.nanmax(attribute, axis=0)
+ else:
+ min_, max_ = numpy.zeros((2, attribute.shape[1]), dtype=numpy.float32)
toCopy = min(len(min_), 3-index)
if toCopy != len(min_):
@@ -451,13 +455,14 @@ class Lines(Geometry):
varying vec3 vNormal;
varying vec4 vColor;
- $clippingDecl
+ $sceneDecl
$lightingFunction
void main(void)
{
- $clippingCall(vCameraPosition);
+ $scenePreCall(vCameraPosition);
gl_FragColor = $lightingCall(vColor, vPosition, vNormal);
+ $scenePostCall(vCameraPosition);
}
"""))
@@ -492,8 +497,9 @@ class Lines(Geometry):
fraglightfunction = ctx.viewport.light.fragmentShaderFunctionNoop
fragment = self._shaders[1].substitute(
- clippingDecl=ctx.clipper.fragDecl,
- clippingCall=ctx.clipper.fragCall,
+ sceneDecl=ctx.fragDecl,
+ scenePreCall=ctx.fragCallPre,
+ scenePostCall=ctx.fragCallPost,
lightingFunction=fraglightfunction,
lightingCall=ctx.viewport.light.fragmentCall)
prog = ctx.glCtx.prog(self._shaders[0], fragment)
@@ -509,7 +515,7 @@ class Lines(Geometry):
ctx.objectToCamera.matrix,
safe=True)
- ctx.clipper.setupProgram(ctx, prog)
+ ctx.setupProgram(prog)
with gl.enabled(gl.GL_LINE_SMOOTH, self._smooth):
self._draw(prog)
@@ -560,18 +566,21 @@ class DashedLines(Lines):
uniform vec2 dash;
- $clippingDecl
+ $sceneDecl
$lightingFunction
void main(void)
{
+ $scenePreCall(vCameraPosition);
+
/* Discard off dash fragments */
float lineDist = distance(vOriginFragCoord, gl_FragCoord.xy);
if (mod(lineDist, dash.x + dash.y) > dash.x) {
discard;
}
- $clippingCall(vCameraPosition);
gl_FragColor = $lightingCall(vColor, vPosition, vNormal);
+
+ $scenePostCall(vCameraPosition);
}
"""))
@@ -627,8 +636,9 @@ class DashedLines(Lines):
context.viewport.light.fragmentShaderFunctionNoop
fragment = self._shaders[1].substitute(
- clippingDecl=context.clipper.fragDecl,
- clippingCall=context.clipper.fragCall,
+ sceneDecl=context.fragDecl,
+ scenePreCall=context.fragCallPre,
+ scenePostCall=context.fragCallPost,
lightingFunction=fraglightfunction,
lightingCall=context.viewport.light.fragmentCall)
program = context.glCtx.prog(self._shaders[0], fragment)
@@ -648,7 +658,7 @@ class DashedLines(Lines):
program.uniforms['viewportSize'], *context.viewport.size)
gl.glUniform2f(program.uniforms['dash'], *self.dash)
- context.clipper.setupProgram(context, program)
+ context.setupProgram(program)
self._draw(program)
@@ -1236,14 +1246,12 @@ class _Points(Geometry):
varying $valueType vValue;
$valueToColorDecl
-
- $clippingDecl
-
+ $sceneDecl
$alphaSymbolDecl
void main(void)
{
- $clippingCall(vCameraPosition);
+ $scenePreCall(vCameraPosition);
float alpha = alphaSymbol(gl_PointCoord, vSize);
@@ -1252,6 +1260,8 @@ class _Points(Geometry):
if (gl_FragColor.a == 0.0) {
discard;
}
+
+ $scenePostCall(vCameraPosition);
}
"""))
@@ -1305,8 +1315,9 @@ class _Points(Geometry):
vertexShader = self._shaders[0].substitute(
valueType=valueType)
fragmentShader = self._shaders[1].substitute(
- clippingDecl=ctx.clipper.fragDecl,
- clippingCall=ctx.clipper.fragCall,
+ sceneDecl=ctx.fragDecl,
+ scenePreCall=ctx.fragCallPre,
+ scenePostCall=ctx.fragCallPost,
valueType=valueType,
valueToColorDecl=valueToColorDecl,
valueToColorCall=valueToColorCall,
@@ -1324,7 +1335,7 @@ class _Points(Geometry):
ctx.objectToCamera.matrix,
safe=True)
- ctx.clipper.setupProgram(ctx, program)
+ ctx.setupProgram(program)
self._renderGL2PreDrawHook(ctx, program)
@@ -1475,15 +1486,17 @@ class GridPoints(Geometry):
in vec4 vCameraPosition;
in float vNormValue;
- out vec4 fragColor;
+ out vec4 gl_FragColor;
- $clippingDecl
+ $sceneDecl
void main(void)
{
- $clippingCall(vCameraPosition);
+ $scenePreCall(vCameraPosition);
+
+ gl_FragColor = vec4(0.5 * vNormValue + 0.5, 0.0, 0.0, 1.0);
- fragColor = vec4(0.5 * vNormValue + 0.5, 0.0, 0.0, 1.0);
+ $scenePostCall(vCameraPosition);
}
"""))
@@ -1497,7 +1510,7 @@ class GridPoints(Geometry):
def __init__(self, values=0., shape=None, sizes=1., indices=None,
minValue=None, maxValue=None):
- if isinstance(values, collections.Iterable):
+ if isinstance(values, abc.Iterable):
values = numpy.array(values, copy=False)
# Test if gl_VertexID will overflow
@@ -1532,8 +1545,9 @@ class GridPoints(Geometry):
def renderGL2(self, ctx):
fragment = self._shaders[1].substitute(
- clippingDecl=ctx.clipper.fragDecl,
- clippingCall=ctx.clipper.fragCall)
+ sceneDecl=ctx.fragDecl,
+ scenePreCall=ctx.fragCallPre,
+ scenePostCall=ctx.fragCallPost)
prog = ctx.glCtx.prog(self._shaders[0], fragment)
prog.use()
@@ -1546,7 +1560,7 @@ class GridPoints(Geometry):
ctx.objectToCamera.matrix,
safe=True)
- ctx.clipper.setupProgram(ctx, prog)
+ ctx.setupProgram(prog)
gl.glUniform3i(prog.uniforms['gridDims'],
self._shape[2] if len(self._shape) == 3 else 1,
@@ -1632,12 +1646,12 @@ class Spheres(Geometry):
varying float vViewDepth;
varying float vViewRadius;
- $clippingDecl
+ $sceneDecl
$lightingFunction
void main(void)
{
- $clippingCall(vCameraPosition);
+ $scenePreCall(vCameraPosition);
/* Get normal from point coords */
vec3 normal;
@@ -1658,6 +1672,8 @@ class Spheres(Geometry):
float viewDepth = vViewDepth + vViewRadius * normal.z;
vec2 clipZW = viewDepth * projMat[2].zw + projMat[3].zw;
gl_FragDepth = 0.5 * (clipZW.x / clipZW.y) + 0.5;
+
+ $scenePostCall(vCameraPosition);
}
"""))
@@ -1676,8 +1692,9 @@ class Spheres(Geometry):
def renderGL2(self, ctx):
fragment = self._shaders[1].substitute(
- clippingDecl=ctx.clipper.fragDecl,
- clippingCall=ctx.clipper.fragCall,
+ sceneDecl=ctx.fragDecl,
+ scenePreCall=ctx.fragCallPre,
+ scenePostCall=ctx.fragCallPost,
lightingFunction=ctx.viewport.light.fragmentDef,
lightingCall=ctx.viewport.light.fragmentCall)
prog = ctx.glCtx.prog(self._shaders[0], fragment)
@@ -1694,7 +1711,7 @@ class Spheres(Geometry):
ctx.objectToCamera.matrix,
safe=True)
- ctx.clipper.setupProgram(ctx, prog)
+ ctx.setupProgram(prog)
gl.glUniform2f(prog.uniforms['screenSize'], *ctx.viewport.size)
@@ -1748,14 +1765,16 @@ class Mesh3D(Geometry):
varying vec3 vNormal;
varying vec4 vColor;
- $clippingDecl
+ $sceneDecl
$lightingFunction
void main(void)
{
- $clippingCall(vCameraPosition);
+ $scenePreCall(vCameraPosition);
gl_FragColor = $lightingCall(vColor, vPosition, vNormal);
+
+ $scenePostCall(vCameraPosition);
}
"""))
@@ -1798,8 +1817,9 @@ class Mesh3D(Geometry):
fragLightFunction = ctx.viewport.light.fragmentShaderFunctionNoop
fragment = self._shaders[1].substitute(
- clippingDecl=ctx.clipper.fragDecl,
- clippingCall=ctx.clipper.fragCall,
+ sceneDecl=ctx.fragDecl,
+ scenePreCall=ctx.fragCallPre,
+ scenePostCall=ctx.fragCallPost,
lightingFunction=fragLightFunction,
lightingCall=ctx.viewport.light.fragmentCall)
prog = ctx.glCtx.prog(self._shaders[0], fragment)
@@ -1818,7 +1838,7 @@ class Mesh3D(Geometry):
ctx.objectToCamera.matrix,
safe=True)
- ctx.clipper.setupProgram(ctx, prog)
+ ctx.setupProgram(prog)
self._draw(prog)
@@ -1860,15 +1880,17 @@ class ColormapMesh3D(Geometry):
varying float vValue;
$colormapDecl
- $clippingDecl
+ $sceneDecl
$lightingFunction
void main(void)
{
- $clippingCall(vCameraPosition);
+ $scenePreCall(vCameraPosition);
vec4 color = $colormapCall(vValue);
gl_FragColor = $lightingCall(color, vPosition, vNormal);
+
+ $scenePostCall(vCameraPosition);
}
"""))
@@ -1933,8 +1955,9 @@ class ColormapMesh3D(Geometry):
def _renderGL2(self, ctx):
fragment = self._shaders[1].substitute(
- clippingDecl=ctx.clipper.fragDecl,
- clippingCall=ctx.clipper.fragCall,
+ sceneDecl=ctx.fragDecl,
+ scenePreCall=ctx.fragCallPre,
+ scenePostCall=ctx.fragCallPost,
lightingFunction=ctx.viewport.light.fragmentDef,
lightingCall=ctx.viewport.light.fragmentCall,
colormapDecl=self.colormap.decl,
@@ -1943,7 +1966,7 @@ class ColormapMesh3D(Geometry):
program.use()
ctx.viewport.light.setupProgram(ctx, program)
- ctx.clipper.setupProgram(ctx, program)
+ ctx.setupProgram(program)
self.colormap.setupProgram(ctx, program)
if self.culling is not None:
@@ -2001,20 +2024,20 @@ class _Image(Geometry):
uniform float alpha;
$imageDecl
-
- $clippingDecl
-
+ $sceneDecl
$lightingFunction
void main(void)
{
+ $scenePreCall(vCameraPosition);
+
vec4 color = imageColor(data, vTexCoords);
color.a = alpha;
- $clippingCall(vCameraPosition);
-
vec3 normal = vec3(0.0, 0.0, 1.0);
gl_FragColor = $lightingCall(color, vPosition, normal);
+
+ $scenePostCall(vCameraPosition);
}
"""))
@@ -2133,8 +2156,9 @@ class _Image(Geometry):
def _renderGL2(self, ctx):
fragment = self._shaders[1].substitute(
- clippingDecl=ctx.clipper.fragDecl,
- clippingCall=ctx.clipper.fragCall,
+ sceneDecl=ctx.fragDecl,
+ scenePreCall=ctx.fragCallPre,
+ scenePostCall=ctx.fragCallPost,
lightingFunction=ctx.viewport.light.fragmentDef,
lightingCall=ctx.viewport.light.fragmentCall,
imageDecl=self._shaderImageColorDecl()
@@ -2159,7 +2183,7 @@ class _Image(Geometry):
gl.glUniform1i(program.uniforms['data'], self._texture.texUnit)
- ctx.clipper.setupProgram(ctx, program)
+ ctx.setupProgram(program)
self._texture.bind()
diff --git a/silx/gui/plot3d/scene/utils.py b/silx/gui/plot3d/scene/utils.py
index 1224f5e..bddbcac 100644
--- a/silx/gui/plot3d/scene/utils.py
+++ b/silx/gui/plot3d/scene/utils.py
@@ -1,7 +1,7 @@
# coding: utf-8
# /*##########################################################################
#
-# Copyright (c) 2015-2018 European Synchrotron Radiation Facility
+# Copyright (c) 2015-2019 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -544,77 +544,6 @@ def segmentVolumeIntersect(segment, nbins):
return bins
-def segmentTrianglesIntersection(segment, triangles):
- """Check for segment/triangles intersection.
-
- This is based on signed tetrahedron volume comparison.
-
- See A. Kensler, A., Shirley, P.
- Optimizing Ray-Triangle Intersection via Automated Search.
- Symposium on Interactive Ray Tracing, vol. 0, p33-38 (2006)
-
- :param numpy.ndarray segment:
- Segment end points as a 2x3 array of coordinates
- :param numpy.ndarray triangles:
- Nx3x3 array of triangles
- :return: (triangle indices, segment parameter, barycentric coord)
- Indices of intersected triangles, "depth" along the segment
- of the intersection point and barycentric coordinates of intersection
- point in the triangle.
- :rtype: List[numpy.ndarray]
- """
- # TODO triangles from vertices + indices
- # TODO early rejection? e.g., check segment bbox vs triangle bbox
- segment = numpy.asarray(segment)
- assert segment.ndim == 2
- assert segment.shape == (2, 3)
-
- triangles = numpy.asarray(triangles)
- assert triangles.ndim == 3
- assert triangles.shape[1] == 3
-
- # Test line/triangles intersection
- d = segment[1] - segment[0]
- t0s0 = segment[0] - triangles[:, 0, :]
- edge01 = triangles[:, 1, :] - triangles[:, 0, :]
- edge02 = triangles[:, 2, :] - triangles[:, 0, :]
-
- dCrossEdge02 = numpy.cross(d, edge02)
- t0s0CrossEdge01 = numpy.cross(t0s0, edge01)
- volume = numpy.sum(dCrossEdge02 * edge01, axis=1)
- del edge01
- subVolumes = numpy.empty((len(triangles), 3), dtype=triangles.dtype)
- subVolumes[:, 1] = numpy.sum(dCrossEdge02 * t0s0, axis=1)
- del dCrossEdge02
- subVolumes[:, 2] = numpy.sum(t0s0CrossEdge01 * d, axis=1)
- subVolumes[:, 0] = volume - subVolumes[:, 1] - subVolumes[:, 2]
- intersect = numpy.logical_or(
- numpy.all(subVolumes >= 0., axis=1), # All positive
- numpy.all(subVolumes <= 0., axis=1)) # All negative
- intersect = numpy.where(intersect)[0] # Indices of intersected triangles
-
- # Get barycentric coordinates
- barycentric = subVolumes[intersect] / volume[intersect].reshape(-1, 1)
- del subVolumes
-
- # Test segment/triangles intersection
- volAlpha = numpy.sum(t0s0CrossEdge01[intersect] * edge02[intersect], axis=1)
- t = volAlpha / volume[intersect] # segment parameter of intersected triangles
- del t0s0CrossEdge01
- del edge02
- del volAlpha
- del volume
-
- inSegmentMask = numpy.logical_and(t >= 0., t <= 1.)
- intersect = intersect[inSegmentMask]
- t = t[inSegmentMask]
- barycentric = barycentric[inSegmentMask]
-
- # Sort intersecting triangles by t
- indices = numpy.argsort(t)
- return intersect[indices], t[indices], barycentric[indices]
-
-
# Plane #######################################################################
class Plane(event.Notifier):
diff --git a/silx/gui/plot3d/scene/viewport.py b/silx/gui/plot3d/scene/viewport.py
index 41aa999..6de640e 100644
--- a/silx/gui/plot3d/scene/viewport.py
+++ b/silx/gui/plot3d/scene/viewport.py
@@ -1,7 +1,7 @@
# coding: utf-8
# /*##########################################################################
#
-# Copyright (c) 2015-2018 European Synchrotron Radiation Facility
+# Copyright (c) 2015-2019 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -36,6 +36,7 @@ __license__ = "MIT"
__date__ = "24/04/2018"
+import string
import numpy
from silx.gui.colors import rgba
@@ -45,7 +46,7 @@ from ..._glutils import gl
from . import camera
from . import event
from . import transform
-from .function import DirectionalLight, ClippingPlane
+from .function import DirectionalLight, ClippingPlane, Fog
class RenderContext(object):
@@ -61,12 +62,33 @@ class RenderContext(object):
:param Context glContext: The operating system OpenGL context in use.
"""
+ _FRAGMENT_SHADER_SRC = string.Template("""
+ void scene_post(vec4 cameraPosition) {
+ gl_FragColor = $fogCall(gl_FragColor, cameraPosition);
+ }
+ """)
+
def __init__(self, viewport, glContext):
self._viewport = viewport
self._glContext = glContext
self._transformStack = [viewport.camera.extrinsic]
self._clipPlane = ClippingPlane(normal=(0., 0., 0.))
+ # cache
+ self.__cache = {}
+
+ def cache(self, key, factory, *args, **kwargs):
+ """Lazy-loading cache to store values in the context for rendering
+
+ :param key: The key to retrieve
+ :param factory: A callback taking args and kwargs as arguments
+ and returning the value to store.
+ :return: The stored or newly allocated value
+ """
+ if key not in self.__cache:
+ self.__cache[key] = factory(*args, **kwargs)
+ return self.__cache[key]
+
@property
def viewport(self):
"""Viewport doing the current rendering"""
@@ -127,8 +149,7 @@ class RenderContext(object):
@property
def clipper(self):
- """The current clipping plane
- """
+ """The current clipping plane (ClippingPlane)"""
return self._clipPlane
def setClipPlane(self, point=(0., 0., 0.), normal=(0., 0., 0.)):
@@ -143,6 +164,40 @@ class RenderContext(object):
"""
self._clipPlane = ClippingPlane(point, normal)
+ def setupProgram(self, program):
+ """Sets-up uniforms of a program using the context shader functions.
+
+ :param GLProgram program: The program to set-up.
+ It MUST be in use and using the context function.
+ """
+ self.clipper.setupProgram(self, program)
+ self.viewport.fog.setupProgram(self, program)
+
+ @property
+ def fragDecl(self):
+ """Fragment shader declaration for scene shader functions"""
+ return '\n'.join((
+ self.clipper.fragDecl,
+ self.viewport.fog.fragDecl,
+ self._FRAGMENT_SHADER_SRC.substitute(
+ fogCall=self.viewport.fog.fragCall)))
+
+ @property
+ def fragCallPre(self):
+ """Fragment shader call for scene shader functions (to do first)
+
+ It takes the camera position (vec4) as argument.
+ """
+ return self.clipper.fragCall
+
+ @property
+ def fragCallPost(self):
+ """Fragment shader call for scene shader functions (to do last)
+
+ It takes the camera position (vec4) as argument.
+ """
+ return "scene_post"
+
class Viewport(event.Notifier):
"""Rendering a single scene through a camera in part of a framebuffer.
@@ -170,6 +225,9 @@ class Viewport(event.Notifier):
ambient=(0.3, 0.3, 0.3),
diffuse=(0.7, 0.7, 0.7))
self._light.addListener(self._changed)
+ self._fog = Fog()
+ self._fog.isOn = False
+ self._fog.addListener(self._changed)
@property
def transforms(self):
@@ -224,6 +282,11 @@ class Viewport(event.Notifier):
return self._light
@property
+ def fog(self):
+ """The fog function used to render the scene"""
+ return self._fog
+
+ @property
def origin(self):
"""Origin (ox, oy) of the viewport in pixels"""
return self._origin
@@ -351,8 +414,8 @@ class Viewport(event.Notifier):
"""
bounds = self.scene.bounds(transformed=True)
if bounds is None:
- bounds = numpy.array(((0., 0., 0.), (1., 1., 1.)),
- dtype=numpy.float32)
+ bounds = numpy.array(((0., 0., 0.), (1., 1., 1.)),
+ dtype=numpy.float32)
self.camera.resetCamera(bounds)
def orbitCamera(self, direction, angle=1.):
diff --git a/silx/gui/plot3d/test/__init__.py b/silx/gui/plot3d/test/__init__.py
index 8825cf4..77172d1 100644
--- a/silx/gui/plot3d/test/__init__.py
+++ b/silx/gui/plot3d/test/__init__.py
@@ -58,14 +58,18 @@ def suite():
from ..tools.test import suite as toolsTestSuite
from .testGL import suite as testGLSuite
from .testScalarFieldView import suite as testScalarFieldViewSuite
+ from .testSceneWidget import suite as testSceneWidgetSuite
from .testSceneWidgetPicking import suite as testSceneWidgetPickingSuite
+ from .testSceneWindow import suite as testSceneWindowSuite
from .testStatsWidget import suite as testStatsWidgetSuite
testsuite = unittest.TestSuite()
testsuite.addTest(testGLSuite())
testsuite.addTest(sceneTestSuite())
testsuite.addTest(testScalarFieldViewSuite())
+ testsuite.addTest(testSceneWidgetSuite())
testsuite.addTest(testSceneWidgetPickingSuite())
+ testsuite.addTest(testSceneWindowSuite())
testsuite.addTest(toolsTestSuite())
testsuite.addTest(testStatsWidgetSuite())
return testsuite
diff --git a/silx/gui/plot3d/test/testSceneWidget.py b/silx/gui/plot3d/test/testSceneWidget.py
new file mode 100644
index 0000000..13ddd37
--- /dev/null
+++ b/silx/gui/plot3d/test/testSceneWidget.py
@@ -0,0 +1,84 @@
+# coding: utf-8
+# /*##########################################################################
+#
+# Copyright (c) 2019 European Synchrotron Radiation Facility
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+# ###########################################################################*/
+"""Test SceneWidget"""
+
+__authors__ = ["T. Vincent"]
+__license__ = "MIT"
+__date__ = "06/03/2019"
+
+
+import unittest
+
+import numpy
+
+from silx.utils.testutils import ParametricTestCase
+from silx.gui.utils.testutils import TestCaseQt
+from silx.gui import qt
+
+from silx.gui.plot3d.SceneWidget import SceneWidget
+
+
+class TestSceneWidget(TestCaseQt, ParametricTestCase):
+ """Tests SceneWidget picking feature"""
+
+ def setUp(self):
+ super(TestSceneWidget, self).setUp()
+ self.widget = SceneWidget()
+ self.widget.show()
+ self.qWaitForWindowExposed(self.widget)
+
+ def tearDown(self):
+ self.qapp.processEvents()
+ self.widget.setAttribute(qt.Qt.WA_DeleteOnClose)
+ self.widget.close()
+ del self.widget
+ super(TestSceneWidget, self).tearDown()
+
+ def testFogEffect(self):
+ """Test fog effect on scene primitive"""
+ image = self.widget.addImage(numpy.arange(100).reshape(10, 10))
+ scatter = self.widget.add3DScatter(*numpy.random.random(4000).reshape(4, -1))
+ scatter.setTranslation(10, 10)
+ scatter.setScale(10, 10, 10)
+
+ self.widget.resetZoom('front')
+ self.qapp.processEvents()
+
+ self.widget.setFogMode(self.widget.FogMode.LINEAR)
+ self.qapp.processEvents()
+
+ self.widget.setFogMode(self.widget.FogMode.NONE)
+ self.qapp.processEvents()
+
+
+def suite():
+ testsuite = unittest.TestSuite()
+ testsuite.addTest(
+ unittest.defaultTestLoader.loadTestsFromTestCase(
+ TestSceneWidget))
+ return testsuite
+
+
+if __name__ == '__main__':
+ unittest.main(defaultTest='suite')
diff --git a/silx/gui/plot3d/test/testSceneWidgetPicking.py b/silx/gui/plot3d/test/testSceneWidgetPicking.py
index 649fb47..aea30f6 100644
--- a/silx/gui/plot3d/test/testSceneWidgetPicking.py
+++ b/silx/gui/plot3d/test/testSceneWidgetPicking.py
@@ -128,50 +128,60 @@ class TestSceneWidgetPicking(TestCaseQt, ParametricTestCase):
picking = list(self.widget.pickItems(1, 1))
self.assertEqual(len(picking), 0)
- def testPickScalarField3D(self):
+ def testPickVolume(self):
"""Test picking of volume CutPlane and Isosurface items"""
- volume = self.widget.add3DScalarField(
- numpy.arange(10**3, dtype=numpy.float32).reshape(10, 10, 10))
- self.widget.resetZoom('front')
-
- cutplane = volume.getCutPlanes()[0]
- cutplane.getColormap().setVRange(0, 100)
- cutplane.setNormal((0, 0, 1))
-
- # Picking on data without anything displayed
- cutplane.setVisible(False)
- picking = list(self.widget.pickItems(*self._widgetCenter()))
- self.assertEqual(len(picking), 0)
-
- # Picking on data with the cut plane
- cutplane.setVisible(True)
- picking = list(self.widget.pickItems(*self._widgetCenter()))
-
- self.assertEqual(len(picking), 1)
- self.assertIs(picking[0].getItem(), cutplane)
- data = picking[0].getData()
- self.assertEqual(len(data), 1)
- self.assertEqual(picking[0].getPositions().shape, (1, 3))
- self.assertTrue(numpy.array_equal(
- data,
- volume.getData(copy=False)[picking[0].getIndices()]))
-
- # Picking on data with an isosurface
- isosurface = volume.addIsosurface(level=500, color=(1., 0., 0., .5))
- picking = list(self.widget.pickItems(*self._widgetCenter()))
- self.assertEqual(len(picking), 2)
- self.assertIs(picking[0].getItem(), cutplane)
- self.assertIs(picking[1].getItem(), isosurface)
- self.assertEqual(picking[1].getPositions().shape, (1, 3))
- data = picking[1].getData()
- self.assertEqual(len(data), 1)
- self.assertTrue(numpy.array_equal(
- data,
- volume.getData(copy=False)[picking[1].getIndices()]))
-
- # Picking outside data
- picking = list(self.widget.pickItems(1, 1))
- self.assertEqual(len(picking), 0)
+ for dtype in (numpy.float32, numpy.complex64):
+ with self.subTest(dtype=dtype):
+ refData = numpy.arange(10**3, dtype=dtype).reshape(10, 10, 10)
+ volume = self.widget.addVolume(refData)
+ if dtype == numpy.complex64:
+ volume.setComplexMode(volume.ComplexMode.REAL)
+ refData = numpy.real(refData)
+ self.widget.resetZoom('front')
+
+ cutplane = volume.getCutPlanes()[0]
+ if dtype == numpy.complex64:
+ cutplane.setComplexMode(volume.ComplexMode.REAL)
+ cutplane.getColormap().setVRange(0, 100)
+ cutplane.setNormal((0, 0, 1))
+
+ # Picking on data without anything displayed
+ cutplane.setVisible(False)
+ picking = list(self.widget.pickItems(*self._widgetCenter()))
+ self.assertEqual(len(picking), 0)
+
+ # Picking on data with the cut plane
+ cutplane.setVisible(True)
+ picking = list(self.widget.pickItems(*self._widgetCenter()))
+
+ self.assertEqual(len(picking), 1)
+ self.assertIs(picking[0].getItem(), cutplane)
+ data = picking[0].getData()
+ self.assertEqual(len(data), 1)
+ self.assertEqual(picking[0].getPositions().shape, (1, 3))
+ self.assertTrue(numpy.array_equal(
+ data,
+ refData[picking[0].getIndices()]))
+
+ # Picking on data with an isosurface
+ isosurface = volume.addIsosurface(
+ level=500, color=(1., 0., 0., .5))
+ picking = list(self.widget.pickItems(*self._widgetCenter()))
+ self.assertEqual(len(picking), 2)
+ self.assertIs(picking[0].getItem(), cutplane)
+ self.assertIs(picking[1].getItem(), isosurface)
+ self.assertEqual(picking[1].getPositions().shape, (1, 3))
+ data = picking[1].getData()
+ self.assertEqual(len(data), 1)
+ self.assertTrue(numpy.array_equal(
+ data,
+ refData[picking[1].getIndices()]))
+
+ # Picking outside data
+ picking = list(self.widget.pickItems(1, 1))
+ self.assertEqual(len(picking), 0)
+
+ self.widget.clearItems()
def testPickMesh(self):
"""Test picking of Mesh items"""
diff --git a/silx/gui/plot3d/test/testSceneWindow.py b/silx/gui/plot3d/test/testSceneWindow.py
new file mode 100644
index 0000000..b2e6ea0
--- /dev/null
+++ b/silx/gui/plot3d/test/testSceneWindow.py
@@ -0,0 +1,209 @@
+# coding: utf-8
+# /*##########################################################################
+#
+# Copyright (c) 2019 European Synchrotron Radiation Facility
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+# ###########################################################################*/
+"""Test SceneWindow"""
+
+__authors__ = ["T. Vincent"]
+__license__ = "MIT"
+__date__ = "22/03/2019"
+
+
+import unittest
+
+import numpy
+
+from silx.utils.testutils import ParametricTestCase
+from silx.gui.utils.testutils import TestCaseQt
+from silx.gui import qt
+
+from silx.gui.plot3d.SceneWindow import SceneWindow
+
+
+class TestSceneWindow(TestCaseQt, ParametricTestCase):
+ """Tests SceneWidget picking feature"""
+
+ def setUp(self):
+ super(TestSceneWindow, self).setUp()
+ self.window = SceneWindow()
+ self.window.show()
+ self.qWaitForWindowExposed(self.window)
+
+ def tearDown(self):
+ self.qapp.processEvents()
+ self.window.setAttribute(qt.Qt.WA_DeleteOnClose)
+ self.window.close()
+ del self.window
+ super(TestSceneWindow, self).tearDown()
+
+ def testAdd(self):
+ """Test add basic scene primitive"""
+ sceneWidget = self.window.getSceneWidget()
+ items = []
+
+ # RGB image
+ image = sceneWidget.addImage(numpy.random.random(
+ 10*10*3).astype(numpy.float32).reshape(10, 10, 3))
+ image.setLabel('RGB image')
+ items.append(image)
+ self.assertEqual(sceneWidget.getItems(), tuple(items))
+
+ # Data image
+ image = sceneWidget.addImage(
+ numpy.arange(100, dtype=numpy.float32).reshape(10, 10))
+ image.setTranslation(10.)
+ items.append(image)
+ self.assertEqual(sceneWidget.getItems(), tuple(items))
+
+ # 2D scatter
+ scatter = sceneWidget.add2DScatter(
+ *numpy.random.random(3000).astype(numpy.float32).reshape(3, -1),
+ index=0)
+ scatter.setTranslation(0, 10)
+ scatter.setScale(10, 10, 10)
+ items.insert(0, scatter)
+ self.assertEqual(sceneWidget.getItems(), tuple(items))
+
+ # 3D scatter
+ scatter = sceneWidget.add3DScatter(
+ *numpy.random.random(4000).astype(numpy.float32).reshape(4, -1))
+ scatter.setTranslation(10, 10)
+ scatter.setScale(10, 10, 10)
+ items.append(scatter)
+ self.assertEqual(sceneWidget.getItems(), tuple(items))
+
+ # 3D array of float
+ volume = sceneWidget.addVolume(
+ numpy.arange(10**3, dtype=numpy.float32).reshape(10, 10, 10))
+ volume.setTranslation(0, 0, 10)
+ volume.setRotation(45, (0, 0, 1))
+ volume.addIsosurface(500, 'red')
+ volume.getCutPlanes()[0].getColormap().setName('viridis')
+ items.append(volume)
+ self.assertEqual(sceneWidget.getItems(), tuple(items))
+
+ # 3D array of complex
+ volume = sceneWidget.addVolume(
+ numpy.arange(10**3).reshape(10, 10, 10).astype(numpy.complex64))
+ volume.setTranslation(10, 0, 10)
+ volume.setRotation(45, (0, 0, 1))
+ volume.setComplexMode(volume.ComplexMode.REAL)
+ volume.addIsosurface(500, (1., 0., 0., .5))
+ items.append(volume)
+ self.assertEqual(sceneWidget.getItems(), tuple(items))
+
+ sceneWidget.resetZoom('front')
+ self.qapp.processEvents()
+
+ def testChangeContent(self):
+ """Test add/remove/clear items"""
+ sceneWidget = self.window.getSceneWidget()
+ items = []
+
+ # Add 2 images
+ image = numpy.arange(100, dtype=numpy.float32).reshape(10, 10)
+ items.append(sceneWidget.addImage(image))
+ items.append(sceneWidget.addImage(image))
+ self.qapp.processEvents()
+ self.assertEqual(sceneWidget.getItems(), tuple(items))
+
+ # Clear
+ sceneWidget.clearItems()
+ self.qapp.processEvents()
+ self.assertEqual(sceneWidget.getItems(), ())
+
+ # Add 2 images and remove first one
+ image = numpy.arange(100, dtype=numpy.float32).reshape(10, 10)
+ sceneWidget.addImage(image)
+ items = (sceneWidget.addImage(image),)
+ self.qapp.processEvents()
+
+ sceneWidget.removeItem(sceneWidget.getItems()[0])
+ self.qapp.processEvents()
+ self.assertEqual(sceneWidget.getItems(), items)
+
+ def testColors(self):
+ """Test setting scene colors"""
+ sceneWidget = self.window.getSceneWidget()
+
+ color = qt.QColor(128, 128, 128)
+ sceneWidget.setBackgroundColor(color)
+ self.assertEqual(sceneWidget.getBackgroundColor(), color)
+
+ color = qt.QColor(0, 0, 0)
+ sceneWidget.setForegroundColor(color)
+ self.assertEqual(sceneWidget.getForegroundColor(), color)
+
+ color = qt.QColor(255, 0, 0)
+ sceneWidget.setTextColor(color)
+ self.assertEqual(sceneWidget.getTextColor(), color)
+
+ color = qt.QColor(0, 255, 0)
+ sceneWidget.setHighlightColor(color)
+ self.assertEqual(sceneWidget.getHighlightColor(), color)
+
+ self.qapp.processEvents()
+
+ def testInteractiveMode(self):
+ """Test changing interactive mode"""
+ sceneWidget = self.window.getSceneWidget()
+ center = numpy.array((sceneWidget.width() //2, sceneWidget.height() // 2))
+
+ self.mouseMove(sceneWidget, pos=center)
+ self.mouseClick(sceneWidget, qt.Qt.LeftButton, pos=center)
+
+ volume = sceneWidget.addVolume(
+ numpy.arange(10**3).astype(numpy.float32).reshape(10, 10, 10))
+ sceneWidget.selection().setCurrentItem( volume.getCutPlanes()[0])
+ sceneWidget.resetZoom('side')
+
+ for mode in (None, 'rotate', 'pan', 'panSelectedPlane'):
+ with self.subTest(mode=mode):
+ sceneWidget.setInteractiveMode(mode)
+ self.qapp.processEvents()
+ self.assertEqual(sceneWidget.getInteractiveMode(), mode)
+
+ self.mouseMove(sceneWidget, pos=center)
+ self.mousePress(sceneWidget, qt.Qt.LeftButton, pos=center)
+ self.mouseMove(sceneWidget, pos=center-10)
+ self.mouseMove(sceneWidget, pos=center-20)
+ self.mouseRelease(sceneWidget, qt.Qt.LeftButton, pos=center-20)
+
+ self.keyPress(sceneWidget, qt.Qt.Key_Control)
+ self.mouseMove(sceneWidget, pos=center)
+ self.mousePress(sceneWidget, qt.Qt.LeftButton, pos=center)
+ self.mouseMove(sceneWidget, pos=center-10)
+ self.mouseMove(sceneWidget, pos=center-20)
+ self.mouseRelease(sceneWidget, qt.Qt.LeftButton, pos=center-20)
+ self.keyRelease(sceneWidget, qt.Qt.Key_Control)
+
+
+def suite():
+ testsuite = unittest.TestSuite()
+ testsuite.addTest(
+ unittest.defaultTestLoader.loadTestsFromTestCase(
+ TestSceneWindow))
+ return testsuite
+
+
+if __name__ == '__main__':
+ unittest.main(defaultTest='suite')
diff --git a/silx/gui/plot3d/tools/PositionInfoWidget.py b/silx/gui/plot3d/tools/PositionInfoWidget.py
index b4d2c05..fc86a7f 100644
--- a/silx/gui/plot3d/tools/PositionInfoWidget.py
+++ b/silx/gui/plot3d/tools/PositionInfoWidget.py
@@ -1,7 +1,7 @@
# coding: utf-8
# /*##########################################################################
#
-# Copyright (c) 2018 European Synchrotron Radiation Facility
+# Copyright (c) 2018-2019 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -36,6 +36,7 @@ import logging
import weakref
from ... import qt
+from .. import actions
from .. import items
from ..items import volume
from ..SceneWidget import SceneWidget
@@ -65,6 +66,27 @@ class PositionInfoWidget(qt.QWidget):
layout.addStretch(1)
+ self._action = actions.mode.PickingModeAction(parent=self)
+ self._action.setText('Selection')
+ self._action.setToolTip(
+ 'Toggle selection information update with left button click')
+ self._action.sigSceneClicked.connect(self.pick)
+ self._action.changed.connect(self.__actionChanged)
+ self._action.setChecked(False) # Disabled by default
+ self.__actionChanged() # Sync action/widget
+
+ def __actionChanged(self):
+ """Handle toggle action change signal"""
+ if self.toggleAction().isChecked() != self.isEnabled():
+ self.setEnabled(self.toggleAction().isChecked())
+
+ def toggleAction(self):
+ """The action to toggle the picking mode.
+
+ :rtype: QAction
+ """
+ return self._action
+
def _addInfoField(self, label):
"""Add a description: info widget to this widget
@@ -108,23 +130,9 @@ class PositionInfoWidget(qt.QWidget):
if widget is not None and not isinstance(widget, SceneWidget):
raise ValueError("widget must be a SceneWidget or None")
- previous = self.getSceneWidget()
- if previous is not None:
- previous.removeEventFilter(self)
-
- if widget is None:
- self._sceneWidgetRef = None
- else:
- widget.installEventFilter(self)
- self._sceneWidgetRef = weakref.ref(widget)
-
- def eventFilter(self, watched, event):
- # Filter events of SceneWidget to react on mouse events.
- if (event.type() == qt.QEvent.MouseButtonDblClick and
- event.button() == qt.Qt.LeftButton):
- self.pick(event.x(), event.y())
+ self._sceneWidgetRef = None if widget is None else weakref.ref(widget)
- return super(PositionInfoWidget, self).eventFilter(watched, event)
+ self.toggleAction().setPlot3DWidget(widget)
def clear(self):
"""Clean-up displayed values"""
diff --git a/silx/gui/qt/_qt.py b/silx/gui/qt/_qt.py
index a4b9007..9615342 100644
--- a/silx/gui/qt/_qt.py
+++ b/silx/gui/qt/_qt.py
@@ -1,7 +1,7 @@
# coding: utf-8
# /*##########################################################################
#
-# Copyright (c) 2004-2018 European Synchrotron Radiation Facility
+# Copyright (c) 2004-2019 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -66,17 +66,34 @@ elif 'PyQt4.QtCore' in sys.modules:
else: # Then try Qt bindings
try:
- import PyQt5 # noqa
+ import PyQt5.QtCore # noqa
except ImportError:
+ if 'PyQt5' in sys.modules:
+ del sys.modules["PyQt5"]
try:
- import PyQt4 # noqa
+ import sip
+ sip.setapi("QString", 2)
+ sip.setapi("QVariant", 2)
+ sip.setapi('QDate', 2)
+ sip.setapi('QDateTime', 2)
+ sip.setapi('QTextStream', 2)
+ sip.setapi('QTime', 2)
+ sip.setapi('QUrl', 2)
+ import PyQt4.QtCore # noqa
except ImportError:
+ if 'PyQt4' in sys.modules:
+ del sys.modules["sip"]
+ del sys.modules["PyQt4"]
try:
- import PySide2 # noqa
+ import PySide2.QtCore # noqa
except ImportError:
+ if 'PySide2' in sys.modules:
+ del sys.modules["PySide2"]
try:
- import PySide # noqa
+ import PySide.QtCore # noqa
except ImportError:
+ if 'PySide' in sys.modules:
+ del sys.modules["PySide"]
raise ImportError(
'No Qt wrapper found. Install PyQt5, PyQt4 or PySide2.')
else:
@@ -98,7 +115,6 @@ if BINDING == 'PyQt4':
if sys.version_info < (3, ):
try:
import sip
-
sip.setapi("QString", 2)
sip.setapi("QVariant", 2)
sip.setapi('QDate', 2)
@@ -210,8 +226,6 @@ elif BINDING == 'PyQt5':
elif BINDING == 'PySide2':
_logger.debug('Using PySide2 bindings')
- _logger.warning(
- 'Using PySide2 Qt binding: PySide2 support in silx is experimental!')
import PySide2 as QtBinding # noqa
diff --git a/silx/gui/qt/inspect.py b/silx/gui/qt/inspect.py
index c6c2cbe..3c08835 100644
--- a/silx/gui/qt/inspect.py
+++ b/silx/gui/qt/inspect.py
@@ -1,7 +1,7 @@
# coding: utf-8
# /*##########################################################################
#
-# Copyright (c) 2018 European Synchrotron Radiation Facility
+# Copyright (c) 2018-2019 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -62,9 +62,14 @@ if qt.BINDING in ('PyQt4', 'PyQt5'):
return not _isdeleted(obj)
elif qt.BINDING == 'PySide2':
- from PySide2.shiboken2 import isValid # noqa
- from PySide2.shiboken2 import createdByPython # noqa
- from PySide2.shiboken2 import ownedByPython # noqa
+ try:
+ from PySide2.shiboken2 import isValid # noqa
+ from PySide2.shiboken2 import createdByPython # noqa
+ from PySide2.shiboken2 import ownedByPython # noqa
+ except ImportError:
+ from shiboken2 import isValid # noqa
+ from shiboken2 import createdByPython # noqa
+ from shiboken2 import ownedByPython # noqa
elif qt.BINDING == 'PySide':
try: # Available through PySide
diff --git a/silx/gui/test/test_colors.py b/silx/gui/test/test_colors.py
index 2f883bc..6e4fc73 100644
--- a/silx/gui/test/test_colors.py
+++ b/silx/gui/test/test_colors.py
@@ -1,7 +1,7 @@
# coding: utf-8
# /*##########################################################################
#
-# Copyright (c) 2015-2018 European Synchrotron Radiation Facility
+# Copyright (c) 2015-2019 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -226,7 +226,7 @@ class TestObjectAPI(ParametricTestCase):
def testCopy(self):
"""Make sure the copy function is correctly processing
"""
- colormapObject = Colormap(name='red',
+ colormapObject = Colormap(name=None,
colors=numpy.array([[1., 0., 0.],
[0., 1., 0.],
[0., 0., 1.]]),
@@ -445,7 +445,7 @@ class TestRegisteredLut(unittest.TestCase):
def testLut(self):
colormap = Colormap("test_8")
colors = colormap.getNColors(8)
- self.assertEquals(len(colors), 8)
+ self.assertEqual(len(colors), 8)
def testUint8(self):
lut = numpy.array([[255, 0, 0], [200, 0, 0], [150, 0, 0]], dtype="uint")
diff --git a/silx/gui/utils/testutils.py b/silx/gui/utils/testutils.py
index 6c54357..d7f2f41 100644
--- a/silx/gui/utils/testutils.py
+++ b/silx/gui/utils/testutils.py
@@ -1,7 +1,7 @@
# coding: utf-8
# /*##########################################################################
#
-# Copyright (c) 2016-2018 European Synchrotron Radiation Facility
+# Copyright (c) 2016-2019 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -87,10 +87,6 @@ def qWaitForWindowExposedAndActivate(window, timeout=None):
return result
-# Placeholder for QApplication
-_qapp = None
-
-
class TestCaseQt(unittest.TestCase):
"""Base class to write test for Qt stuff.
@@ -122,6 +118,9 @@ class TestCaseQt(unittest.TestCase):
allow to view the tested widgets.
"""
+ _qapp = None
+ """Placeholder for QApplication"""
+
@classmethod
def exceptionHandler(cls, exceptionClass, exception, stack):
import traceback
@@ -136,14 +135,15 @@ class TestCaseQt(unittest.TestCase):
cls._oldExceptionHook = sys.excepthook
sys.excepthook = cls.exceptionHandler
- global _qapp
- if _qapp is None:
- # Makes sure a QApplication exists and do it once for all
- _qapp = qt.QApplication.instance() or qt.QApplication([])
+ # Makes sure a QApplication exists and do it once for all
+ if not qt.QApplication.instance():
+ cls._qapp = qt.QApplication([])
@classmethod
def tearDownClass(cls):
sys.excepthook = cls._oldExceptionHook
+ if cls._qapp is not None:
+ cls._qapp = None
def setUp(self):
"""Get the list of existing widgets."""
@@ -330,9 +330,10 @@ class TestCaseQt(unittest.TestCase):
# PySide has no qWait, provide a replacement
timeout = int(ms)
endTimeMS = int(time.time() * 1000) + timeout
+ qapp = qt.QApplication.instance()
while timeout > 0:
- _qapp.processEvents(qt.QEventLoop.AllEvents,
- maxtime=timeout)
+ qapp.processEvents(qt.QEventLoop.AllEvents,
+ maxtime=timeout)
timeout = endTimeMS - int(time.time() * 1000)
else:
QTest.qWait(ms + cls.TIMEOUT_WAIT)
diff --git a/silx/image/bilinear.c b/silx/image/bilinear.c
index 1ea3f8c..85b293e 100644
--- a/silx/image/bilinear.c
+++ b/silx/image/bilinear.c
@@ -1,4 +1,4 @@
-/* Generated by Cython 0.29.7 */
+/* Generated by Cython 0.29.11 */
/* BEGIN: Cython Metadata
{
@@ -21,8 +21,8 @@ END: Cython Metadata */
#elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
#error Cython requires Python 2.6+ or Python 3.3+.
#else
-#define CYTHON_ABI "0_29_7"
-#define CYTHON_HEX_VERSION 0x001D07F0
+#define CYTHON_ABI "0_29_11"
+#define CYTHON_HEX_VERSION 0x001D0BF0
#define CYTHON_FUTURE_DIVISION 1
#include <stddef.h>
#ifndef offsetof
@@ -324,8 +324,16 @@ END: Cython Metadata */
#define __Pyx_DefaultClassType PyClass_Type
#else
#define __Pyx_BUILTIN_MODULE_NAME "builtins"
+#if PY_VERSION_HEX < 0x030800A4
#define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
+#elif PY_VERSION_HEX >= 0x030800B2
+ #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
+ PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
+#else
+ #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
+ PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
+#endif
#define __Pyx_DefaultClassType PyType_Type
#endif
#ifndef Py_TPFLAGS_CHECKTYPES
@@ -18726,6 +18734,9 @@ static PyTypeObject __pyx_type_4silx_5image_8bilinear_BilinearImage = {
#if PY_VERSION_HEX >= 0x030400a1
0, /*tp_finalize*/
#endif
+ #if PY_VERSION_HEX >= 0x030800b1
+ 0, /*tp_vectorcall*/
+ #endif
};
static struct __pyx_vtabstruct_array __pyx_vtable_array;
@@ -18904,6 +18915,9 @@ static PyTypeObject __pyx_type___pyx_array = {
#if PY_VERSION_HEX >= 0x030400a1
0, /*tp_finalize*/
#endif
+ #if PY_VERSION_HEX >= 0x030800b1
+ 0, /*tp_vectorcall*/
+ #endif
};
static PyObject *__pyx_tp_new_Enum(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
@@ -19012,6 +19026,9 @@ static PyTypeObject __pyx_type___pyx_MemviewEnum = {
#if PY_VERSION_HEX >= 0x030400a1
0, /*tp_finalize*/
#endif
+ #if PY_VERSION_HEX >= 0x030800b1
+ 0, /*tp_vectorcall*/
+ #endif
};
static struct __pyx_vtabstruct_memoryview __pyx_vtable_memoryview;
@@ -19262,6 +19279,9 @@ static PyTypeObject __pyx_type___pyx_memoryview = {
#if PY_VERSION_HEX >= 0x030400a1
0, /*tp_finalize*/
#endif
+ #if PY_VERSION_HEX >= 0x030800b1
+ 0, /*tp_vectorcall*/
+ #endif
};
static struct __pyx_vtabstruct__memoryviewslice __pyx_vtable__memoryviewslice;
@@ -19397,6 +19417,9 @@ static PyTypeObject __pyx_type___pyx_memoryviewslice = {
#if PY_VERSION_HEX >= 0x030400a1
0, /*tp_finalize*/
#endif
+ #if PY_VERSION_HEX >= 0x030800b1
+ 0, /*tp_vectorcall*/
+ #endif
};
static PyMethodDef __pyx_methods[] = {
@@ -19930,7 +19953,9 @@ static int __Pyx_modinit_type_init_code(void) {
__pyx_vtable_4silx_5image_8bilinear_BilinearImage.c_local_maxi = (size_t (*)(struct __pyx_obj_4silx_5image_8bilinear_BilinearImage *, size_t))__pyx_f_4silx_5image_8bilinear_13BilinearImage_c_local_maxi;
__pyx_vtable_4silx_5image_8bilinear_BilinearImage.c_funct = (float (*)(struct __pyx_obj_4silx_5image_8bilinear_BilinearImage *, float, float))__pyx_f_4silx_5image_8bilinear_13BilinearImage_c_funct;
if (PyType_Ready(&__pyx_type_4silx_5image_8bilinear_BilinearImage) < 0) __PYX_ERR(0, 39, __pyx_L1_error)
+ #if PY_VERSION_HEX < 0x030800B1
__pyx_type_4silx_5image_8bilinear_BilinearImage.tp_print = 0;
+ #endif
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4silx_5image_8bilinear_BilinearImage.tp_dictoffset && __pyx_type_4silx_5image_8bilinear_BilinearImage.tp_getattro == PyObject_GenericGetAttr)) {
__pyx_type_4silx_5image_8bilinear_BilinearImage.tp_getattro = __Pyx_PyObject_GenericGetAttr;
}
@@ -19951,12 +19976,16 @@ static int __Pyx_modinit_type_init_code(void) {
__pyx_vtabptr_array = &__pyx_vtable_array;
__pyx_vtable_array.get_memview = (PyObject *(*)(struct __pyx_array_obj *))__pyx_array_get_memview;
if (PyType_Ready(&__pyx_type___pyx_array) < 0) __PYX_ERR(1, 105, __pyx_L1_error)
+ #if PY_VERSION_HEX < 0x030800B1
__pyx_type___pyx_array.tp_print = 0;
+ #endif
if (__Pyx_SetVtable(__pyx_type___pyx_array.tp_dict, __pyx_vtabptr_array) < 0) __PYX_ERR(1, 105, __pyx_L1_error)
if (__Pyx_setup_reduce((PyObject*)&__pyx_type___pyx_array) < 0) __PYX_ERR(1, 105, __pyx_L1_error)
__pyx_array_type = &__pyx_type___pyx_array;
if (PyType_Ready(&__pyx_type___pyx_MemviewEnum) < 0) __PYX_ERR(1, 279, __pyx_L1_error)
+ #if PY_VERSION_HEX < 0x030800B1
__pyx_type___pyx_MemviewEnum.tp_print = 0;
+ #endif
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_MemviewEnum.tp_dictoffset && __pyx_type___pyx_MemviewEnum.tp_getattro == PyObject_GenericGetAttr)) {
__pyx_type___pyx_MemviewEnum.tp_getattro = __Pyx_PyObject_GenericGetAttr;
}
@@ -19971,7 +20000,9 @@ static int __Pyx_modinit_type_init_code(void) {
__pyx_vtable_memoryview.convert_item_to_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *))__pyx_memoryview_convert_item_to_object;
__pyx_vtable_memoryview.assign_item_from_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *, PyObject *))__pyx_memoryview_assign_item_from_object;
if (PyType_Ready(&__pyx_type___pyx_memoryview) < 0) __PYX_ERR(1, 330, __pyx_L1_error)
+ #if PY_VERSION_HEX < 0x030800B1
__pyx_type___pyx_memoryview.tp_print = 0;
+ #endif
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_memoryview.tp_dictoffset && __pyx_type___pyx_memoryview.tp_getattro == PyObject_GenericGetAttr)) {
__pyx_type___pyx_memoryview.tp_getattro = __Pyx_PyObject_GenericGetAttr;
}
@@ -19984,7 +20015,9 @@ static int __Pyx_modinit_type_init_code(void) {
__pyx_vtable__memoryviewslice.__pyx_base.assign_item_from_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *, PyObject *))__pyx_memoryviewslice_assign_item_from_object;
__pyx_type___pyx_memoryviewslice.tp_base = __pyx_memoryview_type;
if (PyType_Ready(&__pyx_type___pyx_memoryviewslice) < 0) __PYX_ERR(1, 961, __pyx_L1_error)
+ #if PY_VERSION_HEX < 0x030800B1
__pyx_type___pyx_memoryviewslice.tp_print = 0;
+ #endif
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_memoryviewslice.tp_dictoffset && __pyx_type___pyx_memoryviewslice.tp_getattro == PyObject_GenericGetAttr)) {
__pyx_type___pyx_memoryviewslice.tp_getattro = __Pyx_PyObject_GenericGetAttr;
}
diff --git a/silx/image/marchingsquares/_mergeimpl.cpp b/silx/image/marchingsquares/_mergeimpl.cpp
index c073151..8b86d97 100644
--- a/silx/image/marchingsquares/_mergeimpl.cpp
+++ b/silx/image/marchingsquares/_mergeimpl.cpp
@@ -1,12 +1,12 @@
-/* Generated by Cython 0.29.7 */
+/* Generated by Cython 0.29.11 */
/* BEGIN: Cython Metadata
{
"distutils": {
"depends": [
- "/media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/numpy/core/include/numpy/arrayobject.h",
- "/media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/numpy/core/include/numpy/ufuncobject.h",
- "/users/tvincent/Desktop/silx-0.10.1/silx/utils/include/silx_store_openmp.h",
+ "/builds/silx/bob/silx/build/silx/utils/include/silx_store_openmp.h",
+ "/opt/python/cp36-cp36m/lib/python3.6/site-packages/numpy/core/include/numpy/arrayobject.h",
+ "/opt/python/cp36-cp36m/lib/python3.6/site-packages/numpy/core/include/numpy/ufuncobject.h",
"silx/image/marchingsquares/include/patterns.h"
],
"extra_compile_args": [
@@ -17,8 +17,8 @@
],
"include_dirs": [
"silx/image/marchingsquares",
- "/media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/numpy/core/include",
- "/users/tvincent/Desktop/silx-0.10.1/silx/utils/include"
+ "/opt/python/cp36-cp36m/lib/python3.6/site-packages/numpy/core/include",
+ "/builds/silx/bob/silx/build/silx/utils/include"
],
"language": "c++",
"name": "silx.image.marchingsquares._mergeimpl",
@@ -37,8 +37,8 @@ END: Cython Metadata */
#elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
#error Cython requires Python 2.6+ or Python 3.3+.
#else
-#define CYTHON_ABI "0_29_7"
-#define CYTHON_HEX_VERSION 0x001D07F0
+#define CYTHON_ABI "0_29_11"
+#define CYTHON_HEX_VERSION 0x001D0BF0
#define CYTHON_FUTURE_DIVISION 1
#include <stddef.h>
#ifndef offsetof
@@ -354,8 +354,16 @@ class __Pyx_FakeReference {
#define __Pyx_DefaultClassType PyClass_Type
#else
#define __Pyx_BUILTIN_MODULE_NAME "builtins"
+#if PY_VERSION_HEX < 0x030800A4
#define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
+#elif PY_VERSION_HEX >= 0x030800B2
+ #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
+ PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
+#else
+ #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
+ PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
+#endif
#define __Pyx_DefaultClassType PyType_Type
#endif
#ifndef Py_TPFLAGS_CHECKTYPES
@@ -997,7 +1005,7 @@ typedef struct {
} __Pyx_BufFmt_Context;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":776
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":776
* # in Cython to enable them only on the right systems.
*
* ctypedef npy_int8 int8_t # <<<<<<<<<<<<<<
@@ -1006,7 +1014,7 @@ typedef struct {
*/
typedef npy_int8 __pyx_t_5numpy_int8_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":777
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":777
*
* ctypedef npy_int8 int8_t
* ctypedef npy_int16 int16_t # <<<<<<<<<<<<<<
@@ -1015,7 +1023,7 @@ typedef npy_int8 __pyx_t_5numpy_int8_t;
*/
typedef npy_int16 __pyx_t_5numpy_int16_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":778
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":778
* ctypedef npy_int8 int8_t
* ctypedef npy_int16 int16_t
* ctypedef npy_int32 int32_t # <<<<<<<<<<<<<<
@@ -1024,7 +1032,7 @@ typedef npy_int16 __pyx_t_5numpy_int16_t;
*/
typedef npy_int32 __pyx_t_5numpy_int32_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":779
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":779
* ctypedef npy_int16 int16_t
* ctypedef npy_int32 int32_t
* ctypedef npy_int64 int64_t # <<<<<<<<<<<<<<
@@ -1033,7 +1041,7 @@ typedef npy_int32 __pyx_t_5numpy_int32_t;
*/
typedef npy_int64 __pyx_t_5numpy_int64_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":783
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":783
* #ctypedef npy_int128 int128_t
*
* ctypedef npy_uint8 uint8_t # <<<<<<<<<<<<<<
@@ -1042,7 +1050,7 @@ typedef npy_int64 __pyx_t_5numpy_int64_t;
*/
typedef npy_uint8 __pyx_t_5numpy_uint8_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":784
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":784
*
* ctypedef npy_uint8 uint8_t
* ctypedef npy_uint16 uint16_t # <<<<<<<<<<<<<<
@@ -1051,7 +1059,7 @@ typedef npy_uint8 __pyx_t_5numpy_uint8_t;
*/
typedef npy_uint16 __pyx_t_5numpy_uint16_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":785
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":785
* ctypedef npy_uint8 uint8_t
* ctypedef npy_uint16 uint16_t
* ctypedef npy_uint32 uint32_t # <<<<<<<<<<<<<<
@@ -1060,7 +1068,7 @@ typedef npy_uint16 __pyx_t_5numpy_uint16_t;
*/
typedef npy_uint32 __pyx_t_5numpy_uint32_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":786
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":786
* ctypedef npy_uint16 uint16_t
* ctypedef npy_uint32 uint32_t
* ctypedef npy_uint64 uint64_t # <<<<<<<<<<<<<<
@@ -1069,7 +1077,7 @@ typedef npy_uint32 __pyx_t_5numpy_uint32_t;
*/
typedef npy_uint64 __pyx_t_5numpy_uint64_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":790
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":790
* #ctypedef npy_uint128 uint128_t
*
* ctypedef npy_float32 float32_t # <<<<<<<<<<<<<<
@@ -1078,7 +1086,7 @@ typedef npy_uint64 __pyx_t_5numpy_uint64_t;
*/
typedef npy_float32 __pyx_t_5numpy_float32_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":791
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":791
*
* ctypedef npy_float32 float32_t
* ctypedef npy_float64 float64_t # <<<<<<<<<<<<<<
@@ -1087,7 +1095,7 @@ typedef npy_float32 __pyx_t_5numpy_float32_t;
*/
typedef npy_float64 __pyx_t_5numpy_float64_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":800
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":800
* # The int types are mapped a bit surprising --
* # numpy.int corresponds to 'l' and numpy.long to 'q'
* ctypedef npy_long int_t # <<<<<<<<<<<<<<
@@ -1096,7 +1104,7 @@ typedef npy_float64 __pyx_t_5numpy_float64_t;
*/
typedef npy_long __pyx_t_5numpy_int_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":801
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":801
* # numpy.int corresponds to 'l' and numpy.long to 'q'
* ctypedef npy_long int_t
* ctypedef npy_longlong long_t # <<<<<<<<<<<<<<
@@ -1105,7 +1113,7 @@ typedef npy_long __pyx_t_5numpy_int_t;
*/
typedef npy_longlong __pyx_t_5numpy_long_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":802
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":802
* ctypedef npy_long int_t
* ctypedef npy_longlong long_t
* ctypedef npy_longlong longlong_t # <<<<<<<<<<<<<<
@@ -1114,7 +1122,7 @@ typedef npy_longlong __pyx_t_5numpy_long_t;
*/
typedef npy_longlong __pyx_t_5numpy_longlong_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":804
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":804
* ctypedef npy_longlong longlong_t
*
* ctypedef npy_ulong uint_t # <<<<<<<<<<<<<<
@@ -1123,7 +1131,7 @@ typedef npy_longlong __pyx_t_5numpy_longlong_t;
*/
typedef npy_ulong __pyx_t_5numpy_uint_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":805
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":805
*
* ctypedef npy_ulong uint_t
* ctypedef npy_ulonglong ulong_t # <<<<<<<<<<<<<<
@@ -1132,7 +1140,7 @@ typedef npy_ulong __pyx_t_5numpy_uint_t;
*/
typedef npy_ulonglong __pyx_t_5numpy_ulong_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":806
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":806
* ctypedef npy_ulong uint_t
* ctypedef npy_ulonglong ulong_t
* ctypedef npy_ulonglong ulonglong_t # <<<<<<<<<<<<<<
@@ -1141,7 +1149,7 @@ typedef npy_ulonglong __pyx_t_5numpy_ulong_t;
*/
typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":808
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":808
* ctypedef npy_ulonglong ulonglong_t
*
* ctypedef npy_intp intp_t # <<<<<<<<<<<<<<
@@ -1150,7 +1158,7 @@ typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t;
*/
typedef npy_intp __pyx_t_5numpy_intp_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":809
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":809
*
* ctypedef npy_intp intp_t
* ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<<
@@ -1159,7 +1167,7 @@ typedef npy_intp __pyx_t_5numpy_intp_t;
*/
typedef npy_uintp __pyx_t_5numpy_uintp_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":811
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":811
* ctypedef npy_uintp uintp_t
*
* ctypedef npy_double float_t # <<<<<<<<<<<<<<
@@ -1168,7 +1176,7 @@ typedef npy_uintp __pyx_t_5numpy_uintp_t;
*/
typedef npy_double __pyx_t_5numpy_float_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":812
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":812
*
* ctypedef npy_double float_t
* ctypedef npy_double double_t # <<<<<<<<<<<<<<
@@ -1177,7 +1185,7 @@ typedef npy_double __pyx_t_5numpy_float_t;
*/
typedef npy_double __pyx_t_5numpy_double_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":813
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":813
* ctypedef npy_double float_t
* ctypedef npy_double double_t
* ctypedef npy_longdouble longdouble_t # <<<<<<<<<<<<<<
@@ -1229,7 +1237,7 @@ struct __pyx_MemviewEnum_obj;
struct __pyx_memoryview_obj;
struct __pyx_memoryviewslice_obj;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":815
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":815
* ctypedef npy_longdouble longdouble_t
*
* ctypedef npy_cfloat cfloat_t # <<<<<<<<<<<<<<
@@ -1238,7 +1246,7 @@ struct __pyx_memoryviewslice_obj;
*/
typedef npy_cfloat __pyx_t_5numpy_cfloat_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":816
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":816
*
* ctypedef npy_cfloat cfloat_t
* ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<<
@@ -1247,7 +1255,7 @@ typedef npy_cfloat __pyx_t_5numpy_cfloat_t;
*/
typedef npy_cdouble __pyx_t_5numpy_cdouble_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":817
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":817
* ctypedef npy_cfloat cfloat_t
* ctypedef npy_cdouble cdouble_t
* ctypedef npy_clongdouble clongdouble_t # <<<<<<<<<<<<<<
@@ -1256,7 +1264,7 @@ typedef npy_cdouble __pyx_t_5numpy_cdouble_t;
*/
typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":819
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":819
* ctypedef npy_clongdouble clongdouble_t
*
* ctypedef npy_cdouble complex_t # <<<<<<<<<<<<<<
@@ -10959,7 +10967,7 @@ static PyObject *__pyx_pf_4silx_5image_15marchingsquares_10_mergeimpl_24Marching
return __pyx_r;
}
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":258
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":258
* # experimental exception made for __getbuffer__ and __releasebuffer__
* # -- the details of this may change.
* def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<<
@@ -11008,7 +11016,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
__Pyx_GIVEREF(__pyx_v_info->obj);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":265
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":265
*
* cdef int i, ndim
* cdef int endian_detector = 1 # <<<<<<<<<<<<<<
@@ -11017,7 +11025,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_endian_detector = 1;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":266
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":266
* cdef int i, ndim
* cdef int endian_detector = 1
* cdef bint little_endian = ((<char*>&endian_detector)[0] != 0) # <<<<<<<<<<<<<<
@@ -11026,7 +11034,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":268
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":268
* cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
*
* ndim = PyArray_NDIM(self) # <<<<<<<<<<<<<<
@@ -11035,7 +11043,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_ndim = PyArray_NDIM(__pyx_v_self);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":270
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":270
* ndim = PyArray_NDIM(self)
*
* if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<<
@@ -11049,7 +11057,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
goto __pyx_L4_bool_binop_done;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":271
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":271
*
* if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
* and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): # <<<<<<<<<<<<<<
@@ -11060,7 +11068,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_t_1 = __pyx_t_2;
__pyx_L4_bool_binop_done:;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":270
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":270
* ndim = PyArray_NDIM(self)
*
* if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<<
@@ -11069,7 +11077,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
if (unlikely(__pyx_t_1)) {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":272
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":272
* if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
* and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)):
* raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<<
@@ -11082,7 +11090,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__PYX_ERR(2, 272, __pyx_L1_error)
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":270
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":270
* ndim = PyArray_NDIM(self)
*
* if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<<
@@ -11091,7 +11099,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":274
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":274
* raise ValueError(u"ndarray is not C contiguous")
*
* if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<<
@@ -11105,7 +11113,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
goto __pyx_L7_bool_binop_done;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":275
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":275
*
* if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
* and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): # <<<<<<<<<<<<<<
@@ -11116,7 +11124,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_t_1 = __pyx_t_2;
__pyx_L7_bool_binop_done:;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":274
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":274
* raise ValueError(u"ndarray is not C contiguous")
*
* if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<<
@@ -11125,7 +11133,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
if (unlikely(__pyx_t_1)) {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":276
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":276
* if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
* and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)):
* raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<<
@@ -11138,7 +11146,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__PYX_ERR(2, 276, __pyx_L1_error)
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":274
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":274
* raise ValueError(u"ndarray is not C contiguous")
*
* if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<<
@@ -11147,7 +11155,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":278
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":278
* raise ValueError(u"ndarray is not Fortran contiguous")
*
* info.buf = PyArray_DATA(self) # <<<<<<<<<<<<<<
@@ -11156,7 +11164,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_info->buf = PyArray_DATA(__pyx_v_self);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":279
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":279
*
* info.buf = PyArray_DATA(self)
* info.ndim = ndim # <<<<<<<<<<<<<<
@@ -11165,7 +11173,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_info->ndim = __pyx_v_ndim;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":280
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":280
* info.buf = PyArray_DATA(self)
* info.ndim = ndim
* if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<<
@@ -11175,7 +11183,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0);
if (__pyx_t_1) {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":283
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":283
* # Allocate new buffer for strides and shape info.
* # This is allocated as one block, strides first.
* info.strides = <Py_ssize_t*>PyObject_Malloc(sizeof(Py_ssize_t) * 2 * <size_t>ndim) # <<<<<<<<<<<<<<
@@ -11184,7 +11192,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_info->strides = ((Py_ssize_t *)PyObject_Malloc((((sizeof(Py_ssize_t)) * 2) * ((size_t)__pyx_v_ndim))));
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":284
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":284
* # This is allocated as one block, strides first.
* info.strides = <Py_ssize_t*>PyObject_Malloc(sizeof(Py_ssize_t) * 2 * <size_t>ndim)
* info.shape = info.strides + ndim # <<<<<<<<<<<<<<
@@ -11193,7 +11201,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_info->shape = (__pyx_v_info->strides + __pyx_v_ndim);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":285
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":285
* info.strides = <Py_ssize_t*>PyObject_Malloc(sizeof(Py_ssize_t) * 2 * <size_t>ndim)
* info.shape = info.strides + ndim
* for i in range(ndim): # <<<<<<<<<<<<<<
@@ -11205,7 +11213,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
__pyx_v_i = __pyx_t_6;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":286
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":286
* info.shape = info.strides + ndim
* for i in range(ndim):
* info.strides[i] = PyArray_STRIDES(self)[i] # <<<<<<<<<<<<<<
@@ -11214,7 +11222,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
(__pyx_v_info->strides[__pyx_v_i]) = (PyArray_STRIDES(__pyx_v_self)[__pyx_v_i]);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":287
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":287
* for i in range(ndim):
* info.strides[i] = PyArray_STRIDES(self)[i]
* info.shape[i] = PyArray_DIMS(self)[i] # <<<<<<<<<<<<<<
@@ -11224,7 +11232,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
(__pyx_v_info->shape[__pyx_v_i]) = (PyArray_DIMS(__pyx_v_self)[__pyx_v_i]);
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":280
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":280
* info.buf = PyArray_DATA(self)
* info.ndim = ndim
* if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<<
@@ -11234,7 +11242,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
goto __pyx_L9;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":289
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":289
* info.shape[i] = PyArray_DIMS(self)[i]
* else:
* info.strides = <Py_ssize_t*>PyArray_STRIDES(self) # <<<<<<<<<<<<<<
@@ -11244,7 +11252,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
/*else*/ {
__pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(__pyx_v_self));
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":290
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":290
* else:
* info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
* info.shape = <Py_ssize_t*>PyArray_DIMS(self) # <<<<<<<<<<<<<<
@@ -11255,7 +11263,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
}
__pyx_L9:;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":291
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":291
* info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
* info.shape = <Py_ssize_t*>PyArray_DIMS(self)
* info.suboffsets = NULL # <<<<<<<<<<<<<<
@@ -11264,7 +11272,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_info->suboffsets = NULL;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":292
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":292
* info.shape = <Py_ssize_t*>PyArray_DIMS(self)
* info.suboffsets = NULL
* info.itemsize = PyArray_ITEMSIZE(self) # <<<<<<<<<<<<<<
@@ -11273,7 +11281,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_info->itemsize = PyArray_ITEMSIZE(__pyx_v_self);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":293
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":293
* info.suboffsets = NULL
* info.itemsize = PyArray_ITEMSIZE(self)
* info.readonly = not PyArray_ISWRITEABLE(self) # <<<<<<<<<<<<<<
@@ -11282,7 +11290,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_info->readonly = (!(PyArray_ISWRITEABLE(__pyx_v_self) != 0));
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":296
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":296
*
* cdef int t
* cdef char* f = NULL # <<<<<<<<<<<<<<
@@ -11291,7 +11299,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_f = NULL;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":297
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":297
* cdef int t
* cdef char* f = NULL
* cdef dtype descr = <dtype>PyArray_DESCR(self) # <<<<<<<<<<<<<<
@@ -11304,7 +11312,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_v_descr = ((PyArray_Descr *)__pyx_t_3);
__pyx_t_3 = 0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":300
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":300
* cdef int offset
*
* info.obj = self # <<<<<<<<<<<<<<
@@ -11317,7 +11325,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__Pyx_DECREF(__pyx_v_info->obj);
__pyx_v_info->obj = ((PyObject *)__pyx_v_self);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":302
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":302
* info.obj = self
*
* if not PyDataType_HASFIELDS(descr): # <<<<<<<<<<<<<<
@@ -11327,7 +11335,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_t_1 = ((!(PyDataType_HASFIELDS(__pyx_v_descr) != 0)) != 0);
if (__pyx_t_1) {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":303
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":303
*
* if not PyDataType_HASFIELDS(descr):
* t = descr.type_num # <<<<<<<<<<<<<<
@@ -11337,7 +11345,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_t_4 = __pyx_v_descr->type_num;
__pyx_v_t = __pyx_t_4;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":304
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":304
* if not PyDataType_HASFIELDS(descr):
* t = descr.type_num
* if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
@@ -11357,7 +11365,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
}
__pyx_L15_next_or:;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":305
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":305
* t = descr.type_num
* if ((descr.byteorder == c'>' and little_endian) or
* (descr.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<<
@@ -11374,7 +11382,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_t_1 = __pyx_t_2;
__pyx_L14_bool_binop_done:;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":304
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":304
* if not PyDataType_HASFIELDS(descr):
* t = descr.type_num
* if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
@@ -11383,7 +11391,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
if (unlikely(__pyx_t_1)) {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":306
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":306
* if ((descr.byteorder == c'>' and little_endian) or
* (descr.byteorder == c'<' and not little_endian)):
* raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<<
@@ -11396,7 +11404,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__PYX_ERR(2, 306, __pyx_L1_error)
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":304
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":304
* if not PyDataType_HASFIELDS(descr):
* t = descr.type_num
* if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
@@ -11405,7 +11413,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":307
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":307
* (descr.byteorder == c'<' and not little_endian)):
* raise ValueError(u"Non-native byte order not supported")
* if t == NPY_BYTE: f = "b" # <<<<<<<<<<<<<<
@@ -11418,7 +11426,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_UBYTE:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":308
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":308
* raise ValueError(u"Non-native byte order not supported")
* if t == NPY_BYTE: f = "b"
* elif t == NPY_UBYTE: f = "B" # <<<<<<<<<<<<<<
@@ -11429,7 +11437,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_SHORT:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":309
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":309
* if t == NPY_BYTE: f = "b"
* elif t == NPY_UBYTE: f = "B"
* elif t == NPY_SHORT: f = "h" # <<<<<<<<<<<<<<
@@ -11440,7 +11448,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_USHORT:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":310
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":310
* elif t == NPY_UBYTE: f = "B"
* elif t == NPY_SHORT: f = "h"
* elif t == NPY_USHORT: f = "H" # <<<<<<<<<<<<<<
@@ -11451,7 +11459,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_INT:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":311
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":311
* elif t == NPY_SHORT: f = "h"
* elif t == NPY_USHORT: f = "H"
* elif t == NPY_INT: f = "i" # <<<<<<<<<<<<<<
@@ -11462,7 +11470,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_UINT:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":312
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":312
* elif t == NPY_USHORT: f = "H"
* elif t == NPY_INT: f = "i"
* elif t == NPY_UINT: f = "I" # <<<<<<<<<<<<<<
@@ -11473,7 +11481,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_LONG:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":313
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":313
* elif t == NPY_INT: f = "i"
* elif t == NPY_UINT: f = "I"
* elif t == NPY_LONG: f = "l" # <<<<<<<<<<<<<<
@@ -11484,7 +11492,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_ULONG:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":314
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":314
* elif t == NPY_UINT: f = "I"
* elif t == NPY_LONG: f = "l"
* elif t == NPY_ULONG: f = "L" # <<<<<<<<<<<<<<
@@ -11495,7 +11503,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_LONGLONG:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":315
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":315
* elif t == NPY_LONG: f = "l"
* elif t == NPY_ULONG: f = "L"
* elif t == NPY_LONGLONG: f = "q" # <<<<<<<<<<<<<<
@@ -11506,7 +11514,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_ULONGLONG:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":316
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":316
* elif t == NPY_ULONG: f = "L"
* elif t == NPY_LONGLONG: f = "q"
* elif t == NPY_ULONGLONG: f = "Q" # <<<<<<<<<<<<<<
@@ -11517,7 +11525,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_FLOAT:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":317
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":317
* elif t == NPY_LONGLONG: f = "q"
* elif t == NPY_ULONGLONG: f = "Q"
* elif t == NPY_FLOAT: f = "f" # <<<<<<<<<<<<<<
@@ -11528,7 +11536,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_DOUBLE:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":318
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":318
* elif t == NPY_ULONGLONG: f = "Q"
* elif t == NPY_FLOAT: f = "f"
* elif t == NPY_DOUBLE: f = "d" # <<<<<<<<<<<<<<
@@ -11539,7 +11547,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_LONGDOUBLE:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":319
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":319
* elif t == NPY_FLOAT: f = "f"
* elif t == NPY_DOUBLE: f = "d"
* elif t == NPY_LONGDOUBLE: f = "g" # <<<<<<<<<<<<<<
@@ -11550,7 +11558,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_CFLOAT:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":320
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":320
* elif t == NPY_DOUBLE: f = "d"
* elif t == NPY_LONGDOUBLE: f = "g"
* elif t == NPY_CFLOAT: f = "Zf" # <<<<<<<<<<<<<<
@@ -11561,7 +11569,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_CDOUBLE:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":321
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":321
* elif t == NPY_LONGDOUBLE: f = "g"
* elif t == NPY_CFLOAT: f = "Zf"
* elif t == NPY_CDOUBLE: f = "Zd" # <<<<<<<<<<<<<<
@@ -11572,7 +11580,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_CLONGDOUBLE:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":322
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":322
* elif t == NPY_CFLOAT: f = "Zf"
* elif t == NPY_CDOUBLE: f = "Zd"
* elif t == NPY_CLONGDOUBLE: f = "Zg" # <<<<<<<<<<<<<<
@@ -11583,7 +11591,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_OBJECT:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":323
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":323
* elif t == NPY_CDOUBLE: f = "Zd"
* elif t == NPY_CLONGDOUBLE: f = "Zg"
* elif t == NPY_OBJECT: f = "O" # <<<<<<<<<<<<<<
@@ -11594,7 +11602,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
default:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":325
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":325
* elif t == NPY_OBJECT: f = "O"
* else:
* raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<<
@@ -11615,7 +11623,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":326
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":326
* else:
* raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
* info.format = f # <<<<<<<<<<<<<<
@@ -11624,7 +11632,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_info->format = __pyx_v_f;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":327
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":327
* raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
* info.format = f
* return # <<<<<<<<<<<<<<
@@ -11634,7 +11642,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_r = 0;
goto __pyx_L0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":302
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":302
* info.obj = self
*
* if not PyDataType_HASFIELDS(descr): # <<<<<<<<<<<<<<
@@ -11643,7 +11651,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":329
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":329
* return
* else:
* info.format = <char*>PyObject_Malloc(_buffer_format_string_len) # <<<<<<<<<<<<<<
@@ -11653,7 +11661,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
/*else*/ {
__pyx_v_info->format = ((char *)PyObject_Malloc(0xFF));
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":330
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":330
* else:
* info.format = <char*>PyObject_Malloc(_buffer_format_string_len)
* info.format[0] = c'^' # Native data types, manual alignment # <<<<<<<<<<<<<<
@@ -11662,7 +11670,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
(__pyx_v_info->format[0]) = '^';
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":331
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":331
* info.format = <char*>PyObject_Malloc(_buffer_format_string_len)
* info.format[0] = c'^' # Native data types, manual alignment
* offset = 0 # <<<<<<<<<<<<<<
@@ -11671,7 +11679,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_offset = 0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":332
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":332
* info.format[0] = c'^' # Native data types, manual alignment
* offset = 0
* f = _util_dtypestring(descr, info.format + 1, # <<<<<<<<<<<<<<
@@ -11681,7 +11689,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 0xFF), (&__pyx_v_offset)); if (unlikely(__pyx_t_9 == ((char *)NULL))) __PYX_ERR(2, 332, __pyx_L1_error)
__pyx_v_f = __pyx_t_9;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":335
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":335
* info.format + _buffer_format_string_len,
* &offset)
* f[0] = c'\0' # Terminate format string # <<<<<<<<<<<<<<
@@ -11691,7 +11699,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
(__pyx_v_f[0]) = '\x00';
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":258
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":258
* # experimental exception made for __getbuffer__ and __releasebuffer__
* # -- the details of this may change.
* def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<<
@@ -11723,7 +11731,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
return __pyx_r;
}
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":337
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":337
* f[0] = c'\0' # Terminate format string
*
* def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<<
@@ -11747,7 +11755,7 @@ static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_s
int __pyx_t_1;
__Pyx_RefNannySetupContext("__releasebuffer__", 0);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":338
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":338
*
* def __releasebuffer__(ndarray self, Py_buffer* info):
* if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<<
@@ -11757,7 +11765,7 @@ static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_s
__pyx_t_1 = (PyArray_HASFIELDS(__pyx_v_self) != 0);
if (__pyx_t_1) {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":339
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":339
* def __releasebuffer__(ndarray self, Py_buffer* info):
* if PyArray_HASFIELDS(self):
* PyObject_Free(info.format) # <<<<<<<<<<<<<<
@@ -11766,7 +11774,7 @@ static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_s
*/
PyObject_Free(__pyx_v_info->format);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":338
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":338
*
* def __releasebuffer__(ndarray self, Py_buffer* info):
* if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<<
@@ -11775,7 +11783,7 @@ static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_s
*/
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":340
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":340
* if PyArray_HASFIELDS(self):
* PyObject_Free(info.format)
* if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<<
@@ -11785,7 +11793,7 @@ static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_s
__pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0);
if (__pyx_t_1) {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":341
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":341
* PyObject_Free(info.format)
* if sizeof(npy_intp) != sizeof(Py_ssize_t):
* PyObject_Free(info.strides) # <<<<<<<<<<<<<<
@@ -11794,7 +11802,7 @@ static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_s
*/
PyObject_Free(__pyx_v_info->strides);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":340
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":340
* if PyArray_HASFIELDS(self):
* PyObject_Free(info.format)
* if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<<
@@ -11803,7 +11811,7 @@ static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_s
*/
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":337
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":337
* f[0] = c'\0' # Terminate format string
*
* def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<<
@@ -11815,7 +11823,7 @@ static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_s
__Pyx_RefNannyFinishContext();
}
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":821
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":821
* ctypedef npy_cdouble complex_t
*
* cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<<
@@ -11829,7 +11837,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__
PyObject *__pyx_t_1 = NULL;
__Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":822
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":822
*
* cdef inline object PyArray_MultiIterNew1(a):
* return PyArray_MultiIterNew(1, <void*>a) # <<<<<<<<<<<<<<
@@ -11843,7 +11851,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":821
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":821
* ctypedef npy_cdouble complex_t
*
* cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<<
@@ -11862,7 +11870,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__
return __pyx_r;
}
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":824
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":824
* return PyArray_MultiIterNew(1, <void*>a)
*
* cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<<
@@ -11876,7 +11884,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__
PyObject *__pyx_t_1 = NULL;
__Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":825
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":825
*
* cdef inline object PyArray_MultiIterNew2(a, b):
* return PyArray_MultiIterNew(2, <void*>a, <void*>b) # <<<<<<<<<<<<<<
@@ -11890,7 +11898,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":824
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":824
* return PyArray_MultiIterNew(1, <void*>a)
*
* cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<<
@@ -11909,7 +11917,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__
return __pyx_r;
}
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":827
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":827
* return PyArray_MultiIterNew(2, <void*>a, <void*>b)
*
* cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<<
@@ -11923,7 +11931,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__
PyObject *__pyx_t_1 = NULL;
__Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":828
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":828
*
* cdef inline object PyArray_MultiIterNew3(a, b, c):
* return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c) # <<<<<<<<<<<<<<
@@ -11937,7 +11945,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":827
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":827
* return PyArray_MultiIterNew(2, <void*>a, <void*>b)
*
* cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<<
@@ -11956,7 +11964,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__
return __pyx_r;
}
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":830
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":830
* return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
*
* cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<<
@@ -11970,7 +11978,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__
PyObject *__pyx_t_1 = NULL;
__Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":831
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":831
*
* cdef inline object PyArray_MultiIterNew4(a, b, c, d):
* return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d) # <<<<<<<<<<<<<<
@@ -11984,7 +11992,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":830
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":830
* return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
*
* cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<<
@@ -12003,7 +12011,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__
return __pyx_r;
}
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":833
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":833
* return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
*
* cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<<
@@ -12017,7 +12025,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__
PyObject *__pyx_t_1 = NULL;
__Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":834
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":834
*
* cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
* return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e) # <<<<<<<<<<<<<<
@@ -12031,7 +12039,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":833
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":833
* return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
*
* cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<<
@@ -12050,7 +12058,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__
return __pyx_r;
}
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":836
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":836
* return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
*
* cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<<
@@ -12064,7 +12072,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__
int __pyx_t_1;
__Pyx_RefNannySetupContext("PyDataType_SHAPE", 0);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":837
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":837
*
* cdef inline tuple PyDataType_SHAPE(dtype d):
* if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<<
@@ -12074,7 +12082,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__
__pyx_t_1 = (PyDataType_HASSUBARRAY(__pyx_v_d) != 0);
if (__pyx_t_1) {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":838
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":838
* cdef inline tuple PyDataType_SHAPE(dtype d):
* if PyDataType_HASSUBARRAY(d):
* return <tuple>d.subarray.shape # <<<<<<<<<<<<<<
@@ -12086,7 +12094,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__
__pyx_r = ((PyObject*)__pyx_v_d->subarray->shape);
goto __pyx_L0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":837
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":837
*
* cdef inline tuple PyDataType_SHAPE(dtype d):
* if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<<
@@ -12095,7 +12103,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__
*/
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":840
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":840
* return <tuple>d.subarray.shape
* else:
* return () # <<<<<<<<<<<<<<
@@ -12109,7 +12117,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__
goto __pyx_L0;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":836
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":836
* return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
*
* cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<<
@@ -12124,7 +12132,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__
return __pyx_r;
}
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":842
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":842
* return ()
*
* cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<<
@@ -12153,7 +12161,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
char *__pyx_t_9;
__Pyx_RefNannySetupContext("_util_dtypestring", 0);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":847
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":847
*
* cdef dtype child
* cdef int endian_detector = 1 # <<<<<<<<<<<<<<
@@ -12162,7 +12170,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
*/
__pyx_v_endian_detector = 1;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":848
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":848
* cdef dtype child
* cdef int endian_detector = 1
* cdef bint little_endian = ((<char*>&endian_detector)[0] != 0) # <<<<<<<<<<<<<<
@@ -12171,7 +12179,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
*/
__pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":851
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":851
* cdef tuple fields
*
* for childname in descr.names: # <<<<<<<<<<<<<<
@@ -12194,7 +12202,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__Pyx_XDECREF_SET(__pyx_v_childname, __pyx_t_3);
__pyx_t_3 = 0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":852
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":852
*
* for childname in descr.names:
* fields = descr.fields[childname] # <<<<<<<<<<<<<<
@@ -12211,7 +12219,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__Pyx_XDECREF_SET(__pyx_v_fields, ((PyObject*)__pyx_t_3));
__pyx_t_3 = 0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":853
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":853
* for childname in descr.names:
* fields = descr.fields[childname]
* child, new_offset = fields # <<<<<<<<<<<<<<
@@ -12246,7 +12254,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__Pyx_XDECREF_SET(__pyx_v_new_offset, __pyx_t_4);
__pyx_t_4 = 0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":855
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":855
* child, new_offset = fields
*
* if (end - f) - <int>(new_offset - offset[0]) < 15: # <<<<<<<<<<<<<<
@@ -12263,7 +12271,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__pyx_t_6 = ((((__pyx_v_end - __pyx_v_f) - ((int)__pyx_t_5)) < 15) != 0);
if (unlikely(__pyx_t_6)) {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":856
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":856
*
* if (end - f) - <int>(new_offset - offset[0]) < 15:
* raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<<
@@ -12276,7 +12284,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__PYX_ERR(2, 856, __pyx_L1_error)
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":855
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":855
* child, new_offset = fields
*
* if (end - f) - <int>(new_offset - offset[0]) < 15: # <<<<<<<<<<<<<<
@@ -12285,7 +12293,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
*/
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":858
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":858
* raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
*
* if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
@@ -12305,7 +12313,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
}
__pyx_L8_next_or:;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":859
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":859
*
* if ((child.byteorder == c'>' and little_endian) or
* (child.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<<
@@ -12322,7 +12330,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__pyx_t_6 = __pyx_t_7;
__pyx_L7_bool_binop_done:;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":858
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":858
* raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
*
* if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
@@ -12331,7 +12339,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
*/
if (unlikely(__pyx_t_6)) {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":860
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":860
* if ((child.byteorder == c'>' and little_endian) or
* (child.byteorder == c'<' and not little_endian)):
* raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<<
@@ -12344,7 +12352,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__PYX_ERR(2, 860, __pyx_L1_error)
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":858
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":858
* raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
*
* if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
@@ -12353,7 +12361,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
*/
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":870
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":870
*
* # Output padding bytes
* while offset[0] < new_offset: # <<<<<<<<<<<<<<
@@ -12369,7 +12377,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (!__pyx_t_6) break;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":871
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":871
* # Output padding bytes
* while offset[0] < new_offset:
* f[0] = 120 # "x"; pad byte # <<<<<<<<<<<<<<
@@ -12378,7 +12386,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
*/
(__pyx_v_f[0]) = 0x78;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":872
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":872
* while offset[0] < new_offset:
* f[0] = 120 # "x"; pad byte
* f += 1 # <<<<<<<<<<<<<<
@@ -12387,7 +12395,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
*/
__pyx_v_f = (__pyx_v_f + 1);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":873
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":873
* f[0] = 120 # "x"; pad byte
* f += 1
* offset[0] += 1 # <<<<<<<<<<<<<<
@@ -12398,7 +12406,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
(__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + 1);
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":875
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":875
* offset[0] += 1
*
* offset[0] += child.itemsize # <<<<<<<<<<<<<<
@@ -12408,7 +12416,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__pyx_t_8 = 0;
(__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + __pyx_v_child->elsize);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":877
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":877
* offset[0] += child.itemsize
*
* if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<<
@@ -12418,7 +12426,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__pyx_t_6 = ((!(PyDataType_HASFIELDS(__pyx_v_child) != 0)) != 0);
if (__pyx_t_6) {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":878
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":878
*
* if not PyDataType_HASFIELDS(child):
* t = child.type_num # <<<<<<<<<<<<<<
@@ -12430,7 +12438,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_4);
__pyx_t_4 = 0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":879
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":879
* if not PyDataType_HASFIELDS(child):
* t = child.type_num
* if end - f < 5: # <<<<<<<<<<<<<<
@@ -12440,7 +12448,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__pyx_t_6 = (((__pyx_v_end - __pyx_v_f) < 5) != 0);
if (unlikely(__pyx_t_6)) {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":880
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":880
* t = child.type_num
* if end - f < 5:
* raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<<
@@ -12453,7 +12461,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__PYX_ERR(2, 880, __pyx_L1_error)
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":879
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":879
* if not PyDataType_HASFIELDS(child):
* t = child.type_num
* if end - f < 5: # <<<<<<<<<<<<<<
@@ -12462,7 +12470,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
*/
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":883
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":883
*
* # Until ticket #99 is fixed, use integers to avoid warnings
* if t == NPY_BYTE: f[0] = 98 #"b" # <<<<<<<<<<<<<<
@@ -12480,7 +12488,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":884
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":884
* # Until ticket #99 is fixed, use integers to avoid warnings
* if t == NPY_BYTE: f[0] = 98 #"b"
* elif t == NPY_UBYTE: f[0] = 66 #"B" # <<<<<<<<<<<<<<
@@ -12498,7 +12506,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":885
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":885
* if t == NPY_BYTE: f[0] = 98 #"b"
* elif t == NPY_UBYTE: f[0] = 66 #"B"
* elif t == NPY_SHORT: f[0] = 104 #"h" # <<<<<<<<<<<<<<
@@ -12516,7 +12524,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":886
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":886
* elif t == NPY_UBYTE: f[0] = 66 #"B"
* elif t == NPY_SHORT: f[0] = 104 #"h"
* elif t == NPY_USHORT: f[0] = 72 #"H" # <<<<<<<<<<<<<<
@@ -12534,7 +12542,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":887
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":887
* elif t == NPY_SHORT: f[0] = 104 #"h"
* elif t == NPY_USHORT: f[0] = 72 #"H"
* elif t == NPY_INT: f[0] = 105 #"i" # <<<<<<<<<<<<<<
@@ -12552,7 +12560,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":888
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":888
* elif t == NPY_USHORT: f[0] = 72 #"H"
* elif t == NPY_INT: f[0] = 105 #"i"
* elif t == NPY_UINT: f[0] = 73 #"I" # <<<<<<<<<<<<<<
@@ -12570,7 +12578,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":889
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":889
* elif t == NPY_INT: f[0] = 105 #"i"
* elif t == NPY_UINT: f[0] = 73 #"I"
* elif t == NPY_LONG: f[0] = 108 #"l" # <<<<<<<<<<<<<<
@@ -12588,7 +12596,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":890
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":890
* elif t == NPY_UINT: f[0] = 73 #"I"
* elif t == NPY_LONG: f[0] = 108 #"l"
* elif t == NPY_ULONG: f[0] = 76 #"L" # <<<<<<<<<<<<<<
@@ -12606,7 +12614,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":891
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":891
* elif t == NPY_LONG: f[0] = 108 #"l"
* elif t == NPY_ULONG: f[0] = 76 #"L"
* elif t == NPY_LONGLONG: f[0] = 113 #"q" # <<<<<<<<<<<<<<
@@ -12624,7 +12632,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":892
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":892
* elif t == NPY_ULONG: f[0] = 76 #"L"
* elif t == NPY_LONGLONG: f[0] = 113 #"q"
* elif t == NPY_ULONGLONG: f[0] = 81 #"Q" # <<<<<<<<<<<<<<
@@ -12642,7 +12650,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":893
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":893
* elif t == NPY_LONGLONG: f[0] = 113 #"q"
* elif t == NPY_ULONGLONG: f[0] = 81 #"Q"
* elif t == NPY_FLOAT: f[0] = 102 #"f" # <<<<<<<<<<<<<<
@@ -12660,7 +12668,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":894
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":894
* elif t == NPY_ULONGLONG: f[0] = 81 #"Q"
* elif t == NPY_FLOAT: f[0] = 102 #"f"
* elif t == NPY_DOUBLE: f[0] = 100 #"d" # <<<<<<<<<<<<<<
@@ -12678,7 +12686,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":895
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":895
* elif t == NPY_FLOAT: f[0] = 102 #"f"
* elif t == NPY_DOUBLE: f[0] = 100 #"d"
* elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" # <<<<<<<<<<<<<<
@@ -12696,7 +12704,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":896
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":896
* elif t == NPY_DOUBLE: f[0] = 100 #"d"
* elif t == NPY_LONGDOUBLE: f[0] = 103 #"g"
* elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf # <<<<<<<<<<<<<<
@@ -12716,7 +12724,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":897
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":897
* elif t == NPY_LONGDOUBLE: f[0] = 103 #"g"
* elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf
* elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd # <<<<<<<<<<<<<<
@@ -12736,7 +12744,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":898
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":898
* elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf
* elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd
* elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg # <<<<<<<<<<<<<<
@@ -12756,7 +12764,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":899
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":899
* elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd
* elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
* elif t == NPY_OBJECT: f[0] = 79 #"O" # <<<<<<<<<<<<<<
@@ -12774,7 +12782,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":901
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":901
* elif t == NPY_OBJECT: f[0] = 79 #"O"
* else:
* raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<<
@@ -12793,7 +12801,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
}
__pyx_L15:;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":902
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":902
* else:
* raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
* f += 1 # <<<<<<<<<<<<<<
@@ -12802,7 +12810,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
*/
__pyx_v_f = (__pyx_v_f + 1);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":877
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":877
* offset[0] += child.itemsize
*
* if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<<
@@ -12812,7 +12820,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L13;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":906
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":906
* # Cython ignores struct boundary information ("T{...}"),
* # so don't output it
* f = _util_dtypestring(child, f, end, offset) # <<<<<<<<<<<<<<
@@ -12825,7 +12833,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
}
__pyx_L13:;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":851
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":851
* cdef tuple fields
*
* for childname in descr.names: # <<<<<<<<<<<<<<
@@ -12835,7 +12843,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":907
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":907
* # so don't output it
* f = _util_dtypestring(child, f, end, offset)
* return f # <<<<<<<<<<<<<<
@@ -12845,7 +12853,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__pyx_r = __pyx_v_f;
goto __pyx_L0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":842
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":842
* return ()
*
* cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<<
@@ -12870,7 +12878,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
return __pyx_r;
}
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1022
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1022
* int _import_umath() except -1
*
* cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<<
@@ -12882,7 +12890,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("set_array_base", 0);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1023
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1023
*
* cdef inline void set_array_base(ndarray arr, object base):
* Py_INCREF(base) # important to do this before stealing the reference below! # <<<<<<<<<<<<<<
@@ -12891,7 +12899,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a
*/
Py_INCREF(__pyx_v_base);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1024
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1024
* cdef inline void set_array_base(ndarray arr, object base):
* Py_INCREF(base) # important to do this before stealing the reference below!
* PyArray_SetBaseObject(arr, base) # <<<<<<<<<<<<<<
@@ -12900,7 +12908,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a
*/
(void)(PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base));
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1022
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1022
* int _import_umath() except -1
*
* cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<<
@@ -12912,7 +12920,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a
__Pyx_RefNannyFinishContext();
}
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1026
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1026
* PyArray_SetBaseObject(arr, base)
*
* cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<<
@@ -12927,7 +12935,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py
int __pyx_t_1;
__Pyx_RefNannySetupContext("get_array_base", 0);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1027
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1027
*
* cdef inline object get_array_base(ndarray arr):
* base = PyArray_BASE(arr) # <<<<<<<<<<<<<<
@@ -12936,7 +12944,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py
*/
__pyx_v_base = PyArray_BASE(__pyx_v_arr);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1028
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1028
* cdef inline object get_array_base(ndarray arr):
* base = PyArray_BASE(arr)
* if base is NULL: # <<<<<<<<<<<<<<
@@ -12946,7 +12954,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py
__pyx_t_1 = ((__pyx_v_base == NULL) != 0);
if (__pyx_t_1) {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1029
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1029
* base = PyArray_BASE(arr)
* if base is NULL:
* return None # <<<<<<<<<<<<<<
@@ -12957,7 +12965,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
goto __pyx_L0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1028
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1028
* cdef inline object get_array_base(ndarray arr):
* base = PyArray_BASE(arr)
* if base is NULL: # <<<<<<<<<<<<<<
@@ -12966,7 +12974,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py
*/
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1030
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1030
* if base is NULL:
* return None
* return <object>base # <<<<<<<<<<<<<<
@@ -12978,7 +12986,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py
__pyx_r = ((PyObject *)__pyx_v_base);
goto __pyx_L0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1026
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1026
* PyArray_SetBaseObject(arr, base)
*
* cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<<
@@ -12993,7 +13001,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py
return __pyx_r;
}
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1034
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1034
* # Versions of the import_* functions which are more suitable for
* # Cython code.
* cdef inline int import_array() except -1: # <<<<<<<<<<<<<<
@@ -13014,7 +13022,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
PyObject *__pyx_t_8 = NULL;
__Pyx_RefNannySetupContext("import_array", 0);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1035
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1035
* # Cython code.
* cdef inline int import_array() except -1:
* try: # <<<<<<<<<<<<<<
@@ -13030,7 +13038,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
__Pyx_XGOTREF(__pyx_t_3);
/*try:*/ {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1036
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1036
* cdef inline int import_array() except -1:
* try:
* _import_array() # <<<<<<<<<<<<<<
@@ -13039,7 +13047,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
*/
__pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1036, __pyx_L3_error)
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1035
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1035
* # Cython code.
* cdef inline int import_array() except -1:
* try: # <<<<<<<<<<<<<<
@@ -13053,7 +13061,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
goto __pyx_L8_try_end;
__pyx_L3_error:;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1037
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1037
* try:
* _import_array()
* except Exception: # <<<<<<<<<<<<<<
@@ -13068,7 +13076,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
__Pyx_GOTREF(__pyx_t_6);
__Pyx_GOTREF(__pyx_t_7);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1038
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1038
* _import_array()
* except Exception:
* raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<<
@@ -13084,7 +13092,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
goto __pyx_L5_except_error;
__pyx_L5_except_error:;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1035
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1035
* # Cython code.
* cdef inline int import_array() except -1:
* try: # <<<<<<<<<<<<<<
@@ -13099,7 +13107,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
__pyx_L8_try_end:;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1034
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1034
* # Versions of the import_* functions which are more suitable for
* # Cython code.
* cdef inline int import_array() except -1: # <<<<<<<<<<<<<<
@@ -13122,7 +13130,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
return __pyx_r;
}
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1040
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1040
* raise ImportError("numpy.core.multiarray failed to import")
*
* cdef inline int import_umath() except -1: # <<<<<<<<<<<<<<
@@ -13143,7 +13151,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
PyObject *__pyx_t_8 = NULL;
__Pyx_RefNannySetupContext("import_umath", 0);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1041
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1041
*
* cdef inline int import_umath() except -1:
* try: # <<<<<<<<<<<<<<
@@ -13159,7 +13167,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
__Pyx_XGOTREF(__pyx_t_3);
/*try:*/ {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1042
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1042
* cdef inline int import_umath() except -1:
* try:
* _import_umath() # <<<<<<<<<<<<<<
@@ -13168,7 +13176,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
*/
__pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1042, __pyx_L3_error)
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1041
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1041
*
* cdef inline int import_umath() except -1:
* try: # <<<<<<<<<<<<<<
@@ -13182,7 +13190,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
goto __pyx_L8_try_end;
__pyx_L3_error:;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1043
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1043
* try:
* _import_umath()
* except Exception: # <<<<<<<<<<<<<<
@@ -13197,7 +13205,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
__Pyx_GOTREF(__pyx_t_6);
__Pyx_GOTREF(__pyx_t_7);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1044
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1044
* _import_umath()
* except Exception:
* raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<<
@@ -13213,7 +13221,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
goto __pyx_L5_except_error;
__pyx_L5_except_error:;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1041
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1041
*
* cdef inline int import_umath() except -1:
* try: # <<<<<<<<<<<<<<
@@ -13228,7 +13236,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
__pyx_L8_try_end:;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1040
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1040
* raise ImportError("numpy.core.multiarray failed to import")
*
* cdef inline int import_umath() except -1: # <<<<<<<<<<<<<<
@@ -13251,7 +13259,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
return __pyx_r;
}
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1046
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1046
* raise ImportError("numpy.core.umath failed to import")
*
* cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<<
@@ -13272,7 +13280,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) {
PyObject *__pyx_t_8 = NULL;
__Pyx_RefNannySetupContext("import_ufunc", 0);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1047
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1047
*
* cdef inline int import_ufunc() except -1:
* try: # <<<<<<<<<<<<<<
@@ -13288,7 +13296,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) {
__Pyx_XGOTREF(__pyx_t_3);
/*try:*/ {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1048
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1048
* cdef inline int import_ufunc() except -1:
* try:
* _import_umath() # <<<<<<<<<<<<<<
@@ -13297,7 +13305,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) {
*/
__pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1048, __pyx_L3_error)
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1047
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1047
*
* cdef inline int import_ufunc() except -1:
* try: # <<<<<<<<<<<<<<
@@ -13311,7 +13319,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) {
goto __pyx_L8_try_end;
__pyx_L3_error:;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1049
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1049
* try:
* _import_umath()
* except Exception: # <<<<<<<<<<<<<<
@@ -13325,7 +13333,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) {
__Pyx_GOTREF(__pyx_t_6);
__Pyx_GOTREF(__pyx_t_7);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1050
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1050
* _import_umath()
* except Exception:
* raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<<
@@ -13339,7 +13347,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) {
goto __pyx_L5_except_error;
__pyx_L5_except_error:;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1047
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1047
*
* cdef inline int import_ufunc() except -1:
* try: # <<<<<<<<<<<<<<
@@ -13354,7 +13362,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) {
__pyx_L8_try_end:;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1046
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1046
* raise ImportError("numpy.core.umath failed to import")
*
* cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<<
@@ -26241,6 +26249,9 @@ static PyTypeObject __pyx_type_4silx_5image_15marchingsquares_10_mergeimpl__Marc
#if PY_VERSION_HEX >= 0x030400a1
0, /*tp_finalize*/
#endif
+ #if PY_VERSION_HEX >= 0x030800b1
+ 0, /*tp_vectorcall*/
+ #endif
};
static struct __pyx_vtabstruct_4silx_5image_15marchingsquares_10_mergeimpl__MarchingSquaresContours __pyx_vtable_4silx_5image_15marchingsquares_10_mergeimpl__MarchingSquaresContours;
@@ -26315,6 +26326,9 @@ static PyTypeObject __pyx_type_4silx_5image_15marchingsquares_10_mergeimpl__Marc
#if PY_VERSION_HEX >= 0x030400a1
0, /*tp_finalize*/
#endif
+ #if PY_VERSION_HEX >= 0x030800b1
+ 0, /*tp_vectorcall*/
+ #endif
};
static struct __pyx_vtabstruct_4silx_5image_15marchingsquares_10_mergeimpl__MarchingSquaresPixels __pyx_vtable_4silx_5image_15marchingsquares_10_mergeimpl__MarchingSquaresPixels;
@@ -26389,6 +26403,9 @@ static PyTypeObject __pyx_type_4silx_5image_15marchingsquares_10_mergeimpl__Marc
#if PY_VERSION_HEX >= 0x030400a1
0, /*tp_finalize*/
#endif
+ #if PY_VERSION_HEX >= 0x030800b1
+ 0, /*tp_vectorcall*/
+ #endif
};
static struct __pyx_vtabstruct_4silx_5image_15marchingsquares_10_mergeimpl_MarchingSquaresMergeImpl __pyx_vtable_4silx_5image_15marchingsquares_10_mergeimpl_MarchingSquaresMergeImpl;
@@ -26523,6 +26540,9 @@ static PyTypeObject __pyx_type_4silx_5image_15marchingsquares_10_mergeimpl_March
#if PY_VERSION_HEX >= 0x030400a1
0, /*tp_finalize*/
#endif
+ #if PY_VERSION_HEX >= 0x030800b1
+ 0, /*tp_vectorcall*/
+ #endif
};
static struct __pyx_vtabstruct_array __pyx_vtable_array;
@@ -26701,6 +26721,9 @@ static PyTypeObject __pyx_type___pyx_array = {
#if PY_VERSION_HEX >= 0x030400a1
0, /*tp_finalize*/
#endif
+ #if PY_VERSION_HEX >= 0x030800b1
+ 0, /*tp_vectorcall*/
+ #endif
};
static PyObject *__pyx_tp_new_Enum(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
@@ -26809,6 +26832,9 @@ static PyTypeObject __pyx_type___pyx_MemviewEnum = {
#if PY_VERSION_HEX >= 0x030400a1
0, /*tp_finalize*/
#endif
+ #if PY_VERSION_HEX >= 0x030800b1
+ 0, /*tp_vectorcall*/
+ #endif
};
static struct __pyx_vtabstruct_memoryview __pyx_vtable_memoryview;
@@ -27059,6 +27085,9 @@ static PyTypeObject __pyx_type___pyx_memoryview = {
#if PY_VERSION_HEX >= 0x030400a1
0, /*tp_finalize*/
#endif
+ #if PY_VERSION_HEX >= 0x030800b1
+ 0, /*tp_vectorcall*/
+ #endif
};
static struct __pyx_vtabstruct__memoryviewslice __pyx_vtable__memoryviewslice;
@@ -27194,6 +27223,9 @@ static PyTypeObject __pyx_type___pyx_memoryviewslice = {
#if PY_VERSION_HEX >= 0x030400a1
0, /*tp_finalize*/
#endif
+ #if PY_VERSION_HEX >= 0x030800b1
+ 0, /*tp_vectorcall*/
+ #endif
};
static PyMethodDef __pyx_methods[] = {
@@ -27524,7 +27556,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
__Pyx_GOTREF(__pyx_tuple__13);
__Pyx_GIVEREF(__pyx_tuple__13);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":272
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":272
* if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
* and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)):
* raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<<
@@ -27535,7 +27567,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
__Pyx_GOTREF(__pyx_tuple__14);
__Pyx_GIVEREF(__pyx_tuple__14);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":276
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":276
* if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
* and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)):
* raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<<
@@ -27546,7 +27578,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
__Pyx_GOTREF(__pyx_tuple__15);
__Pyx_GIVEREF(__pyx_tuple__15);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":306
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":306
* if ((descr.byteorder == c'>' and little_endian) or
* (descr.byteorder == c'<' and not little_endian)):
* raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<<
@@ -27557,7 +27589,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
__Pyx_GOTREF(__pyx_tuple__16);
__Pyx_GIVEREF(__pyx_tuple__16);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":856
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":856
*
* if (end - f) - <int>(new_offset - offset[0]) < 15:
* raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<<
@@ -27568,7 +27600,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
__Pyx_GOTREF(__pyx_tuple__17);
__Pyx_GIVEREF(__pyx_tuple__17);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":880
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":880
* t = child.type_num
* if end - f < 5:
* raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<<
@@ -27579,7 +27611,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
__Pyx_GOTREF(__pyx_tuple__18);
__Pyx_GIVEREF(__pyx_tuple__18);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1038
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1038
* _import_array()
* except Exception:
* raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<<
@@ -27590,7 +27622,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
__Pyx_GOTREF(__pyx_tuple__19);
__Pyx_GIVEREF(__pyx_tuple__19);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1044
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1044
* _import_umath()
* except Exception:
* raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<<
@@ -27940,7 +27972,9 @@ static int __Pyx_modinit_type_init_code(void) {
__pyx_vtable_4silx_5image_15marchingsquares_10_mergeimpl__MarchingSquaresAlgorithm.compute_ipoint = (void (*)(struct __pyx_obj_4silx_5image_15marchingsquares_10_mergeimpl__MarchingSquaresAlgorithm *, __pyx_t_5numpy_uint32_t, __pyx_t_5numpy_uint32_t, __pyx_t_5numpy_uint8_t, __pyx_t_5numpy_float64_t, struct coord_t *))__pyx_f_4silx_5image_15marchingsquares_10_mergeimpl_25_MarchingSquaresAlgorithm_compute_ipoint;
__pyx_vtable_4silx_5image_15marchingsquares_10_mergeimpl__MarchingSquaresAlgorithm.create_point_index = (__pyx_t_4silx_5image_15marchingsquares_10_mergeimpl_point_index_t (*)(struct __pyx_obj_4silx_5image_15marchingsquares_10_mergeimpl__MarchingSquaresAlgorithm *, int, __pyx_t_5numpy_uint8_t))__pyx_f_4silx_5image_15marchingsquares_10_mergeimpl_25_MarchingSquaresAlgorithm_create_point_index;
if (PyType_Ready(&__pyx_type_4silx_5image_15marchingsquares_10_mergeimpl__MarchingSquaresAlgorithm) < 0) __PYX_ERR(0, 109, __pyx_L1_error)
+ #if PY_VERSION_HEX < 0x030800B1
__pyx_type_4silx_5image_15marchingsquares_10_mergeimpl__MarchingSquaresAlgorithm.tp_print = 0;
+ #endif
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4silx_5image_15marchingsquares_10_mergeimpl__MarchingSquaresAlgorithm.tp_dictoffset && __pyx_type_4silx_5image_15marchingsquares_10_mergeimpl__MarchingSquaresAlgorithm.tp_getattro == PyObject_GenericGetAttr)) {
__pyx_type_4silx_5image_15marchingsquares_10_mergeimpl__MarchingSquaresAlgorithm.tp_getattro = __Pyx_PyObject_GenericGetAttr;
}
@@ -27956,7 +27990,9 @@ static int __Pyx_modinit_type_init_code(void) {
__pyx_vtable_4silx_5image_15marchingsquares_10_mergeimpl__MarchingSquaresContours.extract_polygons = (PyObject *(*)(struct __pyx_obj_4silx_5image_15marchingsquares_10_mergeimpl__MarchingSquaresContours *))__pyx_f_4silx_5image_15marchingsquares_10_mergeimpl_24_MarchingSquaresContours_extract_polygons;
__pyx_type_4silx_5image_15marchingsquares_10_mergeimpl__MarchingSquaresContours.tp_base = __pyx_ptype_4silx_5image_15marchingsquares_10_mergeimpl__MarchingSquaresAlgorithm;
if (PyType_Ready(&__pyx_type_4silx_5image_15marchingsquares_10_mergeimpl__MarchingSquaresContours) < 0) __PYX_ERR(0, 625, __pyx_L1_error)
+ #if PY_VERSION_HEX < 0x030800B1
__pyx_type_4silx_5image_15marchingsquares_10_mergeimpl__MarchingSquaresContours.tp_print = 0;
+ #endif
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4silx_5image_15marchingsquares_10_mergeimpl__MarchingSquaresContours.tp_dictoffset && __pyx_type_4silx_5image_15marchingsquares_10_mergeimpl__MarchingSquaresContours.tp_getattro == PyObject_GenericGetAttr)) {
__pyx_type_4silx_5image_15marchingsquares_10_mergeimpl__MarchingSquaresContours.tp_getattro = __Pyx_PyObject_GenericGetAttr;
}
@@ -27973,7 +28009,9 @@ static int __Pyx_modinit_type_init_code(void) {
__pyx_vtable_4silx_5image_15marchingsquares_10_mergeimpl__MarchingSquaresPixels.extract_pixels = (PyObject *(*)(struct __pyx_obj_4silx_5image_15marchingsquares_10_mergeimpl__MarchingSquaresPixels *))__pyx_f_4silx_5image_15marchingsquares_10_mergeimpl_22_MarchingSquaresPixels_extract_pixels;
__pyx_type_4silx_5image_15marchingsquares_10_mergeimpl__MarchingSquaresPixels.tp_base = __pyx_ptype_4silx_5image_15marchingsquares_10_mergeimpl__MarchingSquaresAlgorithm;
if (PyType_Ready(&__pyx_type_4silx_5image_15marchingsquares_10_mergeimpl__MarchingSquaresPixels) < 0) __PYX_ERR(0, 919, __pyx_L1_error)
+ #if PY_VERSION_HEX < 0x030800B1
__pyx_type_4silx_5image_15marchingsquares_10_mergeimpl__MarchingSquaresPixels.tp_print = 0;
+ #endif
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4silx_5image_15marchingsquares_10_mergeimpl__MarchingSquaresPixels.tp_dictoffset && __pyx_type_4silx_5image_15marchingsquares_10_mergeimpl__MarchingSquaresPixels.tp_getattro == PyObject_GenericGetAttr)) {
__pyx_type_4silx_5image_15marchingsquares_10_mergeimpl__MarchingSquaresPixels.tp_getattro = __Pyx_PyObject_GenericGetAttr;
}
@@ -27985,7 +28023,9 @@ static int __Pyx_modinit_type_init_code(void) {
__pyx_vtable_4silx_5image_15marchingsquares_10_mergeimpl_MarchingSquaresMergeImpl._compute_minmax_on_block = (void (*)(struct __pyx_obj_4silx_5image_15marchingsquares_10_mergeimpl_MarchingSquaresMergeImpl *, int, int, int))__pyx_f_4silx_5image_15marchingsquares_10_mergeimpl_24MarchingSquaresMergeImpl__compute_minmax_on_block;
__pyx_vtable_4silx_5image_15marchingsquares_10_mergeimpl_MarchingSquaresMergeImpl._create_minmax_cache = (void (*)(struct __pyx_obj_4silx_5image_15marchingsquares_10_mergeimpl_MarchingSquaresMergeImpl *))__pyx_f_4silx_5image_15marchingsquares_10_mergeimpl_24MarchingSquaresMergeImpl__create_minmax_cache;
if (PyType_Ready(&__pyx_type_4silx_5image_15marchingsquares_10_mergeimpl_MarchingSquaresMergeImpl) < 0) __PYX_ERR(0, 1034, __pyx_L1_error)
+ #if PY_VERSION_HEX < 0x030800B1
__pyx_type_4silx_5image_15marchingsquares_10_mergeimpl_MarchingSquaresMergeImpl.tp_print = 0;
+ #endif
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4silx_5image_15marchingsquares_10_mergeimpl_MarchingSquaresMergeImpl.tp_dictoffset && __pyx_type_4silx_5image_15marchingsquares_10_mergeimpl_MarchingSquaresMergeImpl.tp_getattro == PyObject_GenericGetAttr)) {
__pyx_type_4silx_5image_15marchingsquares_10_mergeimpl_MarchingSquaresMergeImpl.tp_getattro = __Pyx_PyObject_GenericGetAttr;
}
@@ -27996,12 +28036,16 @@ static int __Pyx_modinit_type_init_code(void) {
__pyx_vtabptr_array = &__pyx_vtable_array;
__pyx_vtable_array.get_memview = (PyObject *(*)(struct __pyx_array_obj *))__pyx_array_get_memview;
if (PyType_Ready(&__pyx_type___pyx_array) < 0) __PYX_ERR(1, 105, __pyx_L1_error)
+ #if PY_VERSION_HEX < 0x030800B1
__pyx_type___pyx_array.tp_print = 0;
+ #endif
if (__Pyx_SetVtable(__pyx_type___pyx_array.tp_dict, __pyx_vtabptr_array) < 0) __PYX_ERR(1, 105, __pyx_L1_error)
if (__Pyx_setup_reduce((PyObject*)&__pyx_type___pyx_array) < 0) __PYX_ERR(1, 105, __pyx_L1_error)
__pyx_array_type = &__pyx_type___pyx_array;
if (PyType_Ready(&__pyx_type___pyx_MemviewEnum) < 0) __PYX_ERR(1, 279, __pyx_L1_error)
+ #if PY_VERSION_HEX < 0x030800B1
__pyx_type___pyx_MemviewEnum.tp_print = 0;
+ #endif
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_MemviewEnum.tp_dictoffset && __pyx_type___pyx_MemviewEnum.tp_getattro == PyObject_GenericGetAttr)) {
__pyx_type___pyx_MemviewEnum.tp_getattro = __Pyx_PyObject_GenericGetAttr;
}
@@ -28016,7 +28060,9 @@ static int __Pyx_modinit_type_init_code(void) {
__pyx_vtable_memoryview.convert_item_to_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *))__pyx_memoryview_convert_item_to_object;
__pyx_vtable_memoryview.assign_item_from_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *, PyObject *))__pyx_memoryview_assign_item_from_object;
if (PyType_Ready(&__pyx_type___pyx_memoryview) < 0) __PYX_ERR(1, 330, __pyx_L1_error)
+ #if PY_VERSION_HEX < 0x030800B1
__pyx_type___pyx_memoryview.tp_print = 0;
+ #endif
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_memoryview.tp_dictoffset && __pyx_type___pyx_memoryview.tp_getattro == PyObject_GenericGetAttr)) {
__pyx_type___pyx_memoryview.tp_getattro = __Pyx_PyObject_GenericGetAttr;
}
@@ -28029,7 +28075,9 @@ static int __Pyx_modinit_type_init_code(void) {
__pyx_vtable__memoryviewslice.__pyx_base.assign_item_from_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *, PyObject *))__pyx_memoryviewslice_assign_item_from_object;
__pyx_type___pyx_memoryviewslice.tp_base = __pyx_memoryview_type;
if (PyType_Ready(&__pyx_type___pyx_memoryviewslice) < 0) __PYX_ERR(1, 961, __pyx_L1_error)
+ #if PY_VERSION_HEX < 0x030800B1
__pyx_type___pyx_memoryviewslice.tp_print = 0;
+ #endif
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_memoryviewslice.tp_dictoffset && __pyx_type___pyx_memoryviewslice.tp_getattro == PyObject_GenericGetAttr)) {
__pyx_type___pyx_memoryviewslice.tp_getattro = __Pyx_PyObject_GenericGetAttr;
}
diff --git a/silx/image/shapes.c b/silx/image/shapes.c
index b1bc137..b69967a 100644
--- a/silx/image/shapes.c
+++ b/silx/image/shapes.c
@@ -1,4 +1,4 @@
-/* Generated by Cython 0.29.7 */
+/* Generated by Cython 0.29.11 */
/* BEGIN: Cython Metadata
{
@@ -21,8 +21,8 @@ END: Cython Metadata */
#elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
#error Cython requires Python 2.6+ or Python 3.3+.
#else
-#define CYTHON_ABI "0_29_7"
-#define CYTHON_HEX_VERSION 0x001D07F0
+#define CYTHON_ABI "0_29_11"
+#define CYTHON_HEX_VERSION 0x001D0BF0
#define CYTHON_FUTURE_DIVISION 1
#include <stddef.h>
#ifndef offsetof
@@ -324,8 +324,16 @@ END: Cython Metadata */
#define __Pyx_DefaultClassType PyClass_Type
#else
#define __Pyx_BUILTIN_MODULE_NAME "builtins"
+#if PY_VERSION_HEX < 0x030800A4
#define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
+#elif PY_VERSION_HEX >= 0x030800B2
+ #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
+ PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
+#else
+ #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
+ PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
+#endif
#define __Pyx_DefaultClassType PyType_Type
#endif
#ifndef Py_TPFLAGS_CHECKTYPES
@@ -19172,6 +19180,9 @@ static PyTypeObject __pyx_type_4silx_5image_6shapes_Polygon = {
#if PY_VERSION_HEX >= 0x030400a1
0, /*tp_finalize*/
#endif
+ #if PY_VERSION_HEX >= 0x030800b1
+ 0, /*tp_vectorcall*/
+ #endif
};
static struct __pyx_vtabstruct_array __pyx_vtable_array;
@@ -19350,6 +19361,9 @@ static PyTypeObject __pyx_type___pyx_array = {
#if PY_VERSION_HEX >= 0x030400a1
0, /*tp_finalize*/
#endif
+ #if PY_VERSION_HEX >= 0x030800b1
+ 0, /*tp_vectorcall*/
+ #endif
};
static PyObject *__pyx_tp_new_Enum(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
@@ -19458,6 +19472,9 @@ static PyTypeObject __pyx_type___pyx_MemviewEnum = {
#if PY_VERSION_HEX >= 0x030400a1
0, /*tp_finalize*/
#endif
+ #if PY_VERSION_HEX >= 0x030800b1
+ 0, /*tp_vectorcall*/
+ #endif
};
static struct __pyx_vtabstruct_memoryview __pyx_vtable_memoryview;
@@ -19708,6 +19725,9 @@ static PyTypeObject __pyx_type___pyx_memoryview = {
#if PY_VERSION_HEX >= 0x030400a1
0, /*tp_finalize*/
#endif
+ #if PY_VERSION_HEX >= 0x030800b1
+ 0, /*tp_vectorcall*/
+ #endif
};
static struct __pyx_vtabstruct__memoryviewslice __pyx_vtable__memoryviewslice;
@@ -19843,6 +19863,9 @@ static PyTypeObject __pyx_type___pyx_memoryviewslice = {
#if PY_VERSION_HEX >= 0x030400a1
0, /*tp_finalize*/
#endif
+ #if PY_VERSION_HEX >= 0x030800b1
+ 0, /*tp_vectorcall*/
+ #endif
};
static PyMethodDef __pyx_methods[] = {
@@ -20471,7 +20494,9 @@ static int __Pyx_modinit_type_init_code(void) {
__pyx_vtabptr_4silx_5image_6shapes_Polygon = &__pyx_vtable_4silx_5image_6shapes_Polygon;
__pyx_vtable_4silx_5image_6shapes_Polygon.c_is_inside = (int (*)(struct __pyx_obj_4silx_5image_6shapes_Polygon *, float, float))__pyx_f_4silx_5image_6shapes_7Polygon_c_is_inside;
if (PyType_Ready(&__pyx_type_4silx_5image_6shapes_Polygon) < 0) __PYX_ERR(0, 49, __pyx_L1_error)
+ #if PY_VERSION_HEX < 0x030800B1
__pyx_type_4silx_5image_6shapes_Polygon.tp_print = 0;
+ #endif
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4silx_5image_6shapes_Polygon.tp_dictoffset && __pyx_type_4silx_5image_6shapes_Polygon.tp_getattro == PyObject_GenericGetAttr)) {
__pyx_type_4silx_5image_6shapes_Polygon.tp_getattro = __Pyx_PyObject_GenericGetAttr;
}
@@ -20482,12 +20507,16 @@ static int __Pyx_modinit_type_init_code(void) {
__pyx_vtabptr_array = &__pyx_vtable_array;
__pyx_vtable_array.get_memview = (PyObject *(*)(struct __pyx_array_obj *))__pyx_array_get_memview;
if (PyType_Ready(&__pyx_type___pyx_array) < 0) __PYX_ERR(1, 105, __pyx_L1_error)
+ #if PY_VERSION_HEX < 0x030800B1
__pyx_type___pyx_array.tp_print = 0;
+ #endif
if (__Pyx_SetVtable(__pyx_type___pyx_array.tp_dict, __pyx_vtabptr_array) < 0) __PYX_ERR(1, 105, __pyx_L1_error)
if (__Pyx_setup_reduce((PyObject*)&__pyx_type___pyx_array) < 0) __PYX_ERR(1, 105, __pyx_L1_error)
__pyx_array_type = &__pyx_type___pyx_array;
if (PyType_Ready(&__pyx_type___pyx_MemviewEnum) < 0) __PYX_ERR(1, 279, __pyx_L1_error)
+ #if PY_VERSION_HEX < 0x030800B1
__pyx_type___pyx_MemviewEnum.tp_print = 0;
+ #endif
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_MemviewEnum.tp_dictoffset && __pyx_type___pyx_MemviewEnum.tp_getattro == PyObject_GenericGetAttr)) {
__pyx_type___pyx_MemviewEnum.tp_getattro = __Pyx_PyObject_GenericGetAttr;
}
@@ -20502,7 +20531,9 @@ static int __Pyx_modinit_type_init_code(void) {
__pyx_vtable_memoryview.convert_item_to_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *))__pyx_memoryview_convert_item_to_object;
__pyx_vtable_memoryview.assign_item_from_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *, PyObject *))__pyx_memoryview_assign_item_from_object;
if (PyType_Ready(&__pyx_type___pyx_memoryview) < 0) __PYX_ERR(1, 330, __pyx_L1_error)
+ #if PY_VERSION_HEX < 0x030800B1
__pyx_type___pyx_memoryview.tp_print = 0;
+ #endif
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_memoryview.tp_dictoffset && __pyx_type___pyx_memoryview.tp_getattro == PyObject_GenericGetAttr)) {
__pyx_type___pyx_memoryview.tp_getattro = __Pyx_PyObject_GenericGetAttr;
}
@@ -20515,7 +20546,9 @@ static int __Pyx_modinit_type_init_code(void) {
__pyx_vtable__memoryviewslice.__pyx_base.assign_item_from_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *, PyObject *))__pyx_memoryviewslice_assign_item_from_object;
__pyx_type___pyx_memoryviewslice.tp_base = __pyx_memoryview_type;
if (PyType_Ready(&__pyx_type___pyx_memoryviewslice) < 0) __PYX_ERR(1, 961, __pyx_L1_error)
+ #if PY_VERSION_HEX < 0x030800B1
__pyx_type___pyx_memoryviewslice.tp_print = 0;
+ #endif
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_memoryviewslice.tp_dictoffset && __pyx_type___pyx_memoryviewslice.tp_getattro == PyObject_GenericGetAttr)) {
__pyx_type___pyx_memoryviewslice.tp_getattro = __Pyx_PyObject_GenericGetAttr;
}
diff --git a/silx/image/tomography.py b/silx/image/tomography.py
index 66dc677..c2aedd8 100644
--- a/silx/image/tomography.py
+++ b/silx/image/tomography.py
@@ -32,27 +32,140 @@ __date__ = "12/09/2017"
import numpy as np
from math import pi
+from itertools import product
+from bisect import bisect
from silx.math.fit import leastsq
+# ------------------------------------------------------------------------------
+# -------------------- Filtering-related functions -----------------------------
+# ------------------------------------------------------------------------------
-def rescale_intensity(img, from_subimg=None, percentiles=None):
+def compute_ramlak_filter(dwidth_padded, dtype=np.float32):
"""
- clamp intensity into the [2, 98] percentiles
+ Compute the Ramachandran-Lakshminarayanan (Ram-Lak) filter, used in
+ filtered backprojection.
- :param img:
- :param from_subimg:
- :param percentiles:
- :return: the rescale intensity
+ :param dwidth_padded: width of the 2D sinogram after padding
+ :param dtype: data type
"""
- if percentiles is None:
- percentiles = [2, 98]
- else:
- assert type(percentiles) in (tuple, list)
- assert(len(percentiles) == 2)
- data = from_subimg if from_subimg is not None else img
- imin, imax = np.percentile(data, percentiles)
- res = np.clip(img, imin, imax)
- return res
+ L = dwidth_padded
+ h = np.zeros(L, dtype=dtype)
+ L2 = L//2+1
+ h[0] = 1/4.
+ j = np.linspace(1, L2, L2//2, False).astype(dtype) # np < 1.9.0
+ h[1:L2:2] = -1./(pi**2 * j**2)
+ h[L2:] = np.copy(h[1:L2-1][::-1])
+ return h
+
+
+def tukey(N, alpha=0.5):
+ """
+ Compute the Tukey apodization window.
+
+ :param int N: Number of points.
+ :param float alpha:
+ """
+ apod = np.zeros(N)
+ x = np.arange(N)/(N-1)
+ r = alpha
+ M1 = (0 <= x) * (x < r/2)
+ M2 = (r/2 <= x) * (x <= 1 - r/2)
+ M3 = (1 - r/2 < x) * (x <= 1)
+ apod[M1] = (1 + np.cos(2*pi/r * (x[M1] - r/2)))/2.
+ apod[M2] = 1.
+ apod[M3] = (1 + np.cos(2*pi/r * (x[M3] - 1 + r/2)))/2.
+ return apod
+
+
+def lanczos(N):
+ """
+ Compute the Lanczos window (truncated sinc) of width N.
+
+ :param int N: window width
+ """
+ x = np.arange(N)/(N-1)
+ return np.sin(pi*(2*x-1))/(pi*(2*x-1))
+
+
+def compute_fourier_filter(dwidth_padded, filter_name, cutoff=1.):
+ """
+ Compute the filter used for FBP.
+
+ :param dwidth_padded: padded detector width. As the filtering is done by the
+ Fourier convolution theorem, dwidth_padded should be at least 2*dwidth.
+ :param filter_name: Name of the filter. Available filters are:
+ Ram-Lak, Shepp-Logan, Cosine, Hamming, Hann, Tukey, Lanczos.
+ :param cutoff: Cut-off frequency, if relevant.
+ """
+ Nf = dwidth_padded
+ #~ filt_f = np.abs(np.fft.fftfreq(Nf))
+ rl = compute_ramlak_filter(Nf, dtype=np.float64)
+ filt_f = np.fft.fft(rl)
+
+ filter_name = filter_name.lower()
+ if filter_name in ["ram-lak", "ramlak"]:
+ return filt_f
+
+ w = 2 * pi * np.fft.fftfreq(dwidth_padded)
+ d = cutoff
+ apodization = {
+ # ~OK
+ "shepp-logan": np.sin(w[1:Nf]/(2*d))/(w[1:Nf]/(2*d)),
+ # ~OK
+ "cosine": np.cos(w[1:Nf]/(2*d)),
+ # OK
+ "hamming": 0.54*np.ones_like(filt_f)[1:Nf] + .46 * np.cos(w[1:Nf]/d),
+ # OK
+ "hann": (np.ones_like(filt_f)[1:Nf] + np.cos(w[1:Nf]/d))/2.,
+ # These one is not compatible with Astra - TODO investigate why
+ "tukey": np.fft.fftshift(tukey(dwidth_padded, alpha=d/2.))[1:Nf],
+ "lanczos": np.fft.fftshift(lanczos(dwidth_padded))[1:Nf],
+ }
+ if filter_name not in apodization:
+ raise ValueError("Unknown filter %s. Available filters are %s" %
+ (filter_name, str(apodization.keys())))
+ filt_f[1:Nf] *= apodization[filter_name]
+ return filt_f
+
+
+def generate_powers():
+ """
+ Generate a list of powers of [2, 3, 5, 7],
+ up to (2**15)*(3**9)*(5**6)*(7**5).
+ """
+ primes = [2, 3, 5, 7]
+ maxpow = {2: 15, 3: 9, 5: 6, 7: 5}
+ valuations = []
+ for prime in primes:
+ # disallow any odd number (for R2C transform), and any number
+ # not multiple of 4 (Ram-Lak filter behaves strangely when
+ # dwidth_padded/2 is not even)
+ minval = 2 if prime == 2 else 0
+ valuations.append(range(minval, maxpow[prime]+1))
+ powers = product(*valuations)
+ res = []
+ for pw in powers:
+ res.append(np.prod(list(map(lambda x : x[0]**x[1], zip(primes, pw)))))
+ return np.unique(res)
+
+
+def get_next_power(n, powers=None):
+ """
+ Given a number, get the closest (upper) number p such that
+ p is a power of 2, 3, 5 and 7.
+ """
+ if powers is None:
+ powers = generate_powers()
+ idx = bisect(powers, n)
+ if powers[idx-1] == n:
+ return n
+ return powers[idx]
+
+
+# ------------------------------------------------------------------------------
+# ------------- Functions for determining the center of rotation --------------
+# ------------------------------------------------------------------------------
+
def calc_center_corr(sino, fullrot=False, props=1):
@@ -158,3 +271,29 @@ def calc_center_centroid(sino):
max_iter=100)
return popt[0]
+
+
+# ------------------------------------------------------------------------------
+# -------------------- Visualization-related functions -------------------------
+# ------------------------------------------------------------------------------
+
+
+def rescale_intensity(img, from_subimg=None, percentiles=None):
+ """
+ clamp intensity into the [2, 98] percentiles
+
+ :param img:
+ :param from_subimg:
+ :param percentiles:
+ :return: the rescale intensity
+ """
+ if percentiles is None:
+ percentiles = [2, 98]
+ else:
+ assert type(percentiles) in (tuple, list)
+ assert(len(percentiles) == 2)
+ data = from_subimg if from_subimg is not None else img
+ imin, imax = np.percentile(data, percentiles)
+ res = np.clip(img, imin, imax)
+ return res
+
diff --git a/silx/io/commonh5.py b/silx/io/commonh5.py
index 2956714..b624816 100644
--- a/silx/io/commonh5.py
+++ b/silx/io/commonh5.py
@@ -1,6 +1,6 @@
# coding: utf-8
# /*##########################################################################
-# Copyright (C) 2016-2018 European Synchrotron Radiation Facility
+# Copyright (C) 2016-2019 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -29,6 +29,10 @@ files. They are used in :mod:`spech5` and :mod:`fabioh5`.
library, which is not a mandatory dependency for `silx`.
"""
import collections
+try:
+ from collections import abc
+except ImportError: # Python2 support
+ import collections as abc
import weakref
import h5py
@@ -42,7 +46,7 @@ __license__ = "MIT"
__date__ = "02/07/2018"
-class _MappingProxyType(collections.MutableMapping):
+class _MappingProxyType(abc.MutableMapping):
"""Read-only dictionary
This class is available since Python 3.3, but not on earlyer Python
diff --git a/silx/io/fabioh5.py b/silx/io/fabioh5.py
index 27ef3fd..351b981 100644
--- a/silx/io/fabioh5.py
+++ b/silx/io/fabioh5.py
@@ -1,6 +1,6 @@
# coding: utf-8
# /*##########################################################################
-# Copyright (C) 2016-2018 European Synchrotron Radiation Facility
+# Copyright (C) 2016-2019 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -474,7 +474,7 @@ class FabioReader(object):
while len(location) < max_dim:
location.append(0)
normalized_image = numpy.zeros(max_shape, dtype=image.dtype)
- normalized_image[location] = image
+ normalized_image[tuple(location)] = image
images[index] = normalized_image
# create a cube
diff --git a/silx/io/specfile.c b/silx/io/specfile.c
index 0cc1195..f8e7ed8 100644
--- a/silx/io/specfile.c
+++ b/silx/io/specfile.c
@@ -1,4 +1,4 @@
-/* Generated by Cython 0.29.7 */
+/* Generated by Cython 0.29.11 */
/* BEGIN: Cython Metadata
{
@@ -41,8 +41,8 @@ END: Cython Metadata */
#elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
#error Cython requires Python 2.6+ or Python 3.3+.
#else
-#define CYTHON_ABI "0_29_7"
-#define CYTHON_HEX_VERSION 0x001D07F0
+#define CYTHON_ABI "0_29_11"
+#define CYTHON_HEX_VERSION 0x001D0BF0
#define CYTHON_FUTURE_DIVISION 1
#include <stddef.h>
#ifndef offsetof
@@ -344,8 +344,16 @@ END: Cython Metadata */
#define __Pyx_DefaultClassType PyClass_Type
#else
#define __Pyx_BUILTIN_MODULE_NAME "builtins"
+#if PY_VERSION_HEX < 0x030800A4
#define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
+#elif PY_VERSION_HEX >= 0x030800B2
+ #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
+ PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
+#else
+ #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
+ PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
+#endif
#define __Pyx_DefaultClassType PyType_Type
#endif
#ifndef Py_TPFLAGS_CHECKTYPES
@@ -28176,6 +28184,9 @@ static PyTypeObject __pyx_type_4silx_2io_8specfile_SpecFile = {
#if PY_VERSION_HEX >= 0x030400a1
0, /*tp_finalize*/
#endif
+ #if PY_VERSION_HEX >= 0x030800b1
+ 0, /*tp_vectorcall*/
+ #endif
};
static struct __pyx_obj_4silx_2io_8specfile___pyx_scope_struct____iter__ *__pyx_freelist_4silx_2io_8specfile___pyx_scope_struct____iter__[8];
@@ -28271,6 +28282,9 @@ static PyTypeObject __pyx_type_4silx_2io_8specfile___pyx_scope_struct____iter__
#if PY_VERSION_HEX >= 0x030400a1
0, /*tp_finalize*/
#endif
+ #if PY_VERSION_HEX >= 0x030800b1
+ 0, /*tp_vectorcall*/
+ #endif
};
static struct __pyx_obj_4silx_2io_8specfile___pyx_scope_struct_1___iter__ *__pyx_freelist_4silx_2io_8specfile___pyx_scope_struct_1___iter__[8];
@@ -28366,6 +28380,9 @@ static PyTypeObject __pyx_type_4silx_2io_8specfile___pyx_scope_struct_1___iter__
#if PY_VERSION_HEX >= 0x030400a1
0, /*tp_finalize*/
#endif
+ #if PY_VERSION_HEX >= 0x030800b1
+ 0, /*tp_vectorcall*/
+ #endif
};
static struct __pyx_vtabstruct_array __pyx_vtable_array;
@@ -28544,6 +28561,9 @@ static PyTypeObject __pyx_type___pyx_array = {
#if PY_VERSION_HEX >= 0x030400a1
0, /*tp_finalize*/
#endif
+ #if PY_VERSION_HEX >= 0x030800b1
+ 0, /*tp_vectorcall*/
+ #endif
};
static PyObject *__pyx_tp_new_Enum(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
@@ -28652,6 +28672,9 @@ static PyTypeObject __pyx_type___pyx_MemviewEnum = {
#if PY_VERSION_HEX >= 0x030400a1
0, /*tp_finalize*/
#endif
+ #if PY_VERSION_HEX >= 0x030800b1
+ 0, /*tp_vectorcall*/
+ #endif
};
static struct __pyx_vtabstruct_memoryview __pyx_vtable_memoryview;
@@ -28902,6 +28925,9 @@ static PyTypeObject __pyx_type___pyx_memoryview = {
#if PY_VERSION_HEX >= 0x030400a1
0, /*tp_finalize*/
#endif
+ #if PY_VERSION_HEX >= 0x030800b1
+ 0, /*tp_vectorcall*/
+ #endif
};
static struct __pyx_vtabstruct__memoryviewslice __pyx_vtable__memoryviewslice;
@@ -29037,6 +29063,9 @@ static PyTypeObject __pyx_type___pyx_memoryviewslice = {
#if PY_VERSION_HEX >= 0x030400a1
0, /*tp_finalize*/
#endif
+ #if PY_VERSION_HEX >= 0x030800b1
+ 0, /*tp_vectorcall*/
+ #endif
};
static PyMethodDef __pyx_methods[] = {
@@ -30192,7 +30221,9 @@ static int __Pyx_modinit_type_init_code(void) {
__Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
/*--- Type init code ---*/
if (PyType_Ready(&__pyx_type_4silx_2io_8specfile_SpecFile) < 0) __PYX_ERR(0, 629, __pyx_L1_error)
+ #if PY_VERSION_HEX < 0x030800B1
__pyx_type_4silx_2io_8specfile_SpecFile.tp_print = 0;
+ #endif
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4silx_2io_8specfile_SpecFile.tp_dictoffset && __pyx_type_4silx_2io_8specfile_SpecFile.tp_getattro == PyObject_GenericGetAttr)) {
__pyx_type_4silx_2io_8specfile_SpecFile.tp_getattro = __Pyx_PyObject_GenericGetAttr;
}
@@ -30240,13 +30271,17 @@ static int __Pyx_modinit_type_init_code(void) {
if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4silx_2io_8specfile_SpecFile) < 0) __PYX_ERR(0, 629, __pyx_L1_error)
__pyx_ptype_4silx_2io_8specfile_SpecFile = &__pyx_type_4silx_2io_8specfile_SpecFile;
if (PyType_Ready(&__pyx_type_4silx_2io_8specfile___pyx_scope_struct____iter__) < 0) __PYX_ERR(0, 300, __pyx_L1_error)
+ #if PY_VERSION_HEX < 0x030800B1
__pyx_type_4silx_2io_8specfile___pyx_scope_struct____iter__.tp_print = 0;
+ #endif
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4silx_2io_8specfile___pyx_scope_struct____iter__.tp_dictoffset && __pyx_type_4silx_2io_8specfile___pyx_scope_struct____iter__.tp_getattro == PyObject_GenericGetAttr)) {
__pyx_type_4silx_2io_8specfile___pyx_scope_struct____iter__.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
}
__pyx_ptype_4silx_2io_8specfile___pyx_scope_struct____iter__ = &__pyx_type_4silx_2io_8specfile___pyx_scope_struct____iter__;
if (PyType_Ready(&__pyx_type_4silx_2io_8specfile___pyx_scope_struct_1___iter__) < 0) __PYX_ERR(0, 680, __pyx_L1_error)
+ #if PY_VERSION_HEX < 0x030800B1
__pyx_type_4silx_2io_8specfile___pyx_scope_struct_1___iter__.tp_print = 0;
+ #endif
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4silx_2io_8specfile___pyx_scope_struct_1___iter__.tp_dictoffset && __pyx_type_4silx_2io_8specfile___pyx_scope_struct_1___iter__.tp_getattro == PyObject_GenericGetAttr)) {
__pyx_type_4silx_2io_8specfile___pyx_scope_struct_1___iter__.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
}
@@ -30254,12 +30289,16 @@ static int __Pyx_modinit_type_init_code(void) {
__pyx_vtabptr_array = &__pyx_vtable_array;
__pyx_vtable_array.get_memview = (PyObject *(*)(struct __pyx_array_obj *))__pyx_array_get_memview;
if (PyType_Ready(&__pyx_type___pyx_array) < 0) __PYX_ERR(1, 105, __pyx_L1_error)
+ #if PY_VERSION_HEX < 0x030800B1
__pyx_type___pyx_array.tp_print = 0;
+ #endif
if (__Pyx_SetVtable(__pyx_type___pyx_array.tp_dict, __pyx_vtabptr_array) < 0) __PYX_ERR(1, 105, __pyx_L1_error)
if (__Pyx_setup_reduce((PyObject*)&__pyx_type___pyx_array) < 0) __PYX_ERR(1, 105, __pyx_L1_error)
__pyx_array_type = &__pyx_type___pyx_array;
if (PyType_Ready(&__pyx_type___pyx_MemviewEnum) < 0) __PYX_ERR(1, 279, __pyx_L1_error)
+ #if PY_VERSION_HEX < 0x030800B1
__pyx_type___pyx_MemviewEnum.tp_print = 0;
+ #endif
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_MemviewEnum.tp_dictoffset && __pyx_type___pyx_MemviewEnum.tp_getattro == PyObject_GenericGetAttr)) {
__pyx_type___pyx_MemviewEnum.tp_getattro = __Pyx_PyObject_GenericGetAttr;
}
@@ -30274,7 +30313,9 @@ static int __Pyx_modinit_type_init_code(void) {
__pyx_vtable_memoryview.convert_item_to_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *))__pyx_memoryview_convert_item_to_object;
__pyx_vtable_memoryview.assign_item_from_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *, PyObject *))__pyx_memoryview_assign_item_from_object;
if (PyType_Ready(&__pyx_type___pyx_memoryview) < 0) __PYX_ERR(1, 330, __pyx_L1_error)
+ #if PY_VERSION_HEX < 0x030800B1
__pyx_type___pyx_memoryview.tp_print = 0;
+ #endif
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_memoryview.tp_dictoffset && __pyx_type___pyx_memoryview.tp_getattro == PyObject_GenericGetAttr)) {
__pyx_type___pyx_memoryview.tp_getattro = __Pyx_PyObject_GenericGetAttr;
}
@@ -30287,7 +30328,9 @@ static int __Pyx_modinit_type_init_code(void) {
__pyx_vtable__memoryviewslice.__pyx_base.assign_item_from_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *, PyObject *))__pyx_memoryviewslice_assign_item_from_object;
__pyx_type___pyx_memoryviewslice.tp_base = __pyx_memoryview_type;
if (PyType_Ready(&__pyx_type___pyx_memoryviewslice) < 0) __PYX_ERR(1, 961, __pyx_L1_error)
+ #if PY_VERSION_HEX < 0x030800B1
__pyx_type___pyx_memoryviewslice.tp_print = 0;
+ #endif
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_memoryviewslice.tp_dictoffset && __pyx_type___pyx_memoryviewslice.tp_getattro == PyObject_GenericGetAttr)) {
__pyx_type___pyx_memoryviewslice.tp_getattro = __Pyx_PyObject_GenericGetAttr;
}
@@ -35245,6 +35288,9 @@ static PyTypeObject __pyx_CyFunctionType_type = {
#if PY_VERSION_HEX >= 0x030400a1
0,
#endif
+#if PY_VERSION_HEX >= 0x030800b1
+ 0,
+#endif
};
static int __pyx_CyFunction_init(void) {
__pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type);
@@ -37223,6 +37269,9 @@ static PyTypeObject __pyx_GeneratorType_type = {
#elif PY_VERSION_HEX >= 0x030400a1
0,
#endif
+#if PY_VERSION_HEX >= 0x030800b1
+ 0,
+#endif
};
static int __pyx_Generator_init(void) {
__pyx_GeneratorType_type.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
diff --git a/silx/io/test/test_specfile.py b/silx/io/test/test_specfile.py
index 55850f1..79d5544 100644
--- a/silx/io/test/test_specfile.py
+++ b/silx/io/test/test_specfile.py
@@ -1,6 +1,6 @@
# coding: utf-8
# /*##########################################################################
-# Copyright (C) 2016-2017 European Synchrotron Radiation Facility
+# Copyright (C) 2016-2019 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -224,14 +224,21 @@ class TestSpecFile(unittest.TestCase):
with self.assertRaises(specfile.SfErrScanNotFound):
self.sf.index(99)
+ def assertRaisesRegex(self, *args, **kwargs):
+ # Python 2 compatibility
+ if sys.version_info.major >= 3:
+ return super(TestSpecFile, self).assertRaisesRegex(*args, **kwargs)
+ else:
+ return self.assertRaisesRegexp(*args, **kwargs)
+
def test_getitem(self):
self.assertIsInstance(self.sf[2], Scan)
self.assertIsInstance(self.sf["1.2"], Scan)
# int out of range
- with self.assertRaisesRegexp(IndexError, 'Scan index must be in ran'):
+ with self.assertRaisesRegex(IndexError, 'Scan index must be in ran'):
self.sf[107]
# float indexing not allowed
- with self.assertRaisesRegexp(TypeError, 'The scan identification k'):
+ with self.assertRaisesRegex(TypeError, 'The scan identification k'):
self.sf[1.2]
# non existant scan with "N.M" indexing
with self.assertRaises(KeyError):
diff --git a/silx/io/test/test_spech5.py b/silx/io/test/test_spech5.py
index 7c8ed5d..0263c3c 100644
--- a/silx/io/test/test_spech5.py
+++ b/silx/io/test/test_spech5.py
@@ -1,6 +1,6 @@
# coding: utf-8
# /*##########################################################################
-# Copyright (C) 2016-2018 European Synchrotron Radiation Facility
+# Copyright (C) 2016-2019 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -272,6 +272,13 @@ class TestSpecH5(unittest.TestCase):
self.assertEqual(self.sfh5["25.1/start_time"],
u"2015-03-14T03:53:50")
+ def assertRaisesRegex(self, *args, **kwargs):
+ # Python 2 compatibility
+ if sys.version_info.major >= 3:
+ return super(TestSpecH5, self).assertRaisesRegex(*args, **kwargs)
+ else:
+ return self.assertRaisesRegexp(*args, **kwargs)
+
def testDatasetInstanceAttr(self):
"""The SpecH5Dataset objects must implement some dummy attributes
to improve compatibility with widgets dealing with h5py datasets."""
@@ -279,7 +286,7 @@ class TestSpecH5(unittest.TestCase):
self.assertIsNone(self.sfh5["1.1"]["measurement"]["MRTSlit UP"].chunks)
# error message must be explicit
- with self.assertRaisesRegexp(
+ with self.assertRaisesRegex(
AttributeError,
"SpecH5Dataset has no attribute tOTo"):
dummy = self.sfh5["/1.1/start_time"].tOTo
diff --git a/silx/io/test/test_spectoh5.py b/silx/io/test/test_spectoh5.py
index 2b79704..44b59e0 100644
--- a/silx/io/test/test_spectoh5.py
+++ b/silx/io/test/test_spectoh5.py
@@ -1,6 +1,6 @@
# coding: utf-8
# /*##########################################################################
-# Copyright (C) 2016-2018 European Synchrotron Radiation Facility
+# Copyright (C) 2016-2019 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -132,7 +132,7 @@ class TestConvertSpecHDF5(unittest.TestCase):
def testTitle(self):
"""Test the value of a dataset"""
- title12 = self.h5f["/1.2/title"].value
+ title12 = self.h5f["/1.2/title"][()]
self.assertEqual(title12,
u"aaaaaa")
diff --git a/silx/io/test/test_utils.py b/silx/io/test/test_utils.py
index 5a4c629..56f89fc 100644
--- a/silx/io/test/test_utils.py
+++ b/silx/io/test/test_utils.py
@@ -1,6 +1,6 @@
# coding: utf-8
# /*##########################################################################
-# Copyright (C) 2016-2018 European Synchrotron Radiation Facility
+# Copyright (C) 2016-2019 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -30,6 +30,7 @@ import re
import shutil
import tempfile
import unittest
+import sys
from .. import utils
import silx.io.url
@@ -102,6 +103,13 @@ class TestSave(unittest.TestCase):
os.unlink(self.npy_fname)
shutil.rmtree(self.tempdir)
+ def assertRegex(self, *args, **kwargs):
+ # Python 2 compatibility
+ if sys.version_info.major >= 3:
+ return super(TestSave, self).assertRegex(*args, **kwargs)
+ else:
+ return self.assertRegexpMatches(*args, **kwargs)
+
def test_save_csv(self):
utils.save1D(self.csv_fname, self.x, self.y,
xlabel=self.xlab, ylabels=self.ylabs,
@@ -112,7 +120,7 @@ class TestSave(unittest.TestCase):
actual_csv = csvf.read()
csvf.close()
- self.assertRegexpMatches(actual_csv, expected_csv)
+ self.assertRegex(actual_csv, expected_csv)
def test_save_npy(self):
"""npy file is saved with numpy.save after building a numpy array
@@ -138,7 +146,7 @@ class TestSave(unittest.TestCase):
actual_spec = specf.read()
specf.close()
- self.assertRegexpMatches(actual_spec, expected_spec1)
+ self.assertRegex(actual_spec, expected_spec1)
def test_savespec_file_handle(self):
"""Save SpecFile using savespec(), passing a file handle"""
@@ -158,7 +166,7 @@ class TestSave(unittest.TestCase):
actual_spec = specf.read()
specf.close()
- self.assertRegexpMatches(actual_spec, expected_spec2)
+ self.assertRegex(actual_spec, expected_spec2)
def test_save_spec(self):
"""Save SpecFile using save()"""
@@ -168,7 +176,7 @@ class TestSave(unittest.TestCase):
specf = open(self.spec_fname)
actual_spec = specf.read()
specf.close()
- self.assertRegexpMatches(actual_spec, expected_spec2)
+ self.assertRegex(actual_spec, expected_spec2)
def test_save_csv_no_labels(self):
"""Save csv using save(), with autoheader=True but
@@ -189,7 +197,7 @@ class TestSave(unittest.TestCase):
csvf = open(self.csv_fname)
actual_csv = csvf.read()
csvf.close()
- self.assertRegexpMatches(actual_csv, expected_csv2)
+ self.assertRegex(actual_csv, expected_csv2)
def assert_match_any_string_in_list(test, pattern, list_of_strings):
diff --git a/silx/io/utils.py b/silx/io/utils.py
index 930c84e..f294101 100644
--- a/silx/io/utils.py
+++ b/silx/io/utils.py
@@ -52,7 +52,7 @@ except ImportError as e:
logger = logging.getLogger(__name__)
-NEXUS_HDF5_EXT = [".h5", ".nx5", ".nxs", ".hdf", ".hdf5", ".cxi"]
+NEXUS_HDF5_EXT = [".h5", ".nx5", ".nxs", ".hdf", ".hdf5", ".cxi"]
"""List of possible extensions for HDF5 file formats."""
@@ -460,7 +460,10 @@ def _open_local_file(filename):
"File '%s' can't be read as a numpy file." % filename))
if h5py.is_hdf5(filename):
- return h5py.File(filename, "r")
+ try:
+ return h5py.File(filename, "r")
+ except OSError:
+ return h5py.File(filename, "r", libver='latest', swmr=True)
try:
from . import fabioh5
diff --git a/silx/math/chistogramnd.c b/silx/math/chistogramnd.c
index da2c183..bf58612 100644
--- a/silx/math/chistogramnd.c
+++ b/silx/math/chistogramnd.c
@@ -1,16 +1,16 @@
-/* Generated by Cython 0.29.7 */
+/* Generated by Cython 0.29.11 */
/* BEGIN: Cython Metadata
{
"distutils": {
"depends": [
- "/media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/numpy/core/include/numpy/arrayobject.h",
- "/media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/numpy/core/include/numpy/ufuncobject.h",
+ "/opt/python/cp36-cp36m/lib/python3.6/site-packages/numpy/core/include/numpy/arrayobject.h",
+ "/opt/python/cp36-cp36m/lib/python3.6/site-packages/numpy/core/include/numpy/ufuncobject.h",
"silx/math/histogramnd/include/histogramnd_c.h"
],
"include_dirs": [
"silx/math/histogramnd/include",
- "/media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/numpy/core/include"
+ "/opt/python/cp36-cp36m/lib/python3.6/site-packages/numpy/core/include"
],
"language": "c",
"name": "silx.math.chistogramnd",
@@ -30,8 +30,8 @@ END: Cython Metadata */
#elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
#error Cython requires Python 2.6+ or Python 3.3+.
#else
-#define CYTHON_ABI "0_29_7"
-#define CYTHON_HEX_VERSION 0x001D07F0
+#define CYTHON_ABI "0_29_11"
+#define CYTHON_HEX_VERSION 0x001D0BF0
#define CYTHON_FUTURE_DIVISION 1
#include <stddef.h>
#ifndef offsetof
@@ -333,8 +333,16 @@ END: Cython Metadata */
#define __Pyx_DefaultClassType PyClass_Type
#else
#define __Pyx_BUILTIN_MODULE_NAME "builtins"
+#if PY_VERSION_HEX < 0x030800A4
#define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
+#elif PY_VERSION_HEX >= 0x030800B2
+ #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
+ PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
+#else
+ #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
+ PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
+#endif
#define __Pyx_DefaultClassType PyType_Type
#endif
#ifndef Py_TPFLAGS_CHECKTYPES
@@ -963,7 +971,7 @@ typedef struct {
} __Pyx_BufFmt_Context;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":776
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":776
* # in Cython to enable them only on the right systems.
*
* ctypedef npy_int8 int8_t # <<<<<<<<<<<<<<
@@ -972,7 +980,7 @@ typedef struct {
*/
typedef npy_int8 __pyx_t_5numpy_int8_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":777
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":777
*
* ctypedef npy_int8 int8_t
* ctypedef npy_int16 int16_t # <<<<<<<<<<<<<<
@@ -981,7 +989,7 @@ typedef npy_int8 __pyx_t_5numpy_int8_t;
*/
typedef npy_int16 __pyx_t_5numpy_int16_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":778
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":778
* ctypedef npy_int8 int8_t
* ctypedef npy_int16 int16_t
* ctypedef npy_int32 int32_t # <<<<<<<<<<<<<<
@@ -990,7 +998,7 @@ typedef npy_int16 __pyx_t_5numpy_int16_t;
*/
typedef npy_int32 __pyx_t_5numpy_int32_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":779
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":779
* ctypedef npy_int16 int16_t
* ctypedef npy_int32 int32_t
* ctypedef npy_int64 int64_t # <<<<<<<<<<<<<<
@@ -999,7 +1007,7 @@ typedef npy_int32 __pyx_t_5numpy_int32_t;
*/
typedef npy_int64 __pyx_t_5numpy_int64_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":783
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":783
* #ctypedef npy_int128 int128_t
*
* ctypedef npy_uint8 uint8_t # <<<<<<<<<<<<<<
@@ -1008,7 +1016,7 @@ typedef npy_int64 __pyx_t_5numpy_int64_t;
*/
typedef npy_uint8 __pyx_t_5numpy_uint8_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":784
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":784
*
* ctypedef npy_uint8 uint8_t
* ctypedef npy_uint16 uint16_t # <<<<<<<<<<<<<<
@@ -1017,7 +1025,7 @@ typedef npy_uint8 __pyx_t_5numpy_uint8_t;
*/
typedef npy_uint16 __pyx_t_5numpy_uint16_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":785
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":785
* ctypedef npy_uint8 uint8_t
* ctypedef npy_uint16 uint16_t
* ctypedef npy_uint32 uint32_t # <<<<<<<<<<<<<<
@@ -1026,7 +1034,7 @@ typedef npy_uint16 __pyx_t_5numpy_uint16_t;
*/
typedef npy_uint32 __pyx_t_5numpy_uint32_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":786
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":786
* ctypedef npy_uint16 uint16_t
* ctypedef npy_uint32 uint32_t
* ctypedef npy_uint64 uint64_t # <<<<<<<<<<<<<<
@@ -1035,7 +1043,7 @@ typedef npy_uint32 __pyx_t_5numpy_uint32_t;
*/
typedef npy_uint64 __pyx_t_5numpy_uint64_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":790
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":790
* #ctypedef npy_uint128 uint128_t
*
* ctypedef npy_float32 float32_t # <<<<<<<<<<<<<<
@@ -1044,7 +1052,7 @@ typedef npy_uint64 __pyx_t_5numpy_uint64_t;
*/
typedef npy_float32 __pyx_t_5numpy_float32_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":791
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":791
*
* ctypedef npy_float32 float32_t
* ctypedef npy_float64 float64_t # <<<<<<<<<<<<<<
@@ -1053,7 +1061,7 @@ typedef npy_float32 __pyx_t_5numpy_float32_t;
*/
typedef npy_float64 __pyx_t_5numpy_float64_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":800
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":800
* # The int types are mapped a bit surprising --
* # numpy.int corresponds to 'l' and numpy.long to 'q'
* ctypedef npy_long int_t # <<<<<<<<<<<<<<
@@ -1062,7 +1070,7 @@ typedef npy_float64 __pyx_t_5numpy_float64_t;
*/
typedef npy_long __pyx_t_5numpy_int_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":801
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":801
* # numpy.int corresponds to 'l' and numpy.long to 'q'
* ctypedef npy_long int_t
* ctypedef npy_longlong long_t # <<<<<<<<<<<<<<
@@ -1071,7 +1079,7 @@ typedef npy_long __pyx_t_5numpy_int_t;
*/
typedef npy_longlong __pyx_t_5numpy_long_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":802
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":802
* ctypedef npy_long int_t
* ctypedef npy_longlong long_t
* ctypedef npy_longlong longlong_t # <<<<<<<<<<<<<<
@@ -1080,7 +1088,7 @@ typedef npy_longlong __pyx_t_5numpy_long_t;
*/
typedef npy_longlong __pyx_t_5numpy_longlong_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":804
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":804
* ctypedef npy_longlong longlong_t
*
* ctypedef npy_ulong uint_t # <<<<<<<<<<<<<<
@@ -1089,7 +1097,7 @@ typedef npy_longlong __pyx_t_5numpy_longlong_t;
*/
typedef npy_ulong __pyx_t_5numpy_uint_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":805
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":805
*
* ctypedef npy_ulong uint_t
* ctypedef npy_ulonglong ulong_t # <<<<<<<<<<<<<<
@@ -1098,7 +1106,7 @@ typedef npy_ulong __pyx_t_5numpy_uint_t;
*/
typedef npy_ulonglong __pyx_t_5numpy_ulong_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":806
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":806
* ctypedef npy_ulong uint_t
* ctypedef npy_ulonglong ulong_t
* ctypedef npy_ulonglong ulonglong_t # <<<<<<<<<<<<<<
@@ -1107,7 +1115,7 @@ typedef npy_ulonglong __pyx_t_5numpy_ulong_t;
*/
typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":808
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":808
* ctypedef npy_ulonglong ulonglong_t
*
* ctypedef npy_intp intp_t # <<<<<<<<<<<<<<
@@ -1116,7 +1124,7 @@ typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t;
*/
typedef npy_intp __pyx_t_5numpy_intp_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":809
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":809
*
* ctypedef npy_intp intp_t
* ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<<
@@ -1125,7 +1133,7 @@ typedef npy_intp __pyx_t_5numpy_intp_t;
*/
typedef npy_uintp __pyx_t_5numpy_uintp_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":811
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":811
* ctypedef npy_uintp uintp_t
*
* ctypedef npy_double float_t # <<<<<<<<<<<<<<
@@ -1134,7 +1142,7 @@ typedef npy_uintp __pyx_t_5numpy_uintp_t;
*/
typedef npy_double __pyx_t_5numpy_float_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":812
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":812
*
* ctypedef npy_double float_t
* ctypedef npy_double double_t # <<<<<<<<<<<<<<
@@ -1143,7 +1151,7 @@ typedef npy_double __pyx_t_5numpy_float_t;
*/
typedef npy_double __pyx_t_5numpy_double_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":813
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":813
* ctypedef npy_double float_t
* ctypedef npy_double double_t
* ctypedef npy_longdouble longdouble_t # <<<<<<<<<<<<<<
@@ -1183,7 +1191,7 @@ struct __pyx_MemviewEnum_obj;
struct __pyx_memoryview_obj;
struct __pyx_memoryviewslice_obj;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":815
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":815
* ctypedef npy_longdouble longdouble_t
*
* ctypedef npy_cfloat cfloat_t # <<<<<<<<<<<<<<
@@ -1192,7 +1200,7 @@ struct __pyx_memoryviewslice_obj;
*/
typedef npy_cfloat __pyx_t_5numpy_cfloat_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":816
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":816
*
* ctypedef npy_cfloat cfloat_t
* ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<<
@@ -1201,7 +1209,7 @@ typedef npy_cfloat __pyx_t_5numpy_cfloat_t;
*/
typedef npy_cdouble __pyx_t_5numpy_cdouble_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":817
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":817
* ctypedef npy_cfloat cfloat_t
* ctypedef npy_cdouble cdouble_t
* ctypedef npy_clongdouble clongdouble_t # <<<<<<<<<<<<<<
@@ -1210,7 +1218,7 @@ typedef npy_cdouble __pyx_t_5numpy_cdouble_t;
*/
typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":819
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":819
* ctypedef npy_clongdouble clongdouble_t
*
* ctypedef npy_cdouble complex_t # <<<<<<<<<<<<<<
@@ -11291,7 +11299,7 @@ static int __pyx_f_4silx_4math_12chistogramnd__histogramnd_int32_t_int32_t_float
return __pyx_r;
}
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":258
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":258
* # experimental exception made for __getbuffer__ and __releasebuffer__
* # -- the details of this may change.
* def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<<
@@ -11340,7 +11348,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
__Pyx_GIVEREF(__pyx_v_info->obj);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":265
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":265
*
* cdef int i, ndim
* cdef int endian_detector = 1 # <<<<<<<<<<<<<<
@@ -11349,7 +11357,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_endian_detector = 1;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":266
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":266
* cdef int i, ndim
* cdef int endian_detector = 1
* cdef bint little_endian = ((<char*>&endian_detector)[0] != 0) # <<<<<<<<<<<<<<
@@ -11358,7 +11366,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":268
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":268
* cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
*
* ndim = PyArray_NDIM(self) # <<<<<<<<<<<<<<
@@ -11367,7 +11375,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_ndim = PyArray_NDIM(__pyx_v_self);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":270
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":270
* ndim = PyArray_NDIM(self)
*
* if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<<
@@ -11381,7 +11389,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
goto __pyx_L4_bool_binop_done;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":271
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":271
*
* if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
* and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): # <<<<<<<<<<<<<<
@@ -11392,7 +11400,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_t_1 = __pyx_t_2;
__pyx_L4_bool_binop_done:;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":270
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":270
* ndim = PyArray_NDIM(self)
*
* if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<<
@@ -11401,7 +11409,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
if (unlikely(__pyx_t_1)) {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":272
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":272
* if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
* and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)):
* raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<<
@@ -11414,7 +11422,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__PYX_ERR(1, 272, __pyx_L1_error)
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":270
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":270
* ndim = PyArray_NDIM(self)
*
* if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<<
@@ -11423,7 +11431,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":274
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":274
* raise ValueError(u"ndarray is not C contiguous")
*
* if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<<
@@ -11437,7 +11445,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
goto __pyx_L7_bool_binop_done;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":275
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":275
*
* if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
* and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): # <<<<<<<<<<<<<<
@@ -11448,7 +11456,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_t_1 = __pyx_t_2;
__pyx_L7_bool_binop_done:;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":274
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":274
* raise ValueError(u"ndarray is not C contiguous")
*
* if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<<
@@ -11457,7 +11465,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
if (unlikely(__pyx_t_1)) {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":276
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":276
* if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
* and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)):
* raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<<
@@ -11470,7 +11478,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__PYX_ERR(1, 276, __pyx_L1_error)
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":274
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":274
* raise ValueError(u"ndarray is not C contiguous")
*
* if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<<
@@ -11479,7 +11487,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":278
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":278
* raise ValueError(u"ndarray is not Fortran contiguous")
*
* info.buf = PyArray_DATA(self) # <<<<<<<<<<<<<<
@@ -11488,7 +11496,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_info->buf = PyArray_DATA(__pyx_v_self);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":279
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":279
*
* info.buf = PyArray_DATA(self)
* info.ndim = ndim # <<<<<<<<<<<<<<
@@ -11497,7 +11505,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_info->ndim = __pyx_v_ndim;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":280
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":280
* info.buf = PyArray_DATA(self)
* info.ndim = ndim
* if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<<
@@ -11507,7 +11515,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0);
if (__pyx_t_1) {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":283
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":283
* # Allocate new buffer for strides and shape info.
* # This is allocated as one block, strides first.
* info.strides = <Py_ssize_t*>PyObject_Malloc(sizeof(Py_ssize_t) * 2 * <size_t>ndim) # <<<<<<<<<<<<<<
@@ -11516,7 +11524,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_info->strides = ((Py_ssize_t *)PyObject_Malloc((((sizeof(Py_ssize_t)) * 2) * ((size_t)__pyx_v_ndim))));
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":284
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":284
* # This is allocated as one block, strides first.
* info.strides = <Py_ssize_t*>PyObject_Malloc(sizeof(Py_ssize_t) * 2 * <size_t>ndim)
* info.shape = info.strides + ndim # <<<<<<<<<<<<<<
@@ -11525,7 +11533,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_info->shape = (__pyx_v_info->strides + __pyx_v_ndim);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":285
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":285
* info.strides = <Py_ssize_t*>PyObject_Malloc(sizeof(Py_ssize_t) * 2 * <size_t>ndim)
* info.shape = info.strides + ndim
* for i in range(ndim): # <<<<<<<<<<<<<<
@@ -11537,7 +11545,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
__pyx_v_i = __pyx_t_6;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":286
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":286
* info.shape = info.strides + ndim
* for i in range(ndim):
* info.strides[i] = PyArray_STRIDES(self)[i] # <<<<<<<<<<<<<<
@@ -11546,7 +11554,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
(__pyx_v_info->strides[__pyx_v_i]) = (PyArray_STRIDES(__pyx_v_self)[__pyx_v_i]);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":287
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":287
* for i in range(ndim):
* info.strides[i] = PyArray_STRIDES(self)[i]
* info.shape[i] = PyArray_DIMS(self)[i] # <<<<<<<<<<<<<<
@@ -11556,7 +11564,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
(__pyx_v_info->shape[__pyx_v_i]) = (PyArray_DIMS(__pyx_v_self)[__pyx_v_i]);
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":280
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":280
* info.buf = PyArray_DATA(self)
* info.ndim = ndim
* if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<<
@@ -11566,7 +11574,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
goto __pyx_L9;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":289
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":289
* info.shape[i] = PyArray_DIMS(self)[i]
* else:
* info.strides = <Py_ssize_t*>PyArray_STRIDES(self) # <<<<<<<<<<<<<<
@@ -11576,7 +11584,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
/*else*/ {
__pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(__pyx_v_self));
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":290
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":290
* else:
* info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
* info.shape = <Py_ssize_t*>PyArray_DIMS(self) # <<<<<<<<<<<<<<
@@ -11587,7 +11595,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
}
__pyx_L9:;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":291
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":291
* info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
* info.shape = <Py_ssize_t*>PyArray_DIMS(self)
* info.suboffsets = NULL # <<<<<<<<<<<<<<
@@ -11596,7 +11604,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_info->suboffsets = NULL;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":292
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":292
* info.shape = <Py_ssize_t*>PyArray_DIMS(self)
* info.suboffsets = NULL
* info.itemsize = PyArray_ITEMSIZE(self) # <<<<<<<<<<<<<<
@@ -11605,7 +11613,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_info->itemsize = PyArray_ITEMSIZE(__pyx_v_self);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":293
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":293
* info.suboffsets = NULL
* info.itemsize = PyArray_ITEMSIZE(self)
* info.readonly = not PyArray_ISWRITEABLE(self) # <<<<<<<<<<<<<<
@@ -11614,7 +11622,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_info->readonly = (!(PyArray_ISWRITEABLE(__pyx_v_self) != 0));
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":296
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":296
*
* cdef int t
* cdef char* f = NULL # <<<<<<<<<<<<<<
@@ -11623,7 +11631,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_f = NULL;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":297
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":297
* cdef int t
* cdef char* f = NULL
* cdef dtype descr = <dtype>PyArray_DESCR(self) # <<<<<<<<<<<<<<
@@ -11636,7 +11644,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_v_descr = ((PyArray_Descr *)__pyx_t_3);
__pyx_t_3 = 0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":300
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":300
* cdef int offset
*
* info.obj = self # <<<<<<<<<<<<<<
@@ -11649,7 +11657,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__Pyx_DECREF(__pyx_v_info->obj);
__pyx_v_info->obj = ((PyObject *)__pyx_v_self);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":302
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":302
* info.obj = self
*
* if not PyDataType_HASFIELDS(descr): # <<<<<<<<<<<<<<
@@ -11659,7 +11667,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_t_1 = ((!(PyDataType_HASFIELDS(__pyx_v_descr) != 0)) != 0);
if (__pyx_t_1) {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":303
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":303
*
* if not PyDataType_HASFIELDS(descr):
* t = descr.type_num # <<<<<<<<<<<<<<
@@ -11669,7 +11677,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_t_4 = __pyx_v_descr->type_num;
__pyx_v_t = __pyx_t_4;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":304
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":304
* if not PyDataType_HASFIELDS(descr):
* t = descr.type_num
* if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
@@ -11689,7 +11697,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
}
__pyx_L15_next_or:;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":305
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":305
* t = descr.type_num
* if ((descr.byteorder == c'>' and little_endian) or
* (descr.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<<
@@ -11706,7 +11714,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_t_1 = __pyx_t_2;
__pyx_L14_bool_binop_done:;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":304
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":304
* if not PyDataType_HASFIELDS(descr):
* t = descr.type_num
* if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
@@ -11715,7 +11723,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
if (unlikely(__pyx_t_1)) {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":306
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":306
* if ((descr.byteorder == c'>' and little_endian) or
* (descr.byteorder == c'<' and not little_endian)):
* raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<<
@@ -11728,7 +11736,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__PYX_ERR(1, 306, __pyx_L1_error)
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":304
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":304
* if not PyDataType_HASFIELDS(descr):
* t = descr.type_num
* if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
@@ -11737,7 +11745,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":307
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":307
* (descr.byteorder == c'<' and not little_endian)):
* raise ValueError(u"Non-native byte order not supported")
* if t == NPY_BYTE: f = "b" # <<<<<<<<<<<<<<
@@ -11750,7 +11758,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_UBYTE:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":308
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":308
* raise ValueError(u"Non-native byte order not supported")
* if t == NPY_BYTE: f = "b"
* elif t == NPY_UBYTE: f = "B" # <<<<<<<<<<<<<<
@@ -11761,7 +11769,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_SHORT:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":309
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":309
* if t == NPY_BYTE: f = "b"
* elif t == NPY_UBYTE: f = "B"
* elif t == NPY_SHORT: f = "h" # <<<<<<<<<<<<<<
@@ -11772,7 +11780,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_USHORT:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":310
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":310
* elif t == NPY_UBYTE: f = "B"
* elif t == NPY_SHORT: f = "h"
* elif t == NPY_USHORT: f = "H" # <<<<<<<<<<<<<<
@@ -11783,7 +11791,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_INT:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":311
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":311
* elif t == NPY_SHORT: f = "h"
* elif t == NPY_USHORT: f = "H"
* elif t == NPY_INT: f = "i" # <<<<<<<<<<<<<<
@@ -11794,7 +11802,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_UINT:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":312
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":312
* elif t == NPY_USHORT: f = "H"
* elif t == NPY_INT: f = "i"
* elif t == NPY_UINT: f = "I" # <<<<<<<<<<<<<<
@@ -11805,7 +11813,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_LONG:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":313
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":313
* elif t == NPY_INT: f = "i"
* elif t == NPY_UINT: f = "I"
* elif t == NPY_LONG: f = "l" # <<<<<<<<<<<<<<
@@ -11816,7 +11824,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_ULONG:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":314
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":314
* elif t == NPY_UINT: f = "I"
* elif t == NPY_LONG: f = "l"
* elif t == NPY_ULONG: f = "L" # <<<<<<<<<<<<<<
@@ -11827,7 +11835,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_LONGLONG:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":315
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":315
* elif t == NPY_LONG: f = "l"
* elif t == NPY_ULONG: f = "L"
* elif t == NPY_LONGLONG: f = "q" # <<<<<<<<<<<<<<
@@ -11838,7 +11846,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_ULONGLONG:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":316
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":316
* elif t == NPY_ULONG: f = "L"
* elif t == NPY_LONGLONG: f = "q"
* elif t == NPY_ULONGLONG: f = "Q" # <<<<<<<<<<<<<<
@@ -11849,7 +11857,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_FLOAT:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":317
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":317
* elif t == NPY_LONGLONG: f = "q"
* elif t == NPY_ULONGLONG: f = "Q"
* elif t == NPY_FLOAT: f = "f" # <<<<<<<<<<<<<<
@@ -11860,7 +11868,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_DOUBLE:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":318
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":318
* elif t == NPY_ULONGLONG: f = "Q"
* elif t == NPY_FLOAT: f = "f"
* elif t == NPY_DOUBLE: f = "d" # <<<<<<<<<<<<<<
@@ -11871,7 +11879,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_LONGDOUBLE:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":319
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":319
* elif t == NPY_FLOAT: f = "f"
* elif t == NPY_DOUBLE: f = "d"
* elif t == NPY_LONGDOUBLE: f = "g" # <<<<<<<<<<<<<<
@@ -11882,7 +11890,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_CFLOAT:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":320
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":320
* elif t == NPY_DOUBLE: f = "d"
* elif t == NPY_LONGDOUBLE: f = "g"
* elif t == NPY_CFLOAT: f = "Zf" # <<<<<<<<<<<<<<
@@ -11893,7 +11901,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_CDOUBLE:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":321
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":321
* elif t == NPY_LONGDOUBLE: f = "g"
* elif t == NPY_CFLOAT: f = "Zf"
* elif t == NPY_CDOUBLE: f = "Zd" # <<<<<<<<<<<<<<
@@ -11904,7 +11912,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_CLONGDOUBLE:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":322
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":322
* elif t == NPY_CFLOAT: f = "Zf"
* elif t == NPY_CDOUBLE: f = "Zd"
* elif t == NPY_CLONGDOUBLE: f = "Zg" # <<<<<<<<<<<<<<
@@ -11915,7 +11923,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_OBJECT:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":323
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":323
* elif t == NPY_CDOUBLE: f = "Zd"
* elif t == NPY_CLONGDOUBLE: f = "Zg"
* elif t == NPY_OBJECT: f = "O" # <<<<<<<<<<<<<<
@@ -11926,7 +11934,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
default:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":325
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":325
* elif t == NPY_OBJECT: f = "O"
* else:
* raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<<
@@ -11947,7 +11955,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":326
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":326
* else:
* raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
* info.format = f # <<<<<<<<<<<<<<
@@ -11956,7 +11964,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_info->format = __pyx_v_f;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":327
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":327
* raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
* info.format = f
* return # <<<<<<<<<<<<<<
@@ -11966,7 +11974,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_r = 0;
goto __pyx_L0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":302
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":302
* info.obj = self
*
* if not PyDataType_HASFIELDS(descr): # <<<<<<<<<<<<<<
@@ -11975,7 +11983,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":329
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":329
* return
* else:
* info.format = <char*>PyObject_Malloc(_buffer_format_string_len) # <<<<<<<<<<<<<<
@@ -11985,7 +11993,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
/*else*/ {
__pyx_v_info->format = ((char *)PyObject_Malloc(0xFF));
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":330
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":330
* else:
* info.format = <char*>PyObject_Malloc(_buffer_format_string_len)
* info.format[0] = c'^' # Native data types, manual alignment # <<<<<<<<<<<<<<
@@ -11994,7 +12002,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
(__pyx_v_info->format[0]) = '^';
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":331
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":331
* info.format = <char*>PyObject_Malloc(_buffer_format_string_len)
* info.format[0] = c'^' # Native data types, manual alignment
* offset = 0 # <<<<<<<<<<<<<<
@@ -12003,7 +12011,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_offset = 0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":332
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":332
* info.format[0] = c'^' # Native data types, manual alignment
* offset = 0
* f = _util_dtypestring(descr, info.format + 1, # <<<<<<<<<<<<<<
@@ -12013,7 +12021,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 0xFF), (&__pyx_v_offset)); if (unlikely(__pyx_t_9 == ((char *)NULL))) __PYX_ERR(1, 332, __pyx_L1_error)
__pyx_v_f = __pyx_t_9;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":335
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":335
* info.format + _buffer_format_string_len,
* &offset)
* f[0] = c'\0' # Terminate format string # <<<<<<<<<<<<<<
@@ -12023,7 +12031,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
(__pyx_v_f[0]) = '\x00';
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":258
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":258
* # experimental exception made for __getbuffer__ and __releasebuffer__
* # -- the details of this may change.
* def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<<
@@ -12055,7 +12063,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
return __pyx_r;
}
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":337
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":337
* f[0] = c'\0' # Terminate format string
*
* def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<<
@@ -12079,7 +12087,7 @@ static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_s
int __pyx_t_1;
__Pyx_RefNannySetupContext("__releasebuffer__", 0);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":338
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":338
*
* def __releasebuffer__(ndarray self, Py_buffer* info):
* if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<<
@@ -12089,7 +12097,7 @@ static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_s
__pyx_t_1 = (PyArray_HASFIELDS(__pyx_v_self) != 0);
if (__pyx_t_1) {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":339
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":339
* def __releasebuffer__(ndarray self, Py_buffer* info):
* if PyArray_HASFIELDS(self):
* PyObject_Free(info.format) # <<<<<<<<<<<<<<
@@ -12098,7 +12106,7 @@ static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_s
*/
PyObject_Free(__pyx_v_info->format);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":338
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":338
*
* def __releasebuffer__(ndarray self, Py_buffer* info):
* if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<<
@@ -12107,7 +12115,7 @@ static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_s
*/
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":340
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":340
* if PyArray_HASFIELDS(self):
* PyObject_Free(info.format)
* if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<<
@@ -12117,7 +12125,7 @@ static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_s
__pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0);
if (__pyx_t_1) {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":341
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":341
* PyObject_Free(info.format)
* if sizeof(npy_intp) != sizeof(Py_ssize_t):
* PyObject_Free(info.strides) # <<<<<<<<<<<<<<
@@ -12126,7 +12134,7 @@ static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_s
*/
PyObject_Free(__pyx_v_info->strides);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":340
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":340
* if PyArray_HASFIELDS(self):
* PyObject_Free(info.format)
* if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<<
@@ -12135,7 +12143,7 @@ static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_s
*/
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":337
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":337
* f[0] = c'\0' # Terminate format string
*
* def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<<
@@ -12147,7 +12155,7 @@ static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_s
__Pyx_RefNannyFinishContext();
}
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":821
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":821
* ctypedef npy_cdouble complex_t
*
* cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<<
@@ -12161,7 +12169,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__
PyObject *__pyx_t_1 = NULL;
__Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":822
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":822
*
* cdef inline object PyArray_MultiIterNew1(a):
* return PyArray_MultiIterNew(1, <void*>a) # <<<<<<<<<<<<<<
@@ -12175,7 +12183,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":821
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":821
* ctypedef npy_cdouble complex_t
*
* cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<<
@@ -12194,7 +12202,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__
return __pyx_r;
}
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":824
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":824
* return PyArray_MultiIterNew(1, <void*>a)
*
* cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<<
@@ -12208,7 +12216,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__
PyObject *__pyx_t_1 = NULL;
__Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":825
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":825
*
* cdef inline object PyArray_MultiIterNew2(a, b):
* return PyArray_MultiIterNew(2, <void*>a, <void*>b) # <<<<<<<<<<<<<<
@@ -12222,7 +12230,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":824
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":824
* return PyArray_MultiIterNew(1, <void*>a)
*
* cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<<
@@ -12241,7 +12249,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__
return __pyx_r;
}
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":827
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":827
* return PyArray_MultiIterNew(2, <void*>a, <void*>b)
*
* cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<<
@@ -12255,7 +12263,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__
PyObject *__pyx_t_1 = NULL;
__Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":828
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":828
*
* cdef inline object PyArray_MultiIterNew3(a, b, c):
* return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c) # <<<<<<<<<<<<<<
@@ -12269,7 +12277,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":827
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":827
* return PyArray_MultiIterNew(2, <void*>a, <void*>b)
*
* cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<<
@@ -12288,7 +12296,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__
return __pyx_r;
}
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":830
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":830
* return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
*
* cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<<
@@ -12302,7 +12310,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__
PyObject *__pyx_t_1 = NULL;
__Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":831
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":831
*
* cdef inline object PyArray_MultiIterNew4(a, b, c, d):
* return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d) # <<<<<<<<<<<<<<
@@ -12316,7 +12324,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":830
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":830
* return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
*
* cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<<
@@ -12335,7 +12343,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__
return __pyx_r;
}
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":833
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":833
* return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
*
* cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<<
@@ -12349,7 +12357,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__
PyObject *__pyx_t_1 = NULL;
__Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":834
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":834
*
* cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
* return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e) # <<<<<<<<<<<<<<
@@ -12363,7 +12371,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":833
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":833
* return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
*
* cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<<
@@ -12382,7 +12390,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__
return __pyx_r;
}
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":836
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":836
* return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
*
* cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<<
@@ -12396,7 +12404,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__
int __pyx_t_1;
__Pyx_RefNannySetupContext("PyDataType_SHAPE", 0);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":837
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":837
*
* cdef inline tuple PyDataType_SHAPE(dtype d):
* if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<<
@@ -12406,7 +12414,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__
__pyx_t_1 = (PyDataType_HASSUBARRAY(__pyx_v_d) != 0);
if (__pyx_t_1) {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":838
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":838
* cdef inline tuple PyDataType_SHAPE(dtype d):
* if PyDataType_HASSUBARRAY(d):
* return <tuple>d.subarray.shape # <<<<<<<<<<<<<<
@@ -12418,7 +12426,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__
__pyx_r = ((PyObject*)__pyx_v_d->subarray->shape);
goto __pyx_L0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":837
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":837
*
* cdef inline tuple PyDataType_SHAPE(dtype d):
* if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<<
@@ -12427,7 +12435,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__
*/
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":840
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":840
* return <tuple>d.subarray.shape
* else:
* return () # <<<<<<<<<<<<<<
@@ -12441,7 +12449,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__
goto __pyx_L0;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":836
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":836
* return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
*
* cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<<
@@ -12456,7 +12464,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__
return __pyx_r;
}
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":842
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":842
* return ()
*
* cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<<
@@ -12485,7 +12493,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
char *__pyx_t_9;
__Pyx_RefNannySetupContext("_util_dtypestring", 0);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":847
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":847
*
* cdef dtype child
* cdef int endian_detector = 1 # <<<<<<<<<<<<<<
@@ -12494,7 +12502,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
*/
__pyx_v_endian_detector = 1;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":848
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":848
* cdef dtype child
* cdef int endian_detector = 1
* cdef bint little_endian = ((<char*>&endian_detector)[0] != 0) # <<<<<<<<<<<<<<
@@ -12503,7 +12511,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
*/
__pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":851
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":851
* cdef tuple fields
*
* for childname in descr.names: # <<<<<<<<<<<<<<
@@ -12526,7 +12534,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__Pyx_XDECREF_SET(__pyx_v_childname, __pyx_t_3);
__pyx_t_3 = 0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":852
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":852
*
* for childname in descr.names:
* fields = descr.fields[childname] # <<<<<<<<<<<<<<
@@ -12543,7 +12551,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__Pyx_XDECREF_SET(__pyx_v_fields, ((PyObject*)__pyx_t_3));
__pyx_t_3 = 0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":853
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":853
* for childname in descr.names:
* fields = descr.fields[childname]
* child, new_offset = fields # <<<<<<<<<<<<<<
@@ -12578,7 +12586,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__Pyx_XDECREF_SET(__pyx_v_new_offset, __pyx_t_4);
__pyx_t_4 = 0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":855
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":855
* child, new_offset = fields
*
* if (end - f) - <int>(new_offset - offset[0]) < 15: # <<<<<<<<<<<<<<
@@ -12595,7 +12603,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__pyx_t_6 = ((((__pyx_v_end - __pyx_v_f) - ((int)__pyx_t_5)) < 15) != 0);
if (unlikely(__pyx_t_6)) {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":856
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":856
*
* if (end - f) - <int>(new_offset - offset[0]) < 15:
* raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<<
@@ -12608,7 +12616,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__PYX_ERR(1, 856, __pyx_L1_error)
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":855
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":855
* child, new_offset = fields
*
* if (end - f) - <int>(new_offset - offset[0]) < 15: # <<<<<<<<<<<<<<
@@ -12617,7 +12625,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
*/
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":858
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":858
* raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
*
* if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
@@ -12637,7 +12645,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
}
__pyx_L8_next_or:;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":859
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":859
*
* if ((child.byteorder == c'>' and little_endian) or
* (child.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<<
@@ -12654,7 +12662,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__pyx_t_6 = __pyx_t_7;
__pyx_L7_bool_binop_done:;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":858
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":858
* raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
*
* if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
@@ -12663,7 +12671,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
*/
if (unlikely(__pyx_t_6)) {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":860
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":860
* if ((child.byteorder == c'>' and little_endian) or
* (child.byteorder == c'<' and not little_endian)):
* raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<<
@@ -12676,7 +12684,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__PYX_ERR(1, 860, __pyx_L1_error)
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":858
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":858
* raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
*
* if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
@@ -12685,7 +12693,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
*/
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":870
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":870
*
* # Output padding bytes
* while offset[0] < new_offset: # <<<<<<<<<<<<<<
@@ -12701,7 +12709,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (!__pyx_t_6) break;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":871
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":871
* # Output padding bytes
* while offset[0] < new_offset:
* f[0] = 120 # "x"; pad byte # <<<<<<<<<<<<<<
@@ -12710,7 +12718,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
*/
(__pyx_v_f[0]) = 0x78;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":872
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":872
* while offset[0] < new_offset:
* f[0] = 120 # "x"; pad byte
* f += 1 # <<<<<<<<<<<<<<
@@ -12719,7 +12727,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
*/
__pyx_v_f = (__pyx_v_f + 1);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":873
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":873
* f[0] = 120 # "x"; pad byte
* f += 1
* offset[0] += 1 # <<<<<<<<<<<<<<
@@ -12730,7 +12738,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
(__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + 1);
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":875
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":875
* offset[0] += 1
*
* offset[0] += child.itemsize # <<<<<<<<<<<<<<
@@ -12740,7 +12748,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__pyx_t_8 = 0;
(__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + __pyx_v_child->elsize);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":877
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":877
* offset[0] += child.itemsize
*
* if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<<
@@ -12750,7 +12758,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__pyx_t_6 = ((!(PyDataType_HASFIELDS(__pyx_v_child) != 0)) != 0);
if (__pyx_t_6) {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":878
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":878
*
* if not PyDataType_HASFIELDS(child):
* t = child.type_num # <<<<<<<<<<<<<<
@@ -12762,7 +12770,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_4);
__pyx_t_4 = 0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":879
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":879
* if not PyDataType_HASFIELDS(child):
* t = child.type_num
* if end - f < 5: # <<<<<<<<<<<<<<
@@ -12772,7 +12780,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__pyx_t_6 = (((__pyx_v_end - __pyx_v_f) < 5) != 0);
if (unlikely(__pyx_t_6)) {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":880
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":880
* t = child.type_num
* if end - f < 5:
* raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<<
@@ -12785,7 +12793,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__PYX_ERR(1, 880, __pyx_L1_error)
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":879
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":879
* if not PyDataType_HASFIELDS(child):
* t = child.type_num
* if end - f < 5: # <<<<<<<<<<<<<<
@@ -12794,7 +12802,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
*/
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":883
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":883
*
* # Until ticket #99 is fixed, use integers to avoid warnings
* if t == NPY_BYTE: f[0] = 98 #"b" # <<<<<<<<<<<<<<
@@ -12812,7 +12820,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":884
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":884
* # Until ticket #99 is fixed, use integers to avoid warnings
* if t == NPY_BYTE: f[0] = 98 #"b"
* elif t == NPY_UBYTE: f[0] = 66 #"B" # <<<<<<<<<<<<<<
@@ -12830,7 +12838,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":885
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":885
* if t == NPY_BYTE: f[0] = 98 #"b"
* elif t == NPY_UBYTE: f[0] = 66 #"B"
* elif t == NPY_SHORT: f[0] = 104 #"h" # <<<<<<<<<<<<<<
@@ -12848,7 +12856,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":886
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":886
* elif t == NPY_UBYTE: f[0] = 66 #"B"
* elif t == NPY_SHORT: f[0] = 104 #"h"
* elif t == NPY_USHORT: f[0] = 72 #"H" # <<<<<<<<<<<<<<
@@ -12866,7 +12874,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":887
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":887
* elif t == NPY_SHORT: f[0] = 104 #"h"
* elif t == NPY_USHORT: f[0] = 72 #"H"
* elif t == NPY_INT: f[0] = 105 #"i" # <<<<<<<<<<<<<<
@@ -12884,7 +12892,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":888
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":888
* elif t == NPY_USHORT: f[0] = 72 #"H"
* elif t == NPY_INT: f[0] = 105 #"i"
* elif t == NPY_UINT: f[0] = 73 #"I" # <<<<<<<<<<<<<<
@@ -12902,7 +12910,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":889
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":889
* elif t == NPY_INT: f[0] = 105 #"i"
* elif t == NPY_UINT: f[0] = 73 #"I"
* elif t == NPY_LONG: f[0] = 108 #"l" # <<<<<<<<<<<<<<
@@ -12920,7 +12928,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":890
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":890
* elif t == NPY_UINT: f[0] = 73 #"I"
* elif t == NPY_LONG: f[0] = 108 #"l"
* elif t == NPY_ULONG: f[0] = 76 #"L" # <<<<<<<<<<<<<<
@@ -12938,7 +12946,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":891
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":891
* elif t == NPY_LONG: f[0] = 108 #"l"
* elif t == NPY_ULONG: f[0] = 76 #"L"
* elif t == NPY_LONGLONG: f[0] = 113 #"q" # <<<<<<<<<<<<<<
@@ -12956,7 +12964,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":892
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":892
* elif t == NPY_ULONG: f[0] = 76 #"L"
* elif t == NPY_LONGLONG: f[0] = 113 #"q"
* elif t == NPY_ULONGLONG: f[0] = 81 #"Q" # <<<<<<<<<<<<<<
@@ -12974,7 +12982,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":893
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":893
* elif t == NPY_LONGLONG: f[0] = 113 #"q"
* elif t == NPY_ULONGLONG: f[0] = 81 #"Q"
* elif t == NPY_FLOAT: f[0] = 102 #"f" # <<<<<<<<<<<<<<
@@ -12992,7 +13000,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":894
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":894
* elif t == NPY_ULONGLONG: f[0] = 81 #"Q"
* elif t == NPY_FLOAT: f[0] = 102 #"f"
* elif t == NPY_DOUBLE: f[0] = 100 #"d" # <<<<<<<<<<<<<<
@@ -13010,7 +13018,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":895
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":895
* elif t == NPY_FLOAT: f[0] = 102 #"f"
* elif t == NPY_DOUBLE: f[0] = 100 #"d"
* elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" # <<<<<<<<<<<<<<
@@ -13028,7 +13036,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":896
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":896
* elif t == NPY_DOUBLE: f[0] = 100 #"d"
* elif t == NPY_LONGDOUBLE: f[0] = 103 #"g"
* elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf # <<<<<<<<<<<<<<
@@ -13048,7 +13056,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":897
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":897
* elif t == NPY_LONGDOUBLE: f[0] = 103 #"g"
* elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf
* elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd # <<<<<<<<<<<<<<
@@ -13068,7 +13076,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":898
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":898
* elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf
* elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd
* elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg # <<<<<<<<<<<<<<
@@ -13088,7 +13096,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":899
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":899
* elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd
* elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
* elif t == NPY_OBJECT: f[0] = 79 #"O" # <<<<<<<<<<<<<<
@@ -13106,7 +13114,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":901
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":901
* elif t == NPY_OBJECT: f[0] = 79 #"O"
* else:
* raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<<
@@ -13125,7 +13133,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
}
__pyx_L15:;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":902
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":902
* else:
* raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
* f += 1 # <<<<<<<<<<<<<<
@@ -13134,7 +13142,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
*/
__pyx_v_f = (__pyx_v_f + 1);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":877
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":877
* offset[0] += child.itemsize
*
* if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<<
@@ -13144,7 +13152,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L13;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":906
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":906
* # Cython ignores struct boundary information ("T{...}"),
* # so don't output it
* f = _util_dtypestring(child, f, end, offset) # <<<<<<<<<<<<<<
@@ -13157,7 +13165,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
}
__pyx_L13:;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":851
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":851
* cdef tuple fields
*
* for childname in descr.names: # <<<<<<<<<<<<<<
@@ -13167,7 +13175,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":907
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":907
* # so don't output it
* f = _util_dtypestring(child, f, end, offset)
* return f # <<<<<<<<<<<<<<
@@ -13177,7 +13185,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__pyx_r = __pyx_v_f;
goto __pyx_L0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":842
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":842
* return ()
*
* cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<<
@@ -13202,7 +13210,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
return __pyx_r;
}
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1022
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1022
* int _import_umath() except -1
*
* cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<<
@@ -13214,7 +13222,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("set_array_base", 0);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1023
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1023
*
* cdef inline void set_array_base(ndarray arr, object base):
* Py_INCREF(base) # important to do this before stealing the reference below! # <<<<<<<<<<<<<<
@@ -13223,7 +13231,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a
*/
Py_INCREF(__pyx_v_base);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1024
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1024
* cdef inline void set_array_base(ndarray arr, object base):
* Py_INCREF(base) # important to do this before stealing the reference below!
* PyArray_SetBaseObject(arr, base) # <<<<<<<<<<<<<<
@@ -13232,7 +13240,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a
*/
(void)(PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base));
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1022
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1022
* int _import_umath() except -1
*
* cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<<
@@ -13244,7 +13252,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a
__Pyx_RefNannyFinishContext();
}
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1026
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1026
* PyArray_SetBaseObject(arr, base)
*
* cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<<
@@ -13259,7 +13267,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py
int __pyx_t_1;
__Pyx_RefNannySetupContext("get_array_base", 0);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1027
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1027
*
* cdef inline object get_array_base(ndarray arr):
* base = PyArray_BASE(arr) # <<<<<<<<<<<<<<
@@ -13268,7 +13276,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py
*/
__pyx_v_base = PyArray_BASE(__pyx_v_arr);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1028
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1028
* cdef inline object get_array_base(ndarray arr):
* base = PyArray_BASE(arr)
* if base is NULL: # <<<<<<<<<<<<<<
@@ -13278,7 +13286,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py
__pyx_t_1 = ((__pyx_v_base == NULL) != 0);
if (__pyx_t_1) {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1029
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1029
* base = PyArray_BASE(arr)
* if base is NULL:
* return None # <<<<<<<<<<<<<<
@@ -13289,7 +13297,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
goto __pyx_L0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1028
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1028
* cdef inline object get_array_base(ndarray arr):
* base = PyArray_BASE(arr)
* if base is NULL: # <<<<<<<<<<<<<<
@@ -13298,7 +13306,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py
*/
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1030
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1030
* if base is NULL:
* return None
* return <object>base # <<<<<<<<<<<<<<
@@ -13310,7 +13318,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py
__pyx_r = ((PyObject *)__pyx_v_base);
goto __pyx_L0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1026
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1026
* PyArray_SetBaseObject(arr, base)
*
* cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<<
@@ -13325,7 +13333,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py
return __pyx_r;
}
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1034
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1034
* # Versions of the import_* functions which are more suitable for
* # Cython code.
* cdef inline int import_array() except -1: # <<<<<<<<<<<<<<
@@ -13346,7 +13354,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
PyObject *__pyx_t_8 = NULL;
__Pyx_RefNannySetupContext("import_array", 0);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1035
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1035
* # Cython code.
* cdef inline int import_array() except -1:
* try: # <<<<<<<<<<<<<<
@@ -13362,7 +13370,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
__Pyx_XGOTREF(__pyx_t_3);
/*try:*/ {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1036
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1036
* cdef inline int import_array() except -1:
* try:
* _import_array() # <<<<<<<<<<<<<<
@@ -13371,7 +13379,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
*/
__pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 1036, __pyx_L3_error)
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1035
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1035
* # Cython code.
* cdef inline int import_array() except -1:
* try: # <<<<<<<<<<<<<<
@@ -13385,7 +13393,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
goto __pyx_L8_try_end;
__pyx_L3_error:;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1037
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1037
* try:
* _import_array()
* except Exception: # <<<<<<<<<<<<<<
@@ -13400,7 +13408,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
__Pyx_GOTREF(__pyx_t_6);
__Pyx_GOTREF(__pyx_t_7);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1038
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1038
* _import_array()
* except Exception:
* raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<<
@@ -13416,7 +13424,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
goto __pyx_L5_except_error;
__pyx_L5_except_error:;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1035
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1035
* # Cython code.
* cdef inline int import_array() except -1:
* try: # <<<<<<<<<<<<<<
@@ -13431,7 +13439,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
__pyx_L8_try_end:;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1034
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1034
* # Versions of the import_* functions which are more suitable for
* # Cython code.
* cdef inline int import_array() except -1: # <<<<<<<<<<<<<<
@@ -13454,7 +13462,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
return __pyx_r;
}
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1040
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1040
* raise ImportError("numpy.core.multiarray failed to import")
*
* cdef inline int import_umath() except -1: # <<<<<<<<<<<<<<
@@ -13475,7 +13483,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
PyObject *__pyx_t_8 = NULL;
__Pyx_RefNannySetupContext("import_umath", 0);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1041
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1041
*
* cdef inline int import_umath() except -1:
* try: # <<<<<<<<<<<<<<
@@ -13491,7 +13499,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
__Pyx_XGOTREF(__pyx_t_3);
/*try:*/ {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1042
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1042
* cdef inline int import_umath() except -1:
* try:
* _import_umath() # <<<<<<<<<<<<<<
@@ -13500,7 +13508,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
*/
__pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 1042, __pyx_L3_error)
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1041
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1041
*
* cdef inline int import_umath() except -1:
* try: # <<<<<<<<<<<<<<
@@ -13514,7 +13522,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
goto __pyx_L8_try_end;
__pyx_L3_error:;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1043
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1043
* try:
* _import_umath()
* except Exception: # <<<<<<<<<<<<<<
@@ -13529,7 +13537,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
__Pyx_GOTREF(__pyx_t_6);
__Pyx_GOTREF(__pyx_t_7);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1044
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1044
* _import_umath()
* except Exception:
* raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<<
@@ -13545,7 +13553,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
goto __pyx_L5_except_error;
__pyx_L5_except_error:;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1041
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1041
*
* cdef inline int import_umath() except -1:
* try: # <<<<<<<<<<<<<<
@@ -13560,7 +13568,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
__pyx_L8_try_end:;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1040
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1040
* raise ImportError("numpy.core.multiarray failed to import")
*
* cdef inline int import_umath() except -1: # <<<<<<<<<<<<<<
@@ -13583,7 +13591,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
return __pyx_r;
}
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1046
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1046
* raise ImportError("numpy.core.umath failed to import")
*
* cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<<
@@ -13604,7 +13612,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) {
PyObject *__pyx_t_8 = NULL;
__Pyx_RefNannySetupContext("import_ufunc", 0);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1047
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1047
*
* cdef inline int import_ufunc() except -1:
* try: # <<<<<<<<<<<<<<
@@ -13620,7 +13628,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) {
__Pyx_XGOTREF(__pyx_t_3);
/*try:*/ {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1048
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1048
* cdef inline int import_ufunc() except -1:
* try:
* _import_umath() # <<<<<<<<<<<<<<
@@ -13629,7 +13637,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) {
*/
__pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 1048, __pyx_L3_error)
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1047
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1047
*
* cdef inline int import_ufunc() except -1:
* try: # <<<<<<<<<<<<<<
@@ -13643,7 +13651,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) {
goto __pyx_L8_try_end;
__pyx_L3_error:;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1049
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1049
* try:
* _import_umath()
* except Exception: # <<<<<<<<<<<<<<
@@ -13657,7 +13665,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) {
__Pyx_GOTREF(__pyx_t_6);
__Pyx_GOTREF(__pyx_t_7);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1050
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1050
* _import_umath()
* except Exception:
* raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<<
@@ -13671,7 +13679,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) {
goto __pyx_L5_except_error;
__pyx_L5_except_error:;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1047
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1047
*
* cdef inline int import_ufunc() except -1:
* try: # <<<<<<<<<<<<<<
@@ -13686,7 +13694,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) {
__pyx_L8_try_end:;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1046
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1046
* raise ImportError("numpy.core.umath failed to import")
*
* cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<<
@@ -26592,6 +26600,9 @@ static PyTypeObject __pyx_type_4silx_4math_12chistogramnd___pyx_scope_struct__ch
#if PY_VERSION_HEX >= 0x030400a1
0, /*tp_finalize*/
#endif
+ #if PY_VERSION_HEX >= 0x030800b1
+ 0, /*tp_vectorcall*/
+ #endif
};
static struct __pyx_vtabstruct_array __pyx_vtable_array;
@@ -26770,6 +26781,9 @@ static PyTypeObject __pyx_type___pyx_array = {
#if PY_VERSION_HEX >= 0x030400a1
0, /*tp_finalize*/
#endif
+ #if PY_VERSION_HEX >= 0x030800b1
+ 0, /*tp_vectorcall*/
+ #endif
};
static PyObject *__pyx_tp_new_Enum(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
@@ -26878,6 +26892,9 @@ static PyTypeObject __pyx_type___pyx_MemviewEnum = {
#if PY_VERSION_HEX >= 0x030400a1
0, /*tp_finalize*/
#endif
+ #if PY_VERSION_HEX >= 0x030800b1
+ 0, /*tp_vectorcall*/
+ #endif
};
static struct __pyx_vtabstruct_memoryview __pyx_vtable_memoryview;
@@ -27128,6 +27145,9 @@ static PyTypeObject __pyx_type___pyx_memoryview = {
#if PY_VERSION_HEX >= 0x030400a1
0, /*tp_finalize*/
#endif
+ #if PY_VERSION_HEX >= 0x030800b1
+ 0, /*tp_vectorcall*/
+ #endif
};
static struct __pyx_vtabstruct__memoryviewslice __pyx_vtable__memoryviewslice;
@@ -27263,6 +27283,9 @@ static PyTypeObject __pyx_type___pyx_memoryviewslice = {
#if PY_VERSION_HEX >= 0x030400a1
0, /*tp_finalize*/
#endif
+ #if PY_VERSION_HEX >= 0x030800b1
+ 0, /*tp_vectorcall*/
+ #endif
};
static PyMethodDef __pyx_methods[] = {
@@ -27629,7 +27652,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
__Pyx_GOTREF(__pyx_tuple__11);
__Pyx_GIVEREF(__pyx_tuple__11);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":272
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":272
* if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
* and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)):
* raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<<
@@ -27640,7 +27663,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
__Pyx_GOTREF(__pyx_tuple__12);
__Pyx_GIVEREF(__pyx_tuple__12);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":276
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":276
* if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
* and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)):
* raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<<
@@ -27651,7 +27674,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
__Pyx_GOTREF(__pyx_tuple__13);
__Pyx_GIVEREF(__pyx_tuple__13);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":306
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":306
* if ((descr.byteorder == c'>' and little_endian) or
* (descr.byteorder == c'<' and not little_endian)):
* raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<<
@@ -27662,7 +27685,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
__Pyx_GOTREF(__pyx_tuple__14);
__Pyx_GIVEREF(__pyx_tuple__14);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":856
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":856
*
* if (end - f) - <int>(new_offset - offset[0]) < 15:
* raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<<
@@ -27673,7 +27696,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
__Pyx_GOTREF(__pyx_tuple__15);
__Pyx_GIVEREF(__pyx_tuple__15);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":880
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":880
* t = child.type_num
* if end - f < 5:
* raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<<
@@ -27684,7 +27707,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
__Pyx_GOTREF(__pyx_tuple__16);
__Pyx_GIVEREF(__pyx_tuple__16);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1038
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1038
* _import_array()
* except Exception:
* raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<<
@@ -27695,7 +27718,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
__Pyx_GOTREF(__pyx_tuple__17);
__Pyx_GIVEREF(__pyx_tuple__17);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1044
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1044
* _import_umath()
* except Exception:
* raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<<
@@ -28035,7 +28058,9 @@ static int __Pyx_modinit_type_init_code(void) {
__Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
/*--- Type init code ---*/
if (PyType_Ready(&__pyx_type_4silx_4math_12chistogramnd___pyx_scope_struct__chistogramnd) < 0) __PYX_ERR(0, 36, __pyx_L1_error)
+ #if PY_VERSION_HEX < 0x030800B1
__pyx_type_4silx_4math_12chistogramnd___pyx_scope_struct__chistogramnd.tp_print = 0;
+ #endif
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4silx_4math_12chistogramnd___pyx_scope_struct__chistogramnd.tp_dictoffset && __pyx_type_4silx_4math_12chistogramnd___pyx_scope_struct__chistogramnd.tp_getattro == PyObject_GenericGetAttr)) {
__pyx_type_4silx_4math_12chistogramnd___pyx_scope_struct__chistogramnd.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
}
@@ -28043,12 +28068,16 @@ static int __Pyx_modinit_type_init_code(void) {
__pyx_vtabptr_array = &__pyx_vtable_array;
__pyx_vtable_array.get_memview = (PyObject *(*)(struct __pyx_array_obj *))__pyx_array_get_memview;
if (PyType_Ready(&__pyx_type___pyx_array) < 0) __PYX_ERR(2, 105, __pyx_L1_error)
+ #if PY_VERSION_HEX < 0x030800B1
__pyx_type___pyx_array.tp_print = 0;
+ #endif
if (__Pyx_SetVtable(__pyx_type___pyx_array.tp_dict, __pyx_vtabptr_array) < 0) __PYX_ERR(2, 105, __pyx_L1_error)
if (__Pyx_setup_reduce((PyObject*)&__pyx_type___pyx_array) < 0) __PYX_ERR(2, 105, __pyx_L1_error)
__pyx_array_type = &__pyx_type___pyx_array;
if (PyType_Ready(&__pyx_type___pyx_MemviewEnum) < 0) __PYX_ERR(2, 279, __pyx_L1_error)
+ #if PY_VERSION_HEX < 0x030800B1
__pyx_type___pyx_MemviewEnum.tp_print = 0;
+ #endif
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_MemviewEnum.tp_dictoffset && __pyx_type___pyx_MemviewEnum.tp_getattro == PyObject_GenericGetAttr)) {
__pyx_type___pyx_MemviewEnum.tp_getattro = __Pyx_PyObject_GenericGetAttr;
}
@@ -28063,7 +28092,9 @@ static int __Pyx_modinit_type_init_code(void) {
__pyx_vtable_memoryview.convert_item_to_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *))__pyx_memoryview_convert_item_to_object;
__pyx_vtable_memoryview.assign_item_from_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *, PyObject *))__pyx_memoryview_assign_item_from_object;
if (PyType_Ready(&__pyx_type___pyx_memoryview) < 0) __PYX_ERR(2, 330, __pyx_L1_error)
+ #if PY_VERSION_HEX < 0x030800B1
__pyx_type___pyx_memoryview.tp_print = 0;
+ #endif
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_memoryview.tp_dictoffset && __pyx_type___pyx_memoryview.tp_getattro == PyObject_GenericGetAttr)) {
__pyx_type___pyx_memoryview.tp_getattro = __Pyx_PyObject_GenericGetAttr;
}
@@ -28076,7 +28107,9 @@ static int __Pyx_modinit_type_init_code(void) {
__pyx_vtable__memoryviewslice.__pyx_base.assign_item_from_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *, PyObject *))__pyx_memoryviewslice_assign_item_from_object;
__pyx_type___pyx_memoryviewslice.tp_base = __pyx_memoryview_type;
if (PyType_Ready(&__pyx_type___pyx_memoryviewslice) < 0) __PYX_ERR(2, 961, __pyx_L1_error)
+ #if PY_VERSION_HEX < 0x030800B1
__pyx_type___pyx_memoryviewslice.tp_print = 0;
+ #endif
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_memoryviewslice.tp_dictoffset && __pyx_type___pyx_memoryviewslice.tp_getattro == PyObject_GenericGetAttr)) {
__pyx_type___pyx_memoryviewslice.tp_getattro = __Pyx_PyObject_GenericGetAttr;
}
@@ -30156,6 +30189,9 @@ static PyTypeObject __pyx_CyFunctionType_type = {
#if PY_VERSION_HEX >= 0x030400a1
0,
#endif
+#if PY_VERSION_HEX >= 0x030800b1
+ 0,
+#endif
};
static int __pyx_CyFunction_init(void) {
__pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type);
diff --git a/silx/math/chistogramnd_lut.c b/silx/math/chistogramnd_lut.c
index 8c16577..08a2829 100644
--- a/silx/math/chistogramnd_lut.c
+++ b/silx/math/chistogramnd_lut.c
@@ -1,15 +1,15 @@
-/* Generated by Cython 0.29.7 */
+/* Generated by Cython 0.29.11 */
/* BEGIN: Cython Metadata
{
"distutils": {
"depends": [
- "/media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/numpy/core/include/numpy/arrayobject.h",
- "/media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/numpy/core/include/numpy/ufuncobject.h"
+ "/opt/python/cp36-cp36m/lib/python3.6/site-packages/numpy/core/include/numpy/arrayobject.h",
+ "/opt/python/cp36-cp36m/lib/python3.6/site-packages/numpy/core/include/numpy/ufuncobject.h"
],
"include_dirs": [
"silx/math/histogramnd/include",
- "/media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/numpy/core/include"
+ "/opt/python/cp36-cp36m/lib/python3.6/site-packages/numpy/core/include"
],
"language": "c",
"name": "silx.math.chistogramnd_lut",
@@ -28,8 +28,8 @@ END: Cython Metadata */
#elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
#error Cython requires Python 2.6+ or Python 3.3+.
#else
-#define CYTHON_ABI "0_29_7"
-#define CYTHON_HEX_VERSION 0x001D07F0
+#define CYTHON_ABI "0_29_11"
+#define CYTHON_HEX_VERSION 0x001D0BF0
#define CYTHON_FUTURE_DIVISION 1
#include <stddef.h>
#ifndef offsetof
@@ -331,8 +331,16 @@ END: Cython Metadata */
#define __Pyx_DefaultClassType PyClass_Type
#else
#define __Pyx_BUILTIN_MODULE_NAME "builtins"
+#if PY_VERSION_HEX < 0x030800A4
#define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
+#elif PY_VERSION_HEX >= 0x030800B2
+ #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
+ PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
+#else
+ #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
+ PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
+#endif
#define __Pyx_DefaultClassType PyType_Type
#endif
#ifndef Py_TPFLAGS_CHECKTYPES
@@ -960,7 +968,7 @@ typedef struct {
} __Pyx_BufFmt_Context;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":776
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":776
* # in Cython to enable them only on the right systems.
*
* ctypedef npy_int8 int8_t # <<<<<<<<<<<<<<
@@ -969,7 +977,7 @@ typedef struct {
*/
typedef npy_int8 __pyx_t_5numpy_int8_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":777
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":777
*
* ctypedef npy_int8 int8_t
* ctypedef npy_int16 int16_t # <<<<<<<<<<<<<<
@@ -978,7 +986,7 @@ typedef npy_int8 __pyx_t_5numpy_int8_t;
*/
typedef npy_int16 __pyx_t_5numpy_int16_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":778
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":778
* ctypedef npy_int8 int8_t
* ctypedef npy_int16 int16_t
* ctypedef npy_int32 int32_t # <<<<<<<<<<<<<<
@@ -987,7 +995,7 @@ typedef npy_int16 __pyx_t_5numpy_int16_t;
*/
typedef npy_int32 __pyx_t_5numpy_int32_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":779
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":779
* ctypedef npy_int16 int16_t
* ctypedef npy_int32 int32_t
* ctypedef npy_int64 int64_t # <<<<<<<<<<<<<<
@@ -996,7 +1004,7 @@ typedef npy_int32 __pyx_t_5numpy_int32_t;
*/
typedef npy_int64 __pyx_t_5numpy_int64_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":783
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":783
* #ctypedef npy_int128 int128_t
*
* ctypedef npy_uint8 uint8_t # <<<<<<<<<<<<<<
@@ -1005,7 +1013,7 @@ typedef npy_int64 __pyx_t_5numpy_int64_t;
*/
typedef npy_uint8 __pyx_t_5numpy_uint8_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":784
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":784
*
* ctypedef npy_uint8 uint8_t
* ctypedef npy_uint16 uint16_t # <<<<<<<<<<<<<<
@@ -1014,7 +1022,7 @@ typedef npy_uint8 __pyx_t_5numpy_uint8_t;
*/
typedef npy_uint16 __pyx_t_5numpy_uint16_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":785
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":785
* ctypedef npy_uint8 uint8_t
* ctypedef npy_uint16 uint16_t
* ctypedef npy_uint32 uint32_t # <<<<<<<<<<<<<<
@@ -1023,7 +1031,7 @@ typedef npy_uint16 __pyx_t_5numpy_uint16_t;
*/
typedef npy_uint32 __pyx_t_5numpy_uint32_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":786
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":786
* ctypedef npy_uint16 uint16_t
* ctypedef npy_uint32 uint32_t
* ctypedef npy_uint64 uint64_t # <<<<<<<<<<<<<<
@@ -1032,7 +1040,7 @@ typedef npy_uint32 __pyx_t_5numpy_uint32_t;
*/
typedef npy_uint64 __pyx_t_5numpy_uint64_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":790
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":790
* #ctypedef npy_uint128 uint128_t
*
* ctypedef npy_float32 float32_t # <<<<<<<<<<<<<<
@@ -1041,7 +1049,7 @@ typedef npy_uint64 __pyx_t_5numpy_uint64_t;
*/
typedef npy_float32 __pyx_t_5numpy_float32_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":791
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":791
*
* ctypedef npy_float32 float32_t
* ctypedef npy_float64 float64_t # <<<<<<<<<<<<<<
@@ -1050,7 +1058,7 @@ typedef npy_float32 __pyx_t_5numpy_float32_t;
*/
typedef npy_float64 __pyx_t_5numpy_float64_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":800
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":800
* # The int types are mapped a bit surprising --
* # numpy.int corresponds to 'l' and numpy.long to 'q'
* ctypedef npy_long int_t # <<<<<<<<<<<<<<
@@ -1059,7 +1067,7 @@ typedef npy_float64 __pyx_t_5numpy_float64_t;
*/
typedef npy_long __pyx_t_5numpy_int_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":801
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":801
* # numpy.int corresponds to 'l' and numpy.long to 'q'
* ctypedef npy_long int_t
* ctypedef npy_longlong long_t # <<<<<<<<<<<<<<
@@ -1068,7 +1076,7 @@ typedef npy_long __pyx_t_5numpy_int_t;
*/
typedef npy_longlong __pyx_t_5numpy_long_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":802
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":802
* ctypedef npy_long int_t
* ctypedef npy_longlong long_t
* ctypedef npy_longlong longlong_t # <<<<<<<<<<<<<<
@@ -1077,7 +1085,7 @@ typedef npy_longlong __pyx_t_5numpy_long_t;
*/
typedef npy_longlong __pyx_t_5numpy_longlong_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":804
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":804
* ctypedef npy_longlong longlong_t
*
* ctypedef npy_ulong uint_t # <<<<<<<<<<<<<<
@@ -1086,7 +1094,7 @@ typedef npy_longlong __pyx_t_5numpy_longlong_t;
*/
typedef npy_ulong __pyx_t_5numpy_uint_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":805
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":805
*
* ctypedef npy_ulong uint_t
* ctypedef npy_ulonglong ulong_t # <<<<<<<<<<<<<<
@@ -1095,7 +1103,7 @@ typedef npy_ulong __pyx_t_5numpy_uint_t;
*/
typedef npy_ulonglong __pyx_t_5numpy_ulong_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":806
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":806
* ctypedef npy_ulong uint_t
* ctypedef npy_ulonglong ulong_t
* ctypedef npy_ulonglong ulonglong_t # <<<<<<<<<<<<<<
@@ -1104,7 +1112,7 @@ typedef npy_ulonglong __pyx_t_5numpy_ulong_t;
*/
typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":808
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":808
* ctypedef npy_ulonglong ulonglong_t
*
* ctypedef npy_intp intp_t # <<<<<<<<<<<<<<
@@ -1113,7 +1121,7 @@ typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t;
*/
typedef npy_intp __pyx_t_5numpy_intp_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":809
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":809
*
* ctypedef npy_intp intp_t
* ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<<
@@ -1122,7 +1130,7 @@ typedef npy_intp __pyx_t_5numpy_intp_t;
*/
typedef npy_uintp __pyx_t_5numpy_uintp_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":811
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":811
* ctypedef npy_uintp uintp_t
*
* ctypedef npy_double float_t # <<<<<<<<<<<<<<
@@ -1131,7 +1139,7 @@ typedef npy_uintp __pyx_t_5numpy_uintp_t;
*/
typedef npy_double __pyx_t_5numpy_float_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":812
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":812
*
* ctypedef npy_double float_t
* ctypedef npy_double double_t # <<<<<<<<<<<<<<
@@ -1140,7 +1148,7 @@ typedef npy_double __pyx_t_5numpy_float_t;
*/
typedef npy_double __pyx_t_5numpy_double_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":813
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":813
* ctypedef npy_double float_t
* ctypedef npy_double double_t
* ctypedef npy_longdouble longdouble_t # <<<<<<<<<<<<<<
@@ -1179,7 +1187,7 @@ struct __pyx_MemviewEnum_obj;
struct __pyx_memoryview_obj;
struct __pyx_memoryviewslice_obj;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":815
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":815
* ctypedef npy_longdouble longdouble_t
*
* ctypedef npy_cfloat cfloat_t # <<<<<<<<<<<<<<
@@ -1188,7 +1196,7 @@ struct __pyx_memoryviewslice_obj;
*/
typedef npy_cfloat __pyx_t_5numpy_cfloat_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":816
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":816
*
* ctypedef npy_cfloat cfloat_t
* ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<<
@@ -1197,7 +1205,7 @@ typedef npy_cfloat __pyx_t_5numpy_cfloat_t;
*/
typedef npy_cdouble __pyx_t_5numpy_cdouble_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":817
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":817
* ctypedef npy_cfloat cfloat_t
* ctypedef npy_cdouble cdouble_t
* ctypedef npy_clongdouble clongdouble_t # <<<<<<<<<<<<<<
@@ -1206,7 +1214,7 @@ typedef npy_cdouble __pyx_t_5numpy_cdouble_t;
*/
typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":819
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":819
* ctypedef npy_clongdouble clongdouble_t
*
* ctypedef npy_cdouble complex_t # <<<<<<<<<<<<<<
@@ -32658,7 +32666,7 @@ static PyObject *__pyx_pf_4silx_4math_16chistogramnd_lut_128_histogramnd_get_lut
return __pyx_r;
}
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":258
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":258
* # experimental exception made for __getbuffer__ and __releasebuffer__
* # -- the details of this may change.
* def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<<
@@ -32707,7 +32715,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
__Pyx_GIVEREF(__pyx_v_info->obj);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":265
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":265
*
* cdef int i, ndim
* cdef int endian_detector = 1 # <<<<<<<<<<<<<<
@@ -32716,7 +32724,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_endian_detector = 1;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":266
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":266
* cdef int i, ndim
* cdef int endian_detector = 1
* cdef bint little_endian = ((<char*>&endian_detector)[0] != 0) # <<<<<<<<<<<<<<
@@ -32725,7 +32733,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":268
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":268
* cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
*
* ndim = PyArray_NDIM(self) # <<<<<<<<<<<<<<
@@ -32734,7 +32742,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_ndim = PyArray_NDIM(__pyx_v_self);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":270
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":270
* ndim = PyArray_NDIM(self)
*
* if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<<
@@ -32748,7 +32756,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
goto __pyx_L4_bool_binop_done;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":271
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":271
*
* if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
* and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): # <<<<<<<<<<<<<<
@@ -32759,7 +32767,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_t_1 = __pyx_t_2;
__pyx_L4_bool_binop_done:;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":270
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":270
* ndim = PyArray_NDIM(self)
*
* if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<<
@@ -32768,7 +32776,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
if (unlikely(__pyx_t_1)) {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":272
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":272
* if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
* and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)):
* raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<<
@@ -32781,7 +32789,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__PYX_ERR(1, 272, __pyx_L1_error)
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":270
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":270
* ndim = PyArray_NDIM(self)
*
* if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<<
@@ -32790,7 +32798,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":274
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":274
* raise ValueError(u"ndarray is not C contiguous")
*
* if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<<
@@ -32804,7 +32812,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
goto __pyx_L7_bool_binop_done;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":275
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":275
*
* if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
* and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): # <<<<<<<<<<<<<<
@@ -32815,7 +32823,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_t_1 = __pyx_t_2;
__pyx_L7_bool_binop_done:;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":274
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":274
* raise ValueError(u"ndarray is not C contiguous")
*
* if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<<
@@ -32824,7 +32832,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
if (unlikely(__pyx_t_1)) {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":276
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":276
* if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
* and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)):
* raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<<
@@ -32837,7 +32845,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__PYX_ERR(1, 276, __pyx_L1_error)
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":274
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":274
* raise ValueError(u"ndarray is not C contiguous")
*
* if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<<
@@ -32846,7 +32854,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":278
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":278
* raise ValueError(u"ndarray is not Fortran contiguous")
*
* info.buf = PyArray_DATA(self) # <<<<<<<<<<<<<<
@@ -32855,7 +32863,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_info->buf = PyArray_DATA(__pyx_v_self);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":279
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":279
*
* info.buf = PyArray_DATA(self)
* info.ndim = ndim # <<<<<<<<<<<<<<
@@ -32864,7 +32872,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_info->ndim = __pyx_v_ndim;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":280
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":280
* info.buf = PyArray_DATA(self)
* info.ndim = ndim
* if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<<
@@ -32874,7 +32882,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0);
if (__pyx_t_1) {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":283
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":283
* # Allocate new buffer for strides and shape info.
* # This is allocated as one block, strides first.
* info.strides = <Py_ssize_t*>PyObject_Malloc(sizeof(Py_ssize_t) * 2 * <size_t>ndim) # <<<<<<<<<<<<<<
@@ -32883,7 +32891,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_info->strides = ((Py_ssize_t *)PyObject_Malloc((((sizeof(Py_ssize_t)) * 2) * ((size_t)__pyx_v_ndim))));
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":284
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":284
* # This is allocated as one block, strides first.
* info.strides = <Py_ssize_t*>PyObject_Malloc(sizeof(Py_ssize_t) * 2 * <size_t>ndim)
* info.shape = info.strides + ndim # <<<<<<<<<<<<<<
@@ -32892,7 +32900,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_info->shape = (__pyx_v_info->strides + __pyx_v_ndim);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":285
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":285
* info.strides = <Py_ssize_t*>PyObject_Malloc(sizeof(Py_ssize_t) * 2 * <size_t>ndim)
* info.shape = info.strides + ndim
* for i in range(ndim): # <<<<<<<<<<<<<<
@@ -32904,7 +32912,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
__pyx_v_i = __pyx_t_6;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":286
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":286
* info.shape = info.strides + ndim
* for i in range(ndim):
* info.strides[i] = PyArray_STRIDES(self)[i] # <<<<<<<<<<<<<<
@@ -32913,7 +32921,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
(__pyx_v_info->strides[__pyx_v_i]) = (PyArray_STRIDES(__pyx_v_self)[__pyx_v_i]);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":287
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":287
* for i in range(ndim):
* info.strides[i] = PyArray_STRIDES(self)[i]
* info.shape[i] = PyArray_DIMS(self)[i] # <<<<<<<<<<<<<<
@@ -32923,7 +32931,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
(__pyx_v_info->shape[__pyx_v_i]) = (PyArray_DIMS(__pyx_v_self)[__pyx_v_i]);
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":280
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":280
* info.buf = PyArray_DATA(self)
* info.ndim = ndim
* if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<<
@@ -32933,7 +32941,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
goto __pyx_L9;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":289
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":289
* info.shape[i] = PyArray_DIMS(self)[i]
* else:
* info.strides = <Py_ssize_t*>PyArray_STRIDES(self) # <<<<<<<<<<<<<<
@@ -32943,7 +32951,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
/*else*/ {
__pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(__pyx_v_self));
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":290
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":290
* else:
* info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
* info.shape = <Py_ssize_t*>PyArray_DIMS(self) # <<<<<<<<<<<<<<
@@ -32954,7 +32962,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
}
__pyx_L9:;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":291
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":291
* info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
* info.shape = <Py_ssize_t*>PyArray_DIMS(self)
* info.suboffsets = NULL # <<<<<<<<<<<<<<
@@ -32963,7 +32971,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_info->suboffsets = NULL;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":292
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":292
* info.shape = <Py_ssize_t*>PyArray_DIMS(self)
* info.suboffsets = NULL
* info.itemsize = PyArray_ITEMSIZE(self) # <<<<<<<<<<<<<<
@@ -32972,7 +32980,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_info->itemsize = PyArray_ITEMSIZE(__pyx_v_self);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":293
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":293
* info.suboffsets = NULL
* info.itemsize = PyArray_ITEMSIZE(self)
* info.readonly = not PyArray_ISWRITEABLE(self) # <<<<<<<<<<<<<<
@@ -32981,7 +32989,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_info->readonly = (!(PyArray_ISWRITEABLE(__pyx_v_self) != 0));
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":296
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":296
*
* cdef int t
* cdef char* f = NULL # <<<<<<<<<<<<<<
@@ -32990,7 +32998,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_f = NULL;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":297
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":297
* cdef int t
* cdef char* f = NULL
* cdef dtype descr = <dtype>PyArray_DESCR(self) # <<<<<<<<<<<<<<
@@ -33003,7 +33011,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_v_descr = ((PyArray_Descr *)__pyx_t_3);
__pyx_t_3 = 0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":300
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":300
* cdef int offset
*
* info.obj = self # <<<<<<<<<<<<<<
@@ -33016,7 +33024,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__Pyx_DECREF(__pyx_v_info->obj);
__pyx_v_info->obj = ((PyObject *)__pyx_v_self);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":302
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":302
* info.obj = self
*
* if not PyDataType_HASFIELDS(descr): # <<<<<<<<<<<<<<
@@ -33026,7 +33034,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_t_1 = ((!(PyDataType_HASFIELDS(__pyx_v_descr) != 0)) != 0);
if (__pyx_t_1) {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":303
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":303
*
* if not PyDataType_HASFIELDS(descr):
* t = descr.type_num # <<<<<<<<<<<<<<
@@ -33036,7 +33044,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_t_4 = __pyx_v_descr->type_num;
__pyx_v_t = __pyx_t_4;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":304
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":304
* if not PyDataType_HASFIELDS(descr):
* t = descr.type_num
* if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
@@ -33056,7 +33064,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
}
__pyx_L15_next_or:;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":305
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":305
* t = descr.type_num
* if ((descr.byteorder == c'>' and little_endian) or
* (descr.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<<
@@ -33073,7 +33081,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_t_1 = __pyx_t_2;
__pyx_L14_bool_binop_done:;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":304
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":304
* if not PyDataType_HASFIELDS(descr):
* t = descr.type_num
* if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
@@ -33082,7 +33090,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
if (unlikely(__pyx_t_1)) {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":306
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":306
* if ((descr.byteorder == c'>' and little_endian) or
* (descr.byteorder == c'<' and not little_endian)):
* raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<<
@@ -33095,7 +33103,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__PYX_ERR(1, 306, __pyx_L1_error)
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":304
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":304
* if not PyDataType_HASFIELDS(descr):
* t = descr.type_num
* if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
@@ -33104,7 +33112,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":307
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":307
* (descr.byteorder == c'<' and not little_endian)):
* raise ValueError(u"Non-native byte order not supported")
* if t == NPY_BYTE: f = "b" # <<<<<<<<<<<<<<
@@ -33117,7 +33125,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_UBYTE:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":308
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":308
* raise ValueError(u"Non-native byte order not supported")
* if t == NPY_BYTE: f = "b"
* elif t == NPY_UBYTE: f = "B" # <<<<<<<<<<<<<<
@@ -33128,7 +33136,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_SHORT:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":309
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":309
* if t == NPY_BYTE: f = "b"
* elif t == NPY_UBYTE: f = "B"
* elif t == NPY_SHORT: f = "h" # <<<<<<<<<<<<<<
@@ -33139,7 +33147,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_USHORT:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":310
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":310
* elif t == NPY_UBYTE: f = "B"
* elif t == NPY_SHORT: f = "h"
* elif t == NPY_USHORT: f = "H" # <<<<<<<<<<<<<<
@@ -33150,7 +33158,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_INT:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":311
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":311
* elif t == NPY_SHORT: f = "h"
* elif t == NPY_USHORT: f = "H"
* elif t == NPY_INT: f = "i" # <<<<<<<<<<<<<<
@@ -33161,7 +33169,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_UINT:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":312
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":312
* elif t == NPY_USHORT: f = "H"
* elif t == NPY_INT: f = "i"
* elif t == NPY_UINT: f = "I" # <<<<<<<<<<<<<<
@@ -33172,7 +33180,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_LONG:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":313
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":313
* elif t == NPY_INT: f = "i"
* elif t == NPY_UINT: f = "I"
* elif t == NPY_LONG: f = "l" # <<<<<<<<<<<<<<
@@ -33183,7 +33191,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_ULONG:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":314
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":314
* elif t == NPY_UINT: f = "I"
* elif t == NPY_LONG: f = "l"
* elif t == NPY_ULONG: f = "L" # <<<<<<<<<<<<<<
@@ -33194,7 +33202,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_LONGLONG:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":315
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":315
* elif t == NPY_LONG: f = "l"
* elif t == NPY_ULONG: f = "L"
* elif t == NPY_LONGLONG: f = "q" # <<<<<<<<<<<<<<
@@ -33205,7 +33213,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_ULONGLONG:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":316
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":316
* elif t == NPY_ULONG: f = "L"
* elif t == NPY_LONGLONG: f = "q"
* elif t == NPY_ULONGLONG: f = "Q" # <<<<<<<<<<<<<<
@@ -33216,7 +33224,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_FLOAT:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":317
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":317
* elif t == NPY_LONGLONG: f = "q"
* elif t == NPY_ULONGLONG: f = "Q"
* elif t == NPY_FLOAT: f = "f" # <<<<<<<<<<<<<<
@@ -33227,7 +33235,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_DOUBLE:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":318
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":318
* elif t == NPY_ULONGLONG: f = "Q"
* elif t == NPY_FLOAT: f = "f"
* elif t == NPY_DOUBLE: f = "d" # <<<<<<<<<<<<<<
@@ -33238,7 +33246,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_LONGDOUBLE:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":319
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":319
* elif t == NPY_FLOAT: f = "f"
* elif t == NPY_DOUBLE: f = "d"
* elif t == NPY_LONGDOUBLE: f = "g" # <<<<<<<<<<<<<<
@@ -33249,7 +33257,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_CFLOAT:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":320
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":320
* elif t == NPY_DOUBLE: f = "d"
* elif t == NPY_LONGDOUBLE: f = "g"
* elif t == NPY_CFLOAT: f = "Zf" # <<<<<<<<<<<<<<
@@ -33260,7 +33268,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_CDOUBLE:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":321
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":321
* elif t == NPY_LONGDOUBLE: f = "g"
* elif t == NPY_CFLOAT: f = "Zf"
* elif t == NPY_CDOUBLE: f = "Zd" # <<<<<<<<<<<<<<
@@ -33271,7 +33279,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_CLONGDOUBLE:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":322
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":322
* elif t == NPY_CFLOAT: f = "Zf"
* elif t == NPY_CDOUBLE: f = "Zd"
* elif t == NPY_CLONGDOUBLE: f = "Zg" # <<<<<<<<<<<<<<
@@ -33282,7 +33290,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_OBJECT:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":323
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":323
* elif t == NPY_CDOUBLE: f = "Zd"
* elif t == NPY_CLONGDOUBLE: f = "Zg"
* elif t == NPY_OBJECT: f = "O" # <<<<<<<<<<<<<<
@@ -33293,7 +33301,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
default:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":325
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":325
* elif t == NPY_OBJECT: f = "O"
* else:
* raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<<
@@ -33314,7 +33322,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":326
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":326
* else:
* raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
* info.format = f # <<<<<<<<<<<<<<
@@ -33323,7 +33331,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_info->format = __pyx_v_f;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":327
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":327
* raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
* info.format = f
* return # <<<<<<<<<<<<<<
@@ -33333,7 +33341,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_r = 0;
goto __pyx_L0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":302
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":302
* info.obj = self
*
* if not PyDataType_HASFIELDS(descr): # <<<<<<<<<<<<<<
@@ -33342,7 +33350,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":329
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":329
* return
* else:
* info.format = <char*>PyObject_Malloc(_buffer_format_string_len) # <<<<<<<<<<<<<<
@@ -33352,7 +33360,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
/*else*/ {
__pyx_v_info->format = ((char *)PyObject_Malloc(0xFF));
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":330
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":330
* else:
* info.format = <char*>PyObject_Malloc(_buffer_format_string_len)
* info.format[0] = c'^' # Native data types, manual alignment # <<<<<<<<<<<<<<
@@ -33361,7 +33369,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
(__pyx_v_info->format[0]) = '^';
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":331
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":331
* info.format = <char*>PyObject_Malloc(_buffer_format_string_len)
* info.format[0] = c'^' # Native data types, manual alignment
* offset = 0 # <<<<<<<<<<<<<<
@@ -33370,7 +33378,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_offset = 0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":332
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":332
* info.format[0] = c'^' # Native data types, manual alignment
* offset = 0
* f = _util_dtypestring(descr, info.format + 1, # <<<<<<<<<<<<<<
@@ -33380,7 +33388,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 0xFF), (&__pyx_v_offset)); if (unlikely(__pyx_t_9 == ((char *)NULL))) __PYX_ERR(1, 332, __pyx_L1_error)
__pyx_v_f = __pyx_t_9;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":335
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":335
* info.format + _buffer_format_string_len,
* &offset)
* f[0] = c'\0' # Terminate format string # <<<<<<<<<<<<<<
@@ -33390,7 +33398,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
(__pyx_v_f[0]) = '\x00';
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":258
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":258
* # experimental exception made for __getbuffer__ and __releasebuffer__
* # -- the details of this may change.
* def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<<
@@ -33422,7 +33430,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
return __pyx_r;
}
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":337
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":337
* f[0] = c'\0' # Terminate format string
*
* def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<<
@@ -33446,7 +33454,7 @@ static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_s
int __pyx_t_1;
__Pyx_RefNannySetupContext("__releasebuffer__", 0);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":338
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":338
*
* def __releasebuffer__(ndarray self, Py_buffer* info):
* if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<<
@@ -33456,7 +33464,7 @@ static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_s
__pyx_t_1 = (PyArray_HASFIELDS(__pyx_v_self) != 0);
if (__pyx_t_1) {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":339
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":339
* def __releasebuffer__(ndarray self, Py_buffer* info):
* if PyArray_HASFIELDS(self):
* PyObject_Free(info.format) # <<<<<<<<<<<<<<
@@ -33465,7 +33473,7 @@ static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_s
*/
PyObject_Free(__pyx_v_info->format);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":338
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":338
*
* def __releasebuffer__(ndarray self, Py_buffer* info):
* if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<<
@@ -33474,7 +33482,7 @@ static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_s
*/
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":340
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":340
* if PyArray_HASFIELDS(self):
* PyObject_Free(info.format)
* if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<<
@@ -33484,7 +33492,7 @@ static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_s
__pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0);
if (__pyx_t_1) {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":341
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":341
* PyObject_Free(info.format)
* if sizeof(npy_intp) != sizeof(Py_ssize_t):
* PyObject_Free(info.strides) # <<<<<<<<<<<<<<
@@ -33493,7 +33501,7 @@ static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_s
*/
PyObject_Free(__pyx_v_info->strides);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":340
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":340
* if PyArray_HASFIELDS(self):
* PyObject_Free(info.format)
* if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<<
@@ -33502,7 +33510,7 @@ static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_s
*/
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":337
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":337
* f[0] = c'\0' # Terminate format string
*
* def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<<
@@ -33514,7 +33522,7 @@ static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_s
__Pyx_RefNannyFinishContext();
}
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":821
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":821
* ctypedef npy_cdouble complex_t
*
* cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<<
@@ -33528,7 +33536,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__
PyObject *__pyx_t_1 = NULL;
__Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":822
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":822
*
* cdef inline object PyArray_MultiIterNew1(a):
* return PyArray_MultiIterNew(1, <void*>a) # <<<<<<<<<<<<<<
@@ -33542,7 +33550,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":821
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":821
* ctypedef npy_cdouble complex_t
*
* cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<<
@@ -33561,7 +33569,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__
return __pyx_r;
}
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":824
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":824
* return PyArray_MultiIterNew(1, <void*>a)
*
* cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<<
@@ -33575,7 +33583,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__
PyObject *__pyx_t_1 = NULL;
__Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":825
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":825
*
* cdef inline object PyArray_MultiIterNew2(a, b):
* return PyArray_MultiIterNew(2, <void*>a, <void*>b) # <<<<<<<<<<<<<<
@@ -33589,7 +33597,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":824
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":824
* return PyArray_MultiIterNew(1, <void*>a)
*
* cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<<
@@ -33608,7 +33616,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__
return __pyx_r;
}
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":827
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":827
* return PyArray_MultiIterNew(2, <void*>a, <void*>b)
*
* cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<<
@@ -33622,7 +33630,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__
PyObject *__pyx_t_1 = NULL;
__Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":828
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":828
*
* cdef inline object PyArray_MultiIterNew3(a, b, c):
* return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c) # <<<<<<<<<<<<<<
@@ -33636,7 +33644,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":827
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":827
* return PyArray_MultiIterNew(2, <void*>a, <void*>b)
*
* cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<<
@@ -33655,7 +33663,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__
return __pyx_r;
}
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":830
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":830
* return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
*
* cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<<
@@ -33669,7 +33677,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__
PyObject *__pyx_t_1 = NULL;
__Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":831
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":831
*
* cdef inline object PyArray_MultiIterNew4(a, b, c, d):
* return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d) # <<<<<<<<<<<<<<
@@ -33683,7 +33691,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":830
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":830
* return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
*
* cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<<
@@ -33702,7 +33710,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__
return __pyx_r;
}
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":833
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":833
* return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
*
* cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<<
@@ -33716,7 +33724,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__
PyObject *__pyx_t_1 = NULL;
__Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":834
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":834
*
* cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
* return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e) # <<<<<<<<<<<<<<
@@ -33730,7 +33738,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":833
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":833
* return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
*
* cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<<
@@ -33749,7 +33757,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__
return __pyx_r;
}
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":836
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":836
* return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
*
* cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<<
@@ -33763,7 +33771,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__
int __pyx_t_1;
__Pyx_RefNannySetupContext("PyDataType_SHAPE", 0);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":837
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":837
*
* cdef inline tuple PyDataType_SHAPE(dtype d):
* if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<<
@@ -33773,7 +33781,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__
__pyx_t_1 = (PyDataType_HASSUBARRAY(__pyx_v_d) != 0);
if (__pyx_t_1) {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":838
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":838
* cdef inline tuple PyDataType_SHAPE(dtype d):
* if PyDataType_HASSUBARRAY(d):
* return <tuple>d.subarray.shape # <<<<<<<<<<<<<<
@@ -33785,7 +33793,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__
__pyx_r = ((PyObject*)__pyx_v_d->subarray->shape);
goto __pyx_L0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":837
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":837
*
* cdef inline tuple PyDataType_SHAPE(dtype d):
* if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<<
@@ -33794,7 +33802,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__
*/
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":840
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":840
* return <tuple>d.subarray.shape
* else:
* return () # <<<<<<<<<<<<<<
@@ -33808,7 +33816,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__
goto __pyx_L0;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":836
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":836
* return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
*
* cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<<
@@ -33823,7 +33831,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__
return __pyx_r;
}
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":842
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":842
* return ()
*
* cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<<
@@ -33852,7 +33860,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
char *__pyx_t_9;
__Pyx_RefNannySetupContext("_util_dtypestring", 0);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":847
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":847
*
* cdef dtype child
* cdef int endian_detector = 1 # <<<<<<<<<<<<<<
@@ -33861,7 +33869,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
*/
__pyx_v_endian_detector = 1;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":848
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":848
* cdef dtype child
* cdef int endian_detector = 1
* cdef bint little_endian = ((<char*>&endian_detector)[0] != 0) # <<<<<<<<<<<<<<
@@ -33870,7 +33878,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
*/
__pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":851
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":851
* cdef tuple fields
*
* for childname in descr.names: # <<<<<<<<<<<<<<
@@ -33893,7 +33901,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__Pyx_XDECREF_SET(__pyx_v_childname, __pyx_t_3);
__pyx_t_3 = 0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":852
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":852
*
* for childname in descr.names:
* fields = descr.fields[childname] # <<<<<<<<<<<<<<
@@ -33910,7 +33918,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__Pyx_XDECREF_SET(__pyx_v_fields, ((PyObject*)__pyx_t_3));
__pyx_t_3 = 0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":853
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":853
* for childname in descr.names:
* fields = descr.fields[childname]
* child, new_offset = fields # <<<<<<<<<<<<<<
@@ -33945,7 +33953,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__Pyx_XDECREF_SET(__pyx_v_new_offset, __pyx_t_4);
__pyx_t_4 = 0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":855
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":855
* child, new_offset = fields
*
* if (end - f) - <int>(new_offset - offset[0]) < 15: # <<<<<<<<<<<<<<
@@ -33962,7 +33970,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__pyx_t_6 = ((((__pyx_v_end - __pyx_v_f) - ((int)__pyx_t_5)) < 15) != 0);
if (unlikely(__pyx_t_6)) {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":856
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":856
*
* if (end - f) - <int>(new_offset - offset[0]) < 15:
* raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<<
@@ -33975,7 +33983,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__PYX_ERR(1, 856, __pyx_L1_error)
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":855
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":855
* child, new_offset = fields
*
* if (end - f) - <int>(new_offset - offset[0]) < 15: # <<<<<<<<<<<<<<
@@ -33984,7 +33992,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
*/
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":858
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":858
* raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
*
* if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
@@ -34004,7 +34012,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
}
__pyx_L8_next_or:;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":859
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":859
*
* if ((child.byteorder == c'>' and little_endian) or
* (child.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<<
@@ -34021,7 +34029,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__pyx_t_6 = __pyx_t_7;
__pyx_L7_bool_binop_done:;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":858
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":858
* raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
*
* if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
@@ -34030,7 +34038,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
*/
if (unlikely(__pyx_t_6)) {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":860
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":860
* if ((child.byteorder == c'>' and little_endian) or
* (child.byteorder == c'<' and not little_endian)):
* raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<<
@@ -34043,7 +34051,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__PYX_ERR(1, 860, __pyx_L1_error)
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":858
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":858
* raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
*
* if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
@@ -34052,7 +34060,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
*/
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":870
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":870
*
* # Output padding bytes
* while offset[0] < new_offset: # <<<<<<<<<<<<<<
@@ -34068,7 +34076,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (!__pyx_t_6) break;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":871
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":871
* # Output padding bytes
* while offset[0] < new_offset:
* f[0] = 120 # "x"; pad byte # <<<<<<<<<<<<<<
@@ -34077,7 +34085,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
*/
(__pyx_v_f[0]) = 0x78;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":872
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":872
* while offset[0] < new_offset:
* f[0] = 120 # "x"; pad byte
* f += 1 # <<<<<<<<<<<<<<
@@ -34086,7 +34094,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
*/
__pyx_v_f = (__pyx_v_f + 1);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":873
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":873
* f[0] = 120 # "x"; pad byte
* f += 1
* offset[0] += 1 # <<<<<<<<<<<<<<
@@ -34097,7 +34105,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
(__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + 1);
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":875
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":875
* offset[0] += 1
*
* offset[0] += child.itemsize # <<<<<<<<<<<<<<
@@ -34107,7 +34115,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__pyx_t_8 = 0;
(__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + __pyx_v_child->elsize);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":877
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":877
* offset[0] += child.itemsize
*
* if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<<
@@ -34117,7 +34125,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__pyx_t_6 = ((!(PyDataType_HASFIELDS(__pyx_v_child) != 0)) != 0);
if (__pyx_t_6) {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":878
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":878
*
* if not PyDataType_HASFIELDS(child):
* t = child.type_num # <<<<<<<<<<<<<<
@@ -34129,7 +34137,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_4);
__pyx_t_4 = 0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":879
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":879
* if not PyDataType_HASFIELDS(child):
* t = child.type_num
* if end - f < 5: # <<<<<<<<<<<<<<
@@ -34139,7 +34147,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__pyx_t_6 = (((__pyx_v_end - __pyx_v_f) < 5) != 0);
if (unlikely(__pyx_t_6)) {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":880
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":880
* t = child.type_num
* if end - f < 5:
* raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<<
@@ -34152,7 +34160,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__PYX_ERR(1, 880, __pyx_L1_error)
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":879
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":879
* if not PyDataType_HASFIELDS(child):
* t = child.type_num
* if end - f < 5: # <<<<<<<<<<<<<<
@@ -34161,7 +34169,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
*/
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":883
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":883
*
* # Until ticket #99 is fixed, use integers to avoid warnings
* if t == NPY_BYTE: f[0] = 98 #"b" # <<<<<<<<<<<<<<
@@ -34179,7 +34187,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":884
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":884
* # Until ticket #99 is fixed, use integers to avoid warnings
* if t == NPY_BYTE: f[0] = 98 #"b"
* elif t == NPY_UBYTE: f[0] = 66 #"B" # <<<<<<<<<<<<<<
@@ -34197,7 +34205,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":885
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":885
* if t == NPY_BYTE: f[0] = 98 #"b"
* elif t == NPY_UBYTE: f[0] = 66 #"B"
* elif t == NPY_SHORT: f[0] = 104 #"h" # <<<<<<<<<<<<<<
@@ -34215,7 +34223,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":886
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":886
* elif t == NPY_UBYTE: f[0] = 66 #"B"
* elif t == NPY_SHORT: f[0] = 104 #"h"
* elif t == NPY_USHORT: f[0] = 72 #"H" # <<<<<<<<<<<<<<
@@ -34233,7 +34241,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":887
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":887
* elif t == NPY_SHORT: f[0] = 104 #"h"
* elif t == NPY_USHORT: f[0] = 72 #"H"
* elif t == NPY_INT: f[0] = 105 #"i" # <<<<<<<<<<<<<<
@@ -34251,7 +34259,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":888
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":888
* elif t == NPY_USHORT: f[0] = 72 #"H"
* elif t == NPY_INT: f[0] = 105 #"i"
* elif t == NPY_UINT: f[0] = 73 #"I" # <<<<<<<<<<<<<<
@@ -34269,7 +34277,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":889
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":889
* elif t == NPY_INT: f[0] = 105 #"i"
* elif t == NPY_UINT: f[0] = 73 #"I"
* elif t == NPY_LONG: f[0] = 108 #"l" # <<<<<<<<<<<<<<
@@ -34287,7 +34295,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":890
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":890
* elif t == NPY_UINT: f[0] = 73 #"I"
* elif t == NPY_LONG: f[0] = 108 #"l"
* elif t == NPY_ULONG: f[0] = 76 #"L" # <<<<<<<<<<<<<<
@@ -34305,7 +34313,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":891
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":891
* elif t == NPY_LONG: f[0] = 108 #"l"
* elif t == NPY_ULONG: f[0] = 76 #"L"
* elif t == NPY_LONGLONG: f[0] = 113 #"q" # <<<<<<<<<<<<<<
@@ -34323,7 +34331,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":892
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":892
* elif t == NPY_ULONG: f[0] = 76 #"L"
* elif t == NPY_LONGLONG: f[0] = 113 #"q"
* elif t == NPY_ULONGLONG: f[0] = 81 #"Q" # <<<<<<<<<<<<<<
@@ -34341,7 +34349,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":893
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":893
* elif t == NPY_LONGLONG: f[0] = 113 #"q"
* elif t == NPY_ULONGLONG: f[0] = 81 #"Q"
* elif t == NPY_FLOAT: f[0] = 102 #"f" # <<<<<<<<<<<<<<
@@ -34359,7 +34367,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":894
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":894
* elif t == NPY_ULONGLONG: f[0] = 81 #"Q"
* elif t == NPY_FLOAT: f[0] = 102 #"f"
* elif t == NPY_DOUBLE: f[0] = 100 #"d" # <<<<<<<<<<<<<<
@@ -34377,7 +34385,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":895
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":895
* elif t == NPY_FLOAT: f[0] = 102 #"f"
* elif t == NPY_DOUBLE: f[0] = 100 #"d"
* elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" # <<<<<<<<<<<<<<
@@ -34395,7 +34403,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":896
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":896
* elif t == NPY_DOUBLE: f[0] = 100 #"d"
* elif t == NPY_LONGDOUBLE: f[0] = 103 #"g"
* elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf # <<<<<<<<<<<<<<
@@ -34415,7 +34423,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":897
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":897
* elif t == NPY_LONGDOUBLE: f[0] = 103 #"g"
* elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf
* elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd # <<<<<<<<<<<<<<
@@ -34435,7 +34443,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":898
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":898
* elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf
* elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd
* elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg # <<<<<<<<<<<<<<
@@ -34455,7 +34463,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":899
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":899
* elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd
* elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
* elif t == NPY_OBJECT: f[0] = 79 #"O" # <<<<<<<<<<<<<<
@@ -34473,7 +34481,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":901
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":901
* elif t == NPY_OBJECT: f[0] = 79 #"O"
* else:
* raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<<
@@ -34492,7 +34500,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
}
__pyx_L15:;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":902
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":902
* else:
* raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
* f += 1 # <<<<<<<<<<<<<<
@@ -34501,7 +34509,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
*/
__pyx_v_f = (__pyx_v_f + 1);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":877
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":877
* offset[0] += child.itemsize
*
* if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<<
@@ -34511,7 +34519,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L13;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":906
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":906
* # Cython ignores struct boundary information ("T{...}"),
* # so don't output it
* f = _util_dtypestring(child, f, end, offset) # <<<<<<<<<<<<<<
@@ -34524,7 +34532,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
}
__pyx_L13:;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":851
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":851
* cdef tuple fields
*
* for childname in descr.names: # <<<<<<<<<<<<<<
@@ -34534,7 +34542,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":907
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":907
* # so don't output it
* f = _util_dtypestring(child, f, end, offset)
* return f # <<<<<<<<<<<<<<
@@ -34544,7 +34552,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__pyx_r = __pyx_v_f;
goto __pyx_L0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":842
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":842
* return ()
*
* cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<<
@@ -34569,7 +34577,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
return __pyx_r;
}
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1022
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1022
* int _import_umath() except -1
*
* cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<<
@@ -34581,7 +34589,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("set_array_base", 0);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1023
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1023
*
* cdef inline void set_array_base(ndarray arr, object base):
* Py_INCREF(base) # important to do this before stealing the reference below! # <<<<<<<<<<<<<<
@@ -34590,7 +34598,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a
*/
Py_INCREF(__pyx_v_base);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1024
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1024
* cdef inline void set_array_base(ndarray arr, object base):
* Py_INCREF(base) # important to do this before stealing the reference below!
* PyArray_SetBaseObject(arr, base) # <<<<<<<<<<<<<<
@@ -34599,7 +34607,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a
*/
(void)(PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base));
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1022
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1022
* int _import_umath() except -1
*
* cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<<
@@ -34611,7 +34619,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a
__Pyx_RefNannyFinishContext();
}
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1026
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1026
* PyArray_SetBaseObject(arr, base)
*
* cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<<
@@ -34626,7 +34634,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py
int __pyx_t_1;
__Pyx_RefNannySetupContext("get_array_base", 0);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1027
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1027
*
* cdef inline object get_array_base(ndarray arr):
* base = PyArray_BASE(arr) # <<<<<<<<<<<<<<
@@ -34635,7 +34643,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py
*/
__pyx_v_base = PyArray_BASE(__pyx_v_arr);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1028
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1028
* cdef inline object get_array_base(ndarray arr):
* base = PyArray_BASE(arr)
* if base is NULL: # <<<<<<<<<<<<<<
@@ -34645,7 +34653,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py
__pyx_t_1 = ((__pyx_v_base == NULL) != 0);
if (__pyx_t_1) {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1029
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1029
* base = PyArray_BASE(arr)
* if base is NULL:
* return None # <<<<<<<<<<<<<<
@@ -34656,7 +34664,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
goto __pyx_L0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1028
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1028
* cdef inline object get_array_base(ndarray arr):
* base = PyArray_BASE(arr)
* if base is NULL: # <<<<<<<<<<<<<<
@@ -34665,7 +34673,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py
*/
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1030
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1030
* if base is NULL:
* return None
* return <object>base # <<<<<<<<<<<<<<
@@ -34677,7 +34685,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py
__pyx_r = ((PyObject *)__pyx_v_base);
goto __pyx_L0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1026
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1026
* PyArray_SetBaseObject(arr, base)
*
* cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<<
@@ -34692,7 +34700,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py
return __pyx_r;
}
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1034
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1034
* # Versions of the import_* functions which are more suitable for
* # Cython code.
* cdef inline int import_array() except -1: # <<<<<<<<<<<<<<
@@ -34713,7 +34721,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
PyObject *__pyx_t_8 = NULL;
__Pyx_RefNannySetupContext("import_array", 0);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1035
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1035
* # Cython code.
* cdef inline int import_array() except -1:
* try: # <<<<<<<<<<<<<<
@@ -34729,7 +34737,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
__Pyx_XGOTREF(__pyx_t_3);
/*try:*/ {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1036
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1036
* cdef inline int import_array() except -1:
* try:
* _import_array() # <<<<<<<<<<<<<<
@@ -34738,7 +34746,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
*/
__pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 1036, __pyx_L3_error)
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1035
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1035
* # Cython code.
* cdef inline int import_array() except -1:
* try: # <<<<<<<<<<<<<<
@@ -34752,7 +34760,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
goto __pyx_L8_try_end;
__pyx_L3_error:;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1037
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1037
* try:
* _import_array()
* except Exception: # <<<<<<<<<<<<<<
@@ -34767,7 +34775,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
__Pyx_GOTREF(__pyx_t_6);
__Pyx_GOTREF(__pyx_t_7);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1038
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1038
* _import_array()
* except Exception:
* raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<<
@@ -34783,7 +34791,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
goto __pyx_L5_except_error;
__pyx_L5_except_error:;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1035
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1035
* # Cython code.
* cdef inline int import_array() except -1:
* try: # <<<<<<<<<<<<<<
@@ -34798,7 +34806,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
__pyx_L8_try_end:;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1034
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1034
* # Versions of the import_* functions which are more suitable for
* # Cython code.
* cdef inline int import_array() except -1: # <<<<<<<<<<<<<<
@@ -34821,7 +34829,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
return __pyx_r;
}
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1040
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1040
* raise ImportError("numpy.core.multiarray failed to import")
*
* cdef inline int import_umath() except -1: # <<<<<<<<<<<<<<
@@ -34842,7 +34850,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
PyObject *__pyx_t_8 = NULL;
__Pyx_RefNannySetupContext("import_umath", 0);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1041
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1041
*
* cdef inline int import_umath() except -1:
* try: # <<<<<<<<<<<<<<
@@ -34858,7 +34866,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
__Pyx_XGOTREF(__pyx_t_3);
/*try:*/ {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1042
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1042
* cdef inline int import_umath() except -1:
* try:
* _import_umath() # <<<<<<<<<<<<<<
@@ -34867,7 +34875,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
*/
__pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 1042, __pyx_L3_error)
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1041
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1041
*
* cdef inline int import_umath() except -1:
* try: # <<<<<<<<<<<<<<
@@ -34881,7 +34889,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
goto __pyx_L8_try_end;
__pyx_L3_error:;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1043
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1043
* try:
* _import_umath()
* except Exception: # <<<<<<<<<<<<<<
@@ -34896,7 +34904,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
__Pyx_GOTREF(__pyx_t_6);
__Pyx_GOTREF(__pyx_t_7);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1044
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1044
* _import_umath()
* except Exception:
* raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<<
@@ -34912,7 +34920,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
goto __pyx_L5_except_error;
__pyx_L5_except_error:;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1041
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1041
*
* cdef inline int import_umath() except -1:
* try: # <<<<<<<<<<<<<<
@@ -34927,7 +34935,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
__pyx_L8_try_end:;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1040
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1040
* raise ImportError("numpy.core.multiarray failed to import")
*
* cdef inline int import_umath() except -1: # <<<<<<<<<<<<<<
@@ -34950,7 +34958,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
return __pyx_r;
}
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1046
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1046
* raise ImportError("numpy.core.umath failed to import")
*
* cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<<
@@ -34971,7 +34979,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) {
PyObject *__pyx_t_8 = NULL;
__Pyx_RefNannySetupContext("import_ufunc", 0);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1047
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1047
*
* cdef inline int import_ufunc() except -1:
* try: # <<<<<<<<<<<<<<
@@ -34987,7 +34995,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) {
__Pyx_XGOTREF(__pyx_t_3);
/*try:*/ {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1048
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1048
* cdef inline int import_ufunc() except -1:
* try:
* _import_umath() # <<<<<<<<<<<<<<
@@ -34996,7 +35004,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) {
*/
__pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 1048, __pyx_L3_error)
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1047
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1047
*
* cdef inline int import_ufunc() except -1:
* try: # <<<<<<<<<<<<<<
@@ -35010,7 +35018,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) {
goto __pyx_L8_try_end;
__pyx_L3_error:;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1049
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1049
* try:
* _import_umath()
* except Exception: # <<<<<<<<<<<<<<
@@ -35024,7 +35032,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) {
__Pyx_GOTREF(__pyx_t_6);
__Pyx_GOTREF(__pyx_t_7);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1050
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1050
* _import_umath()
* except Exception:
* raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<<
@@ -35038,7 +35046,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) {
goto __pyx_L5_except_error;
__pyx_L5_except_error:;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1047
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1047
*
* cdef inline int import_ufunc() except -1:
* try: # <<<<<<<<<<<<<<
@@ -35053,7 +35061,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) {
__pyx_L8_try_end:;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1046
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1046
* raise ImportError("numpy.core.umath failed to import")
*
* cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<<
@@ -48026,6 +48034,9 @@ static PyTypeObject __pyx_type___pyx_array = {
#if PY_VERSION_HEX >= 0x030400a1
0, /*tp_finalize*/
#endif
+ #if PY_VERSION_HEX >= 0x030800b1
+ 0, /*tp_vectorcall*/
+ #endif
};
static PyObject *__pyx_tp_new_Enum(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
@@ -48134,6 +48145,9 @@ static PyTypeObject __pyx_type___pyx_MemviewEnum = {
#if PY_VERSION_HEX >= 0x030400a1
0, /*tp_finalize*/
#endif
+ #if PY_VERSION_HEX >= 0x030800b1
+ 0, /*tp_vectorcall*/
+ #endif
};
static struct __pyx_vtabstruct_memoryview __pyx_vtable_memoryview;
@@ -48384,6 +48398,9 @@ static PyTypeObject __pyx_type___pyx_memoryview = {
#if PY_VERSION_HEX >= 0x030400a1
0, /*tp_finalize*/
#endif
+ #if PY_VERSION_HEX >= 0x030800b1
+ 0, /*tp_vectorcall*/
+ #endif
};
static struct __pyx_vtabstruct__memoryviewslice __pyx_vtable__memoryviewslice;
@@ -48519,6 +48536,9 @@ static PyTypeObject __pyx_type___pyx_memoryviewslice = {
#if PY_VERSION_HEX >= 0x030400a1
0, /*tp_finalize*/
#endif
+ #if PY_VERSION_HEX >= 0x030800b1
+ 0, /*tp_vectorcall*/
+ #endif
};
static PyMethodDef __pyx_methods[] = {
@@ -49006,7 +49026,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
__Pyx_GOTREF(__pyx_tuple__15);
__Pyx_GIVEREF(__pyx_tuple__15);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":272
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":272
* if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
* and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)):
* raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<<
@@ -49017,7 +49037,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
__Pyx_GOTREF(__pyx_tuple__16);
__Pyx_GIVEREF(__pyx_tuple__16);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":276
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":276
* if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
* and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)):
* raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<<
@@ -49028,7 +49048,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
__Pyx_GOTREF(__pyx_tuple__17);
__Pyx_GIVEREF(__pyx_tuple__17);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":306
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":306
* if ((descr.byteorder == c'>' and little_endian) or
* (descr.byteorder == c'<' and not little_endian)):
* raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<<
@@ -49039,7 +49059,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
__Pyx_GOTREF(__pyx_tuple__18);
__Pyx_GIVEREF(__pyx_tuple__18);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":856
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":856
*
* if (end - f) - <int>(new_offset - offset[0]) < 15:
* raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<<
@@ -49050,7 +49070,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
__Pyx_GOTREF(__pyx_tuple__19);
__Pyx_GIVEREF(__pyx_tuple__19);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":880
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":880
* t = child.type_num
* if end - f < 5:
* raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<<
@@ -49061,7 +49081,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
__Pyx_GOTREF(__pyx_tuple__20);
__Pyx_GIVEREF(__pyx_tuple__20);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1038
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1038
* _import_array()
* except Exception:
* raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<<
@@ -49072,7 +49092,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
__Pyx_GOTREF(__pyx_tuple__21);
__Pyx_GIVEREF(__pyx_tuple__21);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1044
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1044
* _import_umath()
* except Exception:
* raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<<
@@ -49454,12 +49474,16 @@ static int __Pyx_modinit_type_init_code(void) {
__pyx_vtabptr_array = &__pyx_vtable_array;
__pyx_vtable_array.get_memview = (PyObject *(*)(struct __pyx_array_obj *))__pyx_array_get_memview;
if (PyType_Ready(&__pyx_type___pyx_array) < 0) __PYX_ERR(2, 105, __pyx_L1_error)
+ #if PY_VERSION_HEX < 0x030800B1
__pyx_type___pyx_array.tp_print = 0;
+ #endif
if (__Pyx_SetVtable(__pyx_type___pyx_array.tp_dict, __pyx_vtabptr_array) < 0) __PYX_ERR(2, 105, __pyx_L1_error)
if (__Pyx_setup_reduce((PyObject*)&__pyx_type___pyx_array) < 0) __PYX_ERR(2, 105, __pyx_L1_error)
__pyx_array_type = &__pyx_type___pyx_array;
if (PyType_Ready(&__pyx_type___pyx_MemviewEnum) < 0) __PYX_ERR(2, 279, __pyx_L1_error)
+ #if PY_VERSION_HEX < 0x030800B1
__pyx_type___pyx_MemviewEnum.tp_print = 0;
+ #endif
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_MemviewEnum.tp_dictoffset && __pyx_type___pyx_MemviewEnum.tp_getattro == PyObject_GenericGetAttr)) {
__pyx_type___pyx_MemviewEnum.tp_getattro = __Pyx_PyObject_GenericGetAttr;
}
@@ -49474,7 +49498,9 @@ static int __Pyx_modinit_type_init_code(void) {
__pyx_vtable_memoryview.convert_item_to_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *))__pyx_memoryview_convert_item_to_object;
__pyx_vtable_memoryview.assign_item_from_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *, PyObject *))__pyx_memoryview_assign_item_from_object;
if (PyType_Ready(&__pyx_type___pyx_memoryview) < 0) __PYX_ERR(2, 330, __pyx_L1_error)
+ #if PY_VERSION_HEX < 0x030800B1
__pyx_type___pyx_memoryview.tp_print = 0;
+ #endif
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_memoryview.tp_dictoffset && __pyx_type___pyx_memoryview.tp_getattro == PyObject_GenericGetAttr)) {
__pyx_type___pyx_memoryview.tp_getattro = __Pyx_PyObject_GenericGetAttr;
}
@@ -49487,7 +49513,9 @@ static int __Pyx_modinit_type_init_code(void) {
__pyx_vtable__memoryviewslice.__pyx_base.assign_item_from_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *, PyObject *))__pyx_memoryviewslice_assign_item_from_object;
__pyx_type___pyx_memoryviewslice.tp_base = __pyx_memoryview_type;
if (PyType_Ready(&__pyx_type___pyx_memoryviewslice) < 0) __PYX_ERR(2, 961, __pyx_L1_error)
+ #if PY_VERSION_HEX < 0x030800B1
__pyx_type___pyx_memoryviewslice.tp_print = 0;
+ #endif
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_memoryviewslice.tp_dictoffset && __pyx_type___pyx_memoryviewslice.tp_getattro == PyObject_GenericGetAttr)) {
__pyx_type___pyx_memoryviewslice.tp_getattro = __Pyx_PyObject_GenericGetAttr;
}
@@ -53648,6 +53676,9 @@ static PyTypeObject __pyx_CyFunctionType_type = {
#if PY_VERSION_HEX >= 0x030400a1
0,
#endif
+#if PY_VERSION_HEX >= 0x030800b1
+ 0,
+#endif
};
static int __pyx_CyFunction_init(void) {
__pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type);
@@ -54002,6 +54033,9 @@ static PyTypeObject __pyx_FusedFunctionType_type = {
#if PY_VERSION_HEX >= 0x030400a1
0,
#endif
+#if PY_VERSION_HEX >= 0x030800b1
+ 0,
+#endif
};
static int __pyx_FusedFunction_init(void) {
__pyx_FusedFunctionType = __Pyx_FetchCommonType(&__pyx_FusedFunctionType_type);
diff --git a/silx/math/colormap.c b/silx/math/colormap.c
index 6fd2f4e..a03ea45 100644
--- a/silx/math/colormap.c
+++ b/silx/math/colormap.c
@@ -1,11 +1,11 @@
-/* Generated by Cython 0.29.7 */
+/* Generated by Cython 0.29.11 */
/* BEGIN: Cython Metadata
{
"distutils": {
"depends": [
- "/media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/numpy/core/include/numpy/arrayobject.h",
- "/media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/numpy/core/include/numpy/ufuncobject.h",
+ "/opt/python/cp36-cp36m/lib/python3.6/site-packages/numpy/core/include/numpy/arrayobject.h",
+ "/opt/python/cp36-cp36m/lib/python3.6/site-packages/numpy/core/include/numpy/ufuncobject.h",
"silx/math/include/math_compatibility.h"
],
"extra_compile_args": [
@@ -16,7 +16,7 @@
],
"include_dirs": [
"silx/math/include",
- "/media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/numpy/core/include"
+ "/opt/python/cp36-cp36m/lib/python3.6/site-packages/numpy/core/include"
],
"language": "c",
"name": "silx.math.colormap",
@@ -35,8 +35,8 @@ END: Cython Metadata */
#elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
#error Cython requires Python 2.6+ or Python 3.3+.
#else
-#define CYTHON_ABI "0_29_7"
-#define CYTHON_HEX_VERSION 0x001D07F0
+#define CYTHON_ABI "0_29_11"
+#define CYTHON_HEX_VERSION 0x001D0BF0
#define CYTHON_FUTURE_DIVISION 1
#include <stddef.h>
#ifndef offsetof
@@ -338,8 +338,16 @@ END: Cython Metadata */
#define __Pyx_DefaultClassType PyClass_Type
#else
#define __Pyx_BUILTIN_MODULE_NAME "builtins"
+#if PY_VERSION_HEX < 0x030800A4
#define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
+#elif PY_VERSION_HEX >= 0x030800B2
+ #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
+ PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
+#else
+ #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
+ PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
+#endif
#define __Pyx_DefaultClassType PyType_Type
#endif
#ifndef Py_TPFLAGS_CHECKTYPES
@@ -969,7 +977,7 @@ typedef struct {
} __Pyx_BufFmt_Context;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":776
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":776
* # in Cython to enable them only on the right systems.
*
* ctypedef npy_int8 int8_t # <<<<<<<<<<<<<<
@@ -978,7 +986,7 @@ typedef struct {
*/
typedef npy_int8 __pyx_t_5numpy_int8_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":777
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":777
*
* ctypedef npy_int8 int8_t
* ctypedef npy_int16 int16_t # <<<<<<<<<<<<<<
@@ -987,7 +995,7 @@ typedef npy_int8 __pyx_t_5numpy_int8_t;
*/
typedef npy_int16 __pyx_t_5numpy_int16_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":778
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":778
* ctypedef npy_int8 int8_t
* ctypedef npy_int16 int16_t
* ctypedef npy_int32 int32_t # <<<<<<<<<<<<<<
@@ -996,7 +1004,7 @@ typedef npy_int16 __pyx_t_5numpy_int16_t;
*/
typedef npy_int32 __pyx_t_5numpy_int32_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":779
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":779
* ctypedef npy_int16 int16_t
* ctypedef npy_int32 int32_t
* ctypedef npy_int64 int64_t # <<<<<<<<<<<<<<
@@ -1005,7 +1013,7 @@ typedef npy_int32 __pyx_t_5numpy_int32_t;
*/
typedef npy_int64 __pyx_t_5numpy_int64_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":783
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":783
* #ctypedef npy_int128 int128_t
*
* ctypedef npy_uint8 uint8_t # <<<<<<<<<<<<<<
@@ -1014,7 +1022,7 @@ typedef npy_int64 __pyx_t_5numpy_int64_t;
*/
typedef npy_uint8 __pyx_t_5numpy_uint8_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":784
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":784
*
* ctypedef npy_uint8 uint8_t
* ctypedef npy_uint16 uint16_t # <<<<<<<<<<<<<<
@@ -1023,7 +1031,7 @@ typedef npy_uint8 __pyx_t_5numpy_uint8_t;
*/
typedef npy_uint16 __pyx_t_5numpy_uint16_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":785
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":785
* ctypedef npy_uint8 uint8_t
* ctypedef npy_uint16 uint16_t
* ctypedef npy_uint32 uint32_t # <<<<<<<<<<<<<<
@@ -1032,7 +1040,7 @@ typedef npy_uint16 __pyx_t_5numpy_uint16_t;
*/
typedef npy_uint32 __pyx_t_5numpy_uint32_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":786
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":786
* ctypedef npy_uint16 uint16_t
* ctypedef npy_uint32 uint32_t
* ctypedef npy_uint64 uint64_t # <<<<<<<<<<<<<<
@@ -1041,7 +1049,7 @@ typedef npy_uint32 __pyx_t_5numpy_uint32_t;
*/
typedef npy_uint64 __pyx_t_5numpy_uint64_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":790
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":790
* #ctypedef npy_uint128 uint128_t
*
* ctypedef npy_float32 float32_t # <<<<<<<<<<<<<<
@@ -1050,7 +1058,7 @@ typedef npy_uint64 __pyx_t_5numpy_uint64_t;
*/
typedef npy_float32 __pyx_t_5numpy_float32_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":791
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":791
*
* ctypedef npy_float32 float32_t
* ctypedef npy_float64 float64_t # <<<<<<<<<<<<<<
@@ -1059,7 +1067,7 @@ typedef npy_float32 __pyx_t_5numpy_float32_t;
*/
typedef npy_float64 __pyx_t_5numpy_float64_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":800
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":800
* # The int types are mapped a bit surprising --
* # numpy.int corresponds to 'l' and numpy.long to 'q'
* ctypedef npy_long int_t # <<<<<<<<<<<<<<
@@ -1068,7 +1076,7 @@ typedef npy_float64 __pyx_t_5numpy_float64_t;
*/
typedef npy_long __pyx_t_5numpy_int_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":801
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":801
* # numpy.int corresponds to 'l' and numpy.long to 'q'
* ctypedef npy_long int_t
* ctypedef npy_longlong long_t # <<<<<<<<<<<<<<
@@ -1077,7 +1085,7 @@ typedef npy_long __pyx_t_5numpy_int_t;
*/
typedef npy_longlong __pyx_t_5numpy_long_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":802
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":802
* ctypedef npy_long int_t
* ctypedef npy_longlong long_t
* ctypedef npy_longlong longlong_t # <<<<<<<<<<<<<<
@@ -1086,7 +1094,7 @@ typedef npy_longlong __pyx_t_5numpy_long_t;
*/
typedef npy_longlong __pyx_t_5numpy_longlong_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":804
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":804
* ctypedef npy_longlong longlong_t
*
* ctypedef npy_ulong uint_t # <<<<<<<<<<<<<<
@@ -1095,7 +1103,7 @@ typedef npy_longlong __pyx_t_5numpy_longlong_t;
*/
typedef npy_ulong __pyx_t_5numpy_uint_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":805
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":805
*
* ctypedef npy_ulong uint_t
* ctypedef npy_ulonglong ulong_t # <<<<<<<<<<<<<<
@@ -1104,7 +1112,7 @@ typedef npy_ulong __pyx_t_5numpy_uint_t;
*/
typedef npy_ulonglong __pyx_t_5numpy_ulong_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":806
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":806
* ctypedef npy_ulong uint_t
* ctypedef npy_ulonglong ulong_t
* ctypedef npy_ulonglong ulonglong_t # <<<<<<<<<<<<<<
@@ -1113,7 +1121,7 @@ typedef npy_ulonglong __pyx_t_5numpy_ulong_t;
*/
typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":808
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":808
* ctypedef npy_ulonglong ulonglong_t
*
* ctypedef npy_intp intp_t # <<<<<<<<<<<<<<
@@ -1122,7 +1130,7 @@ typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t;
*/
typedef npy_intp __pyx_t_5numpy_intp_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":809
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":809
*
* ctypedef npy_intp intp_t
* ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<<
@@ -1131,7 +1139,7 @@ typedef npy_intp __pyx_t_5numpy_intp_t;
*/
typedef npy_uintp __pyx_t_5numpy_uintp_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":811
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":811
* ctypedef npy_uintp uintp_t
*
* ctypedef npy_double float_t # <<<<<<<<<<<<<<
@@ -1140,7 +1148,7 @@ typedef npy_uintp __pyx_t_5numpy_uintp_t;
*/
typedef npy_double __pyx_t_5numpy_float_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":812
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":812
*
* ctypedef npy_double float_t
* ctypedef npy_double double_t # <<<<<<<<<<<<<<
@@ -1149,7 +1157,7 @@ typedef npy_double __pyx_t_5numpy_float_t;
*/
typedef npy_double __pyx_t_5numpy_double_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":813
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":813
* ctypedef npy_double float_t
* ctypedef npy_double double_t
* ctypedef npy_longdouble longdouble_t # <<<<<<<<<<<<<<
@@ -1188,7 +1196,7 @@ struct __pyx_MemviewEnum_obj;
struct __pyx_memoryview_obj;
struct __pyx_memoryviewslice_obj;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":815
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":815
* ctypedef npy_longdouble longdouble_t
*
* ctypedef npy_cfloat cfloat_t # <<<<<<<<<<<<<<
@@ -1197,7 +1205,7 @@ struct __pyx_memoryviewslice_obj;
*/
typedef npy_cfloat __pyx_t_5numpy_cfloat_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":816
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":816
*
* ctypedef npy_cfloat cfloat_t
* ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<<
@@ -1206,7 +1214,7 @@ typedef npy_cfloat __pyx_t_5numpy_cfloat_t;
*/
typedef npy_cdouble __pyx_t_5numpy_cdouble_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":817
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":817
* ctypedef npy_cfloat cfloat_t
* ctypedef npy_cdouble cdouble_t
* ctypedef npy_clongdouble clongdouble_t # <<<<<<<<<<<<<<
@@ -1215,7 +1223,7 @@ typedef npy_cdouble __pyx_t_5numpy_cdouble_t;
*/
typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":819
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":819
* ctypedef npy_clongdouble clongdouble_t
*
* ctypedef npy_cdouble complex_t # <<<<<<<<<<<<<<
@@ -24169,7 +24177,7 @@ static PyObject *__pyx_pf_4silx_4math_8colormap_2cmap(CYTHON_UNUSED PyObject *__
return __pyx_r;
}
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":258
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":258
* # experimental exception made for __getbuffer__ and __releasebuffer__
* # -- the details of this may change.
* def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<<
@@ -24218,7 +24226,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
__Pyx_GIVEREF(__pyx_v_info->obj);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":265
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":265
*
* cdef int i, ndim
* cdef int endian_detector = 1 # <<<<<<<<<<<<<<
@@ -24227,7 +24235,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_endian_detector = 1;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":266
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":266
* cdef int i, ndim
* cdef int endian_detector = 1
* cdef bint little_endian = ((<char*>&endian_detector)[0] != 0) # <<<<<<<<<<<<<<
@@ -24236,7 +24244,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":268
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":268
* cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
*
* ndim = PyArray_NDIM(self) # <<<<<<<<<<<<<<
@@ -24245,7 +24253,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_ndim = PyArray_NDIM(__pyx_v_self);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":270
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":270
* ndim = PyArray_NDIM(self)
*
* if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<<
@@ -24259,7 +24267,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
goto __pyx_L4_bool_binop_done;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":271
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":271
*
* if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
* and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): # <<<<<<<<<<<<<<
@@ -24270,7 +24278,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_t_1 = __pyx_t_2;
__pyx_L4_bool_binop_done:;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":270
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":270
* ndim = PyArray_NDIM(self)
*
* if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<<
@@ -24279,7 +24287,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
if (unlikely(__pyx_t_1)) {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":272
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":272
* if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
* and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)):
* raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<<
@@ -24292,7 +24300,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__PYX_ERR(1, 272, __pyx_L1_error)
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":270
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":270
* ndim = PyArray_NDIM(self)
*
* if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<<
@@ -24301,7 +24309,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":274
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":274
* raise ValueError(u"ndarray is not C contiguous")
*
* if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<<
@@ -24315,7 +24323,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
goto __pyx_L7_bool_binop_done;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":275
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":275
*
* if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
* and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): # <<<<<<<<<<<<<<
@@ -24326,7 +24334,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_t_1 = __pyx_t_2;
__pyx_L7_bool_binop_done:;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":274
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":274
* raise ValueError(u"ndarray is not C contiguous")
*
* if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<<
@@ -24335,7 +24343,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
if (unlikely(__pyx_t_1)) {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":276
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":276
* if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
* and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)):
* raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<<
@@ -24348,7 +24356,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__PYX_ERR(1, 276, __pyx_L1_error)
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":274
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":274
* raise ValueError(u"ndarray is not C contiguous")
*
* if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<<
@@ -24357,7 +24365,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":278
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":278
* raise ValueError(u"ndarray is not Fortran contiguous")
*
* info.buf = PyArray_DATA(self) # <<<<<<<<<<<<<<
@@ -24366,7 +24374,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_info->buf = PyArray_DATA(__pyx_v_self);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":279
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":279
*
* info.buf = PyArray_DATA(self)
* info.ndim = ndim # <<<<<<<<<<<<<<
@@ -24375,7 +24383,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_info->ndim = __pyx_v_ndim;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":280
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":280
* info.buf = PyArray_DATA(self)
* info.ndim = ndim
* if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<<
@@ -24385,7 +24393,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0);
if (__pyx_t_1) {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":283
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":283
* # Allocate new buffer for strides and shape info.
* # This is allocated as one block, strides first.
* info.strides = <Py_ssize_t*>PyObject_Malloc(sizeof(Py_ssize_t) * 2 * <size_t>ndim) # <<<<<<<<<<<<<<
@@ -24394,7 +24402,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_info->strides = ((Py_ssize_t *)PyObject_Malloc((((sizeof(Py_ssize_t)) * 2) * ((size_t)__pyx_v_ndim))));
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":284
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":284
* # This is allocated as one block, strides first.
* info.strides = <Py_ssize_t*>PyObject_Malloc(sizeof(Py_ssize_t) * 2 * <size_t>ndim)
* info.shape = info.strides + ndim # <<<<<<<<<<<<<<
@@ -24403,7 +24411,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_info->shape = (__pyx_v_info->strides + __pyx_v_ndim);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":285
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":285
* info.strides = <Py_ssize_t*>PyObject_Malloc(sizeof(Py_ssize_t) * 2 * <size_t>ndim)
* info.shape = info.strides + ndim
* for i in range(ndim): # <<<<<<<<<<<<<<
@@ -24415,7 +24423,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
__pyx_v_i = __pyx_t_6;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":286
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":286
* info.shape = info.strides + ndim
* for i in range(ndim):
* info.strides[i] = PyArray_STRIDES(self)[i] # <<<<<<<<<<<<<<
@@ -24424,7 +24432,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
(__pyx_v_info->strides[__pyx_v_i]) = (PyArray_STRIDES(__pyx_v_self)[__pyx_v_i]);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":287
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":287
* for i in range(ndim):
* info.strides[i] = PyArray_STRIDES(self)[i]
* info.shape[i] = PyArray_DIMS(self)[i] # <<<<<<<<<<<<<<
@@ -24434,7 +24442,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
(__pyx_v_info->shape[__pyx_v_i]) = (PyArray_DIMS(__pyx_v_self)[__pyx_v_i]);
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":280
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":280
* info.buf = PyArray_DATA(self)
* info.ndim = ndim
* if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<<
@@ -24444,7 +24452,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
goto __pyx_L9;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":289
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":289
* info.shape[i] = PyArray_DIMS(self)[i]
* else:
* info.strides = <Py_ssize_t*>PyArray_STRIDES(self) # <<<<<<<<<<<<<<
@@ -24454,7 +24462,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
/*else*/ {
__pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(__pyx_v_self));
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":290
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":290
* else:
* info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
* info.shape = <Py_ssize_t*>PyArray_DIMS(self) # <<<<<<<<<<<<<<
@@ -24465,7 +24473,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
}
__pyx_L9:;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":291
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":291
* info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
* info.shape = <Py_ssize_t*>PyArray_DIMS(self)
* info.suboffsets = NULL # <<<<<<<<<<<<<<
@@ -24474,7 +24482,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_info->suboffsets = NULL;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":292
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":292
* info.shape = <Py_ssize_t*>PyArray_DIMS(self)
* info.suboffsets = NULL
* info.itemsize = PyArray_ITEMSIZE(self) # <<<<<<<<<<<<<<
@@ -24483,7 +24491,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_info->itemsize = PyArray_ITEMSIZE(__pyx_v_self);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":293
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":293
* info.suboffsets = NULL
* info.itemsize = PyArray_ITEMSIZE(self)
* info.readonly = not PyArray_ISWRITEABLE(self) # <<<<<<<<<<<<<<
@@ -24492,7 +24500,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_info->readonly = (!(PyArray_ISWRITEABLE(__pyx_v_self) != 0));
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":296
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":296
*
* cdef int t
* cdef char* f = NULL # <<<<<<<<<<<<<<
@@ -24501,7 +24509,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_f = NULL;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":297
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":297
* cdef int t
* cdef char* f = NULL
* cdef dtype descr = <dtype>PyArray_DESCR(self) # <<<<<<<<<<<<<<
@@ -24514,7 +24522,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_v_descr = ((PyArray_Descr *)__pyx_t_3);
__pyx_t_3 = 0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":300
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":300
* cdef int offset
*
* info.obj = self # <<<<<<<<<<<<<<
@@ -24527,7 +24535,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__Pyx_DECREF(__pyx_v_info->obj);
__pyx_v_info->obj = ((PyObject *)__pyx_v_self);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":302
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":302
* info.obj = self
*
* if not PyDataType_HASFIELDS(descr): # <<<<<<<<<<<<<<
@@ -24537,7 +24545,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_t_1 = ((!(PyDataType_HASFIELDS(__pyx_v_descr) != 0)) != 0);
if (__pyx_t_1) {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":303
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":303
*
* if not PyDataType_HASFIELDS(descr):
* t = descr.type_num # <<<<<<<<<<<<<<
@@ -24547,7 +24555,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_t_4 = __pyx_v_descr->type_num;
__pyx_v_t = __pyx_t_4;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":304
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":304
* if not PyDataType_HASFIELDS(descr):
* t = descr.type_num
* if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
@@ -24567,7 +24575,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
}
__pyx_L15_next_or:;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":305
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":305
* t = descr.type_num
* if ((descr.byteorder == c'>' and little_endian) or
* (descr.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<<
@@ -24584,7 +24592,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_t_1 = __pyx_t_2;
__pyx_L14_bool_binop_done:;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":304
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":304
* if not PyDataType_HASFIELDS(descr):
* t = descr.type_num
* if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
@@ -24593,7 +24601,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
if (unlikely(__pyx_t_1)) {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":306
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":306
* if ((descr.byteorder == c'>' and little_endian) or
* (descr.byteorder == c'<' and not little_endian)):
* raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<<
@@ -24606,7 +24614,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__PYX_ERR(1, 306, __pyx_L1_error)
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":304
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":304
* if not PyDataType_HASFIELDS(descr):
* t = descr.type_num
* if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
@@ -24615,7 +24623,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":307
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":307
* (descr.byteorder == c'<' and not little_endian)):
* raise ValueError(u"Non-native byte order not supported")
* if t == NPY_BYTE: f = "b" # <<<<<<<<<<<<<<
@@ -24628,7 +24636,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_UBYTE:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":308
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":308
* raise ValueError(u"Non-native byte order not supported")
* if t == NPY_BYTE: f = "b"
* elif t == NPY_UBYTE: f = "B" # <<<<<<<<<<<<<<
@@ -24639,7 +24647,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_SHORT:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":309
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":309
* if t == NPY_BYTE: f = "b"
* elif t == NPY_UBYTE: f = "B"
* elif t == NPY_SHORT: f = "h" # <<<<<<<<<<<<<<
@@ -24650,7 +24658,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_USHORT:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":310
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":310
* elif t == NPY_UBYTE: f = "B"
* elif t == NPY_SHORT: f = "h"
* elif t == NPY_USHORT: f = "H" # <<<<<<<<<<<<<<
@@ -24661,7 +24669,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_INT:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":311
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":311
* elif t == NPY_SHORT: f = "h"
* elif t == NPY_USHORT: f = "H"
* elif t == NPY_INT: f = "i" # <<<<<<<<<<<<<<
@@ -24672,7 +24680,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_UINT:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":312
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":312
* elif t == NPY_USHORT: f = "H"
* elif t == NPY_INT: f = "i"
* elif t == NPY_UINT: f = "I" # <<<<<<<<<<<<<<
@@ -24683,7 +24691,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_LONG:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":313
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":313
* elif t == NPY_INT: f = "i"
* elif t == NPY_UINT: f = "I"
* elif t == NPY_LONG: f = "l" # <<<<<<<<<<<<<<
@@ -24694,7 +24702,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_ULONG:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":314
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":314
* elif t == NPY_UINT: f = "I"
* elif t == NPY_LONG: f = "l"
* elif t == NPY_ULONG: f = "L" # <<<<<<<<<<<<<<
@@ -24705,7 +24713,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_LONGLONG:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":315
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":315
* elif t == NPY_LONG: f = "l"
* elif t == NPY_ULONG: f = "L"
* elif t == NPY_LONGLONG: f = "q" # <<<<<<<<<<<<<<
@@ -24716,7 +24724,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_ULONGLONG:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":316
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":316
* elif t == NPY_ULONG: f = "L"
* elif t == NPY_LONGLONG: f = "q"
* elif t == NPY_ULONGLONG: f = "Q" # <<<<<<<<<<<<<<
@@ -24727,7 +24735,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_FLOAT:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":317
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":317
* elif t == NPY_LONGLONG: f = "q"
* elif t == NPY_ULONGLONG: f = "Q"
* elif t == NPY_FLOAT: f = "f" # <<<<<<<<<<<<<<
@@ -24738,7 +24746,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_DOUBLE:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":318
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":318
* elif t == NPY_ULONGLONG: f = "Q"
* elif t == NPY_FLOAT: f = "f"
* elif t == NPY_DOUBLE: f = "d" # <<<<<<<<<<<<<<
@@ -24749,7 +24757,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_LONGDOUBLE:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":319
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":319
* elif t == NPY_FLOAT: f = "f"
* elif t == NPY_DOUBLE: f = "d"
* elif t == NPY_LONGDOUBLE: f = "g" # <<<<<<<<<<<<<<
@@ -24760,7 +24768,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_CFLOAT:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":320
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":320
* elif t == NPY_DOUBLE: f = "d"
* elif t == NPY_LONGDOUBLE: f = "g"
* elif t == NPY_CFLOAT: f = "Zf" # <<<<<<<<<<<<<<
@@ -24771,7 +24779,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_CDOUBLE:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":321
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":321
* elif t == NPY_LONGDOUBLE: f = "g"
* elif t == NPY_CFLOAT: f = "Zf"
* elif t == NPY_CDOUBLE: f = "Zd" # <<<<<<<<<<<<<<
@@ -24782,7 +24790,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_CLONGDOUBLE:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":322
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":322
* elif t == NPY_CFLOAT: f = "Zf"
* elif t == NPY_CDOUBLE: f = "Zd"
* elif t == NPY_CLONGDOUBLE: f = "Zg" # <<<<<<<<<<<<<<
@@ -24793,7 +24801,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_OBJECT:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":323
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":323
* elif t == NPY_CDOUBLE: f = "Zd"
* elif t == NPY_CLONGDOUBLE: f = "Zg"
* elif t == NPY_OBJECT: f = "O" # <<<<<<<<<<<<<<
@@ -24804,7 +24812,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
default:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":325
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":325
* elif t == NPY_OBJECT: f = "O"
* else:
* raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<<
@@ -24825,7 +24833,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":326
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":326
* else:
* raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
* info.format = f # <<<<<<<<<<<<<<
@@ -24834,7 +24842,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_info->format = __pyx_v_f;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":327
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":327
* raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
* info.format = f
* return # <<<<<<<<<<<<<<
@@ -24844,7 +24852,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_r = 0;
goto __pyx_L0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":302
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":302
* info.obj = self
*
* if not PyDataType_HASFIELDS(descr): # <<<<<<<<<<<<<<
@@ -24853,7 +24861,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":329
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":329
* return
* else:
* info.format = <char*>PyObject_Malloc(_buffer_format_string_len) # <<<<<<<<<<<<<<
@@ -24863,7 +24871,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
/*else*/ {
__pyx_v_info->format = ((char *)PyObject_Malloc(0xFF));
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":330
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":330
* else:
* info.format = <char*>PyObject_Malloc(_buffer_format_string_len)
* info.format[0] = c'^' # Native data types, manual alignment # <<<<<<<<<<<<<<
@@ -24872,7 +24880,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
(__pyx_v_info->format[0]) = '^';
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":331
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":331
* info.format = <char*>PyObject_Malloc(_buffer_format_string_len)
* info.format[0] = c'^' # Native data types, manual alignment
* offset = 0 # <<<<<<<<<<<<<<
@@ -24881,7 +24889,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_offset = 0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":332
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":332
* info.format[0] = c'^' # Native data types, manual alignment
* offset = 0
* f = _util_dtypestring(descr, info.format + 1, # <<<<<<<<<<<<<<
@@ -24891,7 +24899,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 0xFF), (&__pyx_v_offset)); if (unlikely(__pyx_t_9 == ((char *)NULL))) __PYX_ERR(1, 332, __pyx_L1_error)
__pyx_v_f = __pyx_t_9;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":335
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":335
* info.format + _buffer_format_string_len,
* &offset)
* f[0] = c'\0' # Terminate format string # <<<<<<<<<<<<<<
@@ -24901,7 +24909,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
(__pyx_v_f[0]) = '\x00';
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":258
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":258
* # experimental exception made for __getbuffer__ and __releasebuffer__
* # -- the details of this may change.
* def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<<
@@ -24933,7 +24941,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
return __pyx_r;
}
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":337
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":337
* f[0] = c'\0' # Terminate format string
*
* def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<<
@@ -24957,7 +24965,7 @@ static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_s
int __pyx_t_1;
__Pyx_RefNannySetupContext("__releasebuffer__", 0);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":338
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":338
*
* def __releasebuffer__(ndarray self, Py_buffer* info):
* if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<<
@@ -24967,7 +24975,7 @@ static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_s
__pyx_t_1 = (PyArray_HASFIELDS(__pyx_v_self) != 0);
if (__pyx_t_1) {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":339
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":339
* def __releasebuffer__(ndarray self, Py_buffer* info):
* if PyArray_HASFIELDS(self):
* PyObject_Free(info.format) # <<<<<<<<<<<<<<
@@ -24976,7 +24984,7 @@ static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_s
*/
PyObject_Free(__pyx_v_info->format);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":338
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":338
*
* def __releasebuffer__(ndarray self, Py_buffer* info):
* if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<<
@@ -24985,7 +24993,7 @@ static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_s
*/
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":340
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":340
* if PyArray_HASFIELDS(self):
* PyObject_Free(info.format)
* if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<<
@@ -24995,7 +25003,7 @@ static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_s
__pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0);
if (__pyx_t_1) {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":341
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":341
* PyObject_Free(info.format)
* if sizeof(npy_intp) != sizeof(Py_ssize_t):
* PyObject_Free(info.strides) # <<<<<<<<<<<<<<
@@ -25004,7 +25012,7 @@ static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_s
*/
PyObject_Free(__pyx_v_info->strides);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":340
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":340
* if PyArray_HASFIELDS(self):
* PyObject_Free(info.format)
* if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<<
@@ -25013,7 +25021,7 @@ static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_s
*/
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":337
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":337
* f[0] = c'\0' # Terminate format string
*
* def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<<
@@ -25025,7 +25033,7 @@ static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_s
__Pyx_RefNannyFinishContext();
}
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":821
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":821
* ctypedef npy_cdouble complex_t
*
* cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<<
@@ -25039,7 +25047,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__
PyObject *__pyx_t_1 = NULL;
__Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":822
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":822
*
* cdef inline object PyArray_MultiIterNew1(a):
* return PyArray_MultiIterNew(1, <void*>a) # <<<<<<<<<<<<<<
@@ -25053,7 +25061,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":821
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":821
* ctypedef npy_cdouble complex_t
*
* cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<<
@@ -25072,7 +25080,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__
return __pyx_r;
}
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":824
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":824
* return PyArray_MultiIterNew(1, <void*>a)
*
* cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<<
@@ -25086,7 +25094,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__
PyObject *__pyx_t_1 = NULL;
__Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":825
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":825
*
* cdef inline object PyArray_MultiIterNew2(a, b):
* return PyArray_MultiIterNew(2, <void*>a, <void*>b) # <<<<<<<<<<<<<<
@@ -25100,7 +25108,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":824
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":824
* return PyArray_MultiIterNew(1, <void*>a)
*
* cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<<
@@ -25119,7 +25127,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__
return __pyx_r;
}
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":827
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":827
* return PyArray_MultiIterNew(2, <void*>a, <void*>b)
*
* cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<<
@@ -25133,7 +25141,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__
PyObject *__pyx_t_1 = NULL;
__Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":828
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":828
*
* cdef inline object PyArray_MultiIterNew3(a, b, c):
* return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c) # <<<<<<<<<<<<<<
@@ -25147,7 +25155,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":827
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":827
* return PyArray_MultiIterNew(2, <void*>a, <void*>b)
*
* cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<<
@@ -25166,7 +25174,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__
return __pyx_r;
}
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":830
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":830
* return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
*
* cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<<
@@ -25180,7 +25188,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__
PyObject *__pyx_t_1 = NULL;
__Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":831
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":831
*
* cdef inline object PyArray_MultiIterNew4(a, b, c, d):
* return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d) # <<<<<<<<<<<<<<
@@ -25194,7 +25202,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":830
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":830
* return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
*
* cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<<
@@ -25213,7 +25221,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__
return __pyx_r;
}
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":833
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":833
* return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
*
* cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<<
@@ -25227,7 +25235,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__
PyObject *__pyx_t_1 = NULL;
__Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":834
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":834
*
* cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
* return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e) # <<<<<<<<<<<<<<
@@ -25241,7 +25249,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":833
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":833
* return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
*
* cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<<
@@ -25260,7 +25268,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__
return __pyx_r;
}
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":836
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":836
* return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
*
* cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<<
@@ -25274,7 +25282,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__
int __pyx_t_1;
__Pyx_RefNannySetupContext("PyDataType_SHAPE", 0);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":837
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":837
*
* cdef inline tuple PyDataType_SHAPE(dtype d):
* if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<<
@@ -25284,7 +25292,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__
__pyx_t_1 = (PyDataType_HASSUBARRAY(__pyx_v_d) != 0);
if (__pyx_t_1) {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":838
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":838
* cdef inline tuple PyDataType_SHAPE(dtype d):
* if PyDataType_HASSUBARRAY(d):
* return <tuple>d.subarray.shape # <<<<<<<<<<<<<<
@@ -25296,7 +25304,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__
__pyx_r = ((PyObject*)__pyx_v_d->subarray->shape);
goto __pyx_L0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":837
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":837
*
* cdef inline tuple PyDataType_SHAPE(dtype d):
* if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<<
@@ -25305,7 +25313,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__
*/
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":840
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":840
* return <tuple>d.subarray.shape
* else:
* return () # <<<<<<<<<<<<<<
@@ -25319,7 +25327,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__
goto __pyx_L0;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":836
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":836
* return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
*
* cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<<
@@ -25334,7 +25342,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__
return __pyx_r;
}
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":842
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":842
* return ()
*
* cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<<
@@ -25363,7 +25371,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
char *__pyx_t_9;
__Pyx_RefNannySetupContext("_util_dtypestring", 0);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":847
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":847
*
* cdef dtype child
* cdef int endian_detector = 1 # <<<<<<<<<<<<<<
@@ -25372,7 +25380,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
*/
__pyx_v_endian_detector = 1;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":848
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":848
* cdef dtype child
* cdef int endian_detector = 1
* cdef bint little_endian = ((<char*>&endian_detector)[0] != 0) # <<<<<<<<<<<<<<
@@ -25381,7 +25389,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
*/
__pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":851
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":851
* cdef tuple fields
*
* for childname in descr.names: # <<<<<<<<<<<<<<
@@ -25404,7 +25412,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__Pyx_XDECREF_SET(__pyx_v_childname, __pyx_t_3);
__pyx_t_3 = 0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":852
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":852
*
* for childname in descr.names:
* fields = descr.fields[childname] # <<<<<<<<<<<<<<
@@ -25421,7 +25429,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__Pyx_XDECREF_SET(__pyx_v_fields, ((PyObject*)__pyx_t_3));
__pyx_t_3 = 0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":853
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":853
* for childname in descr.names:
* fields = descr.fields[childname]
* child, new_offset = fields # <<<<<<<<<<<<<<
@@ -25456,7 +25464,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__Pyx_XDECREF_SET(__pyx_v_new_offset, __pyx_t_4);
__pyx_t_4 = 0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":855
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":855
* child, new_offset = fields
*
* if (end - f) - <int>(new_offset - offset[0]) < 15: # <<<<<<<<<<<<<<
@@ -25473,7 +25481,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__pyx_t_6 = ((((__pyx_v_end - __pyx_v_f) - ((int)__pyx_t_5)) < 15) != 0);
if (unlikely(__pyx_t_6)) {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":856
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":856
*
* if (end - f) - <int>(new_offset - offset[0]) < 15:
* raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<<
@@ -25486,7 +25494,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__PYX_ERR(1, 856, __pyx_L1_error)
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":855
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":855
* child, new_offset = fields
*
* if (end - f) - <int>(new_offset - offset[0]) < 15: # <<<<<<<<<<<<<<
@@ -25495,7 +25503,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
*/
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":858
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":858
* raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
*
* if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
@@ -25515,7 +25523,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
}
__pyx_L8_next_or:;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":859
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":859
*
* if ((child.byteorder == c'>' and little_endian) or
* (child.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<<
@@ -25532,7 +25540,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__pyx_t_6 = __pyx_t_7;
__pyx_L7_bool_binop_done:;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":858
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":858
* raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
*
* if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
@@ -25541,7 +25549,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
*/
if (unlikely(__pyx_t_6)) {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":860
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":860
* if ((child.byteorder == c'>' and little_endian) or
* (child.byteorder == c'<' and not little_endian)):
* raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<<
@@ -25554,7 +25562,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__PYX_ERR(1, 860, __pyx_L1_error)
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":858
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":858
* raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
*
* if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
@@ -25563,7 +25571,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
*/
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":870
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":870
*
* # Output padding bytes
* while offset[0] < new_offset: # <<<<<<<<<<<<<<
@@ -25579,7 +25587,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (!__pyx_t_6) break;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":871
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":871
* # Output padding bytes
* while offset[0] < new_offset:
* f[0] = 120 # "x"; pad byte # <<<<<<<<<<<<<<
@@ -25588,7 +25596,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
*/
(__pyx_v_f[0]) = 0x78;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":872
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":872
* while offset[0] < new_offset:
* f[0] = 120 # "x"; pad byte
* f += 1 # <<<<<<<<<<<<<<
@@ -25597,7 +25605,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
*/
__pyx_v_f = (__pyx_v_f + 1);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":873
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":873
* f[0] = 120 # "x"; pad byte
* f += 1
* offset[0] += 1 # <<<<<<<<<<<<<<
@@ -25608,7 +25616,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
(__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + 1);
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":875
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":875
* offset[0] += 1
*
* offset[0] += child.itemsize # <<<<<<<<<<<<<<
@@ -25618,7 +25626,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__pyx_t_8 = 0;
(__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + __pyx_v_child->elsize);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":877
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":877
* offset[0] += child.itemsize
*
* if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<<
@@ -25628,7 +25636,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__pyx_t_6 = ((!(PyDataType_HASFIELDS(__pyx_v_child) != 0)) != 0);
if (__pyx_t_6) {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":878
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":878
*
* if not PyDataType_HASFIELDS(child):
* t = child.type_num # <<<<<<<<<<<<<<
@@ -25640,7 +25648,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_4);
__pyx_t_4 = 0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":879
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":879
* if not PyDataType_HASFIELDS(child):
* t = child.type_num
* if end - f < 5: # <<<<<<<<<<<<<<
@@ -25650,7 +25658,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__pyx_t_6 = (((__pyx_v_end - __pyx_v_f) < 5) != 0);
if (unlikely(__pyx_t_6)) {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":880
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":880
* t = child.type_num
* if end - f < 5:
* raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<<
@@ -25663,7 +25671,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__PYX_ERR(1, 880, __pyx_L1_error)
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":879
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":879
* if not PyDataType_HASFIELDS(child):
* t = child.type_num
* if end - f < 5: # <<<<<<<<<<<<<<
@@ -25672,7 +25680,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
*/
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":883
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":883
*
* # Until ticket #99 is fixed, use integers to avoid warnings
* if t == NPY_BYTE: f[0] = 98 #"b" # <<<<<<<<<<<<<<
@@ -25690,7 +25698,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":884
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":884
* # Until ticket #99 is fixed, use integers to avoid warnings
* if t == NPY_BYTE: f[0] = 98 #"b"
* elif t == NPY_UBYTE: f[0] = 66 #"B" # <<<<<<<<<<<<<<
@@ -25708,7 +25716,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":885
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":885
* if t == NPY_BYTE: f[0] = 98 #"b"
* elif t == NPY_UBYTE: f[0] = 66 #"B"
* elif t == NPY_SHORT: f[0] = 104 #"h" # <<<<<<<<<<<<<<
@@ -25726,7 +25734,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":886
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":886
* elif t == NPY_UBYTE: f[0] = 66 #"B"
* elif t == NPY_SHORT: f[0] = 104 #"h"
* elif t == NPY_USHORT: f[0] = 72 #"H" # <<<<<<<<<<<<<<
@@ -25744,7 +25752,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":887
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":887
* elif t == NPY_SHORT: f[0] = 104 #"h"
* elif t == NPY_USHORT: f[0] = 72 #"H"
* elif t == NPY_INT: f[0] = 105 #"i" # <<<<<<<<<<<<<<
@@ -25762,7 +25770,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":888
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":888
* elif t == NPY_USHORT: f[0] = 72 #"H"
* elif t == NPY_INT: f[0] = 105 #"i"
* elif t == NPY_UINT: f[0] = 73 #"I" # <<<<<<<<<<<<<<
@@ -25780,7 +25788,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":889
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":889
* elif t == NPY_INT: f[0] = 105 #"i"
* elif t == NPY_UINT: f[0] = 73 #"I"
* elif t == NPY_LONG: f[0] = 108 #"l" # <<<<<<<<<<<<<<
@@ -25798,7 +25806,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":890
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":890
* elif t == NPY_UINT: f[0] = 73 #"I"
* elif t == NPY_LONG: f[0] = 108 #"l"
* elif t == NPY_ULONG: f[0] = 76 #"L" # <<<<<<<<<<<<<<
@@ -25816,7 +25824,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":891
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":891
* elif t == NPY_LONG: f[0] = 108 #"l"
* elif t == NPY_ULONG: f[0] = 76 #"L"
* elif t == NPY_LONGLONG: f[0] = 113 #"q" # <<<<<<<<<<<<<<
@@ -25834,7 +25842,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":892
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":892
* elif t == NPY_ULONG: f[0] = 76 #"L"
* elif t == NPY_LONGLONG: f[0] = 113 #"q"
* elif t == NPY_ULONGLONG: f[0] = 81 #"Q" # <<<<<<<<<<<<<<
@@ -25852,7 +25860,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":893
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":893
* elif t == NPY_LONGLONG: f[0] = 113 #"q"
* elif t == NPY_ULONGLONG: f[0] = 81 #"Q"
* elif t == NPY_FLOAT: f[0] = 102 #"f" # <<<<<<<<<<<<<<
@@ -25870,7 +25878,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":894
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":894
* elif t == NPY_ULONGLONG: f[0] = 81 #"Q"
* elif t == NPY_FLOAT: f[0] = 102 #"f"
* elif t == NPY_DOUBLE: f[0] = 100 #"d" # <<<<<<<<<<<<<<
@@ -25888,7 +25896,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":895
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":895
* elif t == NPY_FLOAT: f[0] = 102 #"f"
* elif t == NPY_DOUBLE: f[0] = 100 #"d"
* elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" # <<<<<<<<<<<<<<
@@ -25906,7 +25914,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":896
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":896
* elif t == NPY_DOUBLE: f[0] = 100 #"d"
* elif t == NPY_LONGDOUBLE: f[0] = 103 #"g"
* elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf # <<<<<<<<<<<<<<
@@ -25926,7 +25934,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":897
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":897
* elif t == NPY_LONGDOUBLE: f[0] = 103 #"g"
* elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf
* elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd # <<<<<<<<<<<<<<
@@ -25946,7 +25954,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":898
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":898
* elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf
* elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd
* elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg # <<<<<<<<<<<<<<
@@ -25966,7 +25974,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":899
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":899
* elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd
* elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
* elif t == NPY_OBJECT: f[0] = 79 #"O" # <<<<<<<<<<<<<<
@@ -25984,7 +25992,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":901
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":901
* elif t == NPY_OBJECT: f[0] = 79 #"O"
* else:
* raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<<
@@ -26003,7 +26011,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
}
__pyx_L15:;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":902
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":902
* else:
* raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
* f += 1 # <<<<<<<<<<<<<<
@@ -26012,7 +26020,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
*/
__pyx_v_f = (__pyx_v_f + 1);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":877
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":877
* offset[0] += child.itemsize
*
* if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<<
@@ -26022,7 +26030,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L13;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":906
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":906
* # Cython ignores struct boundary information ("T{...}"),
* # so don't output it
* f = _util_dtypestring(child, f, end, offset) # <<<<<<<<<<<<<<
@@ -26035,7 +26043,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
}
__pyx_L13:;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":851
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":851
* cdef tuple fields
*
* for childname in descr.names: # <<<<<<<<<<<<<<
@@ -26045,7 +26053,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":907
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":907
* # so don't output it
* f = _util_dtypestring(child, f, end, offset)
* return f # <<<<<<<<<<<<<<
@@ -26055,7 +26063,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__pyx_r = __pyx_v_f;
goto __pyx_L0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":842
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":842
* return ()
*
* cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<<
@@ -26080,7 +26088,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
return __pyx_r;
}
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1022
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1022
* int _import_umath() except -1
*
* cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<<
@@ -26092,7 +26100,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("set_array_base", 0);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1023
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1023
*
* cdef inline void set_array_base(ndarray arr, object base):
* Py_INCREF(base) # important to do this before stealing the reference below! # <<<<<<<<<<<<<<
@@ -26101,7 +26109,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a
*/
Py_INCREF(__pyx_v_base);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1024
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1024
* cdef inline void set_array_base(ndarray arr, object base):
* Py_INCREF(base) # important to do this before stealing the reference below!
* PyArray_SetBaseObject(arr, base) # <<<<<<<<<<<<<<
@@ -26110,7 +26118,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a
*/
(void)(PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base));
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1022
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1022
* int _import_umath() except -1
*
* cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<<
@@ -26122,7 +26130,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a
__Pyx_RefNannyFinishContext();
}
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1026
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1026
* PyArray_SetBaseObject(arr, base)
*
* cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<<
@@ -26137,7 +26145,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py
int __pyx_t_1;
__Pyx_RefNannySetupContext("get_array_base", 0);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1027
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1027
*
* cdef inline object get_array_base(ndarray arr):
* base = PyArray_BASE(arr) # <<<<<<<<<<<<<<
@@ -26146,7 +26154,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py
*/
__pyx_v_base = PyArray_BASE(__pyx_v_arr);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1028
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1028
* cdef inline object get_array_base(ndarray arr):
* base = PyArray_BASE(arr)
* if base is NULL: # <<<<<<<<<<<<<<
@@ -26156,7 +26164,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py
__pyx_t_1 = ((__pyx_v_base == NULL) != 0);
if (__pyx_t_1) {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1029
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1029
* base = PyArray_BASE(arr)
* if base is NULL:
* return None # <<<<<<<<<<<<<<
@@ -26167,7 +26175,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
goto __pyx_L0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1028
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1028
* cdef inline object get_array_base(ndarray arr):
* base = PyArray_BASE(arr)
* if base is NULL: # <<<<<<<<<<<<<<
@@ -26176,7 +26184,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py
*/
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1030
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1030
* if base is NULL:
* return None
* return <object>base # <<<<<<<<<<<<<<
@@ -26188,7 +26196,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py
__pyx_r = ((PyObject *)__pyx_v_base);
goto __pyx_L0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1026
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1026
* PyArray_SetBaseObject(arr, base)
*
* cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<<
@@ -26203,7 +26211,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py
return __pyx_r;
}
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1034
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1034
* # Versions of the import_* functions which are more suitable for
* # Cython code.
* cdef inline int import_array() except -1: # <<<<<<<<<<<<<<
@@ -26224,7 +26232,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
PyObject *__pyx_t_8 = NULL;
__Pyx_RefNannySetupContext("import_array", 0);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1035
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1035
* # Cython code.
* cdef inline int import_array() except -1:
* try: # <<<<<<<<<<<<<<
@@ -26240,7 +26248,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
__Pyx_XGOTREF(__pyx_t_3);
/*try:*/ {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1036
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1036
* cdef inline int import_array() except -1:
* try:
* _import_array() # <<<<<<<<<<<<<<
@@ -26249,7 +26257,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
*/
__pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 1036, __pyx_L3_error)
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1035
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1035
* # Cython code.
* cdef inline int import_array() except -1:
* try: # <<<<<<<<<<<<<<
@@ -26263,7 +26271,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
goto __pyx_L8_try_end;
__pyx_L3_error:;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1037
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1037
* try:
* _import_array()
* except Exception: # <<<<<<<<<<<<<<
@@ -26278,7 +26286,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
__Pyx_GOTREF(__pyx_t_6);
__Pyx_GOTREF(__pyx_t_7);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1038
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1038
* _import_array()
* except Exception:
* raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<<
@@ -26294,7 +26302,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
goto __pyx_L5_except_error;
__pyx_L5_except_error:;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1035
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1035
* # Cython code.
* cdef inline int import_array() except -1:
* try: # <<<<<<<<<<<<<<
@@ -26309,7 +26317,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
__pyx_L8_try_end:;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1034
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1034
* # Versions of the import_* functions which are more suitable for
* # Cython code.
* cdef inline int import_array() except -1: # <<<<<<<<<<<<<<
@@ -26332,7 +26340,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
return __pyx_r;
}
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1040
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1040
* raise ImportError("numpy.core.multiarray failed to import")
*
* cdef inline int import_umath() except -1: # <<<<<<<<<<<<<<
@@ -26353,7 +26361,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
PyObject *__pyx_t_8 = NULL;
__Pyx_RefNannySetupContext("import_umath", 0);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1041
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1041
*
* cdef inline int import_umath() except -1:
* try: # <<<<<<<<<<<<<<
@@ -26369,7 +26377,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
__Pyx_XGOTREF(__pyx_t_3);
/*try:*/ {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1042
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1042
* cdef inline int import_umath() except -1:
* try:
* _import_umath() # <<<<<<<<<<<<<<
@@ -26378,7 +26386,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
*/
__pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 1042, __pyx_L3_error)
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1041
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1041
*
* cdef inline int import_umath() except -1:
* try: # <<<<<<<<<<<<<<
@@ -26392,7 +26400,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
goto __pyx_L8_try_end;
__pyx_L3_error:;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1043
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1043
* try:
* _import_umath()
* except Exception: # <<<<<<<<<<<<<<
@@ -26407,7 +26415,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
__Pyx_GOTREF(__pyx_t_6);
__Pyx_GOTREF(__pyx_t_7);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1044
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1044
* _import_umath()
* except Exception:
* raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<<
@@ -26423,7 +26431,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
goto __pyx_L5_except_error;
__pyx_L5_except_error:;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1041
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1041
*
* cdef inline int import_umath() except -1:
* try: # <<<<<<<<<<<<<<
@@ -26438,7 +26446,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
__pyx_L8_try_end:;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1040
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1040
* raise ImportError("numpy.core.multiarray failed to import")
*
* cdef inline int import_umath() except -1: # <<<<<<<<<<<<<<
@@ -26461,7 +26469,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
return __pyx_r;
}
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1046
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1046
* raise ImportError("numpy.core.umath failed to import")
*
* cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<<
@@ -26482,7 +26490,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) {
PyObject *__pyx_t_8 = NULL;
__Pyx_RefNannySetupContext("import_ufunc", 0);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1047
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1047
*
* cdef inline int import_ufunc() except -1:
* try: # <<<<<<<<<<<<<<
@@ -26498,7 +26506,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) {
__Pyx_XGOTREF(__pyx_t_3);
/*try:*/ {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1048
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1048
* cdef inline int import_ufunc() except -1:
* try:
* _import_umath() # <<<<<<<<<<<<<<
@@ -26507,7 +26515,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) {
*/
__pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 1048, __pyx_L3_error)
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1047
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1047
*
* cdef inline int import_ufunc() except -1:
* try: # <<<<<<<<<<<<<<
@@ -26521,7 +26529,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) {
goto __pyx_L8_try_end;
__pyx_L3_error:;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1049
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1049
* try:
* _import_umath()
* except Exception: # <<<<<<<<<<<<<<
@@ -26535,7 +26543,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) {
__Pyx_GOTREF(__pyx_t_6);
__Pyx_GOTREF(__pyx_t_7);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1050
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1050
* _import_umath()
* except Exception:
* raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<<
@@ -26549,7 +26557,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) {
goto __pyx_L5_except_error;
__pyx_L5_except_error:;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1047
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1047
*
* cdef inline int import_ufunc() except -1:
* try: # <<<<<<<<<<<<<<
@@ -26564,7 +26572,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) {
__pyx_L8_try_end:;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1046
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1046
* raise ImportError("numpy.core.umath failed to import")
*
* cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<<
@@ -39537,6 +39545,9 @@ static PyTypeObject __pyx_type___pyx_array = {
#if PY_VERSION_HEX >= 0x030400a1
0, /*tp_finalize*/
#endif
+ #if PY_VERSION_HEX >= 0x030800b1
+ 0, /*tp_vectorcall*/
+ #endif
};
static PyObject *__pyx_tp_new_Enum(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
@@ -39645,6 +39656,9 @@ static PyTypeObject __pyx_type___pyx_MemviewEnum = {
#if PY_VERSION_HEX >= 0x030400a1
0, /*tp_finalize*/
#endif
+ #if PY_VERSION_HEX >= 0x030800b1
+ 0, /*tp_vectorcall*/
+ #endif
};
static struct __pyx_vtabstruct_memoryview __pyx_vtable_memoryview;
@@ -39895,6 +39909,9 @@ static PyTypeObject __pyx_type___pyx_memoryview = {
#if PY_VERSION_HEX >= 0x030400a1
0, /*tp_finalize*/
#endif
+ #if PY_VERSION_HEX >= 0x030800b1
+ 0, /*tp_vectorcall*/
+ #endif
};
static struct __pyx_vtabstruct__memoryviewslice __pyx_vtable__memoryviewslice;
@@ -40030,6 +40047,9 @@ static PyTypeObject __pyx_type___pyx_memoryviewslice = {
#if PY_VERSION_HEX >= 0x030400a1
0, /*tp_finalize*/
#endif
+ #if PY_VERSION_HEX >= 0x030800b1
+ 0, /*tp_vectorcall*/
+ #endif
};
static PyMethodDef __pyx_methods[] = {
@@ -40319,7 +40339,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
__Pyx_GOTREF(__pyx_tuple__5);
__Pyx_GIVEREF(__pyx_tuple__5);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":272
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":272
* if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
* and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)):
* raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<<
@@ -40330,7 +40350,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
__Pyx_GOTREF(__pyx_tuple__6);
__Pyx_GIVEREF(__pyx_tuple__6);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":276
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":276
* if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
* and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)):
* raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<<
@@ -40341,7 +40361,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
__Pyx_GOTREF(__pyx_tuple__7);
__Pyx_GIVEREF(__pyx_tuple__7);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":306
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":306
* if ((descr.byteorder == c'>' and little_endian) or
* (descr.byteorder == c'<' and not little_endian)):
* raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<<
@@ -40352,7 +40372,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
__Pyx_GOTREF(__pyx_tuple__8);
__Pyx_GIVEREF(__pyx_tuple__8);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":856
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":856
*
* if (end - f) - <int>(new_offset - offset[0]) < 15:
* raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<<
@@ -40363,7 +40383,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
__Pyx_GOTREF(__pyx_tuple__9);
__Pyx_GIVEREF(__pyx_tuple__9);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":880
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":880
* t = child.type_num
* if end - f < 5:
* raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<<
@@ -40374,7 +40394,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
__Pyx_GOTREF(__pyx_tuple__10);
__Pyx_GIVEREF(__pyx_tuple__10);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1038
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1038
* _import_array()
* except Exception:
* raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<<
@@ -40385,7 +40405,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
__Pyx_GOTREF(__pyx_tuple__11);
__Pyx_GIVEREF(__pyx_tuple__11);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1044
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1044
* _import_umath()
* except Exception:
* raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<<
@@ -40761,12 +40781,16 @@ static int __Pyx_modinit_type_init_code(void) {
__pyx_vtabptr_array = &__pyx_vtable_array;
__pyx_vtable_array.get_memview = (PyObject *(*)(struct __pyx_array_obj *))__pyx_array_get_memview;
if (PyType_Ready(&__pyx_type___pyx_array) < 0) __PYX_ERR(2, 105, __pyx_L1_error)
+ #if PY_VERSION_HEX < 0x030800B1
__pyx_type___pyx_array.tp_print = 0;
+ #endif
if (__Pyx_SetVtable(__pyx_type___pyx_array.tp_dict, __pyx_vtabptr_array) < 0) __PYX_ERR(2, 105, __pyx_L1_error)
if (__Pyx_setup_reduce((PyObject*)&__pyx_type___pyx_array) < 0) __PYX_ERR(2, 105, __pyx_L1_error)
__pyx_array_type = &__pyx_type___pyx_array;
if (PyType_Ready(&__pyx_type___pyx_MemviewEnum) < 0) __PYX_ERR(2, 279, __pyx_L1_error)
+ #if PY_VERSION_HEX < 0x030800B1
__pyx_type___pyx_MemviewEnum.tp_print = 0;
+ #endif
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_MemviewEnum.tp_dictoffset && __pyx_type___pyx_MemviewEnum.tp_getattro == PyObject_GenericGetAttr)) {
__pyx_type___pyx_MemviewEnum.tp_getattro = __Pyx_PyObject_GenericGetAttr;
}
@@ -40781,7 +40805,9 @@ static int __Pyx_modinit_type_init_code(void) {
__pyx_vtable_memoryview.convert_item_to_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *))__pyx_memoryview_convert_item_to_object;
__pyx_vtable_memoryview.assign_item_from_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *, PyObject *))__pyx_memoryview_assign_item_from_object;
if (PyType_Ready(&__pyx_type___pyx_memoryview) < 0) __PYX_ERR(2, 330, __pyx_L1_error)
+ #if PY_VERSION_HEX < 0x030800B1
__pyx_type___pyx_memoryview.tp_print = 0;
+ #endif
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_memoryview.tp_dictoffset && __pyx_type___pyx_memoryview.tp_getattro == PyObject_GenericGetAttr)) {
__pyx_type___pyx_memoryview.tp_getattro = __Pyx_PyObject_GenericGetAttr;
}
@@ -40794,7 +40820,9 @@ static int __Pyx_modinit_type_init_code(void) {
__pyx_vtable__memoryviewslice.__pyx_base.assign_item_from_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *, PyObject *))__pyx_memoryviewslice_assign_item_from_object;
__pyx_type___pyx_memoryviewslice.tp_base = __pyx_memoryview_type;
if (PyType_Ready(&__pyx_type___pyx_memoryviewslice) < 0) __PYX_ERR(2, 961, __pyx_L1_error)
+ #if PY_VERSION_HEX < 0x030800B1
__pyx_type___pyx_memoryviewslice.tp_print = 0;
+ #endif
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_memoryviewslice.tp_dictoffset && __pyx_type___pyx_memoryviewslice.tp_getattro == PyObject_GenericGetAttr)) {
__pyx_type___pyx_memoryviewslice.tp_getattro = __Pyx_PyObject_GenericGetAttr;
}
@@ -44895,6 +44923,9 @@ static PyTypeObject __pyx_CyFunctionType_type = {
#if PY_VERSION_HEX >= 0x030400a1
0,
#endif
+#if PY_VERSION_HEX >= 0x030800b1
+ 0,
+#endif
};
static int __pyx_CyFunction_init(void) {
__pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type);
@@ -45249,6 +45280,9 @@ static PyTypeObject __pyx_FusedFunctionType_type = {
#if PY_VERSION_HEX >= 0x030400a1
0,
#endif
+#if PY_VERSION_HEX >= 0x030800b1
+ 0,
+#endif
};
static int __pyx_FusedFunction_init(void) {
__pyx_FusedFunctionType = __Pyx_FetchCommonType(&__pyx_FusedFunctionType_type);
diff --git a/silx/math/combo.c b/silx/math/combo.c
index 8fba7de..a166dde 100644
--- a/silx/math/combo.c
+++ b/silx/math/combo.c
@@ -1,4 +1,4 @@
-/* Generated by Cython 0.29.7 */
+/* Generated by Cython 0.29.11 */
/* BEGIN: Cython Metadata
{
@@ -26,8 +26,8 @@ END: Cython Metadata */
#elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
#error Cython requires Python 2.6+ or Python 3.3+.
#else
-#define CYTHON_ABI "0_29_7"
-#define CYTHON_HEX_VERSION 0x001D07F0
+#define CYTHON_ABI "0_29_11"
+#define CYTHON_HEX_VERSION 0x001D0BF0
#define CYTHON_FUTURE_DIVISION 1
#include <stddef.h>
#ifndef offsetof
@@ -329,8 +329,16 @@ END: Cython Metadata */
#define __Pyx_DefaultClassType PyClass_Type
#else
#define __Pyx_BUILTIN_MODULE_NAME "builtins"
+#if PY_VERSION_HEX < 0x030800A4
#define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
+#elif PY_VERSION_HEX >= 0x030800B2
+ #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
+ PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
+#else
+ #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
+ PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
+#endif
#define __Pyx_DefaultClassType PyType_Type
#endif
#ifndef Py_TPFLAGS_CHECKTYPES
@@ -33002,6 +33010,9 @@ static PyTypeObject __pyx_type___pyx_array = {
#if PY_VERSION_HEX >= 0x030400a1
0, /*tp_finalize*/
#endif
+ #if PY_VERSION_HEX >= 0x030800b1
+ 0, /*tp_vectorcall*/
+ #endif
};
static PyObject *__pyx_tp_new_Enum(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
@@ -33110,6 +33121,9 @@ static PyTypeObject __pyx_type___pyx_MemviewEnum = {
#if PY_VERSION_HEX >= 0x030400a1
0, /*tp_finalize*/
#endif
+ #if PY_VERSION_HEX >= 0x030800b1
+ 0, /*tp_vectorcall*/
+ #endif
};
static struct __pyx_vtabstruct_memoryview __pyx_vtable_memoryview;
@@ -33360,6 +33374,9 @@ static PyTypeObject __pyx_type___pyx_memoryview = {
#if PY_VERSION_HEX >= 0x030400a1
0, /*tp_finalize*/
#endif
+ #if PY_VERSION_HEX >= 0x030800b1
+ 0, /*tp_vectorcall*/
+ #endif
};
static struct __pyx_vtabstruct__memoryviewslice __pyx_vtable__memoryviewslice;
@@ -33495,6 +33512,9 @@ static PyTypeObject __pyx_type___pyx_memoryviewslice = {
#if PY_VERSION_HEX >= 0x030400a1
0, /*tp_finalize*/
#endif
+ #if PY_VERSION_HEX >= 0x030800b1
+ 0, /*tp_vectorcall*/
+ #endif
};
static PyMethodDef __pyx_methods[] = {
@@ -34174,12 +34194,16 @@ static int __Pyx_modinit_type_init_code(void) {
__pyx_vtabptr_array = &__pyx_vtable_array;
__pyx_vtable_array.get_memview = (PyObject *(*)(struct __pyx_array_obj *))__pyx_array_get_memview;
if (PyType_Ready(&__pyx_type___pyx_array) < 0) __PYX_ERR(1, 105, __pyx_L1_error)
+ #if PY_VERSION_HEX < 0x030800B1
__pyx_type___pyx_array.tp_print = 0;
+ #endif
if (__Pyx_SetVtable(__pyx_type___pyx_array.tp_dict, __pyx_vtabptr_array) < 0) __PYX_ERR(1, 105, __pyx_L1_error)
if (__Pyx_setup_reduce((PyObject*)&__pyx_type___pyx_array) < 0) __PYX_ERR(1, 105, __pyx_L1_error)
__pyx_array_type = &__pyx_type___pyx_array;
if (PyType_Ready(&__pyx_type___pyx_MemviewEnum) < 0) __PYX_ERR(1, 279, __pyx_L1_error)
+ #if PY_VERSION_HEX < 0x030800B1
__pyx_type___pyx_MemviewEnum.tp_print = 0;
+ #endif
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_MemviewEnum.tp_dictoffset && __pyx_type___pyx_MemviewEnum.tp_getattro == PyObject_GenericGetAttr)) {
__pyx_type___pyx_MemviewEnum.tp_getattro = __Pyx_PyObject_GenericGetAttr;
}
@@ -34194,7 +34218,9 @@ static int __Pyx_modinit_type_init_code(void) {
__pyx_vtable_memoryview.convert_item_to_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *))__pyx_memoryview_convert_item_to_object;
__pyx_vtable_memoryview.assign_item_from_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *, PyObject *))__pyx_memoryview_assign_item_from_object;
if (PyType_Ready(&__pyx_type___pyx_memoryview) < 0) __PYX_ERR(1, 330, __pyx_L1_error)
+ #if PY_VERSION_HEX < 0x030800B1
__pyx_type___pyx_memoryview.tp_print = 0;
+ #endif
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_memoryview.tp_dictoffset && __pyx_type___pyx_memoryview.tp_getattro == PyObject_GenericGetAttr)) {
__pyx_type___pyx_memoryview.tp_getattro = __Pyx_PyObject_GenericGetAttr;
}
@@ -34207,7 +34233,9 @@ static int __Pyx_modinit_type_init_code(void) {
__pyx_vtable__memoryviewslice.__pyx_base.assign_item_from_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *, PyObject *))__pyx_memoryviewslice_assign_item_from_object;
__pyx_type___pyx_memoryviewslice.tp_base = __pyx_memoryview_type;
if (PyType_Ready(&__pyx_type___pyx_memoryviewslice) < 0) __PYX_ERR(1, 961, __pyx_L1_error)
+ #if PY_VERSION_HEX < 0x030800B1
__pyx_type___pyx_memoryviewslice.tp_print = 0;
+ #endif
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_memoryviewslice.tp_dictoffset && __pyx_type___pyx_memoryviewslice.tp_getattro == PyObject_GenericGetAttr)) {
__pyx_type___pyx_memoryviewslice.tp_getattro = __Pyx_PyObject_GenericGetAttr;
}
@@ -38351,6 +38379,9 @@ static PyTypeObject __pyx_CyFunctionType_type = {
#if PY_VERSION_HEX >= 0x030400a1
0,
#endif
+#if PY_VERSION_HEX >= 0x030800b1
+ 0,
+#endif
};
static int __pyx_CyFunction_init(void) {
__pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type);
@@ -38772,6 +38803,9 @@ static PyTypeObject __pyx_FusedFunctionType_type = {
#if PY_VERSION_HEX >= 0x030400a1
0,
#endif
+#if PY_VERSION_HEX >= 0x030800b1
+ 0,
+#endif
};
static int __pyx_FusedFunction_init(void) {
__pyx_FusedFunctionType = __Pyx_FetchCommonType(&__pyx_FusedFunctionType_type);
diff --git a/silx/math/fft/test/__init__.py b/silx/math/fft/test/__init__.py
index 8019fba..83f8926 100644
--- a/silx/math/fft/test/__init__.py
+++ b/silx/math/fft/test/__init__.py
@@ -1,6 +1,6 @@
# coding: utf-8
# /*##########################################################################
-# Copyright (C) 2016-2018 European Synchrotron Radiation Facility
+# Copyright (C) 2016-2019 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -22,7 +22,4 @@
#
# ############################################################################*/
-from .test_fft import test_all
-
-def suite():
- return test_all()
+from .test_fft import suite
diff --git a/silx/math/fft/test/test_fft.py b/silx/math/fft/test/test_fft.py
index b0e595b..51f846f 100644
--- a/silx/math/fft/test/test_fft.py
+++ b/silx/math/fft/test/test_fft.py
@@ -2,7 +2,7 @@
# coding: utf-8
# /*##########################################################################
#
-# Copyright (c) 2018 European Synchrotron Radiation Facility
+# Copyright (c) 2018-2019 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -23,21 +23,27 @@
# THE SOFTWARE.
#
# ###########################################################################*/
-"""Test of the MFFT module"""
+"""Test of the FFT module"""
import numpy as np
import unittest
import logging
-from scipy.misc import ascent
-from silx.utils.testutils import parameterize
+try:
+ from scipy.misc import ascent
+ __have_scipy = True
+except ImportError:
+ __have_scipy = False
+from silx.utils.testutils import ParametricTestCase
from silx.math.fft.fft import FFT
from silx.math.fft.clfft import __have_clfft__
from silx.math.fft.cufft import __have_cufft__
from silx.math.fft.fftw import __have_fftw__
from silx.test.utils import test_options
+
logger = logging.getLogger(__name__)
+
class TransformInfos(object):
def __init__(self):
self.dimensions = [
@@ -73,7 +79,7 @@ class TransformInfos(object):
class TestData(object):
def __init__(self):
self.data = ascent().astype("float32")
- self.data1d = self.data[:, 0] # non-contiguous data
+ self.data1d = self.data[:, 0] # non-contiguous data
self.data3d = np.tile(self.data[:128, :128], (128, 1, 1))
self.data_refs = {
1: self.data1d,
@@ -82,29 +88,9 @@ class TestData(object):
}
-
-class TestFFT(unittest.TestCase):
-
- @classmethod
- def setUpClass(cls):
- super(TestFFT, cls).setUpClass()
- cls.Ctx = None
- if __have_clfft__:
- from silx.opencl.common import ocl
- if ocl is not None:
- cls.Ctx = ocl.create_context()
-
- @classmethod
- def tearDownClass(cls):
- super(TestFFT, cls).tearDownClass()
- if cls.Ctx is not None:
- del cls.Ctx
-
-
- def __init__(self, methodName='runTest', param=None):
- unittest.TestCase.__init__(self, methodName)
- self.param = param
-
+@unittest.skipUnless(__have_scipy, "scipy is missing")
+class TestFFT(ParametricTestCase):
+ """Test cuda/opencl/fftw backends of FFT"""
def setUp(self):
self.tol = {
@@ -113,48 +99,8 @@ class TestFFT(unittest.TestCase):
np.dtype("complex64"): 1e-3,
np.dtype("complex128"): 1e-9,
}
- self.backend = self.param["backend"]
- self.trdim = self.param["trdim"]
- self.mode = self.param["mode"]
- self.size = self.param["size"]
- self.transform_infos = self.param["transform_infos"]
- self.test_data = self.param["test_data"]
- self.configure_backends()
- self.configure_extra_args()
- if self.backend == "opencl" and self.Ctx is None:
- self.skipTest("PyopenCL is missing")
-
-
- def tearDown(self):
- pass
-
-
- def configure_backends(self):
- self.__have_clfft__ = __have_clfft__
- self.__have_cufft__ = __have_cufft__
- self.__have_fftw__ = __have_fftw__
-
- if self.backend in ["cuda", "cufft"] and __have_cufft__:
- import pycuda.autoinit
- # Error is higher when using cuda. fast_math mode ?
- self.tol[np.dtype("float32")] *= 2
-
-
- def configure_extra_args(self):
- self.extra_args = {}
- if __have_clfft__ and self.backend in ["opencl", "clfft"]:
- self.extra_args["ctx"] = self.Ctx
-
-
- def check_current_backend(self):
- if self.backend in ["cuda", "cufft"] and not(self.__have_cufft__):
- return "cuda back-end requires pycuda and scikit-cuda"
- if self.backend in ["opencl", "clfft"] and not(self.__have_clfft__):
- return "opencl back-end requires pyopencl and gpyfft"
- if self.backend == "fftw" and not(self.__have_fftw__):
- return "fftw back-end requires pyfftw"
- return None
-
+ self.transform_infos = TransformInfos()
+ self.test_data = TestData()
@staticmethod
def calc_mae(arr1, arr2):
@@ -163,33 +109,66 @@ class TestFFT(unittest.TestCase):
"""
return np.max(np.abs(arr1 - arr2))
+ @unittest.skipIf(not __have_cufft__,
+ "cuda back-end requires pycuda and scikit-cuda")
+ def test_cuda(self):
+ import pycuda.autoinit
+
+ # Error is higher when using cuda. fast_math mode ?
+ self.tol[np.dtype("float32")] *= 2
+
+ self.__run_tests(backend="cuda")
+
+ @unittest.skipIf(not __have_clfft__,
+ "opencl back-end requires pyopencl and gpyfft")
+ def test_opencl(self):
+ from silx.opencl.common import ocl
+ self.__run_tests(backend="opencl", ctx=ocl.create_context())
- def test_fft(self):
- err = self.check_current_backend()
- if err is not None:
- self.skipTest(err)
- if self.size == "3D" and test_options.TEST_LOW_MEM:
+ @unittest.skipIf(not __have_fftw__,
+ "fftw back-end requires pyfftw")
+ def test_fftw(self):
+ self.__run_tests(backend="fftw")
+
+ def __run_tests(self, backend, **extra_args):
+ """Run all tests with the given backend
+
+ :param str backend:
+ :param dict extra_args: Additional arguments to provide to FFT
+ """
+ for trdim in self.transform_infos.dimensions:
+ for mode in self.transform_infos.modes:
+ for size in self.transform_infos.sizes[trdim]:
+ with self.subTest(trdim=trdim, mode=mode, size=size):
+ self.__test(backend, trdim, mode, size, **extra_args)
+
+ def __test(self, backend, trdim, mode, size, **extra_args):
+ """Compare given backend with numpy for given conditions"""
+ logger.debug("backend: %s, trdim: %s, mode: %s, size: %s",
+ backend, trdim, mode, str(size))
+ if size == "3D" and test_options.TEST_LOW_MEM:
self.skipTest("low mem")
- ndim = len(self.size)
- input_data = self.test_data.data_refs[ndim].astype(self.transform_infos.modes[self.mode])
+ ndim = len(size)
+ input_data = self.test_data.data_refs[ndim].astype(
+ self.transform_infos.modes[mode])
tol = self.tol[np.dtype(input_data.dtype)]
- if self.trdim == "3D":
- tol *= 10 # Error is relatively high in high dimensions
+ if trdim == "3D":
+ tol *= 10 # Error is relatively high in high dimensions
# Python < 3.5 does not want to mix **extra_args with existing kwargs
fft_args = {
"template": input_data,
- "axes": self.transform_infos.axes[self.trdim],
- "backend": self.backend,
+ "axes": self.transform_infos.axes[trdim],
+ "backend": backend,
}
- fft_args.update(self.extra_args)
+ fft_args.update(extra_args)
F = FFT(
**fft_args
)
F_np = FFT(
template=input_data,
- axes=self.transform_infos.axes[self.trdim],
+ axes=self.transform_infos.axes[trdim],
backend="numpy"
)
@@ -199,7 +178,7 @@ class TestFFT(unittest.TestCase):
mae = self.calc_mae(res, res_np)
self.assertTrue(
mae < np.abs(input_data.max()) * tol,
- "FFT %s:%s, MAE(%s, numpy) = %f" % (self.mode, self.trdim, self.backend, mae)
+ "FFT %s:%s, MAE(%s, numpy) = %f" % (mode, trdim, backend, mae)
)
# Inverse FFT
@@ -207,19 +186,16 @@ class TestFFT(unittest.TestCase):
mae = self.calc_mae(res2, input_data)
self.assertTrue(
mae < tol,
- "IFFT %s:%s, MAE(%s, numpy) = %f" % (self.mode, self.trdim, self.backend, mae)
+ "IFFT %s:%s, MAE(%s, numpy) = %f" % (mode, trdim, backend, mae)
)
-class TestNumpyFFT(unittest.TestCase):
+@unittest.skipUnless(__have_scipy, "scipy is missing")
+class TestNumpyFFT(ParametricTestCase):
"""
Test the Numpy backend individually.
"""
- def __init__(self, methodName='runTest', param=None):
- unittest.TestCase.__init__(self, methodName)
- self.param = param
-
def setUp(self):
transforms = {
"1D": {
@@ -238,22 +214,30 @@ class TestNumpyFFT(unittest.TestCase):
transforms["batched_1D"] = transforms["1D"]
transforms["batched_2D"] = transforms["2D"]
self.transforms = transforms
+ self.transform_infos = TransformInfos()
+ self.test_data = TestData()
+ def test(self):
+ """Test the numpy backend against native fft.
- def test_numpy_fft(self):
- """
- Test the numpy backend against native fft.
Results should be exactly the same.
"""
- trinfos = self.param["transform_infos"]
- trdim = self.param["trdim"]
- ndim = len(self.param["size"])
- input_data = self.param["test_data"].data_refs[ndim].astype(trinfos.modes[self.param["mode"]])
+ for trdim in self.transform_infos.dimensions:
+ for mode in self.transform_infos.modes:
+ for size in self.transform_infos.sizes[trdim]:
+ with self.subTest(trdim=trdim, mode=mode, size=size):
+ self.__test(trdim, mode, size)
+
+ def __test(self, trdim, mode, size):
+ logger.debug("trdim: %s, mode: %s, size: %s", trdim, mode, str(size))
+ ndim = len(size)
+ input_data = self.test_data.data_refs[ndim].astype(
+ self.transform_infos.modes[mode])
np_fft, np_ifft = self.transforms[trdim][np.isrealobj(input_data)]
F = FFT(
template=input_data,
- axes=trinfos.axes[trdim],
+ axes=self.transform_infos.axes[trdim],
backend="numpy"
)
# Test FFT
@@ -267,72 +251,15 @@ class TestNumpyFFT(unittest.TestCase):
self.assertTrue(np.allclose(res2, ref2))
-def test_numpy_backend(dimensions=None):
- testSuite = unittest.TestSuite()
- transform_infos = TransformInfos()
- test_data = TestData()
- dimensions = dimensions or transform_infos.dimensions
-
- for trdim in dimensions:
- logger.debug(" testing %s" % trdim)
- for mode in transform_infos.modes:
- logger.debug(" testing %s:%s" % (trdim, mode))
- for size in transform_infos.sizes[trdim]:
- logger.debug(" size: %s" % str(size))
- testcase = parameterize(
- TestNumpyFFT,
- param={
- "transform_infos": transform_infos,
- "test_data": test_data,
- "trdim": trdim,
- "mode": mode,
- "size": size,
- }
- )
- testSuite.addTest(testcase)
- return testSuite
-
-
-def test_fft(backend, dimensions=None):
- testSuite = unittest.TestSuite()
- transform_infos = TransformInfos()
- test_data = TestData()
- dimensions = dimensions or transform_infos.dimensions
-
- logger.info("Testing backend: %s" % backend)
- for trdim in dimensions:
- logger.debug(" testing %s" % trdim)
- for mode in transform_infos.modes:
- logger.debug(" testing %s:%s" % (trdim, mode))
- for size in transform_infos.sizes[trdim]:
- logger.debug(" size: %s" % str(size))
- testcase = parameterize(
- TestFFT,
- param={
- "transform_infos": transform_infos,
- "test_data": test_data,
- "backend": backend,
- "trdim": trdim,
- "mode": mode,
- "size": size,
- }
- )
- testSuite.addTest(testcase)
- return testSuite
-
-
-def test_all():
+def suite():
suite = unittest.TestSuite()
-
- suite.addTest(test_numpy_backend())
-
- suite.addTest(test_fft("fftw"))
- suite.addTest(test_fft("opencl"))
- suite.addTest(test_fft("cuda"))
+ for cls in (TestNumpyFFT, TestFFT):
+ suite.addTest(
+ unittest.defaultTestLoader.loadTestsFromTestCase(cls))
return suite
if __name__ == '__main__':
- unittest.main(defaultTest="test_all")
+ unittest.main(defaultTest="suite")
diff --git a/silx/math/fit/bgtheories.py b/silx/math/fit/bgtheories.py
index 3cdac98..ccb556e 100644
--- a/silx/math/fit/bgtheories.py
+++ b/silx/math/fit/bgtheories.py
@@ -1,7 +1,7 @@
# coding: utf-8
#/*##########################################################################
#
-# Copyright (c) 2004-2017 European Synchrotron Radiation Facility
+# Copyright (c) 2004-2019 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -163,7 +163,7 @@ def strip_bg(x, y0, width, niter):
# same parameters
if not parameters_changed:
# same data
- if numpy.sum(_BG_STRIP_OLDY == y0) == len(y0):
+ if numpy.array_equal(_BG_STRIP_OLDY, y0):
# same result
return _BG_STRIP_OLDBG
diff --git a/silx/math/fit/filters.c b/silx/math/fit/filters.c
index d4f0946..0e45fe4 100644
--- a/silx/math/fit/filters.c
+++ b/silx/math/fit/filters.c
@@ -1,4 +1,4 @@
-/* Generated by Cython 0.29.7 */
+/* Generated by Cython 0.29.11 */
/* BEGIN: Cython Metadata
{
@@ -31,8 +31,8 @@ END: Cython Metadata */
#elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
#error Cython requires Python 2.6+ or Python 3.3+.
#else
-#define CYTHON_ABI "0_29_7"
-#define CYTHON_HEX_VERSION 0x001D07F0
+#define CYTHON_ABI "0_29_11"
+#define CYTHON_HEX_VERSION 0x001D0BF0
#define CYTHON_FUTURE_DIVISION 1
#include <stddef.h>
#ifndef offsetof
@@ -334,8 +334,16 @@ END: Cython Metadata */
#define __Pyx_DefaultClassType PyClass_Type
#else
#define __Pyx_BUILTIN_MODULE_NAME "builtins"
+#if PY_VERSION_HEX < 0x030800A4
#define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
+#elif PY_VERSION_HEX >= 0x030800B2
+ #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
+ PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
+#else
+ #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
+ PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
+#endif
#define __Pyx_DefaultClassType PyType_Type
#endif
#ifndef Py_TPFLAGS_CHECKTYPES
@@ -19001,6 +19009,9 @@ static PyTypeObject __pyx_type___pyx_array = {
#if PY_VERSION_HEX >= 0x030400a1
0, /*tp_finalize*/
#endif
+ #if PY_VERSION_HEX >= 0x030800b1
+ 0, /*tp_vectorcall*/
+ #endif
};
static PyObject *__pyx_tp_new_Enum(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
@@ -19109,6 +19120,9 @@ static PyTypeObject __pyx_type___pyx_MemviewEnum = {
#if PY_VERSION_HEX >= 0x030400a1
0, /*tp_finalize*/
#endif
+ #if PY_VERSION_HEX >= 0x030800b1
+ 0, /*tp_vectorcall*/
+ #endif
};
static struct __pyx_vtabstruct_memoryview __pyx_vtable_memoryview;
@@ -19359,6 +19373,9 @@ static PyTypeObject __pyx_type___pyx_memoryview = {
#if PY_VERSION_HEX >= 0x030400a1
0, /*tp_finalize*/
#endif
+ #if PY_VERSION_HEX >= 0x030800b1
+ 0, /*tp_vectorcall*/
+ #endif
};
static struct __pyx_vtabstruct__memoryviewslice __pyx_vtable__memoryviewslice;
@@ -19494,6 +19511,9 @@ static PyTypeObject __pyx_type___pyx_memoryviewslice = {
#if PY_VERSION_HEX >= 0x030400a1
0, /*tp_finalize*/
#endif
+ #if PY_VERSION_HEX >= 0x030800b1
+ 0, /*tp_vectorcall*/
+ #endif
};
static PyMethodDef __pyx_methods[] = {
@@ -20188,12 +20208,16 @@ static int __Pyx_modinit_type_init_code(void) {
__pyx_vtabptr_array = &__pyx_vtable_array;
__pyx_vtable_array.get_memview = (PyObject *(*)(struct __pyx_array_obj *))__pyx_array_get_memview;
if (PyType_Ready(&__pyx_type___pyx_array) < 0) __PYX_ERR(1, 105, __pyx_L1_error)
+ #if PY_VERSION_HEX < 0x030800B1
__pyx_type___pyx_array.tp_print = 0;
+ #endif
if (__Pyx_SetVtable(__pyx_type___pyx_array.tp_dict, __pyx_vtabptr_array) < 0) __PYX_ERR(1, 105, __pyx_L1_error)
if (__Pyx_setup_reduce((PyObject*)&__pyx_type___pyx_array) < 0) __PYX_ERR(1, 105, __pyx_L1_error)
__pyx_array_type = &__pyx_type___pyx_array;
if (PyType_Ready(&__pyx_type___pyx_MemviewEnum) < 0) __PYX_ERR(1, 279, __pyx_L1_error)
+ #if PY_VERSION_HEX < 0x030800B1
__pyx_type___pyx_MemviewEnum.tp_print = 0;
+ #endif
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_MemviewEnum.tp_dictoffset && __pyx_type___pyx_MemviewEnum.tp_getattro == PyObject_GenericGetAttr)) {
__pyx_type___pyx_MemviewEnum.tp_getattro = __Pyx_PyObject_GenericGetAttr;
}
@@ -20208,7 +20232,9 @@ static int __Pyx_modinit_type_init_code(void) {
__pyx_vtable_memoryview.convert_item_to_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *))__pyx_memoryview_convert_item_to_object;
__pyx_vtable_memoryview.assign_item_from_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *, PyObject *))__pyx_memoryview_assign_item_from_object;
if (PyType_Ready(&__pyx_type___pyx_memoryview) < 0) __PYX_ERR(1, 330, __pyx_L1_error)
+ #if PY_VERSION_HEX < 0x030800B1
__pyx_type___pyx_memoryview.tp_print = 0;
+ #endif
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_memoryview.tp_dictoffset && __pyx_type___pyx_memoryview.tp_getattro == PyObject_GenericGetAttr)) {
__pyx_type___pyx_memoryview.tp_getattro = __Pyx_PyObject_GenericGetAttr;
}
@@ -20221,7 +20247,9 @@ static int __Pyx_modinit_type_init_code(void) {
__pyx_vtable__memoryviewslice.__pyx_base.assign_item_from_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *, PyObject *))__pyx_memoryviewslice_assign_item_from_object;
__pyx_type___pyx_memoryviewslice.tp_base = __pyx_memoryview_type;
if (PyType_Ready(&__pyx_type___pyx_memoryviewslice) < 0) __PYX_ERR(1, 961, __pyx_L1_error)
+ #if PY_VERSION_HEX < 0x030800B1
__pyx_type___pyx_memoryviewslice.tp_print = 0;
+ #endif
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_memoryviewslice.tp_dictoffset && __pyx_type___pyx_memoryviewslice.tp_getattro == PyObject_GenericGetAttr)) {
__pyx_type___pyx_memoryviewslice.tp_getattro = __Pyx_PyObject_GenericGetAttr;
}
diff --git a/silx/math/fit/functions.c b/silx/math/fit/functions.c
index 2c6eea7..6c92c88 100644
--- a/silx/math/fit/functions.c
+++ b/silx/math/fit/functions.c
@@ -1,4 +1,4 @@
-/* Generated by Cython 0.29.7 */
+/* Generated by Cython 0.29.11 */
/* BEGIN: Cython Metadata
{
@@ -27,8 +27,8 @@ END: Cython Metadata */
#elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
#error Cython requires Python 2.6+ or Python 3.3+.
#else
-#define CYTHON_ABI "0_29_7"
-#define CYTHON_HEX_VERSION 0x001D07F0
+#define CYTHON_ABI "0_29_11"
+#define CYTHON_HEX_VERSION 0x001D0BF0
#define CYTHON_FUTURE_DIVISION 1
#include <stddef.h>
#ifndef offsetof
@@ -330,8 +330,16 @@ END: Cython Metadata */
#define __Pyx_DefaultClassType PyClass_Type
#else
#define __Pyx_BUILTIN_MODULE_NAME "builtins"
+#if PY_VERSION_HEX < 0x030800A4
#define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
+#elif PY_VERSION_HEX >= 0x030800B2
+ #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
+ PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
+#else
+ #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
+ PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
+#endif
#define __Pyx_DefaultClassType PyType_Type
#endif
#ifndef Py_TPFLAGS_CHECKTYPES
@@ -25387,6 +25395,9 @@ static PyTypeObject __pyx_type___pyx_array = {
#if PY_VERSION_HEX >= 0x030400a1
0, /*tp_finalize*/
#endif
+ #if PY_VERSION_HEX >= 0x030800b1
+ 0, /*tp_vectorcall*/
+ #endif
};
static PyObject *__pyx_tp_new_Enum(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
@@ -25495,6 +25506,9 @@ static PyTypeObject __pyx_type___pyx_MemviewEnum = {
#if PY_VERSION_HEX >= 0x030400a1
0, /*tp_finalize*/
#endif
+ #if PY_VERSION_HEX >= 0x030800b1
+ 0, /*tp_vectorcall*/
+ #endif
};
static struct __pyx_vtabstruct_memoryview __pyx_vtable_memoryview;
@@ -25745,6 +25759,9 @@ static PyTypeObject __pyx_type___pyx_memoryview = {
#if PY_VERSION_HEX >= 0x030400a1
0, /*tp_finalize*/
#endif
+ #if PY_VERSION_HEX >= 0x030800b1
+ 0, /*tp_vectorcall*/
+ #endif
};
static struct __pyx_vtabstruct__memoryviewslice __pyx_vtable__memoryviewslice;
@@ -25880,6 +25897,9 @@ static PyTypeObject __pyx_type___pyx_memoryviewslice = {
#if PY_VERSION_HEX >= 0x030400a1
0, /*tp_finalize*/
#endif
+ #if PY_VERSION_HEX >= 0x030800b1
+ 0, /*tp_vectorcall*/
+ #endif
};
static PyMethodDef __pyx_methods[] = {
@@ -26758,12 +26778,16 @@ static int __Pyx_modinit_type_init_code(void) {
__pyx_vtabptr_array = &__pyx_vtable_array;
__pyx_vtable_array.get_memview = (PyObject *(*)(struct __pyx_array_obj *))__pyx_array_get_memview;
if (PyType_Ready(&__pyx_type___pyx_array) < 0) __PYX_ERR(1, 105, __pyx_L1_error)
+ #if PY_VERSION_HEX < 0x030800B1
__pyx_type___pyx_array.tp_print = 0;
+ #endif
if (__Pyx_SetVtable(__pyx_type___pyx_array.tp_dict, __pyx_vtabptr_array) < 0) __PYX_ERR(1, 105, __pyx_L1_error)
if (__Pyx_setup_reduce((PyObject*)&__pyx_type___pyx_array) < 0) __PYX_ERR(1, 105, __pyx_L1_error)
__pyx_array_type = &__pyx_type___pyx_array;
if (PyType_Ready(&__pyx_type___pyx_MemviewEnum) < 0) __PYX_ERR(1, 279, __pyx_L1_error)
+ #if PY_VERSION_HEX < 0x030800B1
__pyx_type___pyx_MemviewEnum.tp_print = 0;
+ #endif
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_MemviewEnum.tp_dictoffset && __pyx_type___pyx_MemviewEnum.tp_getattro == PyObject_GenericGetAttr)) {
__pyx_type___pyx_MemviewEnum.tp_getattro = __Pyx_PyObject_GenericGetAttr;
}
@@ -26778,7 +26802,9 @@ static int __Pyx_modinit_type_init_code(void) {
__pyx_vtable_memoryview.convert_item_to_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *))__pyx_memoryview_convert_item_to_object;
__pyx_vtable_memoryview.assign_item_from_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *, PyObject *))__pyx_memoryview_assign_item_from_object;
if (PyType_Ready(&__pyx_type___pyx_memoryview) < 0) __PYX_ERR(1, 330, __pyx_L1_error)
+ #if PY_VERSION_HEX < 0x030800B1
__pyx_type___pyx_memoryview.tp_print = 0;
+ #endif
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_memoryview.tp_dictoffset && __pyx_type___pyx_memoryview.tp_getattro == PyObject_GenericGetAttr)) {
__pyx_type___pyx_memoryview.tp_getattro = __Pyx_PyObject_GenericGetAttr;
}
@@ -26791,7 +26817,9 @@ static int __Pyx_modinit_type_init_code(void) {
__pyx_vtable__memoryviewslice.__pyx_base.assign_item_from_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *, PyObject *))__pyx_memoryviewslice_assign_item_from_object;
__pyx_type___pyx_memoryviewslice.tp_base = __pyx_memoryview_type;
if (PyType_Ready(&__pyx_type___pyx_memoryviewslice) < 0) __PYX_ERR(1, 961, __pyx_L1_error)
+ #if PY_VERSION_HEX < 0x030800B1
__pyx_type___pyx_memoryviewslice.tp_print = 0;
+ #endif
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_memoryviewslice.tp_dictoffset && __pyx_type___pyx_memoryviewslice.tp_getattro == PyObject_GenericGetAttr)) {
__pyx_type___pyx_memoryviewslice.tp_getattro = __Pyx_PyObject_GenericGetAttr;
}
diff --git a/silx/math/fit/peaks.c b/silx/math/fit/peaks.c
index bb5bcff..aedd30c 100644
--- a/silx/math/fit/peaks.c
+++ b/silx/math/fit/peaks.c
@@ -1,4 +1,4 @@
-/* Generated by Cython 0.29.7 */
+/* Generated by Cython 0.29.11 */
/* BEGIN: Cython Metadata
{
@@ -27,8 +27,8 @@ END: Cython Metadata */
#elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
#error Cython requires Python 2.6+ or Python 3.3+.
#else
-#define CYTHON_ABI "0_29_7"
-#define CYTHON_HEX_VERSION 0x001D07F0
+#define CYTHON_ABI "0_29_11"
+#define CYTHON_HEX_VERSION 0x001D0BF0
#define CYTHON_FUTURE_DIVISION 1
#include <stddef.h>
#ifndef offsetof
@@ -330,8 +330,16 @@ END: Cython Metadata */
#define __Pyx_DefaultClassType PyClass_Type
#else
#define __Pyx_BUILTIN_MODULE_NAME "builtins"
+#if PY_VERSION_HEX < 0x030800A4
#define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
+#elif PY_VERSION_HEX >= 0x030800B2
+ #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
+ PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
+#else
+ #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
+ PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
+#endif
#define __Pyx_DefaultClassType PyType_Type
#endif
#ifndef Py_TPFLAGS_CHECKTYPES
@@ -16460,6 +16468,9 @@ static PyTypeObject __pyx_type___pyx_array = {
#if PY_VERSION_HEX >= 0x030400a1
0, /*tp_finalize*/
#endif
+ #if PY_VERSION_HEX >= 0x030800b1
+ 0, /*tp_vectorcall*/
+ #endif
};
static PyObject *__pyx_tp_new_Enum(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
@@ -16568,6 +16579,9 @@ static PyTypeObject __pyx_type___pyx_MemviewEnum = {
#if PY_VERSION_HEX >= 0x030400a1
0, /*tp_finalize*/
#endif
+ #if PY_VERSION_HEX >= 0x030800b1
+ 0, /*tp_vectorcall*/
+ #endif
};
static struct __pyx_vtabstruct_memoryview __pyx_vtable_memoryview;
@@ -16818,6 +16832,9 @@ static PyTypeObject __pyx_type___pyx_memoryview = {
#if PY_VERSION_HEX >= 0x030400a1
0, /*tp_finalize*/
#endif
+ #if PY_VERSION_HEX >= 0x030800b1
+ 0, /*tp_vectorcall*/
+ #endif
};
static struct __pyx_vtabstruct__memoryviewslice __pyx_vtable__memoryviewslice;
@@ -16953,6 +16970,9 @@ static PyTypeObject __pyx_type___pyx_memoryviewslice = {
#if PY_VERSION_HEX >= 0x030400a1
0, /*tp_finalize*/
#endif
+ #if PY_VERSION_HEX >= 0x030800b1
+ 0, /*tp_vectorcall*/
+ #endif
};
static PyMethodDef __pyx_methods[] = {
@@ -17538,12 +17558,16 @@ static int __Pyx_modinit_type_init_code(void) {
__pyx_vtabptr_array = &__pyx_vtable_array;
__pyx_vtable_array.get_memview = (PyObject *(*)(struct __pyx_array_obj *))__pyx_array_get_memview;
if (PyType_Ready(&__pyx_type___pyx_array) < 0) __PYX_ERR(1, 105, __pyx_L1_error)
+ #if PY_VERSION_HEX < 0x030800B1
__pyx_type___pyx_array.tp_print = 0;
+ #endif
if (__Pyx_SetVtable(__pyx_type___pyx_array.tp_dict, __pyx_vtabptr_array) < 0) __PYX_ERR(1, 105, __pyx_L1_error)
if (__Pyx_setup_reduce((PyObject*)&__pyx_type___pyx_array) < 0) __PYX_ERR(1, 105, __pyx_L1_error)
__pyx_array_type = &__pyx_type___pyx_array;
if (PyType_Ready(&__pyx_type___pyx_MemviewEnum) < 0) __PYX_ERR(1, 279, __pyx_L1_error)
+ #if PY_VERSION_HEX < 0x030800B1
__pyx_type___pyx_MemviewEnum.tp_print = 0;
+ #endif
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_MemviewEnum.tp_dictoffset && __pyx_type___pyx_MemviewEnum.tp_getattro == PyObject_GenericGetAttr)) {
__pyx_type___pyx_MemviewEnum.tp_getattro = __Pyx_PyObject_GenericGetAttr;
}
@@ -17558,7 +17582,9 @@ static int __Pyx_modinit_type_init_code(void) {
__pyx_vtable_memoryview.convert_item_to_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *))__pyx_memoryview_convert_item_to_object;
__pyx_vtable_memoryview.assign_item_from_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *, PyObject *))__pyx_memoryview_assign_item_from_object;
if (PyType_Ready(&__pyx_type___pyx_memoryview) < 0) __PYX_ERR(1, 330, __pyx_L1_error)
+ #if PY_VERSION_HEX < 0x030800B1
__pyx_type___pyx_memoryview.tp_print = 0;
+ #endif
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_memoryview.tp_dictoffset && __pyx_type___pyx_memoryview.tp_getattro == PyObject_GenericGetAttr)) {
__pyx_type___pyx_memoryview.tp_getattro = __Pyx_PyObject_GenericGetAttr;
}
@@ -17571,7 +17597,9 @@ static int __Pyx_modinit_type_init_code(void) {
__pyx_vtable__memoryviewslice.__pyx_base.assign_item_from_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *, PyObject *))__pyx_memoryviewslice_assign_item_from_object;
__pyx_type___pyx_memoryviewslice.tp_base = __pyx_memoryview_type;
if (PyType_Ready(&__pyx_type___pyx_memoryviewslice) < 0) __PYX_ERR(1, 961, __pyx_L1_error)
+ #if PY_VERSION_HEX < 0x030800B1
__pyx_type___pyx_memoryviewslice.tp_print = 0;
+ #endif
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_memoryviewslice.tp_dictoffset && __pyx_type___pyx_memoryviewslice.tp_getattro == PyObject_GenericGetAttr)) {
__pyx_type___pyx_memoryviewslice.tp_getattro = __Pyx_PyObject_GenericGetAttr;
}
diff --git a/silx/math/marchingcubes.cpp b/silx/math/marchingcubes.cpp
index 8371994..51ecd56 100644
--- a/silx/math/marchingcubes.cpp
+++ b/silx/math/marchingcubes.cpp
@@ -1,16 +1,16 @@
-/* Generated by Cython 0.29.7 */
+/* Generated by Cython 0.29.11 */
/* BEGIN: Cython Metadata
{
"distutils": {
"depends": [
- "/media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/numpy/core/include/numpy/arrayobject.h",
- "/media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/numpy/core/include/numpy/ufuncobject.h",
+ "/opt/python/cp36-cp36m/lib/python3.6/site-packages/numpy/core/include/numpy/arrayobject.h",
+ "/opt/python/cp36-cp36m/lib/python3.6/site-packages/numpy/core/include/numpy/ufuncobject.h",
"silx/math/marchingcubes/mc.hpp"
],
"include_dirs": [
"silx/math/marchingcubes",
- "/media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/numpy/core/include"
+ "/opt/python/cp36-cp36m/lib/python3.6/site-packages/numpy/core/include"
],
"language": "c++",
"name": "silx.math.marchingcubes",
@@ -30,8 +30,8 @@ END: Cython Metadata */
#elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
#error Cython requires Python 2.6+ or Python 3.3+.
#else
-#define CYTHON_ABI "0_29_7"
-#define CYTHON_HEX_VERSION 0x001D07F0
+#define CYTHON_ABI "0_29_11"
+#define CYTHON_HEX_VERSION 0x001D0BF0
#define CYTHON_FUTURE_DIVISION 1
#include <stddef.h>
#ifndef offsetof
@@ -347,8 +347,16 @@ class __Pyx_FakeReference {
#define __Pyx_DefaultClassType PyClass_Type
#else
#define __Pyx_BUILTIN_MODULE_NAME "builtins"
+#if PY_VERSION_HEX < 0x030800A4
#define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
+#elif PY_VERSION_HEX >= 0x030800B2
+ #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
+ PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
+#else
+ #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
+ PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
+#endif
#define __Pyx_DefaultClassType PyType_Type
#endif
#ifndef Py_TPFLAGS_CHECKTYPES
@@ -982,7 +990,7 @@ typedef struct {
} __Pyx_BufFmt_Context;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":776
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":776
* # in Cython to enable them only on the right systems.
*
* ctypedef npy_int8 int8_t # <<<<<<<<<<<<<<
@@ -991,7 +999,7 @@ typedef struct {
*/
typedef npy_int8 __pyx_t_5numpy_int8_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":777
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":777
*
* ctypedef npy_int8 int8_t
* ctypedef npy_int16 int16_t # <<<<<<<<<<<<<<
@@ -1000,7 +1008,7 @@ typedef npy_int8 __pyx_t_5numpy_int8_t;
*/
typedef npy_int16 __pyx_t_5numpy_int16_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":778
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":778
* ctypedef npy_int8 int8_t
* ctypedef npy_int16 int16_t
* ctypedef npy_int32 int32_t # <<<<<<<<<<<<<<
@@ -1009,7 +1017,7 @@ typedef npy_int16 __pyx_t_5numpy_int16_t;
*/
typedef npy_int32 __pyx_t_5numpy_int32_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":779
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":779
* ctypedef npy_int16 int16_t
* ctypedef npy_int32 int32_t
* ctypedef npy_int64 int64_t # <<<<<<<<<<<<<<
@@ -1018,7 +1026,7 @@ typedef npy_int32 __pyx_t_5numpy_int32_t;
*/
typedef npy_int64 __pyx_t_5numpy_int64_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":783
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":783
* #ctypedef npy_int128 int128_t
*
* ctypedef npy_uint8 uint8_t # <<<<<<<<<<<<<<
@@ -1027,7 +1035,7 @@ typedef npy_int64 __pyx_t_5numpy_int64_t;
*/
typedef npy_uint8 __pyx_t_5numpy_uint8_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":784
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":784
*
* ctypedef npy_uint8 uint8_t
* ctypedef npy_uint16 uint16_t # <<<<<<<<<<<<<<
@@ -1036,7 +1044,7 @@ typedef npy_uint8 __pyx_t_5numpy_uint8_t;
*/
typedef npy_uint16 __pyx_t_5numpy_uint16_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":785
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":785
* ctypedef npy_uint8 uint8_t
* ctypedef npy_uint16 uint16_t
* ctypedef npy_uint32 uint32_t # <<<<<<<<<<<<<<
@@ -1045,7 +1053,7 @@ typedef npy_uint16 __pyx_t_5numpy_uint16_t;
*/
typedef npy_uint32 __pyx_t_5numpy_uint32_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":786
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":786
* ctypedef npy_uint16 uint16_t
* ctypedef npy_uint32 uint32_t
* ctypedef npy_uint64 uint64_t # <<<<<<<<<<<<<<
@@ -1054,7 +1062,7 @@ typedef npy_uint32 __pyx_t_5numpy_uint32_t;
*/
typedef npy_uint64 __pyx_t_5numpy_uint64_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":790
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":790
* #ctypedef npy_uint128 uint128_t
*
* ctypedef npy_float32 float32_t # <<<<<<<<<<<<<<
@@ -1063,7 +1071,7 @@ typedef npy_uint64 __pyx_t_5numpy_uint64_t;
*/
typedef npy_float32 __pyx_t_5numpy_float32_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":791
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":791
*
* ctypedef npy_float32 float32_t
* ctypedef npy_float64 float64_t # <<<<<<<<<<<<<<
@@ -1072,7 +1080,7 @@ typedef npy_float32 __pyx_t_5numpy_float32_t;
*/
typedef npy_float64 __pyx_t_5numpy_float64_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":800
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":800
* # The int types are mapped a bit surprising --
* # numpy.int corresponds to 'l' and numpy.long to 'q'
* ctypedef npy_long int_t # <<<<<<<<<<<<<<
@@ -1081,7 +1089,7 @@ typedef npy_float64 __pyx_t_5numpy_float64_t;
*/
typedef npy_long __pyx_t_5numpy_int_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":801
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":801
* # numpy.int corresponds to 'l' and numpy.long to 'q'
* ctypedef npy_long int_t
* ctypedef npy_longlong long_t # <<<<<<<<<<<<<<
@@ -1090,7 +1098,7 @@ typedef npy_long __pyx_t_5numpy_int_t;
*/
typedef npy_longlong __pyx_t_5numpy_long_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":802
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":802
* ctypedef npy_long int_t
* ctypedef npy_longlong long_t
* ctypedef npy_longlong longlong_t # <<<<<<<<<<<<<<
@@ -1099,7 +1107,7 @@ typedef npy_longlong __pyx_t_5numpy_long_t;
*/
typedef npy_longlong __pyx_t_5numpy_longlong_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":804
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":804
* ctypedef npy_longlong longlong_t
*
* ctypedef npy_ulong uint_t # <<<<<<<<<<<<<<
@@ -1108,7 +1116,7 @@ typedef npy_longlong __pyx_t_5numpy_longlong_t;
*/
typedef npy_ulong __pyx_t_5numpy_uint_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":805
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":805
*
* ctypedef npy_ulong uint_t
* ctypedef npy_ulonglong ulong_t # <<<<<<<<<<<<<<
@@ -1117,7 +1125,7 @@ typedef npy_ulong __pyx_t_5numpy_uint_t;
*/
typedef npy_ulonglong __pyx_t_5numpy_ulong_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":806
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":806
* ctypedef npy_ulong uint_t
* ctypedef npy_ulonglong ulong_t
* ctypedef npy_ulonglong ulonglong_t # <<<<<<<<<<<<<<
@@ -1126,7 +1134,7 @@ typedef npy_ulonglong __pyx_t_5numpy_ulong_t;
*/
typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":808
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":808
* ctypedef npy_ulonglong ulonglong_t
*
* ctypedef npy_intp intp_t # <<<<<<<<<<<<<<
@@ -1135,7 +1143,7 @@ typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t;
*/
typedef npy_intp __pyx_t_5numpy_intp_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":809
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":809
*
* ctypedef npy_intp intp_t
* ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<<
@@ -1144,7 +1152,7 @@ typedef npy_intp __pyx_t_5numpy_intp_t;
*/
typedef npy_uintp __pyx_t_5numpy_uintp_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":811
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":811
* ctypedef npy_uintp uintp_t
*
* ctypedef npy_double float_t # <<<<<<<<<<<<<<
@@ -1153,7 +1161,7 @@ typedef npy_uintp __pyx_t_5numpy_uintp_t;
*/
typedef npy_double __pyx_t_5numpy_float_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":812
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":812
*
* ctypedef npy_double float_t
* ctypedef npy_double double_t # <<<<<<<<<<<<<<
@@ -1162,7 +1170,7 @@ typedef npy_double __pyx_t_5numpy_float_t;
*/
typedef npy_double __pyx_t_5numpy_double_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":813
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":813
* ctypedef npy_double float_t
* ctypedef npy_double double_t
* ctypedef npy_longdouble longdouble_t # <<<<<<<<<<<<<<
@@ -1202,7 +1210,7 @@ struct __pyx_MemviewEnum_obj;
struct __pyx_memoryview_obj;
struct __pyx_memoryviewslice_obj;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":815
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":815
* ctypedef npy_longdouble longdouble_t
*
* ctypedef npy_cfloat cfloat_t # <<<<<<<<<<<<<<
@@ -1211,7 +1219,7 @@ struct __pyx_memoryviewslice_obj;
*/
typedef npy_cfloat __pyx_t_5numpy_cfloat_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":816
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":816
*
* ctypedef npy_cfloat cfloat_t
* ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<<
@@ -1220,7 +1228,7 @@ typedef npy_cfloat __pyx_t_5numpy_cfloat_t;
*/
typedef npy_cdouble __pyx_t_5numpy_cdouble_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":817
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":817
* ctypedef npy_cfloat cfloat_t
* ctypedef npy_cdouble cdouble_t
* ctypedef npy_clongdouble clongdouble_t # <<<<<<<<<<<<<<
@@ -1229,7 +1237,7 @@ typedef npy_cdouble __pyx_t_5numpy_cdouble_t;
*/
typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":819
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":819
* ctypedef npy_clongdouble clongdouble_t
*
* ctypedef npy_cdouble complex_t # <<<<<<<<<<<<<<
@@ -4696,7 +4704,7 @@ static PyObject *__pyx_pf_4silx_4math_13marchingcubes_13MarchingCubes_22__setsta
return __pyx_r;
}
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":258
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":258
* # experimental exception made for __getbuffer__ and __releasebuffer__
* # -- the details of this may change.
* def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<<
@@ -4745,7 +4753,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
__Pyx_GIVEREF(__pyx_v_info->obj);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":265
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":265
*
* cdef int i, ndim
* cdef int endian_detector = 1 # <<<<<<<<<<<<<<
@@ -4754,7 +4762,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_endian_detector = 1;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":266
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":266
* cdef int i, ndim
* cdef int endian_detector = 1
* cdef bint little_endian = ((<char*>&endian_detector)[0] != 0) # <<<<<<<<<<<<<<
@@ -4763,7 +4771,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":268
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":268
* cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
*
* ndim = PyArray_NDIM(self) # <<<<<<<<<<<<<<
@@ -4772,7 +4780,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_ndim = PyArray_NDIM(__pyx_v_self);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":270
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":270
* ndim = PyArray_NDIM(self)
*
* if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<<
@@ -4786,7 +4794,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
goto __pyx_L4_bool_binop_done;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":271
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":271
*
* if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
* and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): # <<<<<<<<<<<<<<
@@ -4797,7 +4805,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_t_1 = __pyx_t_2;
__pyx_L4_bool_binop_done:;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":270
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":270
* ndim = PyArray_NDIM(self)
*
* if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<<
@@ -4806,7 +4814,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
if (unlikely(__pyx_t_1)) {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":272
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":272
* if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
* and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)):
* raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<<
@@ -4819,7 +4827,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__PYX_ERR(2, 272, __pyx_L1_error)
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":270
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":270
* ndim = PyArray_NDIM(self)
*
* if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<<
@@ -4828,7 +4836,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":274
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":274
* raise ValueError(u"ndarray is not C contiguous")
*
* if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<<
@@ -4842,7 +4850,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
goto __pyx_L7_bool_binop_done;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":275
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":275
*
* if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
* and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): # <<<<<<<<<<<<<<
@@ -4853,7 +4861,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_t_1 = __pyx_t_2;
__pyx_L7_bool_binop_done:;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":274
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":274
* raise ValueError(u"ndarray is not C contiguous")
*
* if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<<
@@ -4862,7 +4870,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
if (unlikely(__pyx_t_1)) {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":276
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":276
* if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
* and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)):
* raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<<
@@ -4875,7 +4883,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__PYX_ERR(2, 276, __pyx_L1_error)
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":274
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":274
* raise ValueError(u"ndarray is not C contiguous")
*
* if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<<
@@ -4884,7 +4892,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":278
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":278
* raise ValueError(u"ndarray is not Fortran contiguous")
*
* info.buf = PyArray_DATA(self) # <<<<<<<<<<<<<<
@@ -4893,7 +4901,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_info->buf = PyArray_DATA(__pyx_v_self);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":279
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":279
*
* info.buf = PyArray_DATA(self)
* info.ndim = ndim # <<<<<<<<<<<<<<
@@ -4902,7 +4910,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_info->ndim = __pyx_v_ndim;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":280
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":280
* info.buf = PyArray_DATA(self)
* info.ndim = ndim
* if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<<
@@ -4912,7 +4920,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0);
if (__pyx_t_1) {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":283
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":283
* # Allocate new buffer for strides and shape info.
* # This is allocated as one block, strides first.
* info.strides = <Py_ssize_t*>PyObject_Malloc(sizeof(Py_ssize_t) * 2 * <size_t>ndim) # <<<<<<<<<<<<<<
@@ -4921,7 +4929,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_info->strides = ((Py_ssize_t *)PyObject_Malloc((((sizeof(Py_ssize_t)) * 2) * ((size_t)__pyx_v_ndim))));
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":284
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":284
* # This is allocated as one block, strides first.
* info.strides = <Py_ssize_t*>PyObject_Malloc(sizeof(Py_ssize_t) * 2 * <size_t>ndim)
* info.shape = info.strides + ndim # <<<<<<<<<<<<<<
@@ -4930,7 +4938,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_info->shape = (__pyx_v_info->strides + __pyx_v_ndim);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":285
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":285
* info.strides = <Py_ssize_t*>PyObject_Malloc(sizeof(Py_ssize_t) * 2 * <size_t>ndim)
* info.shape = info.strides + ndim
* for i in range(ndim): # <<<<<<<<<<<<<<
@@ -4942,7 +4950,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
__pyx_v_i = __pyx_t_6;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":286
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":286
* info.shape = info.strides + ndim
* for i in range(ndim):
* info.strides[i] = PyArray_STRIDES(self)[i] # <<<<<<<<<<<<<<
@@ -4951,7 +4959,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
(__pyx_v_info->strides[__pyx_v_i]) = (PyArray_STRIDES(__pyx_v_self)[__pyx_v_i]);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":287
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":287
* for i in range(ndim):
* info.strides[i] = PyArray_STRIDES(self)[i]
* info.shape[i] = PyArray_DIMS(self)[i] # <<<<<<<<<<<<<<
@@ -4961,7 +4969,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
(__pyx_v_info->shape[__pyx_v_i]) = (PyArray_DIMS(__pyx_v_self)[__pyx_v_i]);
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":280
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":280
* info.buf = PyArray_DATA(self)
* info.ndim = ndim
* if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<<
@@ -4971,7 +4979,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
goto __pyx_L9;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":289
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":289
* info.shape[i] = PyArray_DIMS(self)[i]
* else:
* info.strides = <Py_ssize_t*>PyArray_STRIDES(self) # <<<<<<<<<<<<<<
@@ -4981,7 +4989,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
/*else*/ {
__pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(__pyx_v_self));
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":290
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":290
* else:
* info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
* info.shape = <Py_ssize_t*>PyArray_DIMS(self) # <<<<<<<<<<<<<<
@@ -4992,7 +5000,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
}
__pyx_L9:;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":291
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":291
* info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
* info.shape = <Py_ssize_t*>PyArray_DIMS(self)
* info.suboffsets = NULL # <<<<<<<<<<<<<<
@@ -5001,7 +5009,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_info->suboffsets = NULL;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":292
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":292
* info.shape = <Py_ssize_t*>PyArray_DIMS(self)
* info.suboffsets = NULL
* info.itemsize = PyArray_ITEMSIZE(self) # <<<<<<<<<<<<<<
@@ -5010,7 +5018,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_info->itemsize = PyArray_ITEMSIZE(__pyx_v_self);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":293
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":293
* info.suboffsets = NULL
* info.itemsize = PyArray_ITEMSIZE(self)
* info.readonly = not PyArray_ISWRITEABLE(self) # <<<<<<<<<<<<<<
@@ -5019,7 +5027,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_info->readonly = (!(PyArray_ISWRITEABLE(__pyx_v_self) != 0));
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":296
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":296
*
* cdef int t
* cdef char* f = NULL # <<<<<<<<<<<<<<
@@ -5028,7 +5036,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_f = NULL;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":297
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":297
* cdef int t
* cdef char* f = NULL
* cdef dtype descr = <dtype>PyArray_DESCR(self) # <<<<<<<<<<<<<<
@@ -5041,7 +5049,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_v_descr = ((PyArray_Descr *)__pyx_t_3);
__pyx_t_3 = 0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":300
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":300
* cdef int offset
*
* info.obj = self # <<<<<<<<<<<<<<
@@ -5054,7 +5062,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__Pyx_DECREF(__pyx_v_info->obj);
__pyx_v_info->obj = ((PyObject *)__pyx_v_self);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":302
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":302
* info.obj = self
*
* if not PyDataType_HASFIELDS(descr): # <<<<<<<<<<<<<<
@@ -5064,7 +5072,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_t_1 = ((!(PyDataType_HASFIELDS(__pyx_v_descr) != 0)) != 0);
if (__pyx_t_1) {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":303
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":303
*
* if not PyDataType_HASFIELDS(descr):
* t = descr.type_num # <<<<<<<<<<<<<<
@@ -5074,7 +5082,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_t_4 = __pyx_v_descr->type_num;
__pyx_v_t = __pyx_t_4;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":304
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":304
* if not PyDataType_HASFIELDS(descr):
* t = descr.type_num
* if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
@@ -5094,7 +5102,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
}
__pyx_L15_next_or:;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":305
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":305
* t = descr.type_num
* if ((descr.byteorder == c'>' and little_endian) or
* (descr.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<<
@@ -5111,7 +5119,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_t_1 = __pyx_t_2;
__pyx_L14_bool_binop_done:;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":304
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":304
* if not PyDataType_HASFIELDS(descr):
* t = descr.type_num
* if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
@@ -5120,7 +5128,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
if (unlikely(__pyx_t_1)) {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":306
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":306
* if ((descr.byteorder == c'>' and little_endian) or
* (descr.byteorder == c'<' and not little_endian)):
* raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<<
@@ -5133,7 +5141,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__PYX_ERR(2, 306, __pyx_L1_error)
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":304
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":304
* if not PyDataType_HASFIELDS(descr):
* t = descr.type_num
* if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
@@ -5142,7 +5150,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":307
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":307
* (descr.byteorder == c'<' and not little_endian)):
* raise ValueError(u"Non-native byte order not supported")
* if t == NPY_BYTE: f = "b" # <<<<<<<<<<<<<<
@@ -5155,7 +5163,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_UBYTE:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":308
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":308
* raise ValueError(u"Non-native byte order not supported")
* if t == NPY_BYTE: f = "b"
* elif t == NPY_UBYTE: f = "B" # <<<<<<<<<<<<<<
@@ -5166,7 +5174,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_SHORT:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":309
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":309
* if t == NPY_BYTE: f = "b"
* elif t == NPY_UBYTE: f = "B"
* elif t == NPY_SHORT: f = "h" # <<<<<<<<<<<<<<
@@ -5177,7 +5185,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_USHORT:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":310
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":310
* elif t == NPY_UBYTE: f = "B"
* elif t == NPY_SHORT: f = "h"
* elif t == NPY_USHORT: f = "H" # <<<<<<<<<<<<<<
@@ -5188,7 +5196,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_INT:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":311
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":311
* elif t == NPY_SHORT: f = "h"
* elif t == NPY_USHORT: f = "H"
* elif t == NPY_INT: f = "i" # <<<<<<<<<<<<<<
@@ -5199,7 +5207,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_UINT:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":312
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":312
* elif t == NPY_USHORT: f = "H"
* elif t == NPY_INT: f = "i"
* elif t == NPY_UINT: f = "I" # <<<<<<<<<<<<<<
@@ -5210,7 +5218,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_LONG:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":313
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":313
* elif t == NPY_INT: f = "i"
* elif t == NPY_UINT: f = "I"
* elif t == NPY_LONG: f = "l" # <<<<<<<<<<<<<<
@@ -5221,7 +5229,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_ULONG:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":314
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":314
* elif t == NPY_UINT: f = "I"
* elif t == NPY_LONG: f = "l"
* elif t == NPY_ULONG: f = "L" # <<<<<<<<<<<<<<
@@ -5232,7 +5240,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_LONGLONG:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":315
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":315
* elif t == NPY_LONG: f = "l"
* elif t == NPY_ULONG: f = "L"
* elif t == NPY_LONGLONG: f = "q" # <<<<<<<<<<<<<<
@@ -5243,7 +5251,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_ULONGLONG:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":316
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":316
* elif t == NPY_ULONG: f = "L"
* elif t == NPY_LONGLONG: f = "q"
* elif t == NPY_ULONGLONG: f = "Q" # <<<<<<<<<<<<<<
@@ -5254,7 +5262,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_FLOAT:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":317
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":317
* elif t == NPY_LONGLONG: f = "q"
* elif t == NPY_ULONGLONG: f = "Q"
* elif t == NPY_FLOAT: f = "f" # <<<<<<<<<<<<<<
@@ -5265,7 +5273,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_DOUBLE:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":318
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":318
* elif t == NPY_ULONGLONG: f = "Q"
* elif t == NPY_FLOAT: f = "f"
* elif t == NPY_DOUBLE: f = "d" # <<<<<<<<<<<<<<
@@ -5276,7 +5284,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_LONGDOUBLE:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":319
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":319
* elif t == NPY_FLOAT: f = "f"
* elif t == NPY_DOUBLE: f = "d"
* elif t == NPY_LONGDOUBLE: f = "g" # <<<<<<<<<<<<<<
@@ -5287,7 +5295,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_CFLOAT:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":320
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":320
* elif t == NPY_DOUBLE: f = "d"
* elif t == NPY_LONGDOUBLE: f = "g"
* elif t == NPY_CFLOAT: f = "Zf" # <<<<<<<<<<<<<<
@@ -5298,7 +5306,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_CDOUBLE:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":321
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":321
* elif t == NPY_LONGDOUBLE: f = "g"
* elif t == NPY_CFLOAT: f = "Zf"
* elif t == NPY_CDOUBLE: f = "Zd" # <<<<<<<<<<<<<<
@@ -5309,7 +5317,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_CLONGDOUBLE:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":322
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":322
* elif t == NPY_CFLOAT: f = "Zf"
* elif t == NPY_CDOUBLE: f = "Zd"
* elif t == NPY_CLONGDOUBLE: f = "Zg" # <<<<<<<<<<<<<<
@@ -5320,7 +5328,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_OBJECT:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":323
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":323
* elif t == NPY_CDOUBLE: f = "Zd"
* elif t == NPY_CLONGDOUBLE: f = "Zg"
* elif t == NPY_OBJECT: f = "O" # <<<<<<<<<<<<<<
@@ -5331,7 +5339,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
default:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":325
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":325
* elif t == NPY_OBJECT: f = "O"
* else:
* raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<<
@@ -5352,7 +5360,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":326
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":326
* else:
* raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
* info.format = f # <<<<<<<<<<<<<<
@@ -5361,7 +5369,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_info->format = __pyx_v_f;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":327
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":327
* raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
* info.format = f
* return # <<<<<<<<<<<<<<
@@ -5371,7 +5379,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_r = 0;
goto __pyx_L0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":302
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":302
* info.obj = self
*
* if not PyDataType_HASFIELDS(descr): # <<<<<<<<<<<<<<
@@ -5380,7 +5388,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":329
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":329
* return
* else:
* info.format = <char*>PyObject_Malloc(_buffer_format_string_len) # <<<<<<<<<<<<<<
@@ -5390,7 +5398,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
/*else*/ {
__pyx_v_info->format = ((char *)PyObject_Malloc(0xFF));
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":330
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":330
* else:
* info.format = <char*>PyObject_Malloc(_buffer_format_string_len)
* info.format[0] = c'^' # Native data types, manual alignment # <<<<<<<<<<<<<<
@@ -5399,7 +5407,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
(__pyx_v_info->format[0]) = '^';
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":331
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":331
* info.format = <char*>PyObject_Malloc(_buffer_format_string_len)
* info.format[0] = c'^' # Native data types, manual alignment
* offset = 0 # <<<<<<<<<<<<<<
@@ -5408,7 +5416,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_offset = 0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":332
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":332
* info.format[0] = c'^' # Native data types, manual alignment
* offset = 0
* f = _util_dtypestring(descr, info.format + 1, # <<<<<<<<<<<<<<
@@ -5418,7 +5426,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 0xFF), (&__pyx_v_offset)); if (unlikely(__pyx_t_9 == ((char *)NULL))) __PYX_ERR(2, 332, __pyx_L1_error)
__pyx_v_f = __pyx_t_9;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":335
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":335
* info.format + _buffer_format_string_len,
* &offset)
* f[0] = c'\0' # Terminate format string # <<<<<<<<<<<<<<
@@ -5428,7 +5436,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
(__pyx_v_f[0]) = '\x00';
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":258
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":258
* # experimental exception made for __getbuffer__ and __releasebuffer__
* # -- the details of this may change.
* def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<<
@@ -5460,7 +5468,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
return __pyx_r;
}
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":337
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":337
* f[0] = c'\0' # Terminate format string
*
* def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<<
@@ -5484,7 +5492,7 @@ static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_s
int __pyx_t_1;
__Pyx_RefNannySetupContext("__releasebuffer__", 0);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":338
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":338
*
* def __releasebuffer__(ndarray self, Py_buffer* info):
* if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<<
@@ -5494,7 +5502,7 @@ static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_s
__pyx_t_1 = (PyArray_HASFIELDS(__pyx_v_self) != 0);
if (__pyx_t_1) {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":339
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":339
* def __releasebuffer__(ndarray self, Py_buffer* info):
* if PyArray_HASFIELDS(self):
* PyObject_Free(info.format) # <<<<<<<<<<<<<<
@@ -5503,7 +5511,7 @@ static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_s
*/
PyObject_Free(__pyx_v_info->format);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":338
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":338
*
* def __releasebuffer__(ndarray self, Py_buffer* info):
* if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<<
@@ -5512,7 +5520,7 @@ static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_s
*/
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":340
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":340
* if PyArray_HASFIELDS(self):
* PyObject_Free(info.format)
* if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<<
@@ -5522,7 +5530,7 @@ static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_s
__pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0);
if (__pyx_t_1) {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":341
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":341
* PyObject_Free(info.format)
* if sizeof(npy_intp) != sizeof(Py_ssize_t):
* PyObject_Free(info.strides) # <<<<<<<<<<<<<<
@@ -5531,7 +5539,7 @@ static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_s
*/
PyObject_Free(__pyx_v_info->strides);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":340
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":340
* if PyArray_HASFIELDS(self):
* PyObject_Free(info.format)
* if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<<
@@ -5540,7 +5548,7 @@ static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_s
*/
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":337
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":337
* f[0] = c'\0' # Terminate format string
*
* def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<<
@@ -5552,7 +5560,7 @@ static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_s
__Pyx_RefNannyFinishContext();
}
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":821
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":821
* ctypedef npy_cdouble complex_t
*
* cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<<
@@ -5566,7 +5574,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__
PyObject *__pyx_t_1 = NULL;
__Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":822
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":822
*
* cdef inline object PyArray_MultiIterNew1(a):
* return PyArray_MultiIterNew(1, <void*>a) # <<<<<<<<<<<<<<
@@ -5580,7 +5588,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":821
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":821
* ctypedef npy_cdouble complex_t
*
* cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<<
@@ -5599,7 +5607,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__
return __pyx_r;
}
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":824
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":824
* return PyArray_MultiIterNew(1, <void*>a)
*
* cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<<
@@ -5613,7 +5621,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__
PyObject *__pyx_t_1 = NULL;
__Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":825
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":825
*
* cdef inline object PyArray_MultiIterNew2(a, b):
* return PyArray_MultiIterNew(2, <void*>a, <void*>b) # <<<<<<<<<<<<<<
@@ -5627,7 +5635,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":824
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":824
* return PyArray_MultiIterNew(1, <void*>a)
*
* cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<<
@@ -5646,7 +5654,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__
return __pyx_r;
}
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":827
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":827
* return PyArray_MultiIterNew(2, <void*>a, <void*>b)
*
* cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<<
@@ -5660,7 +5668,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__
PyObject *__pyx_t_1 = NULL;
__Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":828
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":828
*
* cdef inline object PyArray_MultiIterNew3(a, b, c):
* return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c) # <<<<<<<<<<<<<<
@@ -5674,7 +5682,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":827
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":827
* return PyArray_MultiIterNew(2, <void*>a, <void*>b)
*
* cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<<
@@ -5693,7 +5701,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__
return __pyx_r;
}
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":830
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":830
* return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
*
* cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<<
@@ -5707,7 +5715,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__
PyObject *__pyx_t_1 = NULL;
__Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":831
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":831
*
* cdef inline object PyArray_MultiIterNew4(a, b, c, d):
* return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d) # <<<<<<<<<<<<<<
@@ -5721,7 +5729,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":830
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":830
* return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
*
* cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<<
@@ -5740,7 +5748,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__
return __pyx_r;
}
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":833
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":833
* return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
*
* cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<<
@@ -5754,7 +5762,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__
PyObject *__pyx_t_1 = NULL;
__Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":834
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":834
*
* cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
* return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e) # <<<<<<<<<<<<<<
@@ -5768,7 +5776,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":833
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":833
* return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
*
* cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<<
@@ -5787,7 +5795,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__
return __pyx_r;
}
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":836
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":836
* return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
*
* cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<<
@@ -5801,7 +5809,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__
int __pyx_t_1;
__Pyx_RefNannySetupContext("PyDataType_SHAPE", 0);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":837
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":837
*
* cdef inline tuple PyDataType_SHAPE(dtype d):
* if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<<
@@ -5811,7 +5819,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__
__pyx_t_1 = (PyDataType_HASSUBARRAY(__pyx_v_d) != 0);
if (__pyx_t_1) {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":838
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":838
* cdef inline tuple PyDataType_SHAPE(dtype d):
* if PyDataType_HASSUBARRAY(d):
* return <tuple>d.subarray.shape # <<<<<<<<<<<<<<
@@ -5823,7 +5831,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__
__pyx_r = ((PyObject*)__pyx_v_d->subarray->shape);
goto __pyx_L0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":837
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":837
*
* cdef inline tuple PyDataType_SHAPE(dtype d):
* if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<<
@@ -5832,7 +5840,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__
*/
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":840
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":840
* return <tuple>d.subarray.shape
* else:
* return () # <<<<<<<<<<<<<<
@@ -5846,7 +5854,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__
goto __pyx_L0;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":836
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":836
* return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
*
* cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<<
@@ -5861,7 +5869,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__
return __pyx_r;
}
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":842
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":842
* return ()
*
* cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<<
@@ -5890,7 +5898,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
char *__pyx_t_9;
__Pyx_RefNannySetupContext("_util_dtypestring", 0);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":847
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":847
*
* cdef dtype child
* cdef int endian_detector = 1 # <<<<<<<<<<<<<<
@@ -5899,7 +5907,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
*/
__pyx_v_endian_detector = 1;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":848
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":848
* cdef dtype child
* cdef int endian_detector = 1
* cdef bint little_endian = ((<char*>&endian_detector)[0] != 0) # <<<<<<<<<<<<<<
@@ -5908,7 +5916,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
*/
__pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":851
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":851
* cdef tuple fields
*
* for childname in descr.names: # <<<<<<<<<<<<<<
@@ -5931,7 +5939,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__Pyx_XDECREF_SET(__pyx_v_childname, __pyx_t_3);
__pyx_t_3 = 0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":852
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":852
*
* for childname in descr.names:
* fields = descr.fields[childname] # <<<<<<<<<<<<<<
@@ -5948,7 +5956,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__Pyx_XDECREF_SET(__pyx_v_fields, ((PyObject*)__pyx_t_3));
__pyx_t_3 = 0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":853
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":853
* for childname in descr.names:
* fields = descr.fields[childname]
* child, new_offset = fields # <<<<<<<<<<<<<<
@@ -5983,7 +5991,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__Pyx_XDECREF_SET(__pyx_v_new_offset, __pyx_t_4);
__pyx_t_4 = 0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":855
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":855
* child, new_offset = fields
*
* if (end - f) - <int>(new_offset - offset[0]) < 15: # <<<<<<<<<<<<<<
@@ -6000,7 +6008,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__pyx_t_6 = ((((__pyx_v_end - __pyx_v_f) - ((int)__pyx_t_5)) < 15) != 0);
if (unlikely(__pyx_t_6)) {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":856
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":856
*
* if (end - f) - <int>(new_offset - offset[0]) < 15:
* raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<<
@@ -6013,7 +6021,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__PYX_ERR(2, 856, __pyx_L1_error)
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":855
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":855
* child, new_offset = fields
*
* if (end - f) - <int>(new_offset - offset[0]) < 15: # <<<<<<<<<<<<<<
@@ -6022,7 +6030,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
*/
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":858
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":858
* raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
*
* if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
@@ -6042,7 +6050,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
}
__pyx_L8_next_or:;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":859
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":859
*
* if ((child.byteorder == c'>' and little_endian) or
* (child.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<<
@@ -6059,7 +6067,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__pyx_t_6 = __pyx_t_7;
__pyx_L7_bool_binop_done:;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":858
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":858
* raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
*
* if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
@@ -6068,7 +6076,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
*/
if (unlikely(__pyx_t_6)) {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":860
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":860
* if ((child.byteorder == c'>' and little_endian) or
* (child.byteorder == c'<' and not little_endian)):
* raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<<
@@ -6081,7 +6089,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__PYX_ERR(2, 860, __pyx_L1_error)
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":858
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":858
* raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
*
* if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
@@ -6090,7 +6098,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
*/
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":870
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":870
*
* # Output padding bytes
* while offset[0] < new_offset: # <<<<<<<<<<<<<<
@@ -6106,7 +6114,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (!__pyx_t_6) break;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":871
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":871
* # Output padding bytes
* while offset[0] < new_offset:
* f[0] = 120 # "x"; pad byte # <<<<<<<<<<<<<<
@@ -6115,7 +6123,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
*/
(__pyx_v_f[0]) = 0x78;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":872
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":872
* while offset[0] < new_offset:
* f[0] = 120 # "x"; pad byte
* f += 1 # <<<<<<<<<<<<<<
@@ -6124,7 +6132,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
*/
__pyx_v_f = (__pyx_v_f + 1);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":873
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":873
* f[0] = 120 # "x"; pad byte
* f += 1
* offset[0] += 1 # <<<<<<<<<<<<<<
@@ -6135,7 +6143,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
(__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + 1);
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":875
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":875
* offset[0] += 1
*
* offset[0] += child.itemsize # <<<<<<<<<<<<<<
@@ -6145,7 +6153,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__pyx_t_8 = 0;
(__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + __pyx_v_child->elsize);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":877
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":877
* offset[0] += child.itemsize
*
* if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<<
@@ -6155,7 +6163,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__pyx_t_6 = ((!(PyDataType_HASFIELDS(__pyx_v_child) != 0)) != 0);
if (__pyx_t_6) {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":878
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":878
*
* if not PyDataType_HASFIELDS(child):
* t = child.type_num # <<<<<<<<<<<<<<
@@ -6167,7 +6175,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_4);
__pyx_t_4 = 0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":879
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":879
* if not PyDataType_HASFIELDS(child):
* t = child.type_num
* if end - f < 5: # <<<<<<<<<<<<<<
@@ -6177,7 +6185,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__pyx_t_6 = (((__pyx_v_end - __pyx_v_f) < 5) != 0);
if (unlikely(__pyx_t_6)) {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":880
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":880
* t = child.type_num
* if end - f < 5:
* raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<<
@@ -6190,7 +6198,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__PYX_ERR(2, 880, __pyx_L1_error)
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":879
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":879
* if not PyDataType_HASFIELDS(child):
* t = child.type_num
* if end - f < 5: # <<<<<<<<<<<<<<
@@ -6199,7 +6207,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
*/
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":883
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":883
*
* # Until ticket #99 is fixed, use integers to avoid warnings
* if t == NPY_BYTE: f[0] = 98 #"b" # <<<<<<<<<<<<<<
@@ -6217,7 +6225,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":884
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":884
* # Until ticket #99 is fixed, use integers to avoid warnings
* if t == NPY_BYTE: f[0] = 98 #"b"
* elif t == NPY_UBYTE: f[0] = 66 #"B" # <<<<<<<<<<<<<<
@@ -6235,7 +6243,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":885
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":885
* if t == NPY_BYTE: f[0] = 98 #"b"
* elif t == NPY_UBYTE: f[0] = 66 #"B"
* elif t == NPY_SHORT: f[0] = 104 #"h" # <<<<<<<<<<<<<<
@@ -6253,7 +6261,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":886
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":886
* elif t == NPY_UBYTE: f[0] = 66 #"B"
* elif t == NPY_SHORT: f[0] = 104 #"h"
* elif t == NPY_USHORT: f[0] = 72 #"H" # <<<<<<<<<<<<<<
@@ -6271,7 +6279,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":887
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":887
* elif t == NPY_SHORT: f[0] = 104 #"h"
* elif t == NPY_USHORT: f[0] = 72 #"H"
* elif t == NPY_INT: f[0] = 105 #"i" # <<<<<<<<<<<<<<
@@ -6289,7 +6297,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":888
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":888
* elif t == NPY_USHORT: f[0] = 72 #"H"
* elif t == NPY_INT: f[0] = 105 #"i"
* elif t == NPY_UINT: f[0] = 73 #"I" # <<<<<<<<<<<<<<
@@ -6307,7 +6315,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":889
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":889
* elif t == NPY_INT: f[0] = 105 #"i"
* elif t == NPY_UINT: f[0] = 73 #"I"
* elif t == NPY_LONG: f[0] = 108 #"l" # <<<<<<<<<<<<<<
@@ -6325,7 +6333,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":890
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":890
* elif t == NPY_UINT: f[0] = 73 #"I"
* elif t == NPY_LONG: f[0] = 108 #"l"
* elif t == NPY_ULONG: f[0] = 76 #"L" # <<<<<<<<<<<<<<
@@ -6343,7 +6351,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":891
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":891
* elif t == NPY_LONG: f[0] = 108 #"l"
* elif t == NPY_ULONG: f[0] = 76 #"L"
* elif t == NPY_LONGLONG: f[0] = 113 #"q" # <<<<<<<<<<<<<<
@@ -6361,7 +6369,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":892
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":892
* elif t == NPY_ULONG: f[0] = 76 #"L"
* elif t == NPY_LONGLONG: f[0] = 113 #"q"
* elif t == NPY_ULONGLONG: f[0] = 81 #"Q" # <<<<<<<<<<<<<<
@@ -6379,7 +6387,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":893
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":893
* elif t == NPY_LONGLONG: f[0] = 113 #"q"
* elif t == NPY_ULONGLONG: f[0] = 81 #"Q"
* elif t == NPY_FLOAT: f[0] = 102 #"f" # <<<<<<<<<<<<<<
@@ -6397,7 +6405,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":894
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":894
* elif t == NPY_ULONGLONG: f[0] = 81 #"Q"
* elif t == NPY_FLOAT: f[0] = 102 #"f"
* elif t == NPY_DOUBLE: f[0] = 100 #"d" # <<<<<<<<<<<<<<
@@ -6415,7 +6423,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":895
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":895
* elif t == NPY_FLOAT: f[0] = 102 #"f"
* elif t == NPY_DOUBLE: f[0] = 100 #"d"
* elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" # <<<<<<<<<<<<<<
@@ -6433,7 +6441,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":896
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":896
* elif t == NPY_DOUBLE: f[0] = 100 #"d"
* elif t == NPY_LONGDOUBLE: f[0] = 103 #"g"
* elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf # <<<<<<<<<<<<<<
@@ -6453,7 +6461,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":897
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":897
* elif t == NPY_LONGDOUBLE: f[0] = 103 #"g"
* elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf
* elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd # <<<<<<<<<<<<<<
@@ -6473,7 +6481,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":898
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":898
* elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf
* elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd
* elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg # <<<<<<<<<<<<<<
@@ -6493,7 +6501,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":899
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":899
* elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd
* elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
* elif t == NPY_OBJECT: f[0] = 79 #"O" # <<<<<<<<<<<<<<
@@ -6511,7 +6519,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":901
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":901
* elif t == NPY_OBJECT: f[0] = 79 #"O"
* else:
* raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<<
@@ -6530,7 +6538,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
}
__pyx_L15:;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":902
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":902
* else:
* raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
* f += 1 # <<<<<<<<<<<<<<
@@ -6539,7 +6547,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
*/
__pyx_v_f = (__pyx_v_f + 1);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":877
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":877
* offset[0] += child.itemsize
*
* if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<<
@@ -6549,7 +6557,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L13;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":906
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":906
* # Cython ignores struct boundary information ("T{...}"),
* # so don't output it
* f = _util_dtypestring(child, f, end, offset) # <<<<<<<<<<<<<<
@@ -6562,7 +6570,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
}
__pyx_L13:;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":851
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":851
* cdef tuple fields
*
* for childname in descr.names: # <<<<<<<<<<<<<<
@@ -6572,7 +6580,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":907
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":907
* # so don't output it
* f = _util_dtypestring(child, f, end, offset)
* return f # <<<<<<<<<<<<<<
@@ -6582,7 +6590,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__pyx_r = __pyx_v_f;
goto __pyx_L0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":842
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":842
* return ()
*
* cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<<
@@ -6607,7 +6615,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
return __pyx_r;
}
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1022
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1022
* int _import_umath() except -1
*
* cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<<
@@ -6619,7 +6627,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("set_array_base", 0);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1023
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1023
*
* cdef inline void set_array_base(ndarray arr, object base):
* Py_INCREF(base) # important to do this before stealing the reference below! # <<<<<<<<<<<<<<
@@ -6628,7 +6636,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a
*/
Py_INCREF(__pyx_v_base);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1024
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1024
* cdef inline void set_array_base(ndarray arr, object base):
* Py_INCREF(base) # important to do this before stealing the reference below!
* PyArray_SetBaseObject(arr, base) # <<<<<<<<<<<<<<
@@ -6637,7 +6645,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a
*/
(void)(PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base));
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1022
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1022
* int _import_umath() except -1
*
* cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<<
@@ -6649,7 +6657,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a
__Pyx_RefNannyFinishContext();
}
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1026
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1026
* PyArray_SetBaseObject(arr, base)
*
* cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<<
@@ -6664,7 +6672,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py
int __pyx_t_1;
__Pyx_RefNannySetupContext("get_array_base", 0);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1027
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1027
*
* cdef inline object get_array_base(ndarray arr):
* base = PyArray_BASE(arr) # <<<<<<<<<<<<<<
@@ -6673,7 +6681,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py
*/
__pyx_v_base = PyArray_BASE(__pyx_v_arr);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1028
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1028
* cdef inline object get_array_base(ndarray arr):
* base = PyArray_BASE(arr)
* if base is NULL: # <<<<<<<<<<<<<<
@@ -6683,7 +6691,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py
__pyx_t_1 = ((__pyx_v_base == NULL) != 0);
if (__pyx_t_1) {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1029
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1029
* base = PyArray_BASE(arr)
* if base is NULL:
* return None # <<<<<<<<<<<<<<
@@ -6694,7 +6702,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
goto __pyx_L0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1028
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1028
* cdef inline object get_array_base(ndarray arr):
* base = PyArray_BASE(arr)
* if base is NULL: # <<<<<<<<<<<<<<
@@ -6703,7 +6711,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py
*/
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1030
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1030
* if base is NULL:
* return None
* return <object>base # <<<<<<<<<<<<<<
@@ -6715,7 +6723,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py
__pyx_r = ((PyObject *)__pyx_v_base);
goto __pyx_L0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1026
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1026
* PyArray_SetBaseObject(arr, base)
*
* cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<<
@@ -6730,7 +6738,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py
return __pyx_r;
}
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1034
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1034
* # Versions of the import_* functions which are more suitable for
* # Cython code.
* cdef inline int import_array() except -1: # <<<<<<<<<<<<<<
@@ -6751,7 +6759,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
PyObject *__pyx_t_8 = NULL;
__Pyx_RefNannySetupContext("import_array", 0);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1035
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1035
* # Cython code.
* cdef inline int import_array() except -1:
* try: # <<<<<<<<<<<<<<
@@ -6767,7 +6775,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
__Pyx_XGOTREF(__pyx_t_3);
/*try:*/ {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1036
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1036
* cdef inline int import_array() except -1:
* try:
* _import_array() # <<<<<<<<<<<<<<
@@ -6776,7 +6784,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
*/
__pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1036, __pyx_L3_error)
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1035
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1035
* # Cython code.
* cdef inline int import_array() except -1:
* try: # <<<<<<<<<<<<<<
@@ -6790,7 +6798,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
goto __pyx_L8_try_end;
__pyx_L3_error:;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1037
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1037
* try:
* _import_array()
* except Exception: # <<<<<<<<<<<<<<
@@ -6805,7 +6813,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
__Pyx_GOTREF(__pyx_t_6);
__Pyx_GOTREF(__pyx_t_7);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1038
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1038
* _import_array()
* except Exception:
* raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<<
@@ -6821,7 +6829,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
goto __pyx_L5_except_error;
__pyx_L5_except_error:;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1035
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1035
* # Cython code.
* cdef inline int import_array() except -1:
* try: # <<<<<<<<<<<<<<
@@ -6836,7 +6844,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
__pyx_L8_try_end:;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1034
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1034
* # Versions of the import_* functions which are more suitable for
* # Cython code.
* cdef inline int import_array() except -1: # <<<<<<<<<<<<<<
@@ -6859,7 +6867,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
return __pyx_r;
}
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1040
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1040
* raise ImportError("numpy.core.multiarray failed to import")
*
* cdef inline int import_umath() except -1: # <<<<<<<<<<<<<<
@@ -6880,7 +6888,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
PyObject *__pyx_t_8 = NULL;
__Pyx_RefNannySetupContext("import_umath", 0);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1041
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1041
*
* cdef inline int import_umath() except -1:
* try: # <<<<<<<<<<<<<<
@@ -6896,7 +6904,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
__Pyx_XGOTREF(__pyx_t_3);
/*try:*/ {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1042
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1042
* cdef inline int import_umath() except -1:
* try:
* _import_umath() # <<<<<<<<<<<<<<
@@ -6905,7 +6913,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
*/
__pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1042, __pyx_L3_error)
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1041
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1041
*
* cdef inline int import_umath() except -1:
* try: # <<<<<<<<<<<<<<
@@ -6919,7 +6927,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
goto __pyx_L8_try_end;
__pyx_L3_error:;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1043
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1043
* try:
* _import_umath()
* except Exception: # <<<<<<<<<<<<<<
@@ -6934,7 +6942,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
__Pyx_GOTREF(__pyx_t_6);
__Pyx_GOTREF(__pyx_t_7);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1044
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1044
* _import_umath()
* except Exception:
* raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<<
@@ -6950,7 +6958,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
goto __pyx_L5_except_error;
__pyx_L5_except_error:;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1041
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1041
*
* cdef inline int import_umath() except -1:
* try: # <<<<<<<<<<<<<<
@@ -6965,7 +6973,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
__pyx_L8_try_end:;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1040
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1040
* raise ImportError("numpy.core.multiarray failed to import")
*
* cdef inline int import_umath() except -1: # <<<<<<<<<<<<<<
@@ -6988,7 +6996,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
return __pyx_r;
}
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1046
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1046
* raise ImportError("numpy.core.umath failed to import")
*
* cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<<
@@ -7009,7 +7017,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) {
PyObject *__pyx_t_8 = NULL;
__Pyx_RefNannySetupContext("import_ufunc", 0);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1047
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1047
*
* cdef inline int import_ufunc() except -1:
* try: # <<<<<<<<<<<<<<
@@ -7025,7 +7033,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) {
__Pyx_XGOTREF(__pyx_t_3);
/*try:*/ {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1048
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1048
* cdef inline int import_ufunc() except -1:
* try:
* _import_umath() # <<<<<<<<<<<<<<
@@ -7034,7 +7042,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) {
*/
__pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1048, __pyx_L3_error)
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1047
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1047
*
* cdef inline int import_ufunc() except -1:
* try: # <<<<<<<<<<<<<<
@@ -7048,7 +7056,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) {
goto __pyx_L8_try_end;
__pyx_L3_error:;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1049
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1049
* try:
* _import_umath()
* except Exception: # <<<<<<<<<<<<<<
@@ -7062,7 +7070,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) {
__Pyx_GOTREF(__pyx_t_6);
__Pyx_GOTREF(__pyx_t_7);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1050
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1050
* _import_umath()
* except Exception:
* raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<<
@@ -7076,7 +7084,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) {
goto __pyx_L5_except_error;
__pyx_L5_except_error:;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1047
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1047
*
* cdef inline int import_ufunc() except -1:
* try: # <<<<<<<<<<<<<<
@@ -7091,7 +7099,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) {
__pyx_L8_try_end:;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1046
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1046
* raise ImportError("numpy.core.umath failed to import")
*
* cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<<
@@ -20155,6 +20163,9 @@ static PyTypeObject __pyx_type_4silx_4math_13marchingcubes_MarchingCubes = {
#if PY_VERSION_HEX >= 0x030400a1
0, /*tp_finalize*/
#endif
+ #if PY_VERSION_HEX >= 0x030800b1
+ 0, /*tp_vectorcall*/
+ #endif
};
static struct __pyx_vtabstruct_array __pyx_vtable_array;
@@ -20333,6 +20344,9 @@ static PyTypeObject __pyx_type___pyx_array = {
#if PY_VERSION_HEX >= 0x030400a1
0, /*tp_finalize*/
#endif
+ #if PY_VERSION_HEX >= 0x030800b1
+ 0, /*tp_vectorcall*/
+ #endif
};
static PyObject *__pyx_tp_new_Enum(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
@@ -20441,6 +20455,9 @@ static PyTypeObject __pyx_type___pyx_MemviewEnum = {
#if PY_VERSION_HEX >= 0x030400a1
0, /*tp_finalize*/
#endif
+ #if PY_VERSION_HEX >= 0x030800b1
+ 0, /*tp_vectorcall*/
+ #endif
};
static struct __pyx_vtabstruct_memoryview __pyx_vtable_memoryview;
@@ -20691,6 +20708,9 @@ static PyTypeObject __pyx_type___pyx_memoryview = {
#if PY_VERSION_HEX >= 0x030400a1
0, /*tp_finalize*/
#endif
+ #if PY_VERSION_HEX >= 0x030800b1
+ 0, /*tp_vectorcall*/
+ #endif
};
static struct __pyx_vtabstruct__memoryviewslice __pyx_vtable__memoryviewslice;
@@ -20826,6 +20846,9 @@ static PyTypeObject __pyx_type___pyx_memoryviewslice = {
#if PY_VERSION_HEX >= 0x030400a1
0, /*tp_finalize*/
#endif
+ #if PY_VERSION_HEX >= 0x030800b1
+ 0, /*tp_vectorcall*/
+ #endif
};
static PyMethodDef __pyx_methods[] = {
@@ -21070,7 +21093,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
__Pyx_GOTREF(__pyx_tuple__5);
__Pyx_GIVEREF(__pyx_tuple__5);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":272
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":272
* if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
* and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)):
* raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<<
@@ -21081,7 +21104,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
__Pyx_GOTREF(__pyx_tuple__6);
__Pyx_GIVEREF(__pyx_tuple__6);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":276
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":276
* if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
* and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)):
* raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<<
@@ -21092,7 +21115,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
__Pyx_GOTREF(__pyx_tuple__7);
__Pyx_GIVEREF(__pyx_tuple__7);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":306
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":306
* if ((descr.byteorder == c'>' and little_endian) or
* (descr.byteorder == c'<' and not little_endian)):
* raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<<
@@ -21103,7 +21126,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
__Pyx_GOTREF(__pyx_tuple__8);
__Pyx_GIVEREF(__pyx_tuple__8);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":856
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":856
*
* if (end - f) - <int>(new_offset - offset[0]) < 15:
* raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<<
@@ -21114,7 +21137,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
__Pyx_GOTREF(__pyx_tuple__9);
__Pyx_GIVEREF(__pyx_tuple__9);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":880
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":880
* t = child.type_num
* if end - f < 5:
* raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<<
@@ -21125,7 +21148,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
__Pyx_GOTREF(__pyx_tuple__10);
__Pyx_GIVEREF(__pyx_tuple__10);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1038
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1038
* _import_array()
* except Exception:
* raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<<
@@ -21136,7 +21159,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
__Pyx_GOTREF(__pyx_tuple__11);
__Pyx_GIVEREF(__pyx_tuple__11);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1044
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1044
* _import_umath()
* except Exception:
* raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<<
@@ -21465,7 +21488,9 @@ static int __Pyx_modinit_type_init_code(void) {
__Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
/*--- Type init code ---*/
if (PyType_Ready(&__pyx_type_4silx_4math_13marchingcubes_MarchingCubes) < 0) __PYX_ERR(0, 56, __pyx_L1_error)
+ #if PY_VERSION_HEX < 0x030800B1
__pyx_type_4silx_4math_13marchingcubes_MarchingCubes.tp_print = 0;
+ #endif
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4silx_4math_13marchingcubes_MarchingCubes.tp_dictoffset && __pyx_type_4silx_4math_13marchingcubes_MarchingCubes.tp_getattro == PyObject_GenericGetAttr)) {
__pyx_type_4silx_4math_13marchingcubes_MarchingCubes.tp_getattro = __Pyx_PyObject_GenericGetAttr;
}
@@ -21485,12 +21510,16 @@ static int __Pyx_modinit_type_init_code(void) {
__pyx_vtabptr_array = &__pyx_vtable_array;
__pyx_vtable_array.get_memview = (PyObject *(*)(struct __pyx_array_obj *))__pyx_array_get_memview;
if (PyType_Ready(&__pyx_type___pyx_array) < 0) __PYX_ERR(1, 105, __pyx_L1_error)
+ #if PY_VERSION_HEX < 0x030800B1
__pyx_type___pyx_array.tp_print = 0;
+ #endif
if (__Pyx_SetVtable(__pyx_type___pyx_array.tp_dict, __pyx_vtabptr_array) < 0) __PYX_ERR(1, 105, __pyx_L1_error)
if (__Pyx_setup_reduce((PyObject*)&__pyx_type___pyx_array) < 0) __PYX_ERR(1, 105, __pyx_L1_error)
__pyx_array_type = &__pyx_type___pyx_array;
if (PyType_Ready(&__pyx_type___pyx_MemviewEnum) < 0) __PYX_ERR(1, 279, __pyx_L1_error)
+ #if PY_VERSION_HEX < 0x030800B1
__pyx_type___pyx_MemviewEnum.tp_print = 0;
+ #endif
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_MemviewEnum.tp_dictoffset && __pyx_type___pyx_MemviewEnum.tp_getattro == PyObject_GenericGetAttr)) {
__pyx_type___pyx_MemviewEnum.tp_getattro = __Pyx_PyObject_GenericGetAttr;
}
@@ -21505,7 +21534,9 @@ static int __Pyx_modinit_type_init_code(void) {
__pyx_vtable_memoryview.convert_item_to_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *))__pyx_memoryview_convert_item_to_object;
__pyx_vtable_memoryview.assign_item_from_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *, PyObject *))__pyx_memoryview_assign_item_from_object;
if (PyType_Ready(&__pyx_type___pyx_memoryview) < 0) __PYX_ERR(1, 330, __pyx_L1_error)
+ #if PY_VERSION_HEX < 0x030800B1
__pyx_type___pyx_memoryview.tp_print = 0;
+ #endif
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_memoryview.tp_dictoffset && __pyx_type___pyx_memoryview.tp_getattro == PyObject_GenericGetAttr)) {
__pyx_type___pyx_memoryview.tp_getattro = __Pyx_PyObject_GenericGetAttr;
}
@@ -21518,7 +21549,9 @@ static int __Pyx_modinit_type_init_code(void) {
__pyx_vtable__memoryviewslice.__pyx_base.assign_item_from_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *, PyObject *))__pyx_memoryviewslice_assign_item_from_object;
__pyx_type___pyx_memoryviewslice.tp_base = __pyx_memoryview_type;
if (PyType_Ready(&__pyx_type___pyx_memoryviewslice) < 0) __PYX_ERR(1, 961, __pyx_L1_error)
+ #if PY_VERSION_HEX < 0x030800B1
__pyx_type___pyx_memoryviewslice.tp_print = 0;
+ #endif
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_memoryviewslice.tp_dictoffset && __pyx_type___pyx_memoryviewslice.tp_getattro == PyObject_GenericGetAttr)) {
__pyx_type___pyx_memoryviewslice.tp_getattro = __Pyx_PyObject_GenericGetAttr;
}
diff --git a/silx/math/medianfilter/include/median_filter.hpp b/silx/math/medianfilter/include/median_filter.hpp
index b4d953a..7e42980 100644
--- a/silx/math/medianfilter/include/median_filter.hpp
+++ b/silx/math/medianfilter/include/median_filter.hpp
@@ -1,6 +1,6 @@
/*##########################################################################
#
-# Copyright (c) 2017-2018 European Synchrotron Radiation Facility
+# Copyright (c) 2017-2019 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -126,6 +126,21 @@ inline int mirror(int index, int length_max){
return res;
}
+/* Provide a way to access NaN that also works for integers*/
+
+template<typename T>
+inline T NotANumber(void) {
+ assert(false); //This should never be called
+ return 0;
+}
+
+template<>
+inline float NotANumber<float>(void) { return NAN; }
+
+template<>
+inline double NotANumber<double>(void) { return NAN; }
+
+
// Browse the column of pixel_x
template<typename T>
void median_filter(
@@ -244,8 +259,7 @@ void median_filter(
if (window_size == 0) {
// Window is empty, this is the case when all values are NaNs
- output[image_dim[1]*y_pixel + x_pixel] = NAN;
-
+ output[image_dim[1]*y_pixel + x_pixel] = NotANumber<T>();
} else {
// apply the median value if needed for this pixel
const T currentPixelValue = input[image_dim[1]*y_pixel + x_pixel];
diff --git a/silx/math/medianfilter/medianfilter.cpp b/silx/math/medianfilter/medianfilter.cpp
index 96f3b8f..29c8ff7 100644
--- a/silx/math/medianfilter/medianfilter.cpp
+++ b/silx/math/medianfilter/medianfilter.cpp
@@ -1,11 +1,11 @@
-/* Generated by Cython 0.29.7 */
+/* Generated by Cython 0.29.11 */
/* BEGIN: Cython Metadata
{
"distutils": {
"depends": [
- "/media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/numpy/core/include/numpy/arrayobject.h",
- "/media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/numpy/core/include/numpy/ufuncobject.h",
+ "/opt/python/cp36-cp36m/lib/python3.6/site-packages/numpy/core/include/numpy/arrayobject.h",
+ "/opt/python/cp36-cp36m/lib/python3.6/site-packages/numpy/core/include/numpy/ufuncobject.h",
"silx/math/medianfilter/include/median_filter.hpp"
],
"extra_compile_args": [
@@ -16,7 +16,7 @@
],
"include_dirs": [
"silx/math/medianfilter/include",
- "/media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/numpy/core/include"
+ "/opt/python/cp36-cp36m/lib/python3.6/site-packages/numpy/core/include"
],
"language": "c++",
"name": "silx.math.medianfilter.medianfilter",
@@ -35,8 +35,8 @@ END: Cython Metadata */
#elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
#error Cython requires Python 2.6+ or Python 3.3+.
#else
-#define CYTHON_ABI "0_29_7"
-#define CYTHON_HEX_VERSION 0x001D07F0
+#define CYTHON_ABI "0_29_11"
+#define CYTHON_HEX_VERSION 0x001D0BF0
#define CYTHON_FUTURE_DIVISION 1
#include <stddef.h>
#ifndef offsetof
@@ -352,8 +352,16 @@ class __Pyx_FakeReference {
#define __Pyx_DefaultClassType PyClass_Type
#else
#define __Pyx_BUILTIN_MODULE_NAME "builtins"
+#if PY_VERSION_HEX < 0x030800A4
#define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
+#elif PY_VERSION_HEX >= 0x030800B2
+ #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
+ PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
+#else
+ #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
+ PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
+#endif
#define __Pyx_DefaultClassType PyType_Type
#endif
#ifndef Py_TPFLAGS_CHECKTYPES
@@ -982,7 +990,7 @@ typedef struct {
} __Pyx_BufFmt_Context;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":776
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":776
* # in Cython to enable them only on the right systems.
*
* ctypedef npy_int8 int8_t # <<<<<<<<<<<<<<
@@ -991,7 +999,7 @@ typedef struct {
*/
typedef npy_int8 __pyx_t_5numpy_int8_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":777
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":777
*
* ctypedef npy_int8 int8_t
* ctypedef npy_int16 int16_t # <<<<<<<<<<<<<<
@@ -1000,7 +1008,7 @@ typedef npy_int8 __pyx_t_5numpy_int8_t;
*/
typedef npy_int16 __pyx_t_5numpy_int16_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":778
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":778
* ctypedef npy_int8 int8_t
* ctypedef npy_int16 int16_t
* ctypedef npy_int32 int32_t # <<<<<<<<<<<<<<
@@ -1009,7 +1017,7 @@ typedef npy_int16 __pyx_t_5numpy_int16_t;
*/
typedef npy_int32 __pyx_t_5numpy_int32_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":779
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":779
* ctypedef npy_int16 int16_t
* ctypedef npy_int32 int32_t
* ctypedef npy_int64 int64_t # <<<<<<<<<<<<<<
@@ -1018,7 +1026,7 @@ typedef npy_int32 __pyx_t_5numpy_int32_t;
*/
typedef npy_int64 __pyx_t_5numpy_int64_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":783
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":783
* #ctypedef npy_int128 int128_t
*
* ctypedef npy_uint8 uint8_t # <<<<<<<<<<<<<<
@@ -1027,7 +1035,7 @@ typedef npy_int64 __pyx_t_5numpy_int64_t;
*/
typedef npy_uint8 __pyx_t_5numpy_uint8_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":784
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":784
*
* ctypedef npy_uint8 uint8_t
* ctypedef npy_uint16 uint16_t # <<<<<<<<<<<<<<
@@ -1036,7 +1044,7 @@ typedef npy_uint8 __pyx_t_5numpy_uint8_t;
*/
typedef npy_uint16 __pyx_t_5numpy_uint16_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":785
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":785
* ctypedef npy_uint8 uint8_t
* ctypedef npy_uint16 uint16_t
* ctypedef npy_uint32 uint32_t # <<<<<<<<<<<<<<
@@ -1045,7 +1053,7 @@ typedef npy_uint16 __pyx_t_5numpy_uint16_t;
*/
typedef npy_uint32 __pyx_t_5numpy_uint32_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":786
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":786
* ctypedef npy_uint16 uint16_t
* ctypedef npy_uint32 uint32_t
* ctypedef npy_uint64 uint64_t # <<<<<<<<<<<<<<
@@ -1054,7 +1062,7 @@ typedef npy_uint32 __pyx_t_5numpy_uint32_t;
*/
typedef npy_uint64 __pyx_t_5numpy_uint64_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":790
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":790
* #ctypedef npy_uint128 uint128_t
*
* ctypedef npy_float32 float32_t # <<<<<<<<<<<<<<
@@ -1063,7 +1071,7 @@ typedef npy_uint64 __pyx_t_5numpy_uint64_t;
*/
typedef npy_float32 __pyx_t_5numpy_float32_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":791
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":791
*
* ctypedef npy_float32 float32_t
* ctypedef npy_float64 float64_t # <<<<<<<<<<<<<<
@@ -1072,7 +1080,7 @@ typedef npy_float32 __pyx_t_5numpy_float32_t;
*/
typedef npy_float64 __pyx_t_5numpy_float64_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":800
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":800
* # The int types are mapped a bit surprising --
* # numpy.int corresponds to 'l' and numpy.long to 'q'
* ctypedef npy_long int_t # <<<<<<<<<<<<<<
@@ -1081,7 +1089,7 @@ typedef npy_float64 __pyx_t_5numpy_float64_t;
*/
typedef npy_long __pyx_t_5numpy_int_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":801
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":801
* # numpy.int corresponds to 'l' and numpy.long to 'q'
* ctypedef npy_long int_t
* ctypedef npy_longlong long_t # <<<<<<<<<<<<<<
@@ -1090,7 +1098,7 @@ typedef npy_long __pyx_t_5numpy_int_t;
*/
typedef npy_longlong __pyx_t_5numpy_long_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":802
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":802
* ctypedef npy_long int_t
* ctypedef npy_longlong long_t
* ctypedef npy_longlong longlong_t # <<<<<<<<<<<<<<
@@ -1099,7 +1107,7 @@ typedef npy_longlong __pyx_t_5numpy_long_t;
*/
typedef npy_longlong __pyx_t_5numpy_longlong_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":804
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":804
* ctypedef npy_longlong longlong_t
*
* ctypedef npy_ulong uint_t # <<<<<<<<<<<<<<
@@ -1108,7 +1116,7 @@ typedef npy_longlong __pyx_t_5numpy_longlong_t;
*/
typedef npy_ulong __pyx_t_5numpy_uint_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":805
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":805
*
* ctypedef npy_ulong uint_t
* ctypedef npy_ulonglong ulong_t # <<<<<<<<<<<<<<
@@ -1117,7 +1125,7 @@ typedef npy_ulong __pyx_t_5numpy_uint_t;
*/
typedef npy_ulonglong __pyx_t_5numpy_ulong_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":806
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":806
* ctypedef npy_ulong uint_t
* ctypedef npy_ulonglong ulong_t
* ctypedef npy_ulonglong ulonglong_t # <<<<<<<<<<<<<<
@@ -1126,7 +1134,7 @@ typedef npy_ulonglong __pyx_t_5numpy_ulong_t;
*/
typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":808
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":808
* ctypedef npy_ulonglong ulonglong_t
*
* ctypedef npy_intp intp_t # <<<<<<<<<<<<<<
@@ -1135,7 +1143,7 @@ typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t;
*/
typedef npy_intp __pyx_t_5numpy_intp_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":809
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":809
*
* ctypedef npy_intp intp_t
* ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<<
@@ -1144,7 +1152,7 @@ typedef npy_intp __pyx_t_5numpy_intp_t;
*/
typedef npy_uintp __pyx_t_5numpy_uintp_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":811
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":811
* ctypedef npy_uintp uintp_t
*
* ctypedef npy_double float_t # <<<<<<<<<<<<<<
@@ -1153,7 +1161,7 @@ typedef npy_uintp __pyx_t_5numpy_uintp_t;
*/
typedef npy_double __pyx_t_5numpy_float_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":812
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":812
*
* ctypedef npy_double float_t
* ctypedef npy_double double_t # <<<<<<<<<<<<<<
@@ -1162,7 +1170,7 @@ typedef npy_double __pyx_t_5numpy_float_t;
*/
typedef npy_double __pyx_t_5numpy_double_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":813
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":813
* ctypedef npy_double float_t
* ctypedef npy_double double_t
* ctypedef npy_longdouble longdouble_t # <<<<<<<<<<<<<<
@@ -1228,7 +1236,7 @@ struct __pyx_MemviewEnum_obj;
struct __pyx_memoryview_obj;
struct __pyx_memoryviewslice_obj;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":815
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":815
* ctypedef npy_longdouble longdouble_t
*
* ctypedef npy_cfloat cfloat_t # <<<<<<<<<<<<<<
@@ -1237,7 +1245,7 @@ struct __pyx_memoryviewslice_obj;
*/
typedef npy_cfloat __pyx_t_5numpy_cfloat_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":816
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":816
*
* ctypedef npy_cfloat cfloat_t
* ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<<
@@ -1246,7 +1254,7 @@ typedef npy_cfloat __pyx_t_5numpy_cfloat_t;
*/
typedef npy_cdouble __pyx_t_5numpy_cdouble_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":817
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":817
* ctypedef npy_cfloat cfloat_t
* ctypedef npy_cdouble cdouble_t
* ctypedef npy_clongdouble clongdouble_t # <<<<<<<<<<<<<<
@@ -1255,7 +1263,7 @@ typedef npy_cdouble __pyx_t_5numpy_cdouble_t;
*/
typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t;
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":819
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":819
* ctypedef npy_clongdouble clongdouble_t
*
* ctypedef npy_cdouble complex_t # <<<<<<<<<<<<<<
@@ -7297,7 +7305,7 @@ static PyObject *__pyx_pf_4silx_4math_12medianfilter_12medianfilter_26_median_fi
return __pyx_r;
}
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":258
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":258
* # experimental exception made for __getbuffer__ and __releasebuffer__
* # -- the details of this may change.
* def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<<
@@ -7346,7 +7354,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
__Pyx_GIVEREF(__pyx_v_info->obj);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":265
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":265
*
* cdef int i, ndim
* cdef int endian_detector = 1 # <<<<<<<<<<<<<<
@@ -7355,7 +7363,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_endian_detector = 1;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":266
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":266
* cdef int i, ndim
* cdef int endian_detector = 1
* cdef bint little_endian = ((<char*>&endian_detector)[0] != 0) # <<<<<<<<<<<<<<
@@ -7364,7 +7372,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":268
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":268
* cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
*
* ndim = PyArray_NDIM(self) # <<<<<<<<<<<<<<
@@ -7373,7 +7381,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_ndim = PyArray_NDIM(__pyx_v_self);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":270
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":270
* ndim = PyArray_NDIM(self)
*
* if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<<
@@ -7387,7 +7395,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
goto __pyx_L4_bool_binop_done;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":271
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":271
*
* if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
* and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): # <<<<<<<<<<<<<<
@@ -7398,7 +7406,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_t_1 = __pyx_t_2;
__pyx_L4_bool_binop_done:;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":270
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":270
* ndim = PyArray_NDIM(self)
*
* if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<<
@@ -7407,7 +7415,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
if (unlikely(__pyx_t_1)) {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":272
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":272
* if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
* and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)):
* raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<<
@@ -7420,7 +7428,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__PYX_ERR(1, 272, __pyx_L1_error)
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":270
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":270
* ndim = PyArray_NDIM(self)
*
* if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<<
@@ -7429,7 +7437,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":274
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":274
* raise ValueError(u"ndarray is not C contiguous")
*
* if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<<
@@ -7443,7 +7451,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
goto __pyx_L7_bool_binop_done;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":275
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":275
*
* if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
* and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): # <<<<<<<<<<<<<<
@@ -7454,7 +7462,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_t_1 = __pyx_t_2;
__pyx_L7_bool_binop_done:;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":274
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":274
* raise ValueError(u"ndarray is not C contiguous")
*
* if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<<
@@ -7463,7 +7471,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
if (unlikely(__pyx_t_1)) {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":276
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":276
* if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
* and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)):
* raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<<
@@ -7476,7 +7484,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__PYX_ERR(1, 276, __pyx_L1_error)
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":274
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":274
* raise ValueError(u"ndarray is not C contiguous")
*
* if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<<
@@ -7485,7 +7493,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":278
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":278
* raise ValueError(u"ndarray is not Fortran contiguous")
*
* info.buf = PyArray_DATA(self) # <<<<<<<<<<<<<<
@@ -7494,7 +7502,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_info->buf = PyArray_DATA(__pyx_v_self);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":279
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":279
*
* info.buf = PyArray_DATA(self)
* info.ndim = ndim # <<<<<<<<<<<<<<
@@ -7503,7 +7511,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_info->ndim = __pyx_v_ndim;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":280
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":280
* info.buf = PyArray_DATA(self)
* info.ndim = ndim
* if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<<
@@ -7513,7 +7521,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0);
if (__pyx_t_1) {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":283
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":283
* # Allocate new buffer for strides and shape info.
* # This is allocated as one block, strides first.
* info.strides = <Py_ssize_t*>PyObject_Malloc(sizeof(Py_ssize_t) * 2 * <size_t>ndim) # <<<<<<<<<<<<<<
@@ -7522,7 +7530,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_info->strides = ((Py_ssize_t *)PyObject_Malloc((((sizeof(Py_ssize_t)) * 2) * ((size_t)__pyx_v_ndim))));
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":284
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":284
* # This is allocated as one block, strides first.
* info.strides = <Py_ssize_t*>PyObject_Malloc(sizeof(Py_ssize_t) * 2 * <size_t>ndim)
* info.shape = info.strides + ndim # <<<<<<<<<<<<<<
@@ -7531,7 +7539,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_info->shape = (__pyx_v_info->strides + __pyx_v_ndim);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":285
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":285
* info.strides = <Py_ssize_t*>PyObject_Malloc(sizeof(Py_ssize_t) * 2 * <size_t>ndim)
* info.shape = info.strides + ndim
* for i in range(ndim): # <<<<<<<<<<<<<<
@@ -7543,7 +7551,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
__pyx_v_i = __pyx_t_6;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":286
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":286
* info.shape = info.strides + ndim
* for i in range(ndim):
* info.strides[i] = PyArray_STRIDES(self)[i] # <<<<<<<<<<<<<<
@@ -7552,7 +7560,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
(__pyx_v_info->strides[__pyx_v_i]) = (PyArray_STRIDES(__pyx_v_self)[__pyx_v_i]);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":287
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":287
* for i in range(ndim):
* info.strides[i] = PyArray_STRIDES(self)[i]
* info.shape[i] = PyArray_DIMS(self)[i] # <<<<<<<<<<<<<<
@@ -7562,7 +7570,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
(__pyx_v_info->shape[__pyx_v_i]) = (PyArray_DIMS(__pyx_v_self)[__pyx_v_i]);
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":280
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":280
* info.buf = PyArray_DATA(self)
* info.ndim = ndim
* if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<<
@@ -7572,7 +7580,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
goto __pyx_L9;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":289
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":289
* info.shape[i] = PyArray_DIMS(self)[i]
* else:
* info.strides = <Py_ssize_t*>PyArray_STRIDES(self) # <<<<<<<<<<<<<<
@@ -7582,7 +7590,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
/*else*/ {
__pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(__pyx_v_self));
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":290
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":290
* else:
* info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
* info.shape = <Py_ssize_t*>PyArray_DIMS(self) # <<<<<<<<<<<<<<
@@ -7593,7 +7601,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
}
__pyx_L9:;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":291
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":291
* info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
* info.shape = <Py_ssize_t*>PyArray_DIMS(self)
* info.suboffsets = NULL # <<<<<<<<<<<<<<
@@ -7602,7 +7610,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_info->suboffsets = NULL;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":292
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":292
* info.shape = <Py_ssize_t*>PyArray_DIMS(self)
* info.suboffsets = NULL
* info.itemsize = PyArray_ITEMSIZE(self) # <<<<<<<<<<<<<<
@@ -7611,7 +7619,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_info->itemsize = PyArray_ITEMSIZE(__pyx_v_self);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":293
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":293
* info.suboffsets = NULL
* info.itemsize = PyArray_ITEMSIZE(self)
* info.readonly = not PyArray_ISWRITEABLE(self) # <<<<<<<<<<<<<<
@@ -7620,7 +7628,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_info->readonly = (!(PyArray_ISWRITEABLE(__pyx_v_self) != 0));
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":296
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":296
*
* cdef int t
* cdef char* f = NULL # <<<<<<<<<<<<<<
@@ -7629,7 +7637,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_f = NULL;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":297
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":297
* cdef int t
* cdef char* f = NULL
* cdef dtype descr = <dtype>PyArray_DESCR(self) # <<<<<<<<<<<<<<
@@ -7642,7 +7650,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_v_descr = ((PyArray_Descr *)__pyx_t_3);
__pyx_t_3 = 0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":300
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":300
* cdef int offset
*
* info.obj = self # <<<<<<<<<<<<<<
@@ -7655,7 +7663,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__Pyx_DECREF(__pyx_v_info->obj);
__pyx_v_info->obj = ((PyObject *)__pyx_v_self);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":302
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":302
* info.obj = self
*
* if not PyDataType_HASFIELDS(descr): # <<<<<<<<<<<<<<
@@ -7665,7 +7673,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_t_1 = ((!(PyDataType_HASFIELDS(__pyx_v_descr) != 0)) != 0);
if (__pyx_t_1) {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":303
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":303
*
* if not PyDataType_HASFIELDS(descr):
* t = descr.type_num # <<<<<<<<<<<<<<
@@ -7675,7 +7683,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_t_4 = __pyx_v_descr->type_num;
__pyx_v_t = __pyx_t_4;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":304
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":304
* if not PyDataType_HASFIELDS(descr):
* t = descr.type_num
* if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
@@ -7695,7 +7703,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
}
__pyx_L15_next_or:;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":305
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":305
* t = descr.type_num
* if ((descr.byteorder == c'>' and little_endian) or
* (descr.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<<
@@ -7712,7 +7720,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_t_1 = __pyx_t_2;
__pyx_L14_bool_binop_done:;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":304
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":304
* if not PyDataType_HASFIELDS(descr):
* t = descr.type_num
* if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
@@ -7721,7 +7729,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
if (unlikely(__pyx_t_1)) {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":306
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":306
* if ((descr.byteorder == c'>' and little_endian) or
* (descr.byteorder == c'<' and not little_endian)):
* raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<<
@@ -7734,7 +7742,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__PYX_ERR(1, 306, __pyx_L1_error)
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":304
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":304
* if not PyDataType_HASFIELDS(descr):
* t = descr.type_num
* if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
@@ -7743,7 +7751,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":307
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":307
* (descr.byteorder == c'<' and not little_endian)):
* raise ValueError(u"Non-native byte order not supported")
* if t == NPY_BYTE: f = "b" # <<<<<<<<<<<<<<
@@ -7756,7 +7764,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_UBYTE:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":308
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":308
* raise ValueError(u"Non-native byte order not supported")
* if t == NPY_BYTE: f = "b"
* elif t == NPY_UBYTE: f = "B" # <<<<<<<<<<<<<<
@@ -7767,7 +7775,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_SHORT:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":309
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":309
* if t == NPY_BYTE: f = "b"
* elif t == NPY_UBYTE: f = "B"
* elif t == NPY_SHORT: f = "h" # <<<<<<<<<<<<<<
@@ -7778,7 +7786,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_USHORT:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":310
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":310
* elif t == NPY_UBYTE: f = "B"
* elif t == NPY_SHORT: f = "h"
* elif t == NPY_USHORT: f = "H" # <<<<<<<<<<<<<<
@@ -7789,7 +7797,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_INT:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":311
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":311
* elif t == NPY_SHORT: f = "h"
* elif t == NPY_USHORT: f = "H"
* elif t == NPY_INT: f = "i" # <<<<<<<<<<<<<<
@@ -7800,7 +7808,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_UINT:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":312
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":312
* elif t == NPY_USHORT: f = "H"
* elif t == NPY_INT: f = "i"
* elif t == NPY_UINT: f = "I" # <<<<<<<<<<<<<<
@@ -7811,7 +7819,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_LONG:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":313
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":313
* elif t == NPY_INT: f = "i"
* elif t == NPY_UINT: f = "I"
* elif t == NPY_LONG: f = "l" # <<<<<<<<<<<<<<
@@ -7822,7 +7830,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_ULONG:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":314
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":314
* elif t == NPY_UINT: f = "I"
* elif t == NPY_LONG: f = "l"
* elif t == NPY_ULONG: f = "L" # <<<<<<<<<<<<<<
@@ -7833,7 +7841,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_LONGLONG:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":315
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":315
* elif t == NPY_LONG: f = "l"
* elif t == NPY_ULONG: f = "L"
* elif t == NPY_LONGLONG: f = "q" # <<<<<<<<<<<<<<
@@ -7844,7 +7852,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_ULONGLONG:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":316
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":316
* elif t == NPY_ULONG: f = "L"
* elif t == NPY_LONGLONG: f = "q"
* elif t == NPY_ULONGLONG: f = "Q" # <<<<<<<<<<<<<<
@@ -7855,7 +7863,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_FLOAT:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":317
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":317
* elif t == NPY_LONGLONG: f = "q"
* elif t == NPY_ULONGLONG: f = "Q"
* elif t == NPY_FLOAT: f = "f" # <<<<<<<<<<<<<<
@@ -7866,7 +7874,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_DOUBLE:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":318
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":318
* elif t == NPY_ULONGLONG: f = "Q"
* elif t == NPY_FLOAT: f = "f"
* elif t == NPY_DOUBLE: f = "d" # <<<<<<<<<<<<<<
@@ -7877,7 +7885,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_LONGDOUBLE:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":319
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":319
* elif t == NPY_FLOAT: f = "f"
* elif t == NPY_DOUBLE: f = "d"
* elif t == NPY_LONGDOUBLE: f = "g" # <<<<<<<<<<<<<<
@@ -7888,7 +7896,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_CFLOAT:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":320
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":320
* elif t == NPY_DOUBLE: f = "d"
* elif t == NPY_LONGDOUBLE: f = "g"
* elif t == NPY_CFLOAT: f = "Zf" # <<<<<<<<<<<<<<
@@ -7899,7 +7907,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_CDOUBLE:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":321
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":321
* elif t == NPY_LONGDOUBLE: f = "g"
* elif t == NPY_CFLOAT: f = "Zf"
* elif t == NPY_CDOUBLE: f = "Zd" # <<<<<<<<<<<<<<
@@ -7910,7 +7918,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_CLONGDOUBLE:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":322
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":322
* elif t == NPY_CFLOAT: f = "Zf"
* elif t == NPY_CDOUBLE: f = "Zd"
* elif t == NPY_CLONGDOUBLE: f = "Zg" # <<<<<<<<<<<<<<
@@ -7921,7 +7929,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
case NPY_OBJECT:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":323
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":323
* elif t == NPY_CDOUBLE: f = "Zd"
* elif t == NPY_CLONGDOUBLE: f = "Zg"
* elif t == NPY_OBJECT: f = "O" # <<<<<<<<<<<<<<
@@ -7932,7 +7940,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
default:
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":325
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":325
* elif t == NPY_OBJECT: f = "O"
* else:
* raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<<
@@ -7953,7 +7961,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":326
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":326
* else:
* raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
* info.format = f # <<<<<<<<<<<<<<
@@ -7962,7 +7970,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_info->format = __pyx_v_f;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":327
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":327
* raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
* info.format = f
* return # <<<<<<<<<<<<<<
@@ -7972,7 +7980,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_r = 0;
goto __pyx_L0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":302
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":302
* info.obj = self
*
* if not PyDataType_HASFIELDS(descr): # <<<<<<<<<<<<<<
@@ -7981,7 +7989,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":329
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":329
* return
* else:
* info.format = <char*>PyObject_Malloc(_buffer_format_string_len) # <<<<<<<<<<<<<<
@@ -7991,7 +7999,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
/*else*/ {
__pyx_v_info->format = ((char *)PyObject_Malloc(0xFF));
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":330
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":330
* else:
* info.format = <char*>PyObject_Malloc(_buffer_format_string_len)
* info.format[0] = c'^' # Native data types, manual alignment # <<<<<<<<<<<<<<
@@ -8000,7 +8008,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
(__pyx_v_info->format[0]) = '^';
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":331
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":331
* info.format = <char*>PyObject_Malloc(_buffer_format_string_len)
* info.format[0] = c'^' # Native data types, manual alignment
* offset = 0 # <<<<<<<<<<<<<<
@@ -8009,7 +8017,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_offset = 0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":332
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":332
* info.format[0] = c'^' # Native data types, manual alignment
* offset = 0
* f = _util_dtypestring(descr, info.format + 1, # <<<<<<<<<<<<<<
@@ -8019,7 +8027,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 0xFF), (&__pyx_v_offset)); if (unlikely(__pyx_t_9 == ((char *)NULL))) __PYX_ERR(1, 332, __pyx_L1_error)
__pyx_v_f = __pyx_t_9;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":335
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":335
* info.format + _buffer_format_string_len,
* &offset)
* f[0] = c'\0' # Terminate format string # <<<<<<<<<<<<<<
@@ -8029,7 +8037,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
(__pyx_v_f[0]) = '\x00';
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":258
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":258
* # experimental exception made for __getbuffer__ and __releasebuffer__
* # -- the details of this may change.
* def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<<
@@ -8061,7 +8069,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
return __pyx_r;
}
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":337
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":337
* f[0] = c'\0' # Terminate format string
*
* def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<<
@@ -8085,7 +8093,7 @@ static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_s
int __pyx_t_1;
__Pyx_RefNannySetupContext("__releasebuffer__", 0);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":338
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":338
*
* def __releasebuffer__(ndarray self, Py_buffer* info):
* if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<<
@@ -8095,7 +8103,7 @@ static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_s
__pyx_t_1 = (PyArray_HASFIELDS(__pyx_v_self) != 0);
if (__pyx_t_1) {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":339
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":339
* def __releasebuffer__(ndarray self, Py_buffer* info):
* if PyArray_HASFIELDS(self):
* PyObject_Free(info.format) # <<<<<<<<<<<<<<
@@ -8104,7 +8112,7 @@ static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_s
*/
PyObject_Free(__pyx_v_info->format);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":338
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":338
*
* def __releasebuffer__(ndarray self, Py_buffer* info):
* if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<<
@@ -8113,7 +8121,7 @@ static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_s
*/
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":340
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":340
* if PyArray_HASFIELDS(self):
* PyObject_Free(info.format)
* if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<<
@@ -8123,7 +8131,7 @@ static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_s
__pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0);
if (__pyx_t_1) {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":341
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":341
* PyObject_Free(info.format)
* if sizeof(npy_intp) != sizeof(Py_ssize_t):
* PyObject_Free(info.strides) # <<<<<<<<<<<<<<
@@ -8132,7 +8140,7 @@ static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_s
*/
PyObject_Free(__pyx_v_info->strides);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":340
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":340
* if PyArray_HASFIELDS(self):
* PyObject_Free(info.format)
* if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<<
@@ -8141,7 +8149,7 @@ static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_s
*/
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":337
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":337
* f[0] = c'\0' # Terminate format string
*
* def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<<
@@ -8153,7 +8161,7 @@ static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_s
__Pyx_RefNannyFinishContext();
}
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":821
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":821
* ctypedef npy_cdouble complex_t
*
* cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<<
@@ -8167,7 +8175,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__
PyObject *__pyx_t_1 = NULL;
__Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":822
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":822
*
* cdef inline object PyArray_MultiIterNew1(a):
* return PyArray_MultiIterNew(1, <void*>a) # <<<<<<<<<<<<<<
@@ -8181,7 +8189,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":821
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":821
* ctypedef npy_cdouble complex_t
*
* cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<<
@@ -8200,7 +8208,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__
return __pyx_r;
}
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":824
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":824
* return PyArray_MultiIterNew(1, <void*>a)
*
* cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<<
@@ -8214,7 +8222,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__
PyObject *__pyx_t_1 = NULL;
__Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":825
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":825
*
* cdef inline object PyArray_MultiIterNew2(a, b):
* return PyArray_MultiIterNew(2, <void*>a, <void*>b) # <<<<<<<<<<<<<<
@@ -8228,7 +8236,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":824
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":824
* return PyArray_MultiIterNew(1, <void*>a)
*
* cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<<
@@ -8247,7 +8255,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__
return __pyx_r;
}
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":827
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":827
* return PyArray_MultiIterNew(2, <void*>a, <void*>b)
*
* cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<<
@@ -8261,7 +8269,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__
PyObject *__pyx_t_1 = NULL;
__Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":828
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":828
*
* cdef inline object PyArray_MultiIterNew3(a, b, c):
* return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c) # <<<<<<<<<<<<<<
@@ -8275,7 +8283,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":827
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":827
* return PyArray_MultiIterNew(2, <void*>a, <void*>b)
*
* cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<<
@@ -8294,7 +8302,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__
return __pyx_r;
}
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":830
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":830
* return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
*
* cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<<
@@ -8308,7 +8316,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__
PyObject *__pyx_t_1 = NULL;
__Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":831
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":831
*
* cdef inline object PyArray_MultiIterNew4(a, b, c, d):
* return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d) # <<<<<<<<<<<<<<
@@ -8322,7 +8330,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":830
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":830
* return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
*
* cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<<
@@ -8341,7 +8349,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__
return __pyx_r;
}
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":833
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":833
* return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
*
* cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<<
@@ -8355,7 +8363,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__
PyObject *__pyx_t_1 = NULL;
__Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":834
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":834
*
* cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
* return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e) # <<<<<<<<<<<<<<
@@ -8369,7 +8377,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":833
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":833
* return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
*
* cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<<
@@ -8388,7 +8396,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__
return __pyx_r;
}
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":836
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":836
* return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
*
* cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<<
@@ -8402,7 +8410,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__
int __pyx_t_1;
__Pyx_RefNannySetupContext("PyDataType_SHAPE", 0);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":837
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":837
*
* cdef inline tuple PyDataType_SHAPE(dtype d):
* if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<<
@@ -8412,7 +8420,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__
__pyx_t_1 = (PyDataType_HASSUBARRAY(__pyx_v_d) != 0);
if (__pyx_t_1) {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":838
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":838
* cdef inline tuple PyDataType_SHAPE(dtype d):
* if PyDataType_HASSUBARRAY(d):
* return <tuple>d.subarray.shape # <<<<<<<<<<<<<<
@@ -8424,7 +8432,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__
__pyx_r = ((PyObject*)__pyx_v_d->subarray->shape);
goto __pyx_L0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":837
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":837
*
* cdef inline tuple PyDataType_SHAPE(dtype d):
* if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<<
@@ -8433,7 +8441,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__
*/
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":840
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":840
* return <tuple>d.subarray.shape
* else:
* return () # <<<<<<<<<<<<<<
@@ -8447,7 +8455,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__
goto __pyx_L0;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":836
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":836
* return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
*
* cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<<
@@ -8462,7 +8470,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__
return __pyx_r;
}
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":842
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":842
* return ()
*
* cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<<
@@ -8491,7 +8499,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
char *__pyx_t_9;
__Pyx_RefNannySetupContext("_util_dtypestring", 0);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":847
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":847
*
* cdef dtype child
* cdef int endian_detector = 1 # <<<<<<<<<<<<<<
@@ -8500,7 +8508,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
*/
__pyx_v_endian_detector = 1;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":848
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":848
* cdef dtype child
* cdef int endian_detector = 1
* cdef bint little_endian = ((<char*>&endian_detector)[0] != 0) # <<<<<<<<<<<<<<
@@ -8509,7 +8517,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
*/
__pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":851
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":851
* cdef tuple fields
*
* for childname in descr.names: # <<<<<<<<<<<<<<
@@ -8532,7 +8540,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__Pyx_XDECREF_SET(__pyx_v_childname, __pyx_t_3);
__pyx_t_3 = 0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":852
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":852
*
* for childname in descr.names:
* fields = descr.fields[childname] # <<<<<<<<<<<<<<
@@ -8549,7 +8557,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__Pyx_XDECREF_SET(__pyx_v_fields, ((PyObject*)__pyx_t_3));
__pyx_t_3 = 0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":853
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":853
* for childname in descr.names:
* fields = descr.fields[childname]
* child, new_offset = fields # <<<<<<<<<<<<<<
@@ -8584,7 +8592,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__Pyx_XDECREF_SET(__pyx_v_new_offset, __pyx_t_4);
__pyx_t_4 = 0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":855
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":855
* child, new_offset = fields
*
* if (end - f) - <int>(new_offset - offset[0]) < 15: # <<<<<<<<<<<<<<
@@ -8601,7 +8609,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__pyx_t_6 = ((((__pyx_v_end - __pyx_v_f) - ((int)__pyx_t_5)) < 15) != 0);
if (unlikely(__pyx_t_6)) {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":856
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":856
*
* if (end - f) - <int>(new_offset - offset[0]) < 15:
* raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<<
@@ -8614,7 +8622,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__PYX_ERR(1, 856, __pyx_L1_error)
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":855
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":855
* child, new_offset = fields
*
* if (end - f) - <int>(new_offset - offset[0]) < 15: # <<<<<<<<<<<<<<
@@ -8623,7 +8631,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
*/
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":858
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":858
* raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
*
* if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
@@ -8643,7 +8651,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
}
__pyx_L8_next_or:;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":859
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":859
*
* if ((child.byteorder == c'>' and little_endian) or
* (child.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<<
@@ -8660,7 +8668,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__pyx_t_6 = __pyx_t_7;
__pyx_L7_bool_binop_done:;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":858
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":858
* raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
*
* if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
@@ -8669,7 +8677,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
*/
if (unlikely(__pyx_t_6)) {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":860
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":860
* if ((child.byteorder == c'>' and little_endian) or
* (child.byteorder == c'<' and not little_endian)):
* raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<<
@@ -8682,7 +8690,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__PYX_ERR(1, 860, __pyx_L1_error)
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":858
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":858
* raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
*
* if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
@@ -8691,7 +8699,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
*/
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":870
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":870
*
* # Output padding bytes
* while offset[0] < new_offset: # <<<<<<<<<<<<<<
@@ -8707,7 +8715,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (!__pyx_t_6) break;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":871
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":871
* # Output padding bytes
* while offset[0] < new_offset:
* f[0] = 120 # "x"; pad byte # <<<<<<<<<<<<<<
@@ -8716,7 +8724,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
*/
(__pyx_v_f[0]) = 0x78;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":872
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":872
* while offset[0] < new_offset:
* f[0] = 120 # "x"; pad byte
* f += 1 # <<<<<<<<<<<<<<
@@ -8725,7 +8733,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
*/
__pyx_v_f = (__pyx_v_f + 1);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":873
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":873
* f[0] = 120 # "x"; pad byte
* f += 1
* offset[0] += 1 # <<<<<<<<<<<<<<
@@ -8736,7 +8744,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
(__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + 1);
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":875
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":875
* offset[0] += 1
*
* offset[0] += child.itemsize # <<<<<<<<<<<<<<
@@ -8746,7 +8754,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__pyx_t_8 = 0;
(__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + __pyx_v_child->elsize);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":877
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":877
* offset[0] += child.itemsize
*
* if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<<
@@ -8756,7 +8764,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__pyx_t_6 = ((!(PyDataType_HASFIELDS(__pyx_v_child) != 0)) != 0);
if (__pyx_t_6) {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":878
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":878
*
* if not PyDataType_HASFIELDS(child):
* t = child.type_num # <<<<<<<<<<<<<<
@@ -8768,7 +8776,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_4);
__pyx_t_4 = 0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":879
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":879
* if not PyDataType_HASFIELDS(child):
* t = child.type_num
* if end - f < 5: # <<<<<<<<<<<<<<
@@ -8778,7 +8786,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__pyx_t_6 = (((__pyx_v_end - __pyx_v_f) < 5) != 0);
if (unlikely(__pyx_t_6)) {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":880
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":880
* t = child.type_num
* if end - f < 5:
* raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<<
@@ -8791,7 +8799,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__PYX_ERR(1, 880, __pyx_L1_error)
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":879
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":879
* if not PyDataType_HASFIELDS(child):
* t = child.type_num
* if end - f < 5: # <<<<<<<<<<<<<<
@@ -8800,7 +8808,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
*/
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":883
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":883
*
* # Until ticket #99 is fixed, use integers to avoid warnings
* if t == NPY_BYTE: f[0] = 98 #"b" # <<<<<<<<<<<<<<
@@ -8818,7 +8826,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":884
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":884
* # Until ticket #99 is fixed, use integers to avoid warnings
* if t == NPY_BYTE: f[0] = 98 #"b"
* elif t == NPY_UBYTE: f[0] = 66 #"B" # <<<<<<<<<<<<<<
@@ -8836,7 +8844,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":885
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":885
* if t == NPY_BYTE: f[0] = 98 #"b"
* elif t == NPY_UBYTE: f[0] = 66 #"B"
* elif t == NPY_SHORT: f[0] = 104 #"h" # <<<<<<<<<<<<<<
@@ -8854,7 +8862,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":886
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":886
* elif t == NPY_UBYTE: f[0] = 66 #"B"
* elif t == NPY_SHORT: f[0] = 104 #"h"
* elif t == NPY_USHORT: f[0] = 72 #"H" # <<<<<<<<<<<<<<
@@ -8872,7 +8880,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":887
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":887
* elif t == NPY_SHORT: f[0] = 104 #"h"
* elif t == NPY_USHORT: f[0] = 72 #"H"
* elif t == NPY_INT: f[0] = 105 #"i" # <<<<<<<<<<<<<<
@@ -8890,7 +8898,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":888
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":888
* elif t == NPY_USHORT: f[0] = 72 #"H"
* elif t == NPY_INT: f[0] = 105 #"i"
* elif t == NPY_UINT: f[0] = 73 #"I" # <<<<<<<<<<<<<<
@@ -8908,7 +8916,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":889
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":889
* elif t == NPY_INT: f[0] = 105 #"i"
* elif t == NPY_UINT: f[0] = 73 #"I"
* elif t == NPY_LONG: f[0] = 108 #"l" # <<<<<<<<<<<<<<
@@ -8926,7 +8934,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":890
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":890
* elif t == NPY_UINT: f[0] = 73 #"I"
* elif t == NPY_LONG: f[0] = 108 #"l"
* elif t == NPY_ULONG: f[0] = 76 #"L" # <<<<<<<<<<<<<<
@@ -8944,7 +8952,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":891
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":891
* elif t == NPY_LONG: f[0] = 108 #"l"
* elif t == NPY_ULONG: f[0] = 76 #"L"
* elif t == NPY_LONGLONG: f[0] = 113 #"q" # <<<<<<<<<<<<<<
@@ -8962,7 +8970,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":892
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":892
* elif t == NPY_ULONG: f[0] = 76 #"L"
* elif t == NPY_LONGLONG: f[0] = 113 #"q"
* elif t == NPY_ULONGLONG: f[0] = 81 #"Q" # <<<<<<<<<<<<<<
@@ -8980,7 +8988,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":893
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":893
* elif t == NPY_LONGLONG: f[0] = 113 #"q"
* elif t == NPY_ULONGLONG: f[0] = 81 #"Q"
* elif t == NPY_FLOAT: f[0] = 102 #"f" # <<<<<<<<<<<<<<
@@ -8998,7 +9006,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":894
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":894
* elif t == NPY_ULONGLONG: f[0] = 81 #"Q"
* elif t == NPY_FLOAT: f[0] = 102 #"f"
* elif t == NPY_DOUBLE: f[0] = 100 #"d" # <<<<<<<<<<<<<<
@@ -9016,7 +9024,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":895
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":895
* elif t == NPY_FLOAT: f[0] = 102 #"f"
* elif t == NPY_DOUBLE: f[0] = 100 #"d"
* elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" # <<<<<<<<<<<<<<
@@ -9034,7 +9042,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":896
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":896
* elif t == NPY_DOUBLE: f[0] = 100 #"d"
* elif t == NPY_LONGDOUBLE: f[0] = 103 #"g"
* elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf # <<<<<<<<<<<<<<
@@ -9054,7 +9062,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":897
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":897
* elif t == NPY_LONGDOUBLE: f[0] = 103 #"g"
* elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf
* elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd # <<<<<<<<<<<<<<
@@ -9074,7 +9082,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":898
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":898
* elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf
* elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd
* elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg # <<<<<<<<<<<<<<
@@ -9094,7 +9102,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":899
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":899
* elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd
* elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
* elif t == NPY_OBJECT: f[0] = 79 #"O" # <<<<<<<<<<<<<<
@@ -9112,7 +9120,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L15;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":901
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":901
* elif t == NPY_OBJECT: f[0] = 79 #"O"
* else:
* raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<<
@@ -9131,7 +9139,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
}
__pyx_L15:;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":902
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":902
* else:
* raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
* f += 1 # <<<<<<<<<<<<<<
@@ -9140,7 +9148,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
*/
__pyx_v_f = (__pyx_v_f + 1);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":877
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":877
* offset[0] += child.itemsize
*
* if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<<
@@ -9150,7 +9158,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L13;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":906
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":906
* # Cython ignores struct boundary information ("T{...}"),
* # so don't output it
* f = _util_dtypestring(child, f, end, offset) # <<<<<<<<<<<<<<
@@ -9163,7 +9171,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
}
__pyx_L13:;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":851
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":851
* cdef tuple fields
*
* for childname in descr.names: # <<<<<<<<<<<<<<
@@ -9173,7 +9181,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":907
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":907
* # so don't output it
* f = _util_dtypestring(child, f, end, offset)
* return f # <<<<<<<<<<<<<<
@@ -9183,7 +9191,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__pyx_r = __pyx_v_f;
goto __pyx_L0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":842
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":842
* return ()
*
* cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<<
@@ -9208,7 +9216,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
return __pyx_r;
}
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1022
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1022
* int _import_umath() except -1
*
* cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<<
@@ -9220,7 +9228,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("set_array_base", 0);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1023
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1023
*
* cdef inline void set_array_base(ndarray arr, object base):
* Py_INCREF(base) # important to do this before stealing the reference below! # <<<<<<<<<<<<<<
@@ -9229,7 +9237,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a
*/
Py_INCREF(__pyx_v_base);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1024
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1024
* cdef inline void set_array_base(ndarray arr, object base):
* Py_INCREF(base) # important to do this before stealing the reference below!
* PyArray_SetBaseObject(arr, base) # <<<<<<<<<<<<<<
@@ -9238,7 +9246,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a
*/
(void)(PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base));
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1022
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1022
* int _import_umath() except -1
*
* cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<<
@@ -9250,7 +9258,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a
__Pyx_RefNannyFinishContext();
}
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1026
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1026
* PyArray_SetBaseObject(arr, base)
*
* cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<<
@@ -9265,7 +9273,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py
int __pyx_t_1;
__Pyx_RefNannySetupContext("get_array_base", 0);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1027
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1027
*
* cdef inline object get_array_base(ndarray arr):
* base = PyArray_BASE(arr) # <<<<<<<<<<<<<<
@@ -9274,7 +9282,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py
*/
__pyx_v_base = PyArray_BASE(__pyx_v_arr);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1028
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1028
* cdef inline object get_array_base(ndarray arr):
* base = PyArray_BASE(arr)
* if base is NULL: # <<<<<<<<<<<<<<
@@ -9284,7 +9292,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py
__pyx_t_1 = ((__pyx_v_base == NULL) != 0);
if (__pyx_t_1) {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1029
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1029
* base = PyArray_BASE(arr)
* if base is NULL:
* return None # <<<<<<<<<<<<<<
@@ -9295,7 +9303,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
goto __pyx_L0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1028
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1028
* cdef inline object get_array_base(ndarray arr):
* base = PyArray_BASE(arr)
* if base is NULL: # <<<<<<<<<<<<<<
@@ -9304,7 +9312,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py
*/
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1030
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1030
* if base is NULL:
* return None
* return <object>base # <<<<<<<<<<<<<<
@@ -9316,7 +9324,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py
__pyx_r = ((PyObject *)__pyx_v_base);
goto __pyx_L0;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1026
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1026
* PyArray_SetBaseObject(arr, base)
*
* cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<<
@@ -9331,7 +9339,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py
return __pyx_r;
}
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1034
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1034
* # Versions of the import_* functions which are more suitable for
* # Cython code.
* cdef inline int import_array() except -1: # <<<<<<<<<<<<<<
@@ -9352,7 +9360,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
PyObject *__pyx_t_8 = NULL;
__Pyx_RefNannySetupContext("import_array", 0);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1035
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1035
* # Cython code.
* cdef inline int import_array() except -1:
* try: # <<<<<<<<<<<<<<
@@ -9368,7 +9376,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
__Pyx_XGOTREF(__pyx_t_3);
/*try:*/ {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1036
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1036
* cdef inline int import_array() except -1:
* try:
* _import_array() # <<<<<<<<<<<<<<
@@ -9377,7 +9385,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
*/
__pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 1036, __pyx_L3_error)
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1035
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1035
* # Cython code.
* cdef inline int import_array() except -1:
* try: # <<<<<<<<<<<<<<
@@ -9391,7 +9399,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
goto __pyx_L8_try_end;
__pyx_L3_error:;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1037
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1037
* try:
* _import_array()
* except Exception: # <<<<<<<<<<<<<<
@@ -9406,7 +9414,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
__Pyx_GOTREF(__pyx_t_6);
__Pyx_GOTREF(__pyx_t_7);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1038
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1038
* _import_array()
* except Exception:
* raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<<
@@ -9422,7 +9430,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
goto __pyx_L5_except_error;
__pyx_L5_except_error:;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1035
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1035
* # Cython code.
* cdef inline int import_array() except -1:
* try: # <<<<<<<<<<<<<<
@@ -9437,7 +9445,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
__pyx_L8_try_end:;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1034
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1034
* # Versions of the import_* functions which are more suitable for
* # Cython code.
* cdef inline int import_array() except -1: # <<<<<<<<<<<<<<
@@ -9460,7 +9468,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
return __pyx_r;
}
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1040
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1040
* raise ImportError("numpy.core.multiarray failed to import")
*
* cdef inline int import_umath() except -1: # <<<<<<<<<<<<<<
@@ -9481,7 +9489,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
PyObject *__pyx_t_8 = NULL;
__Pyx_RefNannySetupContext("import_umath", 0);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1041
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1041
*
* cdef inline int import_umath() except -1:
* try: # <<<<<<<<<<<<<<
@@ -9497,7 +9505,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
__Pyx_XGOTREF(__pyx_t_3);
/*try:*/ {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1042
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1042
* cdef inline int import_umath() except -1:
* try:
* _import_umath() # <<<<<<<<<<<<<<
@@ -9506,7 +9514,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
*/
__pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 1042, __pyx_L3_error)
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1041
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1041
*
* cdef inline int import_umath() except -1:
* try: # <<<<<<<<<<<<<<
@@ -9520,7 +9528,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
goto __pyx_L8_try_end;
__pyx_L3_error:;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1043
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1043
* try:
* _import_umath()
* except Exception: # <<<<<<<<<<<<<<
@@ -9535,7 +9543,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
__Pyx_GOTREF(__pyx_t_6);
__Pyx_GOTREF(__pyx_t_7);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1044
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1044
* _import_umath()
* except Exception:
* raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<<
@@ -9551,7 +9559,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
goto __pyx_L5_except_error;
__pyx_L5_except_error:;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1041
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1041
*
* cdef inline int import_umath() except -1:
* try: # <<<<<<<<<<<<<<
@@ -9566,7 +9574,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
__pyx_L8_try_end:;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1040
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1040
* raise ImportError("numpy.core.multiarray failed to import")
*
* cdef inline int import_umath() except -1: # <<<<<<<<<<<<<<
@@ -9589,7 +9597,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
return __pyx_r;
}
-/* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1046
+/* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1046
* raise ImportError("numpy.core.umath failed to import")
*
* cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<<
@@ -9610,7 +9618,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) {
PyObject *__pyx_t_8 = NULL;
__Pyx_RefNannySetupContext("import_ufunc", 0);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1047
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1047
*
* cdef inline int import_ufunc() except -1:
* try: # <<<<<<<<<<<<<<
@@ -9626,7 +9634,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) {
__Pyx_XGOTREF(__pyx_t_3);
/*try:*/ {
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1048
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1048
* cdef inline int import_ufunc() except -1:
* try:
* _import_umath() # <<<<<<<<<<<<<<
@@ -9635,7 +9643,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) {
*/
__pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 1048, __pyx_L3_error)
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1047
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1047
*
* cdef inline int import_ufunc() except -1:
* try: # <<<<<<<<<<<<<<
@@ -9649,7 +9657,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) {
goto __pyx_L8_try_end;
__pyx_L3_error:;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1049
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1049
* try:
* _import_umath()
* except Exception: # <<<<<<<<<<<<<<
@@ -9663,7 +9671,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) {
__Pyx_GOTREF(__pyx_t_6);
__Pyx_GOTREF(__pyx_t_7);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1050
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1050
* _import_umath()
* except Exception:
* raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<<
@@ -9677,7 +9685,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) {
goto __pyx_L5_except_error;
__pyx_L5_except_error:;
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1047
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1047
*
* cdef inline int import_ufunc() except -1:
* try: # <<<<<<<<<<<<<<
@@ -9692,7 +9700,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) {
__pyx_L8_try_end:;
}
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1046
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1046
* raise ImportError("numpy.core.umath failed to import")
*
* cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<<
@@ -22665,6 +22673,9 @@ static PyTypeObject __pyx_type___pyx_array = {
#if PY_VERSION_HEX >= 0x030400a1
0, /*tp_finalize*/
#endif
+ #if PY_VERSION_HEX >= 0x030800b1
+ 0, /*tp_vectorcall*/
+ #endif
};
static PyObject *__pyx_tp_new_Enum(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
@@ -22773,6 +22784,9 @@ static PyTypeObject __pyx_type___pyx_MemviewEnum = {
#if PY_VERSION_HEX >= 0x030400a1
0, /*tp_finalize*/
#endif
+ #if PY_VERSION_HEX >= 0x030800b1
+ 0, /*tp_vectorcall*/
+ #endif
};
static struct __pyx_vtabstruct_memoryview __pyx_vtable_memoryview;
@@ -23023,6 +23037,9 @@ static PyTypeObject __pyx_type___pyx_memoryview = {
#if PY_VERSION_HEX >= 0x030400a1
0, /*tp_finalize*/
#endif
+ #if PY_VERSION_HEX >= 0x030800b1
+ 0, /*tp_vectorcall*/
+ #endif
};
static struct __pyx_vtabstruct__memoryviewslice __pyx_vtable__memoryviewslice;
@@ -23158,6 +23175,9 @@ static PyTypeObject __pyx_type___pyx_memoryviewslice = {
#if PY_VERSION_HEX >= 0x030400a1
0, /*tp_finalize*/
#endif
+ #if PY_VERSION_HEX >= 0x030800b1
+ 0, /*tp_vectorcall*/
+ #endif
};
static PyMethodDef __pyx_methods[] = {
@@ -23471,7 +23491,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
__Pyx_GOTREF(__pyx_tuple__7);
__Pyx_GIVEREF(__pyx_tuple__7);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":272
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":272
* if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
* and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)):
* raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<<
@@ -23482,7 +23502,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
__Pyx_GOTREF(__pyx_tuple__8);
__Pyx_GIVEREF(__pyx_tuple__8);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":276
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":276
* if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
* and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)):
* raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<<
@@ -23493,7 +23513,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
__Pyx_GOTREF(__pyx_tuple__9);
__Pyx_GIVEREF(__pyx_tuple__9);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":306
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":306
* if ((descr.byteorder == c'>' and little_endian) or
* (descr.byteorder == c'<' and not little_endian)):
* raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<<
@@ -23504,7 +23524,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
__Pyx_GOTREF(__pyx_tuple__10);
__Pyx_GIVEREF(__pyx_tuple__10);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":856
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":856
*
* if (end - f) - <int>(new_offset - offset[0]) < 15:
* raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<<
@@ -23515,7 +23535,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
__Pyx_GOTREF(__pyx_tuple__11);
__Pyx_GIVEREF(__pyx_tuple__11);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":880
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":880
* t = child.type_num
* if end - f < 5:
* raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<<
@@ -23526,7 +23546,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
__Pyx_GOTREF(__pyx_tuple__12);
__Pyx_GIVEREF(__pyx_tuple__12);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1038
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1038
* _import_array()
* except Exception:
* raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<<
@@ -23537,7 +23557,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
__Pyx_GOTREF(__pyx_tuple__13);
__Pyx_GIVEREF(__pyx_tuple__13);
- /* "../../../../media/data_unused/tvincent/venvs/py3env/lib/python3.4/site-packages/Cython/Includes/numpy/__init__.pxd":1044
+ /* "../../../../../opt/python/cp36-cp36m/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1044
* _import_umath()
* except Exception:
* raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<<
@@ -24044,12 +24064,16 @@ static int __Pyx_modinit_type_init_code(void) {
__pyx_vtabptr_array = &__pyx_vtable_array;
__pyx_vtable_array.get_memview = (PyObject *(*)(struct __pyx_array_obj *))__pyx_array_get_memview;
if (PyType_Ready(&__pyx_type___pyx_array) < 0) __PYX_ERR(2, 105, __pyx_L1_error)
+ #if PY_VERSION_HEX < 0x030800B1
__pyx_type___pyx_array.tp_print = 0;
+ #endif
if (__Pyx_SetVtable(__pyx_type___pyx_array.tp_dict, __pyx_vtabptr_array) < 0) __PYX_ERR(2, 105, __pyx_L1_error)
if (__Pyx_setup_reduce((PyObject*)&__pyx_type___pyx_array) < 0) __PYX_ERR(2, 105, __pyx_L1_error)
__pyx_array_type = &__pyx_type___pyx_array;
if (PyType_Ready(&__pyx_type___pyx_MemviewEnum) < 0) __PYX_ERR(2, 279, __pyx_L1_error)
+ #if PY_VERSION_HEX < 0x030800B1
__pyx_type___pyx_MemviewEnum.tp_print = 0;
+ #endif
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_MemviewEnum.tp_dictoffset && __pyx_type___pyx_MemviewEnum.tp_getattro == PyObject_GenericGetAttr)) {
__pyx_type___pyx_MemviewEnum.tp_getattro = __Pyx_PyObject_GenericGetAttr;
}
@@ -24064,7 +24088,9 @@ static int __Pyx_modinit_type_init_code(void) {
__pyx_vtable_memoryview.convert_item_to_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *))__pyx_memoryview_convert_item_to_object;
__pyx_vtable_memoryview.assign_item_from_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *, PyObject *))__pyx_memoryview_assign_item_from_object;
if (PyType_Ready(&__pyx_type___pyx_memoryview) < 0) __PYX_ERR(2, 330, __pyx_L1_error)
+ #if PY_VERSION_HEX < 0x030800B1
__pyx_type___pyx_memoryview.tp_print = 0;
+ #endif
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_memoryview.tp_dictoffset && __pyx_type___pyx_memoryview.tp_getattro == PyObject_GenericGetAttr)) {
__pyx_type___pyx_memoryview.tp_getattro = __Pyx_PyObject_GenericGetAttr;
}
@@ -24077,7 +24103,9 @@ static int __Pyx_modinit_type_init_code(void) {
__pyx_vtable__memoryviewslice.__pyx_base.assign_item_from_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *, PyObject *))__pyx_memoryviewslice_assign_item_from_object;
__pyx_type___pyx_memoryviewslice.tp_base = __pyx_memoryview_type;
if (PyType_Ready(&__pyx_type___pyx_memoryviewslice) < 0) __PYX_ERR(2, 961, __pyx_L1_error)
+ #if PY_VERSION_HEX < 0x030800B1
__pyx_type___pyx_memoryviewslice.tp_print = 0;
+ #endif
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_memoryviewslice.tp_dictoffset && __pyx_type___pyx_memoryviewslice.tp_getattro == PyObject_GenericGetAttr)) {
__pyx_type___pyx_memoryviewslice.tp_getattro = __Pyx_PyObject_GenericGetAttr;
}
diff --git a/silx/math/medianfilter/test/benchmark.py b/silx/math/medianfilter/test/benchmark.py
index 0d1da94..cbb16b3 100644
--- a/silx/math/medianfilter/test/benchmark.py
+++ b/silx/math/medianfilter/test/benchmark.py
@@ -1,6 +1,6 @@
# coding: utf-8
# /*##########################################################################
-# Copyright (C) 2017 European Synchrotron Radiation Facility
+# Copyright (C) 2017-2019 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -108,7 +108,6 @@ class BenchmarkMedianFilter(object):
return res
-global app # QApplication must be global to avoid seg fault on quit
app = qt.QApplication([])
kernels = [3, 5, 7, 11, 15]
benchmark = BenchmarkMedianFilter(imageWidth=1000, kernels=kernels)
@@ -120,3 +119,4 @@ if pymca is not None:
plot.addCurve(x=kernels, y=benchmark.getExecTimeFor("pymca"), legend='pymca')
plot.show()
app.exec_()
+del app
diff --git a/silx/math/test/test_HistogramndLut_nominal.py b/silx/math/test/test_HistogramndLut_nominal.py
index 9450326..08ca682 100644
--- a/silx/math/test/test_HistogramndLut_nominal.py
+++ b/silx/math/test/test_HistogramndLut_nominal.py
@@ -1,6 +1,6 @@
# coding: utf-8
# /*##########################################################################
-# Copyright (C) 2016 European Synchrotron Radiation Facility
+# Copyright (C) 2016-2019 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -112,6 +112,7 @@ class _TestHistogramndLut_nominal(unittest.TestCase):
def fill_histo(h, v, dim, op=None):
idx = [self.other_axes_index]*len(h.shape)
idx[dim] = slice(0, None)
+ idx = tuple(idx)
if op:
h[idx] = op(h[idx], v)
else:
diff --git a/silx/math/test/test_colormap.py b/silx/math/test/test_colormap.py
index ede7d8d..cafe537 100644
--- a/silx/math/test/test_colormap.py
+++ b/silx/math/test/test_colormap.py
@@ -1,7 +1,7 @@
# coding: utf-8
# /*##########################################################################
#
-# Copyright (c) 2018 European Synchrotron Radiation Facility
+# Copyright (c) 2018-2019 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -34,6 +34,7 @@ __date__ = "16/05/2018"
import logging
import sys
import unittest
+import warnings
import numpy
@@ -66,7 +67,10 @@ class TestColormap(ParametricTestCase):
'sqrt': numpy.sqrt}
norm_function = norm_functions[normalization]
- norm_data, vmin, vmax = map(norm_function, (data, vmin, vmax))
+ with warnings.catch_warnings():
+ warnings.simplefilter('ignore', category=RuntimeWarning)
+ # Ignore divide by zero and invalid value encountered in log10, sqrt
+ norm_data, vmin, vmax = map(norm_function, (data, vmin, vmax))
if normalization == 'arcsinh' and sys.platform == 'win32':
# There is a difference of behavior of numpy.arcsinh
diff --git a/silx/math/test/test_combo.py b/silx/math/test/test_combo.py
index 2e142f3..8732954 100644
--- a/silx/math/test/test_combo.py
+++ b/silx/math/test/test_combo.py
@@ -1,6 +1,6 @@
# coding: utf-8
# /*##########################################################################
-# Copyright (C) 2016-2017 European Synchrotron Radiation Facility
+# Copyright (C) 2016-2019 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -31,6 +31,7 @@ __date__ = "17/01/2018"
import unittest
+import warnings
import numpy
@@ -73,22 +74,24 @@ class TestMinMax(ParametricTestCase):
filtered_data = data
if filtered_data.size > 0:
- minimum = numpy.nanmin(filtered_data)
- if numpy.isnan(minimum):
+ if numpy.all(numpy.isnan(filtered_data)):
+ minimum = numpy.nan
argmin = 0
+ maximum = numpy.nan
+ argmax = 0
else:
+ minimum = numpy.nanmin(filtered_data)
# nanargmin equivalent
argmin = numpy.where(data == minimum)[0][0]
-
- maximum = numpy.nanmax(filtered_data)
- if numpy.isnan(maximum):
- argmax = 0
- else:
+ maximum = numpy.nanmax(filtered_data)
# nanargmax equivalent
argmax = numpy.where(data == maximum)[0][0]
if min_positive:
- pos_data = filtered_data[filtered_data > 0]
+ with warnings.catch_warnings():
+ warnings.simplefilter('ignore', category=RuntimeWarning)
+ # Ignore invalid value encountered in greater
+ pos_data = filtered_data[filtered_data > 0]
if pos_data.size > 0:
min_pos = numpy.min(pos_data)
argmin_pos = numpy.where(data == min_pos)[0][0]
diff --git a/silx/math/test/test_histogramnd_nominal.py b/silx/math/test/test_histogramnd_nominal.py
index 9f97521..92febdd 100644
--- a/silx/math/test/test_histogramnd_nominal.py
+++ b/silx/math/test/test_histogramnd_nominal.py
@@ -1,6 +1,6 @@
# coding: utf-8
# /*##########################################################################
-# Copyright (C) 2016 European Synchrotron Radiation Facility
+# Copyright (C) 2016-2019 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -113,6 +113,7 @@ class _Test_chistogramnd_nominal(unittest.TestCase):
def fill_histo(h, v, dim, op=None):
idx = [self.other_axes_index]*len(h.shape)
idx[dim] = slice(0, None)
+ idx = tuple(idx)
if op:
h[idx] = op(h[idx], v)
else:
@@ -366,9 +367,9 @@ class _Test_chistogramnd_nominal(unittest.TestCase):
sample_2 = self.sample[:]
if len(sample_2.shape) == 1:
- idx = [slice(0, None)]
+ idx = (slice(0, None),)
else:
- idx = [slice(0, None), self.tested_dim]
+ idx = slice(0, None), self.tested_dim
sample_2[idx] += 2
@@ -402,9 +403,9 @@ class _Test_chistogramnd_nominal(unittest.TestCase):
sample_2 = self.sample[:]
if len(sample_2.shape) == 1:
- idx = [slice(0, None)]
+ idx = (slice(0, None),)
else:
- idx = [slice(0, None), self.tested_dim]
+ idx = slice(0, None), self.tested_dim
sample_2[idx] += 2
@@ -443,9 +444,9 @@ class _Test_chistogramnd_nominal(unittest.TestCase):
sample_2 = self.sample[:]
if len(sample_2.shape) == 1:
- idx = [slice(0, None)]
+ idx = (slice(0, None),)
else:
- idx = [slice(0, None), self.tested_dim]
+ idx = slice(0, None), self.tested_dim
sample_2[idx] += 2
@@ -787,9 +788,9 @@ class _Test_Histogramnd_nominal(unittest.TestCase):
sample_2 = self.sample[:]
if len(sample_2.shape) == 1:
- idx = [slice(0, None)]
+ idx = (slice(0, None),)
else:
- idx = [slice(0, None), self.tested_dim]
+ idx = slice(0, None), self.tested_dim
sample_2[idx] += 2
@@ -824,9 +825,9 @@ class _Test_Histogramnd_nominal(unittest.TestCase):
sample_2 = self.sample[:]
if len(sample_2.shape) == 1:
- idx = [slice(0, None)]
+ idx = (slice(0, None),)
else:
- idx = [slice(0, None), self.tested_dim]
+ idx = slice(0, None), self.tested_dim
sample_2[idx] += 2
@@ -863,9 +864,9 @@ class _Test_Histogramnd_nominal(unittest.TestCase):
sample_2 = self.sample[:]
if len(sample_2.shape) == 1:
- idx = [slice(0, None)]
+ idx = (slice(0, None),)
else:
- idx = [slice(0, None), self.tested_dim]
+ idx = slice(0, None), self.tested_dim
sample_2[idx] += 2
diff --git a/silx/opencl/backprojection.py b/silx/opencl/backprojection.py
index c257872..5a4087b 100644
--- a/silx/opencl/backprojection.py
+++ b/silx/opencl/backprojection.py
@@ -154,6 +154,9 @@ class Backprojection(OpenclProcessing):
self.extra_options = {
"cutoff": 1.,
"use_numpy_fft": False,
+ # It is axis_pos - (num_bins-1)/2 in PyHST
+ "gpu_offset_x": 0., #self.axis_pos - (self.num_bins - 1) / 2.,
+ "gpu_offset_y": 0., #self.axis_pos - (self.num_bins - 1) / 2.
}
if extra_options is not None:
self.extra_options.update(extra_options)
@@ -221,10 +224,10 @@ class Backprojection(OpenclProcessing):
self.cl_mem["_d_slice"].data,
# d_sino (__read_only image2d_t or float*)
d_sino_ref,
- # gpu_offset_x (float32) # TODO custom ?
- -np.float32((self.num_bins - 1) / 2. - self.axis_pos),
- # gpu_offset_y (float32) # TODO custom ?
- -np.float32((self.num_bins - 1) / 2. - self.axis_pos),
+ # gpu_offset_x (float32) 
+ np.float32(self.extra_options["gpu_offset_x"]),
+ # gpu_offset_y (float32)
+ np.float32(self.extra_options["gpu_offset_y"]),
# d_cos (__global float32*)
self.cl_mem["d_cos"].data,
# d_sin (__global float32*)
diff --git a/silx/opencl/common.py b/silx/opencl/common.py
index 9a04035..8d31c8a 100644
--- a/silx/opencl/common.py
+++ b/silx/opencl/common.py
@@ -34,7 +34,7 @@ __author__ = "Jerome Kieffer"
__contact__ = "Jerome.Kieffer@ESRF.eu"
__license__ = "MIT"
__copyright__ = "2012-2017 European Synchrotron Radiation Facility, Grenoble, France"
-__date__ = "20/09/2018"
+__date__ = "07/06/2019"
__status__ = "stable"
__all__ = ["ocl", "pyopencl", "mf", "release_cl_buffers", "allocate_cl_buffers",
"measure_workgroup_size", "kernel_workgroup_size"]
@@ -158,6 +158,11 @@ class Device(object):
"Available\t:\t%s" % self.available]
return os.linesep.join(lst)
+ def set_unavailable(self):
+ """Use this method to flag a faulty device
+ """
+ self.available = False
+
class Platform(object):
"""
@@ -220,8 +225,16 @@ def _measure_workgroup_size(device_or_context, fast=False):
:return: maximum size for the workgroup
"""
if isinstance(device_or_context, pyopencl.Device):
- ctx = pyopencl.Context(devices=[device_or_context])
- device = device_or_context
+ try:
+ ctx = pyopencl.Context(devices=[device_or_context])
+ except pyopencl._cl.LogicError as error:
+ platform = device_or_context.platform
+ platformid = pyopencl.get_platforms().index(platform)
+ deviceid = platform.get_devices().index(device_or_context)
+ ocl.platforms[platformid].devices[deviceid].set_unavailable()
+ raise RuntimeError("Unable to create context on %s/%s: %s" % (platform, device_or_context, error))
+ else:
+ device = device_or_context
elif isinstance(device_or_context, pyopencl.Context):
ctx = device_or_context
device = device_or_context.devices[0]
@@ -379,6 +392,8 @@ class OpenCL(object):
best_found = None
for platformid, platform in enumerate(self.platforms):
for deviceid, device in enumerate(platform.devices):
+ if not device.available:
+ continue
if (dtype in ["ALL", "DEF"]) or (device.type == dtype):
if (memory is None) or (memory <= device.memory):
found = True
@@ -400,7 +415,7 @@ class OpenCL(object):
return None
def create_context(self, devicetype="ALL", useFp64=False, platformid=None,
- deviceid=None, cached=True, memory=None):
+ deviceid=None, cached=True, memory=None, extensions=None):
"""
Choose a device and initiate a context.
@@ -410,13 +425,20 @@ class OpenCL(object):
E.g.: If Nvidia driver is installed, GPU will succeed but CPU will fail.
The AMD SDK kit is required for CPU via OpenCL.
:param devicetype: string in ["cpu","gpu", "all", "acc"]
- :param useFp64: boolean specifying if double precision will be used
+ :param useFp64: boolean specifying if double precision will be used: deprecated use extensions=["cl_khr_fp64"]
:param platformid: integer
:param deviceid: integer
:param cached: True if we want to cache the context
:param memory: minimum amount of memory of the device
+ :param extensions: list of extensions to be present
:return: OpenCL context on the selected device
"""
+ if extensions is None:
+ extensions = []
+ if useFp64:
+ logger.warning("Deprecation: please select your device using the extension name!, i.e. extensions=['cl_khr_fp64']")
+ extensions.append('cl_khr_fp64')
+
if (platformid is not None) and (deviceid is not None):
platformid = int(platformid)
deviceid = int(deviceid)
@@ -425,20 +447,24 @@ class OpenCL(object):
pyopencl_ctx += [0] * (2 - len(pyopencl_ctx)) # pad with 0
platformid, deviceid = pyopencl_ctx
else:
- if useFp64:
- ids = ocl.select_device(type=devicetype, extensions=["cl_khr_int64_base_atomics"])
- else:
- ids = ocl.select_device(dtype=devicetype)
+ ids = ocl.select_device(type=devicetype, extensions=extensions)
if ids:
platformid, deviceid = ids
+ ctx = None
if (platformid is not None) and (deviceid is not None):
if (platformid, deviceid) in self.context_cache:
ctx = self.context_cache[(platformid, deviceid)]
else:
- ctx = pyopencl.Context(devices=[pyopencl.get_platforms()[platformid].get_devices()[deviceid]])
- if cached:
- self.context_cache[(platformid, deviceid)] = ctx
- else:
+ try:
+ ctx = pyopencl.Context(devices=[pyopencl.get_platforms()[platformid].get_devices()[deviceid]])
+ except pyopencl._cl.LogicError as error:
+ self.platforms[platformid].devices[deviceid].set_unavailable()
+ logger.warning("Unable to create context on %s/%s: %s", platformid, deviceid, error)
+ ctx = None
+ else:
+ if cached:
+ self.context_cache[(platformid, deviceid)] = ctx
+ if ctx is None:
logger.warning("Last chance to get an OpenCL device ... probably not the one requested")
ctx = pyopencl.create_some_context(interactive=False)
return ctx
diff --git a/silx/opencl/convolution.py b/silx/opencl/convolution.py
new file mode 100644
index 0000000..18232f4
--- /dev/null
+++ b/silx/opencl/convolution.py
@@ -0,0 +1,555 @@
+#!/usr/bin/env python
+# coding: utf-8
+# /*##########################################################################
+#
+# Copyright (c) 2019 European Synchrotron Radiation Facility
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+#
+# ###########################################################################*/
+"""Module for convolution on CPU/GPU."""
+
+from __future__ import absolute_import, print_function, with_statement, division
+
+__authors__ = ["P. Paleo"]
+__license__ = "MIT"
+__date__ = "11/02/2019"
+
+import numpy as np
+from math import ceil
+from copy import copy # python2
+from .common import pyopencl as cl
+import pyopencl.array as parray
+from .processing import OpenclProcessing, EventDescription
+
+
+class ConvolutionInfos(object):
+ allowed_axes = {
+ "1D": [None],
+ "separable_2D_1D_2D": [None, (0, 1), (1, 0)],
+ "batched_1D_2D": [(0,), (1,)],
+ "separable_3D_1D_3D": [
+ None,
+ (0, 1, 2),
+ (1, 2, 0),
+ (2, 0, 1),
+ (2, 1, 0),
+ (1, 0, 2),
+ (0, 2, 1)
+ ],
+ "batched_1D_3D": [(0,), (1,), (2,)],
+ "batched_separable_2D_1D_3D": [(0,), (1,), (2,)], # unsupported (?)
+ "2D": [None],
+ "batched_2D_3D": [(0,), (1,), (2,)],
+ "separable_3D_2D_3D": [
+ (1, 0),
+ (0, 1),
+ (2, 0),
+ (0, 2),
+ (1, 2),
+ (2, 1),
+ ],
+ "3D": [None],
+ }
+ use_cases = {
+ (1, 1): {
+ "1D": {
+ "name": "1D convolution on 1D data",
+ "kernels": ["convol_1D_X"],
+ },
+ },
+ (2, 2): {
+ "2D": {
+ "name": "2D convolution on 2D data",
+ "kernels": ["convol_2D_XY"],
+ },
+ },
+ (3, 3): {
+ "3D": {
+ "name": "3D convolution on 3D data",
+ "kernels": ["convol_3D_XYZ"],
+ },
+ },
+ (2, 1): {
+ "separable_2D_1D_2D": {
+ "name": "Separable (2D->1D) convolution on 2D data",
+ "kernels": ["convol_1D_X", "convol_1D_Y"],
+ },
+ "batched_1D_2D": {
+ "name": "Batched 1D convolution on 2D data",
+ "kernels": ["convol_1D_X", "convol_1D_Y"],
+ },
+ },
+ (3, 1): {
+ "separable_3D_1D_3D": {
+ "name": "Separable (3D->1D) convolution on 3D data",
+ "kernels": ["convol_1D_X", "convol_1D_Y", "convol_1D_Z"],
+ },
+ "batched_1D_3D": {
+ "name": "Batched 1D convolution on 3D data",
+ "kernels": ["convol_1D_X", "convol_1D_Y", "convol_1D_Z"],
+ },
+ "batched_separable_2D_1D_3D": {
+ "name": "Batched separable (2D->1D) convolution on 3D data",
+ "kernels": ["convol_1D_X", "convol_1D_Y", "convol_1D_Z"],
+ },
+ },
+ (3, 2): {
+ "separable_3D_2D_3D": {
+ "name": "Separable (3D->2D) convolution on 3D data",
+ "kernels": ["convol_2D_XY", "convol_2D_XZ", "convol_2D_YZ"],
+ },
+ "batched_2D_3D": {
+ "name": "Batched 2D convolution on 3D data",
+ "kernels": ["convol_2D_XY", "convol_2D_XZ", "convol_2D_YZ"],
+ },
+ },
+ }
+
+
+class Convolution(OpenclProcessing):
+ """
+ A class for performing convolution on CPU/GPU with OpenCL.
+ """
+
+ def __init__(self, shape, kernel, axes=None, mode=None, ctx=None,
+ devicetype="all", platformid=None, deviceid=None,
+ profile=False, extra_options=None):
+ """Constructor of OpenCL Convolution.
+
+ :param shape: shape of the array.
+ :param kernel: convolution kernel (1D, 2D or 3D).
+ :param axes: axes along which the convolution is performed,
+ for batched convolutions.
+ :param mode: Boundary handling mode. Available modes are:
+ "reflect": cba|abcd|dcb
+ "nearest": aaa|abcd|ddd
+ "wrap": bcd|abcd|abc
+ "constant": 000|abcd|000
+ Default is "reflect".
+ :param ctx: actual working context, left to None for automatic
+ initialization from device type or platformid/deviceid
+ :param devicetype: type of device, can be "CPU", "GPU", "ACC" or "ALL"
+ :param platformid: integer with the platform_identifier, as given by
+ clinfo
+ :param deviceid: Integer with the device identifier, as given by clinfo
+ :param profile: switch on profiling to be able to profile at the kernel
+ level, store profiling elements (makes code slightly
+ slower)
+ :param extra_options: Advanced options (dict). Current options are:
+ "allocate_input_array": True,
+ "allocate_output_array": True,
+ "allocate_tmp_array": True,
+ "dont_use_textures": False,
+ """
+ OpenclProcessing.__init__(self, ctx=ctx, devicetype=devicetype,
+ platformid=platformid, deviceid=deviceid,
+ profile=profile)
+
+ self._configure_extra_options(extra_options)
+ self._determine_use_case(shape, kernel, axes)
+ self._allocate_memory(mode)
+ self._init_kernels()
+
+ def _configure_extra_options(self, extra_options):
+ self.extra_options = {
+ "allocate_input_array": True,
+ "allocate_output_array": True,
+ "allocate_tmp_array": True,
+ "dont_use_textures": False,
+ }
+ extra_opts = extra_options or {}
+ self.extra_options.update(extra_opts)
+ self.is_cpu = (self.device.type == "CPU")
+ self.use_textures = not(self.extra_options["dont_use_textures"])
+ self.use_textures *= not(self.is_cpu)
+
+ def _get_dimensions(self, shape, kernel):
+ self.shape = shape
+ self.data_ndim = self._check_dimensions(shape=shape, name="Data")
+ self.kernel_ndim = self._check_dimensions(arr=kernel, name="Kernel")
+ Nx = shape[-1]
+ if self.data_ndim >= 2:
+ Ny = shape[-2]
+ else:
+ Ny = 1
+ if self.data_ndim >= 3:
+ Nz = shape[-3]
+ else:
+ Nz = 1
+ self.Nx = np.int32(Nx)
+ self.Ny = np.int32(Ny)
+ self.Nz = np.int32(Nz)
+
+ def _determine_use_case(self, shape, kernel, axes):
+ """
+ Determine the convolution use case from the input/kernel shape, and axes.
+ """
+ self._get_dimensions(shape, kernel)
+ if self.kernel_ndim > self.data_ndim:
+ raise ValueError("Kernel dimensions cannot exceed data dimensions")
+ data_ndim = self.data_ndim
+ kernel_ndim = self.kernel_ndim
+ self.kernel = kernel.astype("f")
+
+ convol_infos = ConvolutionInfos()
+ k = (data_ndim, kernel_ndim)
+ if k not in convol_infos.use_cases:
+ raise ValueError(
+ "Cannot find a use case for data ndim = %d and kernel ndim = %d"
+ % (data_ndim, kernel_ndim)
+ )
+ possible_use_cases = convol_infos.use_cases[k]
+
+ self.use_case_name = None
+ for uc_name, uc_params in possible_use_cases.items():
+ if axes in convol_infos.allowed_axes[uc_name]:
+ self.use_case_name = uc_name
+ self.use_case_desc = uc_params["name"]
+ #~ self.use_case_kernels = uc_params["kernels"].copy()
+ self.use_case_kernels = copy(uc_params["kernels"]) # TODO use the above line once we get rid of python2
+ if self.use_case_name is None:
+ raise ValueError(
+ "Cannot find a use case for data ndim = %d, kernel ndim = %d and axes=%s"
+ % (data_ndim, kernel_ndim, str(axes))
+ )
+ # TODO implement this use case
+ if self.use_case_name == "batched_separable_2D_1D_3D":
+ raise NotImplementedError(
+ "The use case %s is not implemented"
+ % self.use_case_name
+ )
+ #
+ self.axes = axes
+ # Replace "axes=None" with an actual value (except for ND-ND)
+ allowed_axes = convol_infos.allowed_axes[self.use_case_name]
+ if len(allowed_axes) > 1:
+ # The default choice might impact perfs
+ self.axes = allowed_axes[0] or allowed_axes[1]
+ self.separable = self.use_case_name.startswith("separable")
+ self.batched = self.use_case_name.startswith("batched")
+ # Update kernel names when using textures
+ if self.use_textures:
+ for i, kern_name in enumerate(self.use_case_kernels):
+ self.use_case_kernels[i] = kern_name + "_tex"
+
+ def _allocate_memory(self, mode):
+ self.mode = mode or "reflect"
+ option_array_names = {
+ "allocate_input_array": "data_in",
+ "allocate_output_array": "data_out",
+ "allocate_tmp_array": "data_tmp",
+ }
+ # Nonseparable transforms do not need tmp array
+ if not(self.separable):
+ self.extra_options["allocate_tmp_array"] = False
+ # Allocate arrays
+ for option_name, array_name in option_array_names.items():
+ if self.extra_options[option_name]:
+ value = parray.zeros(self.queue, self.shape, "f")
+ else:
+ value = None
+ setattr(self, array_name, value)
+
+ if isinstance(self.kernel, np.ndarray):
+ self.d_kernel = parray.to_device(self.queue, self.kernel)
+ else:
+ if not(isinstance(self.kernel, parray.Array)):
+ raise ValueError("kernel must be either numpy array or pyopencl array")
+ self.d_kernel = self.kernel
+ self._old_input_ref = None
+ self._old_output_ref = None
+ if self.use_textures:
+ self._allocate_textures()
+ self._c_modes_mapping = {
+ "periodic": 2,
+ "wrap": 2,
+ "nearest": 1,
+ "replicate": 1,
+ "reflect": 0,
+ "constant": 3,
+ }
+ mp = self._c_modes_mapping
+ if self.mode.lower() not in mp:
+ raise ValueError(
+ """
+ Mode %s is not available for textures. Available modes are:
+ %s
+ """
+ % (self.mode, str(mp.keys()))
+ )
+ # TODO
+ if not(self.use_textures) and self.mode.lower() == "constant":
+ raise NotImplementedError(
+ "mode='constant' is not implemented without textures yet"
+ )
+ #
+ self._c_conv_mode = mp[self.mode]
+
+ def _allocate_textures(self):
+ self.data_in_tex = self.allocate_texture(self.shape)
+ self.d_kernel_tex = self.allocate_texture(self.kernel.shape)
+ self.transfer_to_texture(self.d_kernel, self.d_kernel_tex)
+
+ def _init_kernels(self):
+ if self.kernel_ndim > 1:
+ if np.abs(np.diff(self.kernel.shape)).max() > 0:
+ raise NotImplementedError(
+ "Non-separable convolution with non-square kernels is not implemented yet"
+ )
+ compile_options = [str("-DUSED_CONV_MODE=%d" % self._c_conv_mode)]
+ if self.use_textures:
+ kernel_files = ["convolution_textures.cl"]
+ compile_options.extend([
+ str("-DIMAGE_DIMS=%d" % self.data_ndim),
+ str("-DFILTER_DIMS=%d" % self.kernel_ndim),
+ ])
+ data_in_ref = self.data_in_tex
+ d_kernel_ref = self.d_kernel_tex
+ else:
+ kernel_files = ["convolution.cl"]
+ data_in_ref = self.data_in.data
+ d_kernel_ref = self.d_kernel.data
+ self.compile_kernels(
+ kernel_files=kernel_files,
+ compile_options=compile_options
+ )
+ self.ndrange = self.shape[::-1]
+ self.wg = None
+ kernel_args = [
+ self.queue,
+ self.ndrange, self.wg,
+ data_in_ref,
+ self.data_out.data,
+ d_kernel_ref,
+ np.int32(self.kernel.shape[0]),
+ self.Nx, self.Ny, self.Nz
+ ]
+ if self.kernel_ndim == 2:
+ kernel_args.insert(6, np.int32(self.kernel.shape[1]))
+ if self.kernel_ndim == 3:
+ kernel_args.insert(6, np.int32(self.kernel.shape[2]))
+ kernel_args.insert(7, np.int32(self.kernel.shape[1]))
+ self.kernel_args = tuple(kernel_args)
+ # If self.data_tmp is allocated, separable transforms can be performed
+ # by a series of batched transforms, without any copy, by swapping refs.
+ self.swap_pattern = None
+ if self.separable:
+ if self.data_tmp is not None:
+ self.swap_pattern = {
+ 2: [
+ ("data_in", "data_tmp"),
+ ("data_tmp", "data_out")
+ ],
+ 3: [
+ ("data_in", "data_out"),
+ ("data_out", "data_tmp"),
+ ("data_tmp", "data_out"),
+ ],
+ }
+ else:
+ # TODO
+ raise NotImplementedError("For now, data_tmp has to be allocated")
+
+ def _get_swapped_arrays(self, i):
+ """
+ Get the input and output arrays to use when using a "swap pattern".
+ Swapping refs enables to avoid copies between temp. array and output.
+ For example, a separable 2D->1D convolution on 2D data reads:
+ data_tmp = convol(data_input, kernel, axis=1) # step i=0
+ data_out = convol(data_tmp, kernel, axis=0) # step i=1
+
+ :param i: current step number of the separable convolution
+ """
+ if self.use_textures:
+ # copy is needed when using texture, as data_out is a Buffer
+ if i > 0:
+ self.transfer_to_texture(self.data_out, self.data_in_tex)
+ return self.data_in_tex, self.data_out
+ n_batchs = len(self.axes)
+ in_ref, out_ref = self.swap_pattern[n_batchs][i]
+ d_in = getattr(self, in_ref)
+ d_out = getattr(self, out_ref)
+ return d_in, d_out
+
+ def _configure_kernel_args(self, opencl_kernel_args, input_ref, output_ref):
+ # TODO more elegant
+ if isinstance(input_ref, parray.Array):
+ input_ref = input_ref.data
+ if isinstance(output_ref, parray.Array):
+ output_ref = output_ref.data
+ if input_ref is not None or output_ref is not None:
+ opencl_kernel_args = list(opencl_kernel_args)
+ if input_ref is not None:
+ opencl_kernel_args[3] = input_ref
+ if output_ref is not None:
+ opencl_kernel_args[4] = output_ref
+ opencl_kernel_args = tuple(opencl_kernel_args)
+ return opencl_kernel_args
+
+ @staticmethod
+ def _check_dimensions(arr=None, shape=None, name="", dim_min=1, dim_max=3):
+ if shape is not None:
+ ndim = len(shape)
+ elif arr is not None:
+ ndim = arr.ndim
+ else:
+ raise ValueError("Please provide either arr= or shape=")
+ if ndim < dim_min or ndim > dim_max:
+ raise ValueError("%s dimensions should be between %d and %d"
+ % (name, dim_min, dim_max)
+ )
+ return ndim
+
+ def _check_array(self, arr):
+ # TODO allow cl.Buffer
+ if not(isinstance(arr, parray.Array) or isinstance(arr, np.ndarray)):
+ raise TypeError("Expected either pyopencl.array.Array or numpy.ndarray")
+ # TODO composition with ImageProcessing/cast
+ if arr.dtype != np.float32:
+ raise TypeError("Data must be float32")
+ if arr.shape != self.shape:
+ raise ValueError("Expected data shape = %s" % str(self.shape))
+
+ def _set_arrays(self, array, output=None):
+ # When using textures: copy
+ if self.use_textures:
+ self.transfer_to_texture(array, self.data_in_tex)
+ data_in_ref = self.data_in_tex
+ else:
+ # Otherwise: copy H->D or update references.
+ if isinstance(array, np.ndarray):
+ self.data_in[:] = array[:]
+ else:
+ self._old_input_ref = self.data_in
+ self.data_in = array
+ data_in_ref = self.data_in
+ if output is not None:
+ if not(isinstance(output, np.ndarray)):
+ self._old_output_ref = self.data_out
+ self.data_out = output
+ # Update OpenCL kernel arguments with new array references
+ self.kernel_args = self._configure_kernel_args(
+ self.kernel_args,
+ data_in_ref,
+ self.data_out
+ )
+
+ def _separable_convolution(self):
+ assert len(self.axes) == len(self.use_case_kernels)
+ # Separable: one kernel call per data dimension
+ for i, axis in enumerate(self.axes):
+ in_ref, out_ref = self._get_swapped_arrays(i)
+ self._batched_convolution(axis, input_ref=in_ref, output_ref=out_ref)
+
+ def _batched_convolution(self, axis, input_ref=None, output_ref=None):
+ # Batched: one kernel call in total
+ opencl_kernel = self.kernels.get_kernel(self.use_case_kernels[axis])
+ opencl_kernel_args = self._configure_kernel_args(
+ self.kernel_args,
+ input_ref,
+ output_ref
+ )
+ ev = opencl_kernel(*opencl_kernel_args)
+ if self.profile:
+ self.events.append(EventDescription("batched convolution", ev))
+
+ def _nd_convolution(self):
+ assert len(self.use_case_kernels) == 1
+ opencl_kernel = self.kernels.get_kernel(self.use_case_kernels[0])
+ ev = opencl_kernel(*self.kernel_args)
+ if self.profile:
+ self.events.append(EventDescription("ND convolution", ev))
+
+ def _recover_arrays_references(self):
+ if self._old_input_ref is not None:
+ self.data_in = self._old_input_ref
+ self._old_input_ref = None
+ if self._old_output_ref is not None:
+ self.data_out = self._old_output_ref
+ self._old_output_ref = None
+ self.kernel_args = self._configure_kernel_args(
+ self.kernel_args,
+ self.data_in,
+ self.data_out
+ )
+
+ def _get_output(self, output):
+ if output is None:
+ res = self.data_out.get()
+ else:
+ res = output
+ if isinstance(output, np.ndarray):
+ output[:] = self.data_out[:]
+ self._recover_arrays_references()
+ return res
+
+ def convolve(self, array, output=None):
+ """
+ Convolve an array with the class kernel.
+
+ :param array: Input array. Can be numpy.ndarray or pyopencl.array.Array.
+ :param output: Output array. Can be numpy.ndarray or pyopencl.array.Array.
+ """
+ self._check_array(array)
+ self._set_arrays(array, output=output)
+ if self.axes is not None:
+ if self.separable:
+ self._separable_convolution()
+ elif self.batched:
+ assert len(self.axes) == 1
+ self._batched_convolution(self.axes[0])
+ # else: ND-ND convol
+ else:
+ # ND-ND convol
+ self._nd_convolution()
+
+ res = self._get_output(output)
+ return res
+
+
+ __call__ = convolve
+
+
+def gaussian_kernel(sigma, cutoff=4, force_odd_size=False):
+ """
+ Generates a Gaussian convolution kernel.
+
+ :param sigma: Standard Deviation of the Gaussian curve.
+ :param cutoff: Parameter tuning the truncation of the Gaussian.
+ The higher cutoff, the biggest the array will be (and the closest to
+ a "true" Gaussian function).
+ :param force_odd_size: when set to True, the resulting array will always
+ have an odd size, regardless of the values of "sigma" and "cutoff".
+ :return: a numpy.ndarray containing the truncated Gaussian function.
+ The array size is 2*c*s+1 where c=cutoff, s=sigma.
+
+ Nota: due to the quick decay of the Gaussian function, small values of the
+ "cutoff" parameter are usually fine. The energy difference between a
+ Gaussian truncated to [-c, c] and a "true" one is
+ erfc(c/(sqrt(2)*s))
+ so choosing cutoff=4*sigma keeps the truncation error below 1e-4.
+ """
+ size = int(ceil(2 * cutoff * sigma + 1))
+ if force_odd_size and size % 2 == 0:
+ size += 1
+ x = np.arange(size) - (size - 1.0) / 2.0
+ g = np.exp(-(x / sigma) ** 2 / 2.0)
+ g /= g.sum()
+ return g
diff --git a/silx/opencl/processing.py b/silx/opencl/processing.py
index 045a9d3..707aa72 100644
--- a/silx/opencl/processing.py
+++ b/silx/opencl/processing.py
@@ -168,7 +168,7 @@ class OpenclProcessing(object):
paramatrized buffers.
:param use_array: allocate memory as pyopencl.array.Array
instead of pyopencl.Buffer
-
+
Note that an OpenCL context also requires some memory, as well
as Event and other OpenCL functionalities which cannot and are
not taken into account here. The memory required by a context
@@ -290,6 +290,59 @@ class OpenclProcessing(object):
else:
self.queue = pyopencl.CommandQueue(self.ctx)
+ def profile_add(self, event, desc):
+ """
+ Add an OpenCL event to the events lists, if profiling is enabled.
+
+ :param event: silx.opencl.processing.EventDescription.
+ :param desc: event description
+ """
+ if self.profile:
+ self.events.append(EventDescription(desc, event))
+
+ def allocate_texture(self, shape, hostbuf=None, support_1D=False):
+ """
+ Allocate an OpenCL image ("texture").
+
+ :param shape: Shape of the image. Note that pyopencl and OpenCL < 1.2
+ do not support 1D images, so 1D images are handled as 2D with one row
+ :param support_1D: force the image to be 1D if the shape has only one dim
+ """
+ if len(shape) == 1 and not(support_1D):
+ shape = (1,) + shape
+ return pyopencl.Image(
+ self.ctx,
+ pyopencl.mem_flags.READ_ONLY | pyopencl.mem_flags.USE_HOST_PTR,
+ pyopencl.ImageFormat(
+ pyopencl.channel_order.INTENSITY,
+ pyopencl.channel_type.FLOAT
+ ),
+ hostbuf=numpy.zeros(shape[::-1], dtype=numpy.float32)
+ )
+
+ def transfer_to_texture(self, arr, tex_ref):
+ """
+ Transfer an array to a texture.
+
+ :param arr: Input array. Can be a numpy array or a pyopencl array.
+ :param tex_ref: texture reference (pyopencl._cl.Image).
+ """
+ copy_args = [self.queue, tex_ref, arr]
+ shp = arr.shape
+ ndim = arr.ndim
+ if ndim == 1:
+ # pyopencl and OpenCL < 1.2 do not support image1d_t
+ # force 2D with one row in this case
+ #~ ndim = 2
+ shp = (1,) + shp
+ copy_kwargs = {"origin":(0,) * ndim, "region": shp[::-1]}
+ if not(isinstance(arr, numpy.ndarray)): # assuming pyopencl.array.Array
+ # D->D copy
+ copy_args[2] = arr.data
+ copy_kwargs["offset"] = 0
+ ev = pyopencl.enqueue_copy(*copy_args, **copy_kwargs)
+ self.profile_add(ev, "Transfer to texture")
+
def log_profile(self):
"""If we are in profiling mode, prints out all timing for every single OpenCL call
"""
@@ -328,7 +381,7 @@ class OpenclProcessing(object):
def get_compiler_options(self, x87_volatile=False):
"""Provide the default OpenCL compiler options
-
+
:param x87_volatile: needed for Kahan summation
:return: string with compiler option
"""
diff --git a/silx/opencl/sinofilter.py b/silx/opencl/sinofilter.py
index 3e4d69c..ad17acb 100644
--- a/silx/opencl/sinofilter.py
+++ b/silx/opencl/sinofilter.py
@@ -29,135 +29,21 @@ from __future__ import absolute_import, print_function, with_statement, division
__authors__ = ["P. Paleo"]
__license__ = "MIT"
-__date__ = "01/02/2019"
+__date__ = "07/06/2019"
import numpy as np
from math import pi
-from itertools import product
-from bisect import bisect
-from .common import pyopencl as cl
+
import pyopencl.array as parray
+from .common import pyopencl as cl
from .processing import OpenclProcessing
from ..math.fft import FFT
from ..math.fft.clfft import __have_clfft__
+from ..image.tomography import generate_powers, get_next_power, compute_fourier_filter
from ..utils.deprecation import deprecated
-def nextpow2(N):
- p = 1
- while p < N:
- p *= 2
- return p
-
-def compute_ramlak_filter(dwidth_padded, dtype=np.float32):
- """
- Compute the Ramachandran-Lakshminarayanan (Ram-Lak) filter, used in
- filtered backprojection.
-
- :param dwidth_padded: width of the 2D sinogram after padding
- :param dtype: data type
- """
- #~ dwidth_padded = dwidth * 2
- L = dwidth_padded
- h = np.zeros(L, dtype=dtype)
- L2 = L//2+1
- h[0] = 1/4.
- j = np.linspace(1, L2, L2//2, False).astype(dtype) # np < 1.9.0
- # h[2::2] = 0
- h[1:L2:2] = -1./(pi**2 * j**2)
- # h[-1:L2-1:-2] = -1./(pi**2 * j**2)
- h[L2:] = np.copy(h[1:L2-1][::-1])
- return h
-
-
-def tukey(N, alpha=0.5):
- """
- Compute the Tukey apodization window.
-
- :param int N: Number of points.
- :param float alpha:
- """
- apod = np.zeros(N)
- x = np.arange(N)/(N-1)
- r = alpha
- M1 = (0 <= x) * (x < r/2)
- M2 = (r/2 <= x) * (x <= 1 - r/2)
- M3 = (1 - r/2 < x) * (x <= 1)
- apod[M1] = (1 + np.cos(2*pi/r * (x[M1] - r/2)))/2.
- apod[M2] = 1.
- apod[M3] = (1 + np.cos(2*pi/r * (x[M3] - 1 + r/2)))/2.
- return apod
-
-
-def lanczos(N):
- """
- Compute the Lanczos window (truncated sinc) of width N.
-
- :param int N: window width
- """
- x = np.arange(N)/(N-1)
- return np.sin(pi*(2*x-1))/(pi*(2*x-1))
-
-
-def compute_fourier_filter(dwidth_padded, filter_name, cutoff=1.):
- """
- Compute the filter used for FBP.
-
- :param dwidth_padded: padded detector width. As the filtering is done by the
- Fourier convolution theorem, dwidth_padded should be at least 2*dwidth.
- :param filter_name: Name of the filter. Available filters are:
- Ram-Lak, Shepp-Logan, Cosine, Hamming, Hann, Tukey, Lanczos.
- :param cutoff: Cut-off frequency, if relevant.
- """
- Nf = dwidth_padded
- #~ filt_f = np.abs(np.fft.fftfreq(Nf))
- rl = compute_ramlak_filter(Nf, dtype=np.float64)
- filt_f = np.fft.fft(rl)
-
- filter_name = filter_name.lower()
- if filter_name in ["ram-lak", "ramlak"]:
- return filt_f
-
- w = 2 * pi * np.fft.fftfreq(dwidth_padded)
- d = cutoff
- apodization = {
- # ~OK
- "shepp-logan": np.sin(w[1:Nf]/(2*d))/(w[1:Nf]/(2*d)),
- # ~OK
- "cosine": np.cos(w[1:Nf]/(2*d)),
- # OK
- "hamming": 0.54*np.ones_like(filt_f)[1:Nf] + .46 * np.cos(w[1:Nf]/d),
- # OK
- "hann": (np.ones_like(filt_f)[1:Nf] + np.cos(w[1:Nf]/d))/2.,
- # These one is not compatible with Astra - TODO investigate why
- "tukey": np.fft.fftshift(tukey(dwidth_padded, alpha=d/2.))[1:Nf],
- "lanczos": np.fft.fftshift(lanczos(dwidth_padded))[1:Nf],
- }
- if filter_name not in apodization:
- raise ValueError("Unknown filter %s. Available filters are %s" %
- (filter_name, str(apodization.keys())))
- filt_f[1:Nf] *= apodization[filter_name]
- return filt_f
-
-
-def generate_powers():
- """
- Generate a list of powers of [2, 3, 5, 7],
- up to (2**15)*(3**9)*(5**6)*(7**5).
- """
- primes = [2, 3, 5, 7]
- maxpow = {2: 15, 3: 9, 5: 6, 7: 5}
- valuations = []
- for prime in primes:
- valuations.append(range(maxpow[prime]+1))
- powers = product(*valuations)
- res = []
- for pw in powers:
- res.append(np.prod(list(map(lambda x : x[0]**x[1], zip(primes, pw)))))
- return np.unique(res)
-
-
class SinoFilter(OpenclProcessing):
"""
@@ -213,10 +99,10 @@ class SinoFilter(OpenclProcessing):
self.sino_shape = sino_shape
self.n_angles = n_angles
self.dwidth = dwidth
- self.dwidth_padded = self.get_next_power(2*self.dwidth)
+ self.dwidth_padded = get_next_power(2 * self.dwidth, powers=self.powers)
self.sino_padded_shape = (n_angles, self.dwidth_padded)
sino_f_shape = list(self.sino_padded_shape)
- sino_f_shape[-1] = sino_f_shape[-1]//2+1
+ sino_f_shape[-1] = sino_f_shape[-1] // 2 + 1
self.sino_f_shape = tuple(sino_f_shape)
def _init_extra_options(self, extra_options):
@@ -268,16 +154,6 @@ class SinoFilter(OpenclProcessing):
self.tmp_sino_device = parray.zeros(self.queue, self.sino_shape, "f")
self.tmp_sino_host = np.zeros(self.sino_shape, "f")
- def get_next_power(self, n):
- """
- Given a number, get the closest (upper) number p such that
- p is a power of 2, 3, 5 and 7.
- """
- idx = bisect(self.powers, n)
- if self.powers[idx-1] == n:
- return n
- return self.powers[idx]
-
def _compute_filter(self, filter_name):
"""
@@ -286,9 +162,9 @@ class SinoFilter(OpenclProcessing):
self.filter_name = filter_name or "ram-lak"
filter_f = compute_fourier_filter(
self.dwidth_padded,
- filter_name,
+ self.filter_name,
cutoff=self.extra_options["cutoff"],
- )[:self.dwidth_padded//2+1] # R2C
+ )[:self.dwidth_padded // 2 + 1] # R2C
self.set_filter(filter_f, normalize=True)
def set_filter(self, h_filt, normalize=True):
@@ -313,22 +189,18 @@ class SinoFilter(OpenclProcessing):
print("Warning: expected a complex Fourier filter")
self.filter_f = h_filt
if normalize:
- self.filter_f *= pi/self.n_angles
+ self.filter_f *= pi / self.n_angles
self.filter_f = self.filter_f.astype(np.complex64)
self.d_filter_f[:] = self.filter_f[:]
def _init_kernels(self):
OpenclProcessing.compile_kernels(self, self.kernel_files)
h, w = self.d_sino_f.shape
- self.mult_kern_args = (
- self.queue,
- np.int32(self.d_sino_f.shape[::-1]),
- None,
- self.d_sino_f.data,
- self.d_filter_f.data,
- np.int32(w),
- np.int32(h)
- )
+ self.mult_kern_args = (self.queue, (int(w), (int(h))), None,
+ self.d_sino_f.data,
+ self.d_filter_f.data,
+ np.int32(w),
+ np.int32(h))
def check_array(self, arr):
if arr.dtype != np.float32:
@@ -350,18 +222,16 @@ class SinoFilter(OpenclProcessing):
:param dst_offset:
:param src_offset:
"""
- self.kernels.cpy2d(
- self.queue,
- np.int32(transfer_shape[::-1]),
- None,
- dst.data,
- src.data,
- np.int32(dst.shape[1]),
- np.int32(src.shape[1]),
- np.int32(dst_offset),
- np.int32(src_offset),
- np.int32(transfer_shape[::-1])
- )
+ shape = tuple(int(i) for i in transfer_shape[::-1])
+ ev = self.kernels.cpy2d(self.queue, shape, None,
+ dst.data,
+ src.data,
+ np.int32(dst.shape[1]),
+ np.int32(src.shape[1]),
+ np.int32(dst_offset),
+ np.int32(src_offset),
+ np.int32(transfer_shape[::-1]))
+ ev.wait()
def copy2d_host(self, dst, src, transfer_shape, dst_offset=(0, 0),
src_offset=(0, 0)):
@@ -376,11 +246,10 @@ class SinoFilter(OpenclProcessing):
s = transfer_shape
do = dst_offset
so = src_offset
- dst[do[0]:do[0]+s[0], do[1]:do[1]+s[1]] = src[so[0]:so[0]+s[0], so[1]:so[1]+s[1]]
+ dst[do[0]:do[0] + s[0], do[1]:do[1] + s[1]] = src[so[0]:so[0] + s[0], so[1]:so[1] + s[1]]
def _prepare_input_sino(self, sino):
"""
-
:param sino: sinogram
"""
self.check_array(sino)
@@ -401,7 +270,7 @@ class SinoFilter(OpenclProcessing):
# Rectangular copy D->D
self.copy2d(self.d_sino_padded, d_sino_ref, self.sino_shape)
if self.is_cpu:
- self.d_sino_padded.finish()
+ self.d_sino_padded.finish() # should not be required here
else:
# Numpy backend: FFT/mult/IFFT are done on host.
if not(isinstance(sino, np.ndarray)):
@@ -415,7 +284,6 @@ class SinoFilter(OpenclProcessing):
def _get_output_sino(self, output):
"""
-
:param Union[numpy.dtype,None] output: sinogram output.
:return: sinogram
"""
@@ -433,14 +301,14 @@ class SinoFilter(OpenclProcessing):
src=self.d_sino_padded,
transfer_shape=self.sino_shape)
if self.is_cpu:
- self.tmp_sino_device.finish()
- res[:] = self.tmp_sino_device[:]
+ self.tmp_sino_device.finish() # should not be required here
+ res[:] = self.tmp_sino_device.get()[:]
else:
if self.is_cpu:
self.d_sino_padded.finish()
self.copy2d(res, self.d_sino_padded, self.sino_shape)
if self.is_cpu:
- res.finish()
+ res.finish() # should not be required here
else:
if not(isinstance(res, np.ndarray)):
# Numpy backend + pyopencl output: rect copy H->H + copy H->D
@@ -467,11 +335,12 @@ class SinoFilter(OpenclProcessing):
def _multiply_fourier(self):
if self.fft_backend == "opencl":
# Everything is on device. Call the multiplication kernel.
- self.kernels.inplace_complex_mul_2Dby1D(
+ ev = self.kernels.inplace_complex_mul_2Dby1D(
*self.mult_kern_args
)
+ ev.wait()
if self.is_cpu:
- self.d_sino_f.finish()
+ self.d_sino_f.finish() # should not be required here
else:
# Everything is on host.
self.d_sino_f *= self.filter_f
@@ -508,7 +377,7 @@ class SinoFilter(OpenclProcessing):
# return
res = self._get_output_sino(output)
return res
- #~ return output
+ # ~ return output
__call__ = filter_sino
@@ -519,6 +388,14 @@ class SinoFilter(OpenclProcessing):
# - Compatibility -
# -------------------
+
+def nextpow2(N):
+ p = 1
+ while p < N:
+ p *= 2
+ return p
+
+
@deprecated(replacement="Backprojection.sino_filter", since_version="0.10")
def fourier_filter(sino, filter_=None, fft_size=None):
"""Simple np based implementation of fourier space filter.
diff --git a/silx/opencl/sparse.py b/silx/opencl/sparse.py
new file mode 100644
index 0000000..8bfaea8
--- /dev/null
+++ b/silx/opencl/sparse.py
@@ -0,0 +1,331 @@
+#!/usr/bin/env python
+# coding: utf-8
+# /*##########################################################################
+#
+# Copyright (c) 2019 European Synchrotron Radiation Facility
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+#
+# ###########################################################################*/
+"""Module for data sparsification on CPU/GPU."""
+
+from __future__ import absolute_import, print_function, with_statement, division
+
+__authors__ = ["P. Paleo"]
+__license__ = "MIT"
+__date__ = "07/06/2019"
+
+import numpy
+import pyopencl.array as parray
+from collections import namedtuple
+from pyopencl.scan import GenericScanKernel
+from .common import pyopencl as cl
+from .processing import OpenclProcessing, EventDescription, BufferDescription
+mf = cl.mem_flags
+
+
+CSRData = namedtuple("CSRData", ["data", "indices", "indptr"])
+
+def tuple_to_csrdata(arrs):
+ """
+ Converts a 3-tuple to a CSRData namedtuple.
+ """
+ if arrs is None:
+ return None
+ return CSRData(data=arrs[0], indices=arrs[1], indptr=arrs[2])
+
+
+
+# only float32 arrays are supported for now
+class CSR(OpenclProcessing):
+ kernel_files = ["sparse.cl"]
+
+ def __init__(self, shape, max_nnz=None, ctx=None, devicetype="all",
+ platformid=None, deviceid=None, block_size=None, memory=None,
+ profile=False):
+ """
+ Compute Compressed Sparse Row format of an image (2D matrix).
+ It is designed to be compatible with scipy.sparse.csr_matrix.
+
+ :param shape: tuple
+ Matrix shape.
+ :param max_nnz: int, optional
+ Maximum number of non-zero elements. By default, the arrays "data"
+ and "indices" are allocated with prod(shape) elements, but
+ in practice a much lesser space is needed.
+ The number of non-zero items cannot be known in advance, but one can
+ estimate an upper-bound with this parameter to save memory.
+
+ Opencl processing parameters
+ -----------------------------
+ Please refer to the documentation of silx.opencl.processing.OpenclProcessing
+ for information on the other parameters.
+ """
+
+ OpenclProcessing.__init__(self, ctx=ctx, devicetype=devicetype,
+ platformid=platformid, deviceid=deviceid,
+ profile=profile)
+ self._set_parameters(shape, max_nnz)
+ self._allocate_memory()
+ self._setup_kernels()
+
+ # --------------------------------------------------------------------------
+ # -------------------------- Initialization --------------------------------
+ # --------------------------------------------------------------------------
+
+ def _set_parameters(self, shape, max_nnz):
+ self.shape = shape
+ self.size = numpy.prod(shape)
+ self.indice_dtype = numpy.int32 #
+ assert len(shape) == 2 #
+ if max_nnz is None:
+ self.max_nnz = numpy.prod(shape) # worst case
+ else:
+ self.max_nnz = int(max_nnz)
+
+
+ def _allocate_memory(self):
+ self.is_cpu = (self.device.type == "CPU") # move to OpenclProcessing ?
+ self.buffers = [
+ BufferDescription("array", (self.size,), numpy.float32, mf.READ_ONLY),
+ BufferDescription("data", (self.max_nnz,), numpy.float32, mf.READ_WRITE),
+ BufferDescription("indices", (self.max_nnz,), self.indice_dtype, mf.READ_WRITE),
+ BufferDescription("indptr", (self.shape[0]+1,), self.indice_dtype, mf.READ_WRITE),
+ ]
+ self.allocate_buffers(use_array=True)
+ for arr_name in ["array", "data", "indices", "indptr"]:
+ setattr(self, arr_name, self.cl_mem[arr_name])
+ self.cl_mem[arr_name].fill(0) # allocate_buffers() uses empty()
+ self._old_array = self.array
+ self._old_data = self.data
+ self._old_indices = self.indices
+ self._old_indptr = self.indptr
+
+
+ def _setup_kernels(self):
+ self._setup_compaction_kernel()
+ self._setup_decompaction_kernel()
+
+
+ def _setup_compaction_kernel(self):
+ self.scan_kernel = GenericScanKernel(
+ self.ctx, self.indice_dtype,
+ arguments="__global float* data, __global float *data_compacted, __global int *indices, __global int* indptr",
+ input_expr="(fabs(data[i]) > 0.0f) ? 1 : 0",
+ scan_expr="a+b", neutral="0",
+ output_statement="""
+ // item is the running sum of input_expr(i), i.e the cumsum of "nonzero"
+ if (prev_item != item) {
+ data_compacted[item-1] = data[i];
+ indices[item-1] = GET_INDEX(i);
+ }
+ // The last cumsum element of each line of "nonzero" goes to inptr[i]
+ if ((i+1) % IMAGE_WIDTH == 0) {
+ indptr[(i/IMAGE_WIDTH)+1] = item;
+ }
+ """,
+ options="-DIMAGE_WIDTH=%d" % self.shape[1],
+ preamble="#define GET_INDEX(i) (i % IMAGE_WIDTH)",
+ )
+
+
+ def _setup_decompaction_kernel(self):
+ OpenclProcessing.compile_kernels(
+ self,
+ self.kernel_files,
+ compile_options=["-DIMAGE_WIDTH=%d" % self.shape[1]]
+ )
+ device = self.ctx.devices[0]
+ wg_x = min(
+ device.max_work_group_size,
+ 32,
+ self.kernels.max_workgroup_size("densify_csr")
+ )
+ self._decomp_wg = (wg_x, 1)
+ self._decomp_grid = (self._decomp_wg[0], self.shape[0])
+
+
+ # --------------------------------------------------------------------------
+ # -------------------------- Array utils -----------------------------------
+ # --------------------------------------------------------------------------
+
+ # TODO handle pyopencl Buffer
+ def check_array(self, arr):
+ """
+ Check that provided array is compatible with current context.
+
+ :param arr: numpy.ndarray or pyopencl.array.Array
+ 2D array in dense format.
+ """
+ assert arr.size == self.size
+ assert arr.dtype == numpy.float32
+
+
+ # TODO handle pyopencl Buffer
+ def check_sparse_arrays(self, csr_data):
+ """
+ Check that the provided sparse arrays are compatible with the current
+ context.
+
+ :param arrays: namedtuple CSRData.
+ It contains the arrays "data", "indices", "indptr"
+ """
+ assert isinstance(csr_data, CSRData)
+ for arr in [csr_data.data, csr_data.indices, csr_data.indptr]:
+ assert arr.ndim == 1
+ assert csr_data.data.size == self.max_nnz
+ assert csr_data.indices.size == self.max_nnz
+ assert csr_data.indptr.size == self.shape[0]+1
+ assert csr_data.data.dtype == numpy.float32
+ assert csr_data.indices.dtype == self.indice_dtype
+ assert csr_data.indptr.dtype == self.indice_dtype
+
+
+ def set_array(self, arr):
+ """
+ Set the provided array as the current context 2D matrix.
+
+ :param arr: numpy.ndarray or pyopencl.array.Array
+ 2D array in dense format.
+ """
+ if arr is None:
+ return
+ self.check_array(arr)
+ # GenericScanKernel only supports 1D data
+ if isinstance(arr, parray.Array):
+ self._old_array = self.array
+ self.array = arr
+ elif isinstance(arr, numpy.ndarray):
+ self.array[:] = arr.ravel()[:]
+ else:
+ raise ValueError("Expected pyopencl array or numpy array")
+
+
+ def set_sparse_arrays(self, csr_data):
+ if csr_data is None:
+ return
+ self.check_sparse_arrays(csr_data)
+ for name, arr in {"data": csr_data.data, "indices": csr_data.indices, "indptr": csr_data.indptr}.items():
+ # The current array is a device array. Don't copy, use it directly
+ if isinstance(arr, parray.Array):
+ setattr(self, "_old_" + name, getattr(self, name))
+ setattr(self, name, arr)
+ # The current array is a numpy.ndarray: copy H2D
+ elif isinstance(arr, numpy.ndarray):
+ getattr(self, name)[:] = arr[:]
+ else:
+ raise ValueError("Unsupported array type: %s" % type(arr))
+
+
+ def _recover_arrays_references(self):
+ """
+ Recover the previous arrays references, and return the references of the
+ "current" arrays.
+ """
+ array = self.array
+ data = self.data
+ indices = self.indices
+ indptr = self.indptr
+ for name in ["array", "data", "indices", "indptr"]:
+ # self.X = self._old_X
+ setattr(self, name, getattr(self, "_old_" + name))
+ return array, (data, indices, indptr)
+
+
+ def get_sparse_arrays(self, output):
+ """
+ Get the 2D dense array of the current context.
+
+ :param output: tuple or None
+ tuple in the form (data, indices, indptr). These arrays have to be
+ compatible with the current context (size and data type).
+ The content of these arrays will be overwritten with the result of
+ the previous computation.
+ """
+ numels = self.max_nnz
+ if output is None:
+ data = self.data.get()[:numels]
+ ind = self.indices.get()[:numels]
+ indptr = self.indptr.get()
+ res = (data, ind, indptr)
+ else:
+ res = output
+ return res
+
+
+ def get_array(self, output):
+ if output is None:
+ res = self.array.get().reshape(self.shape)
+ else:
+ res = output
+ return res
+
+ # --------------------------------------------------------------------------
+ # -------------------------- Compaction ------------------------------------
+ # --------------------------------------------------------------------------
+
+ def sparsify(self, arr, output=None):
+ """
+ Convert an image (2D matrix) into a CSR representation.
+
+ :param arr: numpy.ndarray or pyopencl.array.Array
+ Input array.
+ :param output: tuple of pyopencl.array.Array, optional
+ If provided, this must be a tuple of 3 arrays (data, indices, indptr).
+ The content of each array is overwritten by the computation result.
+ """
+ self.set_array(arr)
+ self.set_sparse_arrays(tuple_to_csrdata(output))
+ evt = self.scan_kernel(
+ self.array,
+ self.data,
+ self.indices,
+ self.indptr,
+ )
+ #~ evt.wait()
+ self.profile_add(evt, "sparsification kernel")
+ res = self.get_sparse_arrays(output)
+ self._recover_arrays_references()
+ return res
+
+ # --------------------------------------------------------------------------
+ # -------------------------- Decompaction ----------------------------------
+ # --------------------------------------------------------------------------
+
+ def densify(self, data, indices, indptr, output=None):
+ self.set_sparse_arrays(
+ CSRData(data=data, indices=indices, indptr=indptr)
+ )
+ self.set_array(output)
+ evt = self.kernels.densify_csr(
+ self.queue,
+ self._decomp_grid,
+ self._decomp_wg,
+ self.data.data,
+ self.indices.data,
+ self.indptr.data,
+ self.array.data,
+ numpy.int32(self.shape[0]),
+ )
+ #~ evt.wait()
+ self.profile_add(evt, "desparsification kernel")
+ res = self.get_array(output)
+ self._recover_arrays_references()
+ return res
+
diff --git a/silx/opencl/test/__init__.py b/silx/opencl/test/__init__.py
index f3121d5..2e90e66 100644
--- a/silx/opencl/test/__init__.py
+++ b/silx/opencl/test/__init__.py
@@ -38,6 +38,8 @@ from ..codec import test as test_codec
from . import test_image
from . import test_kahan
from . import test_stats
+from . import test_convolution
+from . import test_sparse
def suite():
@@ -52,6 +54,8 @@ def suite():
test_suite.addTests(test_image.suite())
test_suite.addTests(test_kahan.suite())
test_suite.addTests(test_stats.suite())
+ test_suite.addTests(test_convolution.suite())
+ test_suite.addTests(test_sparse.suite())
# Allow to remove sift from the project
test_base_dir = os.path.dirname(__file__)
sift_dir = os.path.join(test_base_dir, "..", "sift")
diff --git a/silx/opencl/test/test_backprojection.py b/silx/opencl/test/test_backprojection.py
index 7ab416d..b2f2070 100644
--- a/silx/opencl/test/test_backprojection.py
+++ b/silx/opencl/test/test_backprojection.py
@@ -45,7 +45,7 @@ except ImportError:
from ..common import ocl
if ocl:
from .. import backprojection
- from ..sinofilter import compute_fourier_filter
+ from ...image.tomography import compute_fourier_filter
from silx.test.utils import utilstest
logger = logging.getLogger(__name__)
@@ -199,11 +199,30 @@ class TestFBP(unittest.TestCase):
"Something wrong with FBP(filter=%s)" % filter_name
)
+ @unittest.skipUnless(ocl and mako, "pyopencl is missing")
+ def test_fbp_oddsize(self):
+ # Generate a 513-sinogram.
+ # The padded width will be nextpow(513*2).
+ # silx [0.10, 0.10.1] will give 1029, which makes R2C transform fail.
+ sino = np.pad(self.sino, ((0, 0), (1, 0)), mode='edge')
+ B = backprojection.Backprojection(sino.shape, axis_position=self.fbp.axis_pos+1)
+ res = B(sino)
+ # Compare with self.reference_rec. Tolerance is high as backprojector
+ # is not fully shift-invariant.
+ errmax = np.max(np.abs(clip_circle(res[1:, 1:] - self.reference_rec)))
+ self.assertLess(
+ errmax, 1.e-1,
+ "Something wrong with FBP on odd-sized sinogram"
+ )
+
+
+
def suite():
testSuite = unittest.TestSuite()
testSuite.addTest(TestFBP("test_fbp"))
testSuite.addTest(TestFBP("test_fbp_filters"))
+ testSuite.addTest(TestFBP("test_fbp_oddsize"))
return testSuite
diff --git a/silx/opencl/test/test_convolution.py b/silx/opencl/test/test_convolution.py
new file mode 100644
index 0000000..8acd385
--- /dev/null
+++ b/silx/opencl/test/test_convolution.py
@@ -0,0 +1,263 @@
+#!/usr/bin/env python
+# coding: utf-8
+# /*##########################################################################
+#
+# Copyright (c) 2019 European Synchrotron Radiation Facility
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+#
+# ###########################################################################*/
+
+"""
+Test of the Convolution class.
+"""
+
+from __future__ import division, print_function
+
+__authors__ = ["Pierre Paleo"]
+__contact__ = "pierre.paleo@esrf.fr"
+__license__ = "MIT"
+__copyright__ = "2019 European Synchrotron Radiation Facility, Grenoble, France"
+__date__ = "15/02/2019"
+
+import logging
+from itertools import product
+import numpy as np
+from silx.utils.testutils import parameterize
+try:
+ from scipy.ndimage import convolve, convolve1d
+ from scipy.misc import ascent
+ scipy_convolve = convolve
+ scipy_convolve1d = convolve1d
+except ImportError:
+ scipy_convolve = None
+import unittest
+from ..common import ocl
+if ocl:
+ import pyopencl as cl
+ import pyopencl.array as parray
+ from ..convolution import Convolution, gaussian_kernel
+logger = logging.getLogger(__name__)
+
+
+@unittest.skipUnless(ocl and scipy_convolve, "PyOpenCl/scipy is missing")
+class TestConvolution(unittest.TestCase):
+
+ @classmethod
+ def setUpClass(cls):
+ super(TestConvolution, cls).setUpClass()
+ cls.image = np.ascontiguousarray(ascent()[:, :511], dtype="f")
+ cls.data1d = cls.image[0]
+ cls.data2d = cls.image
+ cls.data3d = np.tile(cls.image[224:-224, 224:-224], (62, 1, 1))
+ cls.kernel1d = gaussian_kernel(1.)
+ cls.kernel2d = np.outer(cls.kernel1d, cls.kernel1d)
+ cls.kernel3d = np.multiply.outer(cls.kernel2d, cls.kernel1d)
+ cls.ctx = ocl.create_context()
+ cls.tol = {
+ "1D": 1e-4,
+ "2D": 1e-3,
+ "3D": 1e-3,
+ }
+
+ @classmethod
+ def tearDownClass(cls):
+ cls.data1d = cls.data2d = cls.data3d = cls.image = None
+ cls.kernel1d = cls.kernel2d = cls.kernel3d = None
+
+ @staticmethod
+ def compare(arr1, arr2):
+ return np.max(np.abs(arr1 - arr2))
+
+ @staticmethod
+ def print_err(conv):
+ errmsg = str(
+ """
+ Something wrong with %s
+ mode=%s, texture=%s
+ """
+ % (conv.use_case_desc, conv.mode, conv.use_textures)
+ )
+ return errmsg
+
+ def __init__(self, methodName='runTest', param=None):
+ unittest.TestCase.__init__(self, methodName)
+ self.param = param
+ self.mode = param["boundary_handling"]
+ logger.debug(
+ """
+ Testing convolution with boundary_handling=%s,
+ use_textures=%s, input_device=%s, output_device=%s
+ """
+ % (
+ self.mode, param["use_textures"],
+ param["input_on_device"], param["output_on_device"]
+ )
+ )
+
+ def instantiate_convol(self, shape, kernel, axes=None):
+ if (self.mode == "constant") and (
+ not(self.param["use_textures"])
+ or (self.ctx.devices[0].type == cl._cl.device_type.CPU)
+ ):
+ self.skipTest("mode=constant not implemented without textures")
+ C = Convolution(
+ shape, kernel,
+ mode=self.mode,
+ ctx=self.ctx,
+ axes=axes,
+ extra_options={"dont_use_textures": not(self.param["use_textures"])}
+ )
+ return C
+
+ def get_data_and_kernel(self, test_name):
+ dims = {
+ "test_1D": (1, 1),
+ "test_separable_2D": (2, 1),
+ "test_separable_3D": (3, 1),
+ "test_nonseparable_2D": (2, 2),
+ "test_nonseparable_3D": (3, 3),
+ }
+ dim_data = {
+ 1: self.data1d,
+ 2: self.data2d,
+ 3: self.data3d
+ }
+ dim_kernel = {
+ 1: self.kernel1d,
+ 2: self.kernel2d,
+ 3: self.kernel3d,
+ }
+ dd, kd = dims[test_name]
+ return dim_data[dd], dim_kernel[kd]
+
+ def get_reference_function(self, test_name):
+ ref_func = {
+ "test_1D":
+ lambda x, y : scipy_convolve1d(x, y, mode=self.mode),
+ "test_separable_2D":
+ lambda x, y : scipy_convolve1d(
+ scipy_convolve1d(x, y, mode=self.mode, axis=1),
+ y, mode=self.mode, axis=0
+ ),
+ "test_separable_3D":
+ lambda x, y: scipy_convolve1d(
+ scipy_convolve1d(
+ scipy_convolve1d(x, y, mode=self.mode, axis=2),
+ y, mode=self.mode, axis=1),
+ y, mode=self.mode, axis=0
+ ),
+ "test_nonseparable_2D":
+ lambda x, y: scipy_convolve(x, y, mode=self.mode),
+ "test_nonseparable_3D":
+ lambda x, y : scipy_convolve(x, y, mode=self.mode),
+ }
+ return ref_func[test_name]
+
+ def template_test(self, test_name):
+ data, kernel = self.get_data_and_kernel(test_name)
+ conv = self.instantiate_convol(data.shape, kernel)
+ if self.param["input_on_device"]:
+ data_ref = parray.to_device(conv.queue, data)
+ else:
+ data_ref = data
+ if self.param["output_on_device"]:
+ d_res = parray.zeros_like(conv.data_out)
+ res = d_res
+ else:
+ res = None
+ res = conv(data_ref, output=res)
+ if self.param["output_on_device"]:
+ res = res.get()
+ ref_func = self.get_reference_function(test_name)
+ ref = ref_func(data, kernel)
+ metric = self.compare(res, ref)
+ logger.info("%s: max error = %.2e" % (test_name, metric))
+ tol = self.tol[str("%dD" % kernel.ndim)]
+ self.assertLess(metric, tol, self.print_err(conv))
+
+ def test_1D(self):
+ self.template_test("test_1D")
+
+ def test_separable_2D(self):
+ self.template_test("test_separable_2D")
+
+ def test_separable_3D(self):
+ self.template_test("test_separable_3D")
+
+ def test_nonseparable_2D(self):
+ self.template_test("test_nonseparable_2D")
+
+ def test_nonseparable_3D(self):
+ self.template_test("test_nonseparable_3D")
+
+ def test_batched_2D(self):
+ """
+ Test batched (nonseparable) 2D convolution on 3D data.
+ In this test: batch along "z" (axis 0)
+ """
+ data = self.data3d
+ kernel = self.kernel2d
+ conv = self.instantiate_convol(data.shape, kernel, axes=(0,))
+ res = conv(data) # 3D
+ ref = scipy_convolve(data[0], kernel, mode=self.mode) # 2D
+
+ std = np.std(res, axis=0)
+ std_max = np.max(np.abs(std))
+ self.assertLess(std_max, self.tol["2D"], self.print_err(conv))
+ metric = self.compare(res[0], ref)
+ logger.info("test_nonseparable_3D: max error = %.2e" % metric)
+ self.assertLess(metric, self.tol["2D"], self.print_err(conv))
+
+
+def test_convolution():
+ boundary_handling_ = ["reflect", "nearest", "wrap", "constant"]
+ use_textures_ = [True, False]
+ input_on_device_ = [True, False]
+ output_on_device_ = [True, False]
+ testSuite = unittest.TestSuite()
+
+ param_vals = list(product(
+ boundary_handling_,
+ use_textures_,
+ input_on_device_,
+ output_on_device_
+ ))
+ for boundary_handling, use_textures, input_dev, output_dev in param_vals:
+ testcase = parameterize(
+ TestConvolution,
+ param={
+ "boundary_handling": boundary_handling,
+ "input_on_device": input_dev,
+ "output_on_device": output_dev,
+ "use_textures": use_textures,
+ }
+ )
+ testSuite.addTest(testcase)
+ return testSuite
+
+
+
+def suite():
+ testSuite = test_convolution()
+ return testSuite
+
+
+if __name__ == '__main__':
+ unittest.main(defaultTest="suite")
diff --git a/silx/opencl/test/test_sparse.py b/silx/opencl/test/test_sparse.py
new file mode 100644
index 0000000..56f1ba4
--- /dev/null
+++ b/silx/opencl/test/test_sparse.py
@@ -0,0 +1,192 @@
+#!/usr/bin/env python
+# coding: utf-8
+# /*##########################################################################
+#
+# Copyright (c) 2018-2019 European Synchrotron Radiation Facility
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+#
+# ###########################################################################*/
+"""Test of the sparse module"""
+
+import numpy as np
+import unittest
+import logging
+from itertools import product
+from ..common import ocl
+if ocl:
+ import pyopencl.array as parray
+ from silx.opencl.sparse import CSR
+try:
+ import scipy.sparse as sp
+except ImportError:
+ sp = None
+logger = logging.getLogger(__name__)
+
+
+
+def generate_sparse_random_data(
+ shape=(1000,),
+ data_min=0, data_max=100,
+ density=0.1,
+ use_only_integers=True,
+ dtype="f"):
+ """
+ Generate random sparse data where.
+
+ Parameters
+ ------------
+ shape: tuple
+ Output data shape.
+ data_min: int or float
+ Minimum value of data
+ data_max: int or float
+ Maximum value of data
+ density: float
+ Density of non-zero elements in the output data.
+ Low value of density mean low number of non-zero elements.
+ use_only_integers: bool
+ If set to True, the output data items will be primarily integers,
+ possibly casted to float if dtype is a floating-point type.
+ This can be used for ease of debugging.
+ dtype: str or numpy.dtype
+ Output data type
+ """
+ mask = np.random.binomial(1, density, size=shape)
+ if use_only_integers:
+ d = np.random.randint(data_min, high=data_max, size=shape)
+ else:
+ d = data_min + (data_max - data_min) * np.random.rand(*shape)
+ return (d * mask).astype(dtype)
+
+
+
+@unittest.skipUnless(ocl and sp, "PyOpenCl/scipy is missing")
+class TestCSR(unittest.TestCase):
+ """Test CSR format"""
+
+ def setUp(self):
+ self.array = generate_sparse_random_data(shape=(512, 511))
+ # Compute reference sparsification
+ a_s = sp.csr_matrix(self.array)
+ self.ref_data = a_s.data
+ self.ref_indices = a_s.indices
+ self.ref_indptr = a_s.indptr
+ self.ref_nnz = a_s.nnz
+ # Test possible configurations
+ input_on_device = [False, True]
+ output_on_device = [False, True]
+ self._test_configs = list(product(input_on_device, output_on_device))
+
+
+ def test_sparsification(self):
+ for input_on_device, output_on_device in self._test_configs:
+ self._test_sparsification(input_on_device, output_on_device)
+
+
+ def _test_sparsification(self, input_on_device, output_on_device):
+ current_config = "input on device: %s, output on device: %s" % (
+ str(input_on_device), str(output_on_device)
+ )
+ # Sparsify on device
+ csr = CSR(self.array.shape)
+ if input_on_device:
+ # The array has to be flattened
+ arr = parray.to_device(csr.queue, self.array.ravel())
+ else:
+ arr = self.array
+ if output_on_device:
+ d_data = parray.zeros_like(csr.data)
+ d_indices = parray.zeros_like(csr.indices)
+ d_indptr = parray.zeros_like(csr.indptr)
+ output = (d_data, d_indices, d_indptr)
+ else:
+ output = None
+ data, indices, indptr = csr.sparsify(arr, output=output)
+ if output_on_device:
+ data = data.get()
+ indices = indices.get()
+ indptr = indptr.get()
+ # Compare
+ nnz = self.ref_nnz
+ self.assertTrue(
+ np.allclose(data[:nnz], self.ref_data),
+ "something wrong with sparsified data (%s)"
+ % current_config
+ )
+ self.assertTrue(
+ np.allclose(indices[:nnz], self.ref_indices),
+ "something wrong with sparsified indices (%s)"
+ % current_config
+ )
+ self.assertTrue(
+ np.allclose(indptr, self.ref_indptr),
+ "something wrong with sparsified indices pointers (indptr) (%s)"
+ % current_config
+ )
+
+
+ def test_desparsification(self):
+ for input_on_device, output_on_device in self._test_configs:
+ self._test_desparsification(input_on_device, output_on_device)
+
+
+ def _test_desparsification(self, input_on_device, output_on_device):
+ current_config = "input on device: %s, output on device: %s" % (
+ str(input_on_device), str(output_on_device)
+ )
+ # De-sparsify on device
+ csr = CSR(self.array.shape, max_nnz=self.ref_nnz)
+ if input_on_device:
+ data = parray.to_device(csr.queue, self.ref_data)
+ indices = parray.to_device(csr.queue, self.ref_indices)
+ indptr = parray.to_device(csr.queue, self.ref_indptr)
+ else:
+ data = self.ref_data
+ indices = self.ref_indices
+ indptr = self.ref_indptr
+ if output_on_device:
+ d_arr = parray.zeros_like(csr.array)
+ output = d_arr
+ else:
+ output = None
+ arr = csr.densify(data, indices, indptr, output=output)
+ if output_on_device:
+ arr = arr.get()
+ # Compare
+ self.assertTrue(
+ np.allclose(arr.reshape(self.array.shape), self.array),
+ "something wrong with densified data (%s)"
+ % current_config
+ )
+
+
+
+def suite():
+ suite = unittest.TestSuite()
+ suite.addTest(
+ unittest.defaultTestLoader.loadTestsFromTestCase(TestCSR)
+ )
+ return suite
+
+
+if __name__ == '__main__':
+ unittest.main(defaultTest="suite")
+
+
diff --git a/silx/resources/__init__.py b/silx/resources/__init__.py
index ba390d6..5346f48 100644
--- a/silx/resources/__init__.py
+++ b/silx/resources/__init__.py
@@ -56,20 +56,14 @@ of this modules to ensure access across different distribution schemes:
__authors__ = ["V.A. Sole", "Thomas Vincent", "J. Kieffer"]
__license__ = "MIT"
-__date__ = "13/02/2019"
+__date__ = "08/03/2019"
import os
import sys
-import threading
-import json
import logging
-import tempfile
-import unittest
import importlib
-import six
-
logger = logging.getLogger(__name__)
@@ -288,193 +282,5 @@ def _resource_filename(resource, default_directory=None):
return pkg_resources.resource_filename(package_name, resource_name)
-class ExternalResources(object):
- """Utility class which allows to download test-data from www.silx.org
- and manage the temporary data during the tests.
-
- """
-
- def __init__(self, project,
- url_base,
- env_key=None,
- timeout=60):
- """Constructor of the class
-
- :param str project: name of the project, like "silx"
- :param str url_base: base URL for the data, like "http://www.silx.org/pub"
- :param str env_key: name of the environment variable which contains the
- test_data directory, like "SILX_DATA".
- If None (default), then the name of the
- environment variable is built from the project argument:
- "<PROJECT>_DATA".
- The environment variable is optional: in case it is not set,
- a directory in the temporary folder is used.
- :param timeout: time in seconds before it breaks
- """
- self.project = project
- self._initialized = False
- self.sem = threading.Semaphore()
-
- self.env_key = env_key or (self.project.upper() + "_TESTDATA")
- self.url_base = url_base
- self.all_data = set()
- self.timeout = timeout
- self._data_home = None
-
- @property
- def data_home(self):
- """Returns the data_home path and make sure it exists in the file
- system."""
- if self._data_home is not None:
- return self._data_home
-
- data_home = os.environ.get(self.env_key)
- if data_home is None:
- try:
- import getpass
- name = getpass.getuser()
- except Exception:
- if "getlogin" in dir(os):
- name = os.getlogin()
- elif "USER" in os.environ:
- name = os.environ["USER"]
- elif "USERNAME" in os.environ:
- name = os.environ["USERNAME"]
- else:
- name = "uid" + str(os.getuid())
-
- basename = "%s_testdata_%s" % (self.project, name)
- data_home = os.path.join(tempfile.gettempdir(), basename)
- if not os.path.exists(data_home):
- os.makedirs(data_home)
- self._data_home = data_home
- return data_home
-
- def _initialize_data(self):
- """Initialize for downloading test data"""
- if not self._initialized:
- with self.sem:
- if not self._initialized:
- self.testdata = os.path.join(self.data_home, "all_testdata.json")
- if os.path.exists(self.testdata):
- with open(self.testdata) as f:
- self.all_data = set(json.load(f))
- self._initialized = True
-
- def clean_up(self):
- pass
-
- def getfile(self, filename):
- """Downloads the requested file from web-server available
- at https://www.silx.org/pub/silx/
-
- :param: relative name of the image.
- :return: full path of the locally saved file.
- """
- logger.debug("ExternalResources.getfile('%s')", filename)
-
- if not self._initialized:
- self._initialize_data()
-
- fullfilename = os.path.abspath(os.path.join(self.data_home, filename))
-
- if not os.path.isfile(fullfilename):
- logger.debug("Trying to download image %s, timeout set to %ss",
- filename, self.timeout)
- dictProxies = {}
- if "http_proxy" in os.environ:
- dictProxies['http'] = os.environ["http_proxy"]
- dictProxies['https'] = os.environ["http_proxy"]
- if "https_proxy" in os.environ:
- dictProxies['https'] = os.environ["https_proxy"]
- if dictProxies:
- proxy_handler = six.moves.urllib.request.ProxyHandler(dictProxies)
- opener = six.moves.urllib.request.build_opener(proxy_handler).open
- else:
- opener = six.moves.urllib.request.urlopen
-
- logger.debug("wget %s/%s", self.url_base, filename)
- try:
- data = opener("%s/%s" % (self.url_base, filename),
- data=None, timeout=self.timeout).read()
- logger.info("Image %s successfully downloaded.", filename)
- except six.moves.urllib.error.URLError:
- raise unittest.SkipTest("network unreachable.")
-
- if not os.path.isdir(os.path.dirname(fullfilename)):
- # Create sub-directory if needed
- os.makedirs(os.path.dirname(fullfilename))
-
- try:
- with open(fullfilename, "wb") as outfile:
- outfile.write(data)
- except IOError:
- raise IOError("unable to write downloaded \
- data to disk at %s" % self.data_home)
-
- if not os.path.isfile(fullfilename):
- raise RuntimeError(
- "Could not automatically \
- download test images %s!\n \ If you are behind a firewall, \
- please set both environment variable http_proxy and https_proxy.\
- This even works under windows ! \n \
- Otherwise please try to download the images manually from \n%s/%s"
- % (filename, self.url_base, filename))
-
- if filename not in self.all_data:
- self.all_data.add(filename)
- image_list = list(self.all_data)
- image_list.sort()
- try:
- with open(self.testdata, "w") as fp:
- json.dump(image_list, fp, indent=4)
- except IOError:
- logger.debug("Unable to save JSON list")
-
- return fullfilename
-
- def getdir(self, dirname):
- """Downloads the requested tarball from the server
- https://www.silx.org/pub/silx/
- and unzips it into the data directory
-
- :param: relative name of the image.
- :return: list of files with their full path.
- """
- lodn = dirname.lower()
- if (lodn.endswith("tar") or lodn.endswith("tgz") or
- lodn.endswith("tbz2") or lodn.endswith("tar.gz") or
- lodn.endswith("tar.bz2")):
- import tarfile
- engine = tarfile.TarFile.open
- elif lodn.endswith("zip"):
- import zipfile
- engine = zipfile.ZipFile
- else:
- raise RuntimeError("Unsupported archive format. Only tar and zip "
- "are currently supported")
- full_path = self.getfile(dirname)
- root = os.path.dirname(full_path)
- with engine(full_path, mode="r") as fd:
- fd.extractall(self.data_home)
- if lodn.endswith("zip"):
- result = [os.path.join(root, i) for i in fd.namelist()]
- else:
- result = [os.path.join(root, i) for i in fd.getnames()]
- return result
-
- def download_all(self, imgs=None):
- """Download all data needed for the test/benchmarks
-
- :param imgs: list of files to download, by default all
- :return: list of path with all files
- """
- if not self._initialized:
- self._initialize_data()
- if not imgs:
- imgs = self.all_data
- res = []
- for fn in imgs:
- logger.info("Downloading from silx.org: %s", fn)
- res.append(self.getfile(fn))
- return res
+# Expose ExternalResources for compatibility (since silx 0.11)
+from ..utils.ExternalResources import ExternalResources
diff --git a/silx/resources/gui/icons/compare-mode-a-minus-b.png b/silx/resources/gui/icons/compare-mode-a-minus-b.png
new file mode 100644
index 0000000..75f8db3
--- /dev/null
+++ b/silx/resources/gui/icons/compare-mode-a-minus-b.png
Binary files differ
diff --git a/silx/resources/gui/icons/compare-mode-a-minus-b.svg b/silx/resources/gui/icons/compare-mode-a-minus-b.svg
new file mode 100644
index 0000000..bd4afbf
--- /dev/null
+++ b/silx/resources/gui/icons/compare-mode-a-minus-b.svg
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg id="svg2985" width="48px" height="48px" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
+ <metadata id="metadata2990">
+ <rdf:RDF>
+ <cc:Work rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
+ <dc:title/>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g id="layer1">
+ <path id="path2992-3" d="m33.031 9.9688c-0.99857 0.014569-2.0178 0.11579-3.0312 0.34375h-0.0625c-2.1183 0.48558-4.0182 1.4422-5.6562 2.6875 2.8649 2.1382 4.9928 5.2987 5.8125 9.125 1.3092 6.1116-1.1148 12.153-5.7188 15.656 3.3562 2.5072 7.6866 3.6093 12.062 2.625 8.1077-1.8236 13.248-10.036 11.469-18.344-1.5572-7.2694-7.885-12.196-14.875-12.094zm-8.6562 27.812c-2.8622-2.1382-5.0246-5.3011-5.8438-9.125-1.3093-6.1119 1.1417-12.153 5.75-15.656-3.3555-2.5044-7.689-3.6087-12.062-2.625l-0.0625 0.03125c-8.0776 1.8516-13.181 10.028-11.406 18.312 1.7797 8.3079 9.7986 13.574 17.906 11.75 2.1433-0.4821 4.0643-1.4286 5.7188-2.6875z"/>
+ <g id="text3834" fill="#fff">
+ <path id="path3870" d="m5.8982 29.014c1.8906-4.8626 3.2728-8.4075 4.1465-10.635 0.05728-0.10741 0.18261-0.23631 0.37598-0.38672 0.20052-0.15754 0.34732-0.23631 0.44043-0.23633 0.02148 1.5e-5 0.04296 0.01076 0.06445 0.03223 0.02864 0.01434 0.05012 0.02508 0.06445 0.03223l4.3721 11.473c0.35806 0.92383 0.54068 1.3965 0.54785 1.418 0.09309 0.22201 0.31509 0.40104 0.66602 0.53711 0.35806 0.12891 0.62303 0.19336 0.79492 0.19336 0.04295 0.06445 0.06444 0.17188 0.06445 0.32227-1.4e-5 0.14323-0.0072 0.24349-0.02148 0.30078-1.4323-0.07161-2.2201-0.10742-2.3633-0.10742-0.29363 0-0.56935 0.0072-0.82715 0.02148-0.25066 0.0072-0.53354 0.02148-0.84863 0.04297-0.31511 0.02148-0.58725 0.03581-0.81641 0.04297-0.05014-0.05729-0.0752-0.16113-0.0752-0.31152 0.0072-0.15039 0.03938-0.25423 0.09668-0.31152 0.1647 1e-6 0.38313-0.02506 0.65527-0.0752 0.27929-0.05729 0.4619-0.12532 0.54785-0.2041 0.05728-0.05729 0.08593-0.15755 0.08594-0.30078-1e-5 -0.19336-0.12176-0.63737-0.36524-1.332-0.2435-0.70182-0.48699-1.3535-0.73047-1.9551l-0.36524-0.90234c-0.04298-0.05729-0.08595-0.08593-0.12891-0.08594-0.18621-0.01432-0.89519-0.02148-2.127-0.02148-0.90235 6e-6 -1.6758 0.02149-2.3203 0.06445l-0.10742 0.06445c-0.40105 1.0599-0.72331 1.9336-0.9668 2.6211-0.20052 0.58724-0.30078 1.0957-0.30078 1.5254-2.6e-6 0.12175 0.064451 0.22559 0.19336 0.31152 0.13606 0.08594 0.2972 0.15039 0.4834 0.19336 0.19336 0.03581 0.35807 0.06087 0.49414 0.0752 0.13606 0.01432 0.2399 0.02149 0.31152 0.02148 0.028642 0.02865 0.046545 0.12533 0.053711 0.29004 0.014326 0.15756 0.010745 0.26856-0.010735 0.33301-0.20769-0.007161-0.43327-0.021484-0.67676-0.042969-0.24349-0.021484-0.46908-0.035807-0.67676-0.042968-0.20768-0.01432-0.45117-0.02148-0.73047-0.02148-0.29362 0-0.55501 0.0072-0.78418 0.02148-0.22201 0.0072-0.46908 0.02148-0.74121 0.04297-0.27214 0.02148-0.52995 0.03581-0.77344 0.04297-0.028646-0.02865-0.042968-0.12174-0.042969-0.2793 3e-7 -0.15755 0.014323-0.27214 0.042969-0.34375 0.17904 1e-6 0.41536-0.03581 0.70898-0.10742 0.29362-0.07878 0.48698-0.17904 0.58008-0.30078 0.30078-0.39388 0.63737-1.0671 1.0098-2.0195m4.2109-8.6582-1.9766 5.2422c-4.3e-6 0.0573 0.014319 0.08594 0.042969 0.08594 0.74479 0.02865 1.3965 0.04298 1.9551 0.04297 0.5371 7e-6 1.1387-0.02148 1.8047-0.06445 0.01431 7e-6 0.02864-0.0072 0.04297-0.02148 0.01431-0.02864 0.02148-0.05012 0.02148-0.06445v-0.02148l-1.8906-5.1992"/>
+ </g>
+ <g id="text3834-3" fill="#fff">
+ <path id="path3867" d="m35.655 25.1v4.6621c-0.0072 0.20768 0.0072 0.48698 0.04297 0.83789 0.0358 0.35091 0.08593 0.55859 0.15039 0.62305 0.15039 0.15755 0.35449 0.26139 0.6123 0.31152 0.26497 0.05013 0.62662 0.0752 1.085 0.07519 2.2773 1e-6 3.416-1.0527 3.416-3.1582-1e-5 -2.2344-1.332-3.3516-3.9961-3.3516h-1.3105m0-0.81641h1.7939c0.89518 8e-6 1.5684-0.24706 2.0195-0.74121 0.45116-0.49413 0.67675-1.085 0.67676-1.7725-9e-6 -0.9453-0.30079-1.6829-0.90234-2.2129-0.59441-0.52994-1.3965-0.79491-2.4062-0.79492-0.6517 1.4e-5 -1.0098 0.07163-1.0742 0.21484-0.08594 0.2077-0.12175 0.7448-0.10742 1.6113v3.6953m2.127-6.209c0.41536 1.4e-5 0.8164 0.03224 1.2031 0.09668 0.38671 0.06447 0.77343 0.17547 1.1602 0.33301 0.38671 0.1504 0.71972 0.34376 0.99902 0.58008 0.28645 0.23634 0.51561 0.54428 0.6875 0.92383 0.17902 0.37241 0.26854 0.79493 0.26855 1.2676-1e-5 0.73764-0.2435 1.3965-0.73047 1.9766-0.47983 0.58009-0.95964 0.95964-1.4395 1.1387-0.06446 0.02865-0.06446 0.06446 0 0.10742 0.27929 0.01433 0.59439 0.10385 0.94531 0.26856 0.3509 0.16472 0.69107 0.39031 1.0205 0.67676 0.33658 0.2793 0.61946 0.64454 0.84863 1.0957 0.22916 0.44402 0.34374 0.91667 0.34375 1.418-1.2e-5 1.3105-0.48341 2.3704-1.4502 3.1797-0.89519 0.74479-2.3955 1.1315-4.501 1.1602h-4.9414c-0.05013-0.05729-0.0752-0.16113-0.0752-0.31152 0.0072-0.15039 0.03223-0.25423 0.0752-0.31152 0.21484 1e-6 0.50846-0.03223 0.88086-0.09668 0.37239-0.06445 0.57291-0.14681 0.60156-0.24707 0.07161-0.22916 0.10742-0.75911 0.10742-1.5898v-9.1738c-2e-6 -0.83072-0.03581-1.3607-0.10742-1.5898-0.02865-0.10025-0.22917-0.1826-0.60156-0.24707-0.3724-0.06444-0.66602-0.09667-0.88086-0.09668-0.04297-0.05728-0.06804-0.16112-0.0752-0.31152-1e-6 -0.15038 0.02506-0.25422 0.0752-0.31152 1.4681 0.07163 2.3131 0.10744 2.5352 0.10742 0.24349 1.4e-5 0.69824-0.0071 1.3643-0.02149 0.66601-0.01431 1.2282-0.02147 1.6865-0.02148"/>
+ </g>
+ <g id="text3859">
+ <path id="path3864" d="m22.387 24.902c2.7083-0.14322 4.2773-0.22135 4.707-0.23438 0.09114 5e-6 0.13671 0.0586 0.13672 0.17578-6e-6 0.34506-0.08464 0.69662-0.25391 1.0547-0.26693 0.01954-1.8359 0.09115-4.707 0.21484-0.09115 4e-6 -0.13672-0.07161-0.13672-0.21484-1e-6 -0.29947 0.08463-0.6315 0.25391-0.99609"/>
+ </g>
+ </g>
+</svg>
diff --git a/silx/resources/gui/icons/eye.png b/silx/resources/gui/icons/eye.png
new file mode 100644
index 0000000..a2d1c23
--- /dev/null
+++ b/silx/resources/gui/icons/eye.png
Binary files differ
diff --git a/silx/resources/gui/icons/eye.svg b/silx/resources/gui/icons/eye.svg
new file mode 100644
index 0000000..7658d86
--- /dev/null
+++ b/silx/resources/gui/icons/eye.svg
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg id="svg2" version="1.1" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
+ <metadata id="metadata16">
+ <rdf:RDF>
+ <cc:Work rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
+ <dc:title/>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g id="g3801" transform="translate(-.98262 -.54146)">
+ <path id="path3789" transform="matrix(1.1637 0 0 1.1637 -1.7349 -11.417)" d="m20.738 24.026a4.6539 4.6539 0 1 1-0.0819-0.86928l-4.572 0.86928z" stroke="#000"/>
+ <path id="path3795" d="m12.628 15.997s0.08165-3.4564 3.4836-3.8374" fill="none" stroke="#FFF" stroke-width="1px"/>
+ </g>
+ <path id="path3816" d="m2.534 15.997c13.578 16.114 26.932 0 26.932 0" fill="none" stroke="#000" stroke-linecap="round" stroke-width="1px"/>
+ <path id="path3818" d="m2.534 15.997c13.578-16.114 26.932 0 26.932 0" fill="none" stroke="#000" stroke-linecap="round" stroke-width="1px"/>
+ <path id="path3822" d="m16 8.6956v-2.0658" fill="none" stroke="#000" stroke-width="1px"/>
+ <path id="path3824" d="m10.772 9.5672-0.8732-1.8723" fill="none" stroke="#000" stroke-width="1px"/>
+ <path id="path3826" d="m5.3345 12.715-1.3278-1.583" fill="none" stroke="#000" stroke-width="1px"/>
+ <path id="path3828" d="m26.665 12.715 1.328-1.583" fill="none" stroke="#000" stroke-width="1px"/>
+ <path id="path3830" d="m21.228 9.5672 0.873-1.8723" fill="none" stroke="#000" stroke-width="1px"/>
+</svg>
diff --git a/silx/resources/gui/icons/pointing-hand.png b/silx/resources/gui/icons/pointing-hand.png
new file mode 100644
index 0000000..abc9cd1
--- /dev/null
+++ b/silx/resources/gui/icons/pointing-hand.png
Binary files differ
diff --git a/silx/resources/gui/icons/pointing-hand.svg b/silx/resources/gui/icons/pointing-hand.svg
new file mode 100644
index 0000000..2a755da
--- /dev/null
+++ b/silx/resources/gui/icons/pointing-hand.svg
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg id="svg3092" version="1.1" viewBox="0 0 32 32" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><metadata id="metadata3123"><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/><dc:title/></cc:Work></rdf:RDF></metadata><g id="g3946" transform="translate(-31.092 .90251)"><path id="path3922" d="m43.172 16.218v-12.218" fill="none" stroke="#000" stroke-width="1px"/><path id="path3924" d="m46.736 15.2v-10.997" fill="none" stroke="#000" stroke-width="1px"/><path id="path3926" d="m50.299 15.2v-3.8692" fill="none" stroke="#000" stroke-width="1px"/><path id="path3930" d="m43.172 3.9994c0.10182-2.7491 3.4619-2.7491 3.5637 0.20364" fill="none" stroke="#000" stroke-linecap="round" stroke-width="1px"/><path id="path3932" d="m46.738 11.229c0.10182-2.7491 3.4619-2.7491 3.5637 0.20364" fill="none" stroke="#000" stroke-width="1px"/><path id="path3934" d="m50.305 12.254c0.10182-2.7491 3.4619-2.7491 3.5637 0.20364" fill="none" stroke="#000" stroke-linecap="round" stroke-width="1px"/><path id="path3936" d="m53.892 14.792v-2.7491" fill="none" stroke="#000" stroke-width="1px"/><path id="path3938" d="m53.888 13.061c0.10182-1.8328 2.7242-2.0364 2.826 0.20364v6.7201c-0.4936 3.3365-2.6441 1.5754-2.24 8.2474" fill="none" stroke="#000" stroke-width="1px"/><path id="path3940" d="m43.019 15.565c-3.3601-4.1746-6.7558-1.7904-5.1267 0.34784l3.3601 3.7674c1.945 2.7929 1.9311 1.7043 1.9346 8.5529" fill="none" stroke="#000" stroke-width="1px"/><rect id="rect3944" x="42.677" y="25.484" width="12.285" height="3.0344" ry="0"/></g></svg>
diff --git a/silx/resources/opencl/convolution.cl b/silx/resources/opencl/convolution.cl
new file mode 100644
index 0000000..629b8fc
--- /dev/null
+++ b/silx/resources/opencl/convolution.cl
@@ -0,0 +1,312 @@
+#define MAX_CONST_SIZE 16384
+
+/******************************************************************************/
+/**************************** Macros ******************************************/
+/******************************************************************************/
+
+// Get the center index of the filter,
+// and the "half-Left" and "half-Right" lengths.
+// In the case of an even-sized filter, the center is shifted to the left.
+#define GET_CENTER_HL(hlen){\
+ if (hlen & 1) {\
+ c = hlen/2;\
+ hL = c;\
+ hR = c;\
+ }\
+ else {\
+ c = hlen/2 - 1;\
+ hL = c;\
+ hR = c+1;\
+ }\
+}\
+
+// Boundary handling modes
+#define CONV_MODE_REFLECT 0 // cba|abcd|dcb
+#define CONV_MODE_NEAREST 1 // aaa|abcd|ddd
+#define CONV_MODE_WRAP 2 // bcd|abcd|abc
+#define CONV_MODE_CONSTANT 3 // 000|abcd|000
+#ifndef USED_CONV_MODE
+ #define USED_CONV_MODE CONV_MODE_NEAREST
+#endif
+
+#define CONV_PERIODIC_IDX_X int idx_x = gidx - c + jx; if (idx_x < 0) idx_x += Nx; if (idx_x >= Nx) idx_x -= Nx;
+#define CONV_PERIODIC_IDX_Y int idx_y = gidy - c + jy; if (idx_y < 0) idx_y += Ny; if (idx_y >= Ny) idx_y -= Ny;
+#define CONV_PERIODIC_IDX_Z int idx_z = gidz - c + jz; if (idx_z < 0) idx_z += Nz; if (idx_z >= Nz) idx_z -= Nz;
+
+#define CONV_NEAREST_IDX_X int idx_x = clamp((int) (gidx - c + jx), 0, Nx-1);
+#define CONV_NEAREST_IDX_Y int idx_y = clamp((int) (gidy - c + jy), 0, Ny-1);
+#define CONV_NEAREST_IDX_Z int idx_z = clamp((int) (gidz - c + jz), 0, Nz-1);
+
+#define CONV_REFLECT_IDX_X int idx_x = gidx - c + jx; if (idx_x < 0) idx_x = -idx_x-1; if (idx_x >= Nx) idx_x = Nx-(idx_x-(Nx-1));
+#define CONV_REFLECT_IDX_Y int idx_y = gidy - c + jy; if (idx_y < 0) idx_y = -idx_y-1; if (idx_y >= Ny) idx_y = Ny-(idx_y-(Ny-1));
+#define CONV_REFLECT_IDX_Z int idx_z = gidz - c + jz; if (idx_z < 0) idx_z = -idx_z-1; if (idx_z >= Nz) idx_z = Nz-(idx_z-(Nz-1));
+
+
+#if USED_CONV_MODE == CONV_MODE_REFLECT
+ #define CONV_IDX_X CONV_REFLECT_IDX_X
+ #define CONV_IDX_Y CONV_REFLECT_IDX_Y
+ #define CONV_IDX_Z CONV_REFLECT_IDX_Z
+#elif USED_CONV_MODE == CONV_MODE_NEAREST
+ #define CONV_IDX_X CONV_NEAREST_IDX_X
+ #define CONV_IDX_Y CONV_NEAREST_IDX_Y
+ #define CONV_IDX_Z CONV_NEAREST_IDX_Z
+#elif USED_CONV_MODE == CONV_MODE_WRAP
+ #define CONV_IDX_X CONV_PERIODIC_IDX_X
+ #define CONV_IDX_Y CONV_PERIODIC_IDX_Y
+ #define CONV_IDX_Z CONV_PERIODIC_IDX_Z
+#elif USED_CONV_MODE == CONV_MODE_CONSTANT
+ #error "constant not implemented yet"
+#else
+ #error "Unknown convolution mode"
+#endif
+
+
+
+// Image access patterns
+#define READ_IMAGE_1D_X input[(gidz*Ny + gidy)*Nx + idx_x]
+#define READ_IMAGE_1D_Y input[(gidz*Ny + idx_y)*Nx + gidx]
+#define READ_IMAGE_1D_Z input[(idx_z*Ny + gidy)*Nx + gidx]
+
+#define READ_IMAGE_2D_XY input[(gidz*Ny + idx_y)*Nx + idx_x]
+#define READ_IMAGE_2D_XZ input[(idx_z*Ny + gidy)*Nx + idx_x]
+#define READ_IMAGE_2D_YZ input[(idx_z*Ny + idx_y)*Nx + gidx]
+
+#define READ_IMAGE_3D_XYZ input[(idx_z*Ny + idx_y)*Nx + idx_x]
+
+
+
+/******************************************************************************/
+/**************************** 1D Convolution **********************************/
+/******************************************************************************/
+
+
+// Convolution with 1D kernel along axis "X" (fast dimension)
+// Works for batched 1D on 2D and batched 2D on 3D, along axis "X".
+__kernel void convol_1D_X(
+ const __global float * input,
+ __global float * output,
+ __global float * filter,
+ int L, // filter size
+ int Nx, // input/output number of columns
+ int Ny, // input/output number of rows
+ int Nz // input/output depth
+)
+{
+ uint gidx = get_global_id(0);
+ uint gidy = get_global_id(1);
+ uint gidz = get_global_id(2);
+ if ((gidx >= Nx) || (gidy >= Ny) || (gidz >= Nz)) return;
+
+ int c, hL, hR;
+ GET_CENTER_HL(L);
+ float sum = 0.0f;
+
+ for (int jx = 0; jx <= hR+hL; jx++) {
+ CONV_IDX_X; // Get index "x"
+ sum += READ_IMAGE_1D_X * filter[L-1 - jx];
+ }
+ output[(gidz*Ny + gidy)*Nx + gidx] = sum;
+}
+
+
+// Convolution with 1D kernel along axis "Y"
+// Works for batched 1D on 2D and batched 2D on 3D, along axis "Y".
+__kernel void convol_1D_Y(
+ const __global float * input,
+ __global float * output,
+ __global float * filter,
+ int L, // filter size
+ int Nx, // input/output number of columns
+ int Ny, // input/output number of rows
+ int Nz // input/output depth
+)
+{
+ uint gidx = get_global_id(0);
+ uint gidy = get_global_id(1);
+ uint gidz = get_global_id(2);
+ if ((gidx >= Nx) || (gidy >= Ny) || (gidz >= Nz)) return;
+
+ int c, hL, hR;
+ GET_CENTER_HL(L);
+ float sum = 0.0f;
+
+ for (int jy = 0; jy <= hR+hL; jy++) {
+ CONV_IDX_Y; // Get index "y"
+ sum += READ_IMAGE_1D_Y * filter[L-1 - jy];
+ }
+ output[(gidz*Ny + gidy)*Nx + gidx] = sum;
+}
+
+
+// Convolution with 1D kernel along axis "Z"
+// Works for batched 1D on 2D and batched 2D on 3D, along axis "Z".
+__kernel void convol_1D_Z(
+ const __global float * input,
+ __global float * output,
+ __global float * filter,
+ int L, // filter size
+ int Nx, // input/output number of columns
+ int Ny, // input/output number of rows
+ int Nz // input/output depth
+)
+{
+ uint gidx = get_global_id(0);
+ uint gidy = get_global_id(1);
+ uint gidz = get_global_id(2);
+ if ((gidx >= Nx) || (gidy >= Ny) || (gidz >= Nz)) return;
+
+ int c, hL, hR;
+ GET_CENTER_HL(L);
+ float sum = 0.0f;
+
+ for (int jz = 0; jz <= hR+hL; jz++) {
+ CONV_IDX_Z; // Get index "z"
+ sum += READ_IMAGE_1D_Z * filter[L-1 - jz];
+ }
+ output[(gidz*Ny + gidy)*Nx + gidx] = sum;
+}
+
+
+/******************************************************************************/
+/**************************** 2D Convolution **********************************/
+/******************************************************************************/
+
+// Convolution with 2D kernel
+// Works for batched 2D on 3D.
+__kernel void convol_2D_XY(
+ const __global float * input,
+ __global float * output,
+ __global float * filter,
+ int Lx, // filter number of columns,
+ int Ly, // filter number of rows,
+ int Nx, // input/output number of columns
+ int Ny, // input/output number of rows
+ int Nz // input/output depth
+)
+{
+ uint gidx = get_global_id(0);
+ uint gidy = get_global_id(1);
+ uint gidz = get_global_id(2);
+ if ((gidx >= Nx) || (gidy >= Ny) || (gidz >= Nz)) return;
+
+ int c, hL, hR;
+ GET_CENTER_HL(Lx);
+ float sum = 0.0f;
+
+ for (int jy = 0; jy <= hR+hL; jy++) {
+ CONV_IDX_Y; // Get index "y"
+ for (int jx = 0; jx <= hR+hL; jx++) {
+ CONV_IDX_X; // Get index "x"
+ sum += READ_IMAGE_2D_XY * filter[(Ly-1-jy)*Lx + (Lx-1 - jx)];
+ }
+ }
+ output[(gidz*Ny + gidy)*Nx + gidx] = sum;
+}
+
+
+// Convolution with 2D kernel
+// Works for batched 2D on 3D.
+__kernel void convol_2D_XZ(
+ const __global float * input,
+ __global float * output,
+ __global float * filter,
+ int Lx, // filter number of columns,
+ int Lz, // filter number of rows,
+ int Nx, // input/output number of columns
+ int Ny, // input/output number of rows
+ int Nz // input/output depth
+)
+{
+ uint gidx = get_global_id(0);
+ uint gidy = get_global_id(1);
+ uint gidz = get_global_id(2);
+ if ((gidx >= Nx) || (gidy >= Ny) || (gidz >= Nz)) return;
+
+ int c, hL, hR;
+ GET_CENTER_HL(Lx);
+ float sum = 0.0f;
+
+ for (int jz = 0; jz <= hR+hL; jz++) {
+ CONV_IDX_Z; // Get index "z"
+ for (int jx = 0; jx <= hR+hL; jx++) {
+ CONV_IDX_X; // Get index "x"
+ sum += READ_IMAGE_2D_XZ * filter[(Lz-1-jz)*Lx + (Lx-1 - jx)];
+ }
+ }
+ output[(gidz*Ny + gidy)*Nx + gidx] = sum;
+}
+
+
+// Convolution with 2D kernel
+// Works for batched 2D on 3D.
+__kernel void convol_2D_YZ(
+ const __global float * input,
+ __global float * output,
+ __global float * filter,
+ int Ly, // filter number of columns,
+ int Lz, // filter number of rows,
+ int Nx, // input/output number of columns
+ int Ny, // input/output number of rows
+ int Nz // input/output depth
+)
+{
+ uint gidx = get_global_id(0);
+ uint gidy = get_global_id(1);
+ uint gidz = get_global_id(2);
+ if ((gidx >= Nx) || (gidy >= Ny) || (gidz >= Nz)) return;
+
+ int c, hL, hR;
+ GET_CENTER_HL(Ly);
+ float sum = 0.0f;
+
+ for (int jz = 0; jz <= hR+hL; jz++) {
+ CONV_IDX_Z; // Get index "z"
+ for (int jy = 0; jy <= hR+hL; jy++) {
+ CONV_IDX_Y; // Get index "y"
+ sum += READ_IMAGE_2D_YZ * filter[(Lz-1-jz)*Ly + (Ly-1 - jy)];
+ }
+ }
+ output[(gidz*Ny + gidy)*Nx + gidx] = sum;
+}
+
+
+
+/******************************************************************************/
+/**************************** 3D Convolution **********************************/
+/******************************************************************************/
+
+// Convolution with 3D kernel
+__kernel void convol_3D_XYZ(
+ const __global float * input,
+ __global float * output,
+ __global float * filter,
+ int Lx, // filter number of columns,
+ int Ly, // filter number of rows,
+ int Lz, // filter number of rows,
+ int Nx, // input/output number of columns
+ int Ny, // input/output number of rows
+ int Nz // input/output depth
+)
+{
+ uint gidx = get_global_id(0);
+ uint gidy = get_global_id(1);
+ uint gidz = get_global_id(2);
+ if ((gidx >= Nx) || (gidy >= Ny) || (gidz >= Nz)) return;
+
+ int c, hL, hR;
+ GET_CENTER_HL(Lx);
+ float sum = 0.0f;
+
+ for (int jz = 0; jz <= hR+hL; jz++) {
+ CONV_IDX_Z; // Get index "z"
+ for (int jy = 0; jy <= hR+hL; jy++) {
+ CONV_IDX_Y; // Get index "y"
+ for (int jx = 0; jx <= hR+hL; jx++) {
+ CONV_IDX_X; // Get index "x"
+ sum += READ_IMAGE_3D_XYZ * filter[((Lz-1-jz)*Ly + (Ly-1-jy))*Lx + (Lx-1 - jx)];
+ }
+ }
+ }
+ output[(gidz*Ny + gidy)*Nx + gidx] = sum;
+}
+
diff --git a/silx/resources/opencl/convolution_textures.cl b/silx/resources/opencl/convolution_textures.cl
new file mode 100644
index 0000000..517a67c
--- /dev/null
+++ b/silx/resources/opencl/convolution_textures.cl
@@ -0,0 +1,374 @@
+/******************************************************************************/
+/**************************** Macros ******************************************/
+/******************************************************************************/
+
+// Error handling
+#ifndef IMAGE_DIMS
+ #error "IMAGE_DIMS must be defined"
+#endif
+#ifndef FILTER_DIMS
+ #error "FILTER_DIMS must be defined"
+#endif
+#if FILTER_DIMS > IMAGE_DIMS
+ #error "Filter cannot have more dimensions than image"
+#endif
+
+// Boundary handling modes
+#define CONV_MODE_REFLECT 0 // CLK_ADDRESS_MIRRORED_REPEAT : cba|abcd|dcb
+#define CONV_MODE_NEAREST 1 // CLK_ADDRESS_CLAMP_TO_EDGE : aaa|abcd|ddd
+#define CONV_MODE_WRAP 2 // CLK_ADDRESS_REPEAT : bcd|abcd|abc
+#define CONV_MODE_CONSTANT 3 // CLK_ADDRESS_CLAMP : 000|abcd|000
+#ifndef USED_CONV_MODE
+ #define USED_CONV_MODE CONV_MODE_NEAREST
+#endif
+#if USED_CONV_MODE == CONV_MODE_REFLECT
+ #define CLK_BOUNDARY CLK_ADDRESS_MIRRORED_REPEAT
+ #define CLK_COORDS CLK_NORMALIZED_COORDS_TRUE
+ #define USE_NORM_COORDS
+#elif USED_CONV_MODE == CONV_MODE_NEAREST
+ #define CLK_BOUNDARY CLK_ADDRESS_CLAMP_TO_EDGE
+ #define CLK_COORDS CLK_NORMALIZED_COORDS_FALSE
+#elif USED_CONV_MODE == CONV_MODE_WRAP
+ #define CLK_BOUNDARY CLK_ADDRESS_REPEAT
+ #define CLK_COORDS CLK_NORMALIZED_COORDS_TRUE
+ #define USE_NORM_COORDS
+#elif USED_CONV_MODE == CONV_MODE_CONSTANT
+ #define CLK_BOUNDARY CLK_ADDRESS_CLAMP
+ #define CLK_COORDS CLK_NORMALIZED_COORDS_FALSE
+#else
+ #error "Unknown convolution mode"
+#endif
+
+
+
+// Convolution index for filter
+#define FILTER_INDEX(j) (Lx - 1 - j)
+
+// Filter access patterns
+#define READ_FILTER_1D(j) read_imagef(filter, (int2) (FILTER_INDEX(j), 0)).x;
+#define READ_FILTER_2D(jx, jy) read_imagef(filter, (int2) (FILTER_INDEX(jx), FILTER_INDEX(jy))).x;
+#define READ_FILTER_3D(jx, jy, jz) read_imagef(filter, (int4) (FILTER_INDEX(jx), FILTER_INDEX(jy), FILTER_INDEX(jz), 0)).x;
+
+
+// Convolution index for image
+#ifdef USE_NORM_COORDS
+ #define IMAGE_INDEX_X (gidx*1.0f +0.5f - c + jx)/Nx
+ #define IMAGE_INDEX_Y (gidy*1.0f +0.5f - c + jy)/Ny
+ #define IMAGE_INDEX_Z (gidz*1.0f +0.5f - c + jz)/Nz
+ #define RET_TYPE_1 float
+ #define RET_TYPE_2 float2
+ #define RET_TYPE_4 float4
+ #define C_ZERO 0.5f
+ #define GIDX (gidx*1.0f + 0.5f)/Nx
+ #define GIDY (gidy*1.0f + 0.5f)/Ny
+ #define GIDZ (gidz*1.0f + 0.5f)/Nz
+#else
+ #define IMAGE_INDEX_X (gidx - c + jx)
+ #define IMAGE_INDEX_Y (gidy - c + jy)
+ #define IMAGE_INDEX_Z (gidz - c + jz)
+ #define RET_TYPE_1 int
+ #define RET_TYPE_2 int2
+ #define RET_TYPE_4 int4
+ #define C_ZERO 0
+ #define GIDX gidx
+ #define GIDY gidy
+ #define GIDZ gidz
+#endif
+
+static const sampler_t sampler = CLK_COORDS | CLK_BOUNDARY | CLK_FILTER_NEAREST;
+
+// Image access patterns
+#define READ_IMAGE_1D read_imagef(input, sampler, (RET_TYPE_2) (IMAGE_INDEX_X, C_ZERO)).x
+
+#define READ_IMAGE_2D_X read_imagef(input, sampler, (RET_TYPE_2) (IMAGE_INDEX_X , GIDY)).x
+#define READ_IMAGE_2D_Y read_imagef(input, sampler, (RET_TYPE_2) (GIDX, IMAGE_INDEX_Y)).x
+#define READ_IMAGE_2D_XY read_imagef(input, sampler, (RET_TYPE_2) (IMAGE_INDEX_X, IMAGE_INDEX_Y)).x
+
+#define READ_IMAGE_3D_X read_imagef(input, sampler, (RET_TYPE_4) (IMAGE_INDEX_X, GIDY, GIDZ, C_ZERO)).x
+#define READ_IMAGE_3D_Y read_imagef(input, sampler, (RET_TYPE_4) (GIDX, IMAGE_INDEX_Y, GIDZ, C_ZERO)).x
+#define READ_IMAGE_3D_Z read_imagef(input, sampler, (RET_TYPE_4) (GIDX, GIDY, IMAGE_INDEX_Z, C_ZERO)).x
+#define READ_IMAGE_3D_XY read_imagef(input, sampler, (RET_TYPE_4) (IMAGE_INDEX_X, IMAGE_INDEX_Y, GIDZ, C_ZERO)).x
+#define READ_IMAGE_3D_XZ read_imagef(input, sampler, (RET_TYPE_4) (IMAGE_INDEX_X, GIDY, IMAGE_INDEX_Z, C_ZERO)).x
+#define READ_IMAGE_3D_YZ read_imagef(input, sampler, (RET_TYPE_4) (GIDX, IMAGE_INDEX_Y, IMAGE_INDEX_Z, C_ZERO)).x
+#define READ_IMAGE_3D_XYZ read_imagef(input, sampler, (RET_TYPE_4) (IMAGE_INDEX_X, IMAGE_INDEX_Y, IMAGE_INDEX_Z, C_ZERO)).x
+
+
+// NOTE: pyopencl and OpenCL < 1.2 do not support image1d_t
+#if FILTER_DIMS == 1
+ #define FILTER_TYPE image2d_t
+ #define READ_FILTER_VAL(j) READ_FILTER_1D(j)
+#elif FILTER_DIMS == 2
+ #define FILTER_TYPE image2d_t
+ #define READ_FILTER_VAL(jx, jy) READ_FILTER_2D(jx, jy)
+#elif FILTER_DIMS == 3
+ #define FILTER_TYPE image3d_t
+ #define READ_FILTER_VAL(jx, jy, jz) READ_FILTER_3D(jx, jy, jz)
+#endif
+
+#if IMAGE_DIMS == 1
+ #define IMAGE_TYPE image2d_t
+ #define READ_IMAGE_X READ_IMAGE_1D
+#elif IMAGE_DIMS == 2
+ #define IMAGE_TYPE image2d_t
+ #define READ_IMAGE_X READ_IMAGE_2D_X
+ #define READ_IMAGE_Y READ_IMAGE_2D_Y
+ #define READ_IMAGE_XY READ_IMAGE_2D_XY
+#elif IMAGE_DIMS == 3
+ #define IMAGE_TYPE image3d_t
+ #define READ_IMAGE_X READ_IMAGE_3D_X
+ #define READ_IMAGE_Y READ_IMAGE_3D_Y
+ #define READ_IMAGE_Z READ_IMAGE_3D_Z
+ #define READ_IMAGE_XY READ_IMAGE_3D_XY
+ #define READ_IMAGE_XZ READ_IMAGE_3D_XZ
+ #define READ_IMAGE_YZ READ_IMAGE_3D_YZ
+ #define READ_IMAGE_XYZ READ_IMAGE_3D_XYZ
+#endif
+
+
+// Get the center index of the filter,
+// and the "half-Left" and "half-Right" lengths.
+// In the case of an even-sized filter, the center is shifted to the left.
+#define GET_CENTER_HL(hlen){\
+ if (hlen & 1) {\
+ c = hlen/2;\
+ hL = c;\
+ hR = c;\
+ }\
+ else {\
+ c = hlen/2 - 1;\
+ hL = c;\
+ hR = c+1;\
+ }\
+}\
+
+
+
+/******************************************************************************/
+/**************************** 1D Convolution **********************************/
+/******************************************************************************/
+
+#if FILTER_DIMS == 1
+// Convolution with 1D kernel along axis "X" (fast dimension)
+// Works for batched 1D on 2D and batched 2D on 3D, along axis "X".
+__kernel void convol_1D_X_tex(
+ read_only IMAGE_TYPE input,
+ __global float * output,
+ read_only FILTER_TYPE filter,
+ int Lx, // filter size
+ int Nx, // input/output number of columns
+ int Ny, // input/output number of rows
+ int Nz // input/output depth
+)
+{
+ uint gidx = get_global_id(0);
+ uint gidy = get_global_id(1);
+ uint gidz = get_global_id(2);
+ if ((gidx >= Nx) || (gidy >= Ny) || (gidz >= Nz)) return;
+
+ int c, hL, hR;
+ GET_CENTER_HL(Lx);
+ float sum = 0.0f;
+
+ for (int jx = 0; jx <= hR+hL; jx++) {
+ sum += READ_IMAGE_X * READ_FILTER_VAL(jx);
+ }
+ output[(gidz*Ny + gidy)*Nx + gidx] = sum;
+}
+
+
+#if IMAGE_DIMS >= 2
+// Convolution with 1D kernel along axis "Y"
+// Works for batched 1D on 2D and batched 2D on 3D, along axis "Y".
+__kernel void convol_1D_Y_tex(
+ read_only IMAGE_TYPE input,
+ __global float * output,
+ read_only FILTER_TYPE filter,
+ int Lx, // filter size
+ int Nx, // input/output number of columns
+ int Ny, // input/output number of rows
+ int Nz // input/output depth
+)
+{
+ uint gidx = get_global_id(0);
+ uint gidy = get_global_id(1);
+ uint gidz = get_global_id(2);
+ if ((gidx >= Nx) || (gidy >= Ny) || (gidz >= Nz)) return;
+
+ int c, hL, hR;
+ GET_CENTER_HL(Lx);
+ float sum = 0.0f;
+
+ for (int jy = 0; jy <= hR+hL; jy++) {
+ sum += READ_IMAGE_Y * READ_FILTER_VAL(jy);
+ }
+ output[(gidz*Ny + gidy)*Nx + gidx] = sum;
+}
+#endif
+
+#if IMAGE_DIMS == 3
+// Convolution with 1D kernel along axis "Z"
+// Works for batched 1D on 2D and batched 2D on 3D, along axis "Z".
+__kernel void convol_1D_Z_tex(
+ read_only IMAGE_TYPE input,
+ __global float * output,
+ read_only FILTER_TYPE filter,
+ int Lx, // filter size
+ int Nx, // input/output number of columns
+ int Ny, // input/output number of rows
+ int Nz // input/output depth
+)
+{
+ uint gidx = get_global_id(0);
+ uint gidy = get_global_id(1);
+ uint gidz = get_global_id(2);
+ if ((gidx >= Nx) || (gidy >= Ny) || (gidz >= Nz)) return;
+
+ int c, hL, hR;
+ GET_CENTER_HL(Lx);
+ float sum = 0.0f;
+
+ for (int jz = 0; jz <= hR+hL; jz++) {
+ sum += READ_IMAGE_Z * READ_FILTER_VAL(jz);
+ }
+ output[(gidz*Ny + gidy)*Nx + gidx] = sum;
+}
+#endif
+#endif
+
+/******************************************************************************/
+/**************************** 2D Convolution **********************************/
+/******************************************************************************/
+
+#if IMAGE_DIMS >= 2 && FILTER_DIMS == 2
+// Convolution with 2D kernel
+// Works for batched 2D on 3D.
+__kernel void convol_2D_XY_tex(
+ read_only IMAGE_TYPE input,
+ __global float * output,
+ read_only FILTER_TYPE filter,
+ int Lx, // filter number of columns,
+ int Ly, // filter number of rows,
+ int Nx, // input/output number of columns
+ int Ny, // input/output number of rows
+ int Nz // input/output depth
+)
+{
+ uint gidx = get_global_id(0);
+ uint gidy = get_global_id(1);
+ uint gidz = get_global_id(2);
+ if ((gidx >= Nx) || (gidy >= Ny) || (gidz >= Nz)) return;
+
+ int c, hL, hR;
+ GET_CENTER_HL(Lx);
+ float sum = 0.0f;
+
+ for (int jy = 0; jy <= hR+hL; jy++) {
+ for (int jx = 0; jx <= hR+hL; jx++) {
+ sum += READ_IMAGE_XY * READ_FILTER_VAL(jx, jy);
+ }
+ }
+ output[(gidz*Ny + gidy)*Nx + gidx] = sum;
+}
+#endif
+
+#if IMAGE_DIMS == 3 && FILTER_DIMS == 2
+// Convolution with 2D kernel
+// Works for batched 2D on 3D.
+__kernel void convol_2D_XZ_tex(
+ read_only IMAGE_TYPE input,
+ __global float * output,
+ read_only FILTER_TYPE filter,
+ int Lx, // filter number of columns,
+ int Lz, // filter number of rows,
+ int Nx, // input/output number of columns
+ int Ny, // input/output number of rows
+ int Nz // input/output depth
+)
+{
+ uint gidx = get_global_id(0);
+ uint gidy = get_global_id(1);
+ uint gidz = get_global_id(2);
+ if ((gidx >= Nx) || (gidy >= Ny) || (gidz >= Nz)) return;
+
+ int c, hL, hR;
+ GET_CENTER_HL(Lx);
+ float sum = 0.0f;
+
+ for (int jz = 0; jz <= hR+hL; jz++) {
+ for (int jx = 0; jx <= hR+hL; jx++) {
+ sum += READ_IMAGE_XZ * READ_FILTER_VAL(jx, jz);
+ }
+ }
+ output[(gidz*Ny + gidy)*Nx + gidx] = sum;
+}
+
+
+// Convolution with 2D kernel
+// Works for batched 2D on 3D.
+__kernel void convol_2D_YZ_tex(
+ read_only IMAGE_TYPE input,
+ __global float * output,
+ read_only FILTER_TYPE filter,
+ int Lx, // filter number of columns,
+ int Lz, // filter number of rows,
+ int Nx, // input/output number of columns
+ int Ny, // input/output number of rows
+ int Nz // input/output depth
+)
+{
+ uint gidx = get_global_id(0);
+ uint gidy = get_global_id(1);
+ uint gidz = get_global_id(2);
+ if ((gidx >= Nx) || (gidy >= Ny) || (gidz >= Nz)) return;
+
+ int c, hL, hR;
+ GET_CENTER_HL(Lx);
+ float sum = 0.0f;
+
+ for (int jz = 0; jz <= hR+hL; jz++) {
+ for (int jy = 0; jy <= hR+hL; jy++) {
+ sum += READ_IMAGE_YZ * READ_FILTER_VAL(jy, jz);
+ }
+ }
+ output[(gidz*Ny + gidy)*Nx + gidx] = sum;
+}
+#endif
+
+
+/******************************************************************************/
+/**************************** 3D Convolution **********************************/
+/******************************************************************************/
+
+#if IMAGE_DIMS == 3 && FILTER_DIMS == 3
+// Convolution with 3D kernel
+__kernel void convol_3D_XYZ_tex(
+ read_only IMAGE_TYPE input,
+ __global float * output,
+ read_only FILTER_TYPE filter,
+ int Lx, // filter number of columns,
+ int Ly, // filter number of rows,
+ int Lz, // filter number of rows,
+ int Nx, // input/output number of columns
+ int Ny, // input/output number of rows
+ int Nz // input/output depth
+)
+{
+ uint gidx = get_global_id(0);
+ uint gidy = get_global_id(1);
+ uint gidz = get_global_id(2);
+ if ((gidx >= Nx) || (gidy >= Ny) || (gidz >= Nz)) return;
+
+ int c, hL, hR;
+ GET_CENTER_HL(Lx);
+ float sum = 0.0f;
+
+ for (int jz = 0; jz <= hR+hL; jz++) {
+ for (int jy = 0; jy <= hR+hL; jy++) {
+ for (int jx = 0; jx <= hR+hL; jx++) {
+ sum += READ_IMAGE_XYZ * READ_FILTER_VAL(jx, jy, jz);
+ }
+ }
+ }
+ output[(gidz*Ny + gidy)*Nx + gidx] = sum;
+}
+#endif
diff --git a/silx/resources/opencl/sparse.cl b/silx/resources/opencl/sparse.cl
new file mode 100644
index 0000000..29e09ad
--- /dev/null
+++ b/silx/resources/opencl/sparse.cl
@@ -0,0 +1,84 @@
+/*
+ * Copyright (C) 2016-2019 European Synchrotron Radiation Facility
+ * Grenoble, France
+ *
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following
+ * conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef IMAGE_WIDTH
+ #error "Please define IMAGE_WIDTH parameter"
+#endif
+
+/**
+ * Densify a matric from CSR format to "dense" 2D format.
+ * The input CSR data consists in 3 arrays: (data, ind, iptr).
+ * The output array is a 2D array of dimensions IMAGE_WIDTH * image_height.
+ *
+ * data: 1D array containing the nonzero data items.
+ * ind: 1D array containing the column indices of the nonzero data items.
+ * iptr: 1D array containing indirection indices, such that range
+ * [iptr[i], iptr[i+1]-1] of "data" and "ind" contain the relevant data
+ * of output row "i".
+ * output: 2D array containing the densified data.
+ * image_height: height (number of rows) of the output data.
+**/
+
+kernel void densify_csr(
+ const global float* data,
+ const global int* ind,
+ const global int* iptr,
+ global float* output,
+ int image_height
+)
+{
+ uint tid = get_local_id(0);
+ uint row_idx = get_global_id(1);
+ if ((tid >= IMAGE_WIDTH) || (row_idx >= image_height)) return;
+
+ local float line[IMAGE_WIDTH];
+
+ // Memset
+ //~ #pragma unroll
+ for (int k = 0; tid+k < IMAGE_WIDTH; k += get_local_size(0)) {
+ if (tid+k >= IMAGE_WIDTH) break;
+ line[tid+k] = 0.0f;
+ }
+ barrier(CLK_LOCAL_MEM_FENCE);
+
+
+ uint start = iptr[row_idx], end = iptr[row_idx+1];
+ //~ #pragma unroll
+ for (int k = start; k < end; k += get_local_size(0)) {
+ // Current work group handles one line of the final array
+ // on the current line, write data[start+tid] at column index ind[start+tid]
+ if (k+tid < end)
+ line[ind[k+tid]] = data[k+tid];
+ }
+ barrier(CLK_LOCAL_MEM_FENCE);
+
+ // write the current line (shared mem) into the output array (global mem)
+ //~ #pragma unroll
+ for (int k = 0; tid+k < IMAGE_WIDTH; k += get_local_size(0)) {
+ output[row_idx*IMAGE_WIDTH + tid+k] = line[tid+k];
+ if (k+tid >= IMAGE_WIDTH) return;
+ }
+}
diff --git a/silx/setup.py b/silx/setup.py
index ac747a2..2575ebf 100644
--- a/silx/setup.py
+++ b/silx/setup.py
@@ -1,7 +1,7 @@
# coding: utf-8
# /*##########################################################################
#
-# Copyright (c) 2015-2018 European Synchrotron Radiation Facility
+# Copyright (c) 2015-2019 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -39,7 +39,6 @@ def configuration(parent_package='', top_path=None):
config.add_subpackage('opencl')
config.add_subpackage('resources')
config.add_subpackage('sx')
- config.add_subpackage('sx.test')
config.add_subpackage('test')
config.add_subpackage('third_party')
config.add_subpackage('utils')
diff --git a/silx/sx/__init__.py b/silx/sx/__init__.py
index e3641c8..97a3460 100644
--- a/silx/sx/__init__.py
+++ b/silx/sx/__init__.py
@@ -1,7 +1,7 @@
# coding: utf-8
# /*##########################################################################
#
-# Copyright (c) 2016-2018 European Synchrotron Radiation Facility
+# Copyright (c) 2016-2019 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -75,6 +75,10 @@ else:
_IS_NOTEBOOK = False
+# Placeholder for QApplication
+_qapp = None
+
+
def enable_gui():
"""Populate silx.sx module with silx.gui features and initialise Qt"""
if _NO_DISPLAY: # Missing DISPLAY under linux
@@ -82,18 +86,21 @@ def enable_gui():
'Not loading silx.gui features: No DISPLAY available')
return
- global qt, qapp
+ global qt, _qapp
if _IS_NOTEBOOK:
_get_ipython().enable_pylab(gui='qt', import_all=False)
from silx.gui import qt
- qapp = qt.QApplication.instance() or qt.QApplication([])
+ # Create QApplication and keep reference only if needed
+ if not qt.QApplication.instance():
+ _qapp = qt.QApplication([])
if hasattr(_sys, 'ps1'): # If from console, change windows icon
# Change windows default icon
from silx.gui import icons
- qapp.setWindowIcon(icons.getQIcon('silx'))
+ app = qt.QApplication.instance()
+ app.setWindowIcon(icons.getQIcon('silx'))
global ImageView, PlotWidget, PlotWindow, Plot1D
global Plot2D, StackView, ScatterView, TickMode
diff --git a/silx/sx/_plot.py b/silx/sx/_plot.py
index 00dcabe..1da44ab 100644
--- a/silx/sx/_plot.py
+++ b/silx/sx/_plot.py
@@ -31,6 +31,10 @@ __date__ = "06/11/2018"
import collections
+try:
+ from collections import abc
+except ImportError: # Python2 support
+ import collections as abc
import logging
import weakref
@@ -362,7 +366,7 @@ def scatter(x=None, y=None, value=None, size=None,
if value is None:
value = numpy.ones(len(x), dtype=numpy.float32)
- elif isinstance(value, collections.Iterable):
+ elif isinstance(value, abc.Iterable):
value = numpy.array(value, copy=True).reshape(-1)
assert len(x) == len(value)
@@ -400,7 +404,7 @@ class _GInputResult(tuple):
def __init__(self, position, item, indices, data):
self._itemRef = weakref.ref(item) if item is not None else None
self._indices = numpy.array(indices, copy=True)
- if isinstance(data, collections.Iterable):
+ if isinstance(data, abc.Iterable):
self._data = numpy.array(data, copy=True)
else:
self._data = data
diff --git a/silx/sx/_plot3d.py b/silx/sx/_plot3d.py
index da4bad4..444d9e0 100644
--- a/silx/sx/_plot3d.py
+++ b/silx/sx/_plot3d.py
@@ -30,7 +30,10 @@ __license__ = "MIT"
__date__ = "24/04/2018"
-from collections import Iterable
+try:
+ from collections import abc
+except ImportError: # Python2 support
+ import collections as abc
import logging
import numpy
@@ -111,7 +114,7 @@ def contour3d(scalars,
elif isinstance(contours, float):
contours = [contours]
- assert isinstance(contours, Iterable)
+ assert isinstance(contours, abc.Iterable)
# Prepare colors
if color is not None:
diff --git a/silx/test/__init__.py b/silx/test/__init__.py
index 8bada7f..0991469 100644
--- a/silx/test/__init__.py
+++ b/silx/test/__init__.py
@@ -1,7 +1,7 @@
# coding: utf-8
# /*##########################################################################
#
-# Copyright (c) 2015-2018 European Synchrotron Radiation Facility
+# Copyright (c) 2015-2019 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -60,7 +60,7 @@ def suite():
suite.addTest(SkipSXTest())
return suite
else:
- from ..sx.test import suite as test_sx_suite
+ from .test_sx import suite as test_sx_suite
from . import test_version
from . import test_resources
diff --git a/silx/test/test_resources.py b/silx/test/test_resources.py
index 8d3bd41..7f5f432 100644
--- a/silx/test/test_resources.py
+++ b/silx/test/test_resources.py
@@ -26,19 +26,15 @@
__authors__ = ["T. Vincent"]
__license__ = "MIT"
-__date__ = "17/01/2018"
+__date__ = "08/03/2019"
import os
import unittest
import shutil
-import socket
import tempfile
-import six
-
import silx.resources
-from .utils import utilstest
class TestResources(unittest.TestCase):
@@ -191,63 +187,12 @@ class TestResourcesWithCustomDirectory(TestResources):
super(TestResourcesWithCustomDirectory, cls).tearDownClass()
-def isSilxWebsiteAvailable():
- try:
- six.moves.urllib.request.urlopen('http://www.silx.org', timeout=1)
- return True
- except six.moves.urllib.error.URLError:
- return False
- except socket.timeout:
- # This exception is still received in Python 2.7
- return False
-
-
-class TestExternalResources(unittest.TestCase):
- """This is a test for the ExternalResources"""
-
- @classmethod
- def setUpClass(cls):
- if not isSilxWebsiteAvailable():
- raise unittest.SkipTest("Network or silx website not available")
-
- def setUp(self):
- self.utilstest = silx.resources.ExternalResources("toto", "http://www.silx.org/pub/silx/")
-
- def tearDown(self):
- if self.utilstest.data_home:
- shutil.rmtree(self.utilstest.data_home)
- self.utilstest = None
-
- def test_download(self):
- "test the download from silx.org"
- f = self.utilstest.getfile("lena.png")
- self.assertTrue(os.path.exists(f))
- di = utilstest.getdir("source.tar.gz")
- for fi in di:
- self.assertTrue(os.path.exists(fi))
-
- def test_download_all(self):
- "test the download of all files from silx.org"
- filename = self.utilstest.getfile("lena.png")
- directory = "source.tar.gz"
- _filelist = self.utilstest.getdir(directory)
- # download file and remove it to create a json mapping file
- os.remove(filename)
- directory_path = os.path.join(self.utilstest.data_home, "source")
- shutil.rmtree(directory_path)
- directory_path = os.path.join(self.utilstest.data_home, directory)
- os.remove(directory_path)
- filelist = self.utilstest.download_all()
- self.assertGreater(len(filelist), 1, "At least 2 items were downloaded")
-
-
def suite():
loadTests = unittest.defaultTestLoader.loadTestsFromTestCase
test_suite = unittest.TestSuite()
test_suite.addTest(loadTests(TestResources))
test_suite.addTest(loadTests(TestResourcesWithoutPkgResources))
test_suite.addTest(loadTests(TestResourcesWithCustomDirectory))
- test_suite.addTest(loadTests(TestExternalResources))
return test_suite
diff --git a/silx/sx/test/test_sx.py b/silx/test/test_sx.py
index ec95838..a32cc06 100644
--- a/silx/sx/test/test_sx.py
+++ b/silx/test/test_sx.py
@@ -1,7 +1,7 @@
# coding: utf-8
# /*##########################################################################
#
-# Copyright (c) 2016-2018 European Synchrotron Radiation Facility
+# Copyright (c) 2016-2019 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -39,14 +39,6 @@ from silx.gui import qt
from silx.gui.utils.testutils import TestCaseQt
from silx.gui.colors import rgba
from silx.gui.colors import Colormap
-from silx import sx
-
-try:
- import OpenGL
-except ImportError:
- has_opengl = False
-else:
- has_opengl = True
_logger = logging.getLogger(__name__)
@@ -63,6 +55,8 @@ class SXTest(TestCaseQt, ParametricTestCase):
def test_plot(self):
"""Test plot function"""
+ from silx import sx # Lazy loading to avoid it to create QApplication
+
y = numpy.random.random(100)
x = numpy.arange(len(y)) * 0.5
@@ -107,6 +101,8 @@ class SXTest(TestCaseQt, ParametricTestCase):
def test_imshow(self):
"""Test imshow function"""
+ from silx import sx # Lazy loading to avoid it to create QApplication
+
img = numpy.arange(100.).reshape(10, 10) + 1
# Nothing
@@ -150,6 +146,8 @@ class SXTest(TestCaseQt, ParametricTestCase):
def test_scatter(self):
"""Test scatter function"""
+ from silx import sx # Lazy loading to avoid it to create QApplication
+
x = numpy.arange(100)
y = numpy.arange(100)
values = numpy.arange(100)
@@ -187,6 +185,7 @@ class SXTest(TestCaseQt, ParametricTestCase):
This does NOT perform interactive tests
"""
+ from silx import sx # Lazy loading to avoid it to create QApplication
for create_plot in (sx.plot, sx.imshow, sx.scatter):
with self.subTest(create_plot.__name__):
@@ -200,11 +199,12 @@ class SXTest(TestCaseQt, ParametricTestCase):
plt.setAttribute(qt.Qt.WA_DeleteOnClose)
plt.close()
- @unittest.skipUnless(has_opengl, 'OpenGL not installed')
@unittest.skipUnless(test_options.WITH_GL_TEST,
test_options.WITH_GL_TEST_REASON)
def test_contour3d(self):
"""Test contour3d function"""
+ from silx import sx # Lazy loading to avoid it to create QApplication
+
coords = numpy.linspace(-10, 10, 64)
z = coords.reshape(-1, 1, 1)
y = coords.reshape(1, -1, 1)
@@ -252,11 +252,12 @@ class SXTest(TestCaseQt, ParametricTestCase):
self.assertEqual(rgba(isosurfaces[0].getColor()),
(0., 0., 0., 0.4))
- @unittest.skipUnless(has_opengl, 'OpenGL not installed')
@unittest.skipUnless(test_options.WITH_GL_TEST,
test_options.WITH_GL_TEST_REASON)
def test_points3d(self):
"""Test points3d function"""
+ from silx import sx # Lazy loading to avoid it to create QApplication
+
x = numpy.random.random(1024)
y = numpy.random.random(1024)
z = numpy.random.random(1024)
diff --git a/silx/test/utils.py b/silx/test/utils.py
index 12bede9..77746c6 100644
--- a/silx/test/utils.py
+++ b/silx/test/utils.py
@@ -1,7 +1,7 @@
# coding: utf-8
# /*##########################################################################
#
-# Copyright (c) 2016-2017 European Synchrotron Radiation Facility
+# Copyright (c) 2016-2019 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -96,6 +96,15 @@ class _TestOptions(object):
elif os.environ.get('WITH_GL_TEST', 'True') == 'False':
self.WITH_GL_TEST = False
self.WITH_GL_TEST_REASON = "Skipped by WITH_GL_TEST env var"
+ elif sys.platform.startswith('linux') and not os.environ.get('DISPLAY', ''):
+ self.WITH_GL_TEST = False
+ self.WITH_GL_TEST_REASON = "DISPLAY env variable not set"
+ else:
+ try:
+ import OpenGL
+ except ImportError:
+ self.WITH_GL_TEST = False
+ self.WITH_GL_TEST_REASON = "OpenGL package not available"
if (parsed_options is not None and parsed_options.low_mem) or os.environ.get('SILX_TEST_LOW_MEM', 'True') == 'False':
self.TEST_LOW_MEM = True
diff --git a/silx/utils/ExternalResources.py b/silx/utils/ExternalResources.py
new file mode 100644
index 0000000..7d9008b
--- /dev/null
+++ b/silx/utils/ExternalResources.py
@@ -0,0 +1,321 @@
+# coding: utf-8
+# /*##########################################################################
+#
+# Copyright (c) 2016-2018 European Synchrotron Radiation Facility
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+#
+# ###########################################################################*/
+"""Helper to access to external resources.
+"""
+
+__authors__ = ["Thomas Vincent", "J. Kieffer"]
+__license__ = "MIT"
+__date__ = "08/03/2019"
+
+
+import os
+import threading
+import json
+import logging
+import tempfile
+import unittest
+import six
+
+logger = logging.getLogger(__name__)
+
+
+class ExternalResources(object):
+ """Utility class which allows to download test-data from www.silx.org
+ and manage the temporary data during the tests.
+
+ """
+
+ def __init__(self, project,
+ url_base,
+ env_key=None,
+ timeout=60):
+ """Constructor of the class
+
+ :param str project: name of the project, like "silx"
+ :param str url_base: base URL for the data, like "http://www.silx.org/pub"
+ :param str env_key: name of the environment variable which contains the
+ test_data directory, like "SILX_DATA".
+ If None (default), then the name of the
+ environment variable is built from the project argument:
+ "<PROJECT>_DATA".
+ The environment variable is optional: in case it is not set,
+ a directory in the temporary folder is used.
+ :param timeout: time in seconds before it breaks
+ """
+ self.project = project
+ self._initialized = False
+ self.sem = threading.Semaphore()
+
+ self.env_key = env_key or (self.project.upper() + "_TESTDATA")
+ self.url_base = url_base
+ self.all_data = set()
+ self.timeout = timeout
+ self._data_home = None
+
+ @property
+ def data_home(self):
+ """Returns the data_home path and make sure it exists in the file
+ system."""
+ if self._data_home is not None:
+ return self._data_home
+
+ data_home = os.environ.get(self.env_key)
+ if data_home is None:
+ try:
+ import getpass
+ name = getpass.getuser()
+ except Exception:
+ if "getlogin" in dir(os):
+ name = os.getlogin()
+ elif "USER" in os.environ:
+ name = os.environ["USER"]
+ elif "USERNAME" in os.environ:
+ name = os.environ["USERNAME"]
+ else:
+ name = "uid" + str(os.getuid())
+
+ basename = "%s_testdata_%s" % (self.project, name)
+ data_home = os.path.join(tempfile.gettempdir(), basename)
+ if not os.path.exists(data_home):
+ os.makedirs(data_home)
+ self._data_home = data_home
+ return data_home
+
+ def _initialize_data(self):
+ """Initialize for downloading test data"""
+ if not self._initialized:
+ with self.sem:
+ if not self._initialized:
+ self.testdata = os.path.join(self.data_home, "all_testdata.json")
+ if os.path.exists(self.testdata):
+ with open(self.testdata) as f:
+ self.all_data = set(json.load(f))
+ self._initialized = True
+
+ def clean_up(self):
+ pass
+
+ def getfile(self, filename):
+ """Downloads the requested file from web-server available
+ at https://www.silx.org/pub/silx/
+
+ :param: relative name of the image.
+ :return: full path of the locally saved file.
+ """
+ logger.debug("ExternalResources.getfile('%s')", filename)
+
+ if not self._initialized:
+ self._initialize_data()
+
+ fullfilename = os.path.abspath(os.path.join(self.data_home, filename))
+
+ if not os.path.isfile(fullfilename):
+ logger.debug("Trying to download image %s, timeout set to %ss",
+ filename, self.timeout)
+ dictProxies = {}
+ if "http_proxy" in os.environ:
+ dictProxies['http'] = os.environ["http_proxy"]
+ dictProxies['https'] = os.environ["http_proxy"]
+ if "https_proxy" in os.environ:
+ dictProxies['https'] = os.environ["https_proxy"]
+ if dictProxies:
+ proxy_handler = six.moves.urllib.request.ProxyHandler(dictProxies)
+ opener = six.moves.urllib.request.build_opener(proxy_handler).open
+ else:
+ opener = six.moves.urllib.request.urlopen
+
+ logger.debug("wget %s/%s", self.url_base, filename)
+ try:
+ data = opener("%s/%s" % (self.url_base, filename),
+ data=None, timeout=self.timeout).read()
+ logger.info("Image %s successfully downloaded.", filename)
+ except six.moves.urllib.error.URLError:
+ raise unittest.SkipTest("network unreachable.")
+
+ if not os.path.isdir(os.path.dirname(fullfilename)):
+ # Create sub-directory if needed
+ os.makedirs(os.path.dirname(fullfilename))
+
+ try:
+ with open(fullfilename, "wb") as outfile:
+ outfile.write(data)
+ except IOError:
+ raise IOError("unable to write downloaded \
+ data to disk at %s" % self.data_home)
+
+ if not os.path.isfile(fullfilename):
+ raise RuntimeError(
+ "Could not automatically \
+ download test images %s!\n \ If you are behind a firewall, \
+ please set both environment variable http_proxy and https_proxy.\
+ This even works under windows ! \n \
+ Otherwise please try to download the images manually from \n%s/%s"
+ % (filename, self.url_base, filename))
+
+ if filename not in self.all_data:
+ self.all_data.add(filename)
+ image_list = list(self.all_data)
+ image_list.sort()
+ try:
+ with open(self.testdata, "w") as fp:
+ json.dump(image_list, fp, indent=4)
+ except IOError:
+ logger.debug("Unable to save JSON list")
+
+ return fullfilename
+
+ def getdir(self, dirname):
+ """Downloads the requested tarball from the server
+ https://www.silx.org/pub/silx/
+ and unzips it into the data directory
+
+ :param: relative name of the image.
+ :return: list of files with their full path.
+ """
+ lodn = dirname.lower()
+ if (lodn.endswith("tar") or lodn.endswith("tgz") or
+ lodn.endswith("tbz2") or lodn.endswith("tar.gz") or
+ lodn.endswith("tar.bz2")):
+ import tarfile
+ engine = tarfile.TarFile.open
+ elif lodn.endswith("zip"):
+ import zipfile
+ engine = zipfile.ZipFile
+ else:
+ raise RuntimeError("Unsupported archive format. Only tar and zip "
+ "are currently supported")
+ full_path = self.getfile(dirname)
+ with engine(full_path, mode="r") as fd:
+ output = os.path.join(self.data_home, dirname + "__content")
+ fd.extractall(output)
+ if lodn.endswith("zip"):
+ result = [os.path.join(output, i) for i in fd.namelist()]
+ else:
+ result = [os.path.join(output, i) for i in fd.getnames()]
+ return result
+
+ def get_file_and_repack(self, filename):
+ """
+ Download the requested file, decompress and repack it to bz2 and gz.
+
+ :param str filename: name of the image.
+ :rtype: str
+ :return: full path of the locally saved file
+ """
+ if not self._initialized:
+ self._initialize_data()
+ if filename not in self.all_data:
+ self.all_data.add(filename)
+ image_list = list(self.all_data)
+ image_list.sort()
+ try:
+ with open(self.testdata, "w") as fp:
+ json.dump(image_list, fp, indent=4)
+ except IOError:
+ logger.debug("Unable to save JSON list")
+ baseimage = os.path.basename(filename)
+ logger.info("UtilsTest.getimage('%s')" % baseimage)
+
+ if not os.path.exists(self.data_home):
+ os.makedirs(self.data_home)
+ fullimagename = os.path.abspath(os.path.join(self.data_home, baseimage))
+
+ if baseimage.endswith(".bz2"):
+ bzip2name = baseimage
+ basename = baseimage[:-4]
+ gzipname = basename + ".gz"
+ elif baseimage.endswith(".gz"):
+ gzipname = baseimage
+ basename = baseimage[:-3]
+ bzip2name = basename + ".bz2"
+ else:
+ basename = baseimage
+ gzipname = baseimage + "gz2"
+ bzip2name = basename + ".bz2"
+
+ fullimagename_gz = os.path.abspath(os.path.join(self.data_home, gzipname))
+ fullimagename_raw = os.path.abspath(os.path.join(self.data_home, basename))
+ fullimagename_bz2 = os.path.abspath(os.path.join(self.data_home, bzip2name))
+
+ # The files are recreated from the bz2 file
+ if not os.path.isfile(fullimagename_bz2):
+ self.getfile(bzip2name)
+ if not os.path.isfile(fullimagename_bz2):
+ raise RuntimeError("Could not automatically \
+ download test images %s!\n \ If you are behind a firewall, \
+ please set the environment variable http_proxy.\n \
+ Otherwise please try to download the images manually from \n \
+ %s" % (self.url_base, filename))
+
+ try:
+ import bz2
+ except ImportError:
+ raise RuntimeError("bz2 library is needed to decompress data")
+ try:
+ import gzip
+ except ImportError:
+ gzip = None
+
+ raw_file_exists = os.path.isfile(fullimagename_raw)
+ gz_file_exists = os.path.isfile(fullimagename_gz)
+ if not raw_file_exists or not gz_file_exists:
+ with open(fullimagename_bz2, "rb") as f:
+ data = f.read()
+ decompressed = bz2.decompress(data)
+
+ if not raw_file_exists:
+ try:
+ with open(fullimagename_raw, "wb") as fullimage:
+ fullimage.write(decompressed)
+ except IOError:
+ raise IOError("unable to write decompressed \
+ data to disk at %s" % self.data_home)
+
+ if not gz_file_exists:
+ if gzip is None:
+ raise RuntimeError("gzip library is expected to recompress data")
+ try:
+ gzip.open(fullimagename_gz, "wb").write(decompressed)
+ except IOError:
+ raise IOError("unable to write gzipped \
+ data to disk at %s" % self.data_home)
+
+ return fullimagename
+
+ def download_all(self, imgs=None):
+ """Download all data needed for the test/benchmarks
+
+ :param imgs: list of files to download, by default all
+ :return: list of path with all files
+ """
+ if not self._initialized:
+ self._initialize_data()
+ if not imgs:
+ imgs = self.all_data
+ res = []
+ for fn in imgs:
+ logger.info("Downloading from silx.org: %s", fn)
+ res.append(self.getfile(fn))
+ return res
diff --git a/silx/utils/enum.py b/silx/utils/enum.py
new file mode 100644
index 0000000..fece575
--- /dev/null
+++ b/silx/utils/enum.py
@@ -0,0 +1,79 @@
+# coding: utf-8
+# /*##########################################################################
+#
+# Copyright (c) 2019 European Synchrotron Radiation Facility
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+#
+# ###########################################################################*/
+"""An :class:`.Enum` class with additional features."""
+
+from __future__ import absolute_import
+
+__authors__ = ["T. Vincent"]
+__license__ = "MIT"
+__date__ = "29/04/2019"
+
+
+import enum
+
+
+class Enum(enum.Enum):
+ """Enum with additional class methods."""
+
+ @classmethod
+ def from_value(cls, value):
+ """Convert a value to corresponding Enum member
+
+ :param value: The value to compare to Enum members
+ If it is already a member of Enum, it is returned directly.
+ :return: The corresponding enum member
+ :rtype: Enum
+ :raise ValueError: In case the conversion is not possible
+ """
+ if isinstance(value, cls):
+ return value
+ for member in cls:
+ if value == member.value:
+ return member
+ raise ValueError("Cannot convert: %s" % value)
+
+ @classmethod
+ def members(cls):
+ """Returns a tuple of all members.
+
+ :rtype: Tuple[Enum]
+ """
+ return tuple(member for member in cls)
+
+ @classmethod
+ def names(cls):
+ """Returns a tuple of all member names.
+
+ :rtype: Tuple[str]
+ """
+ return tuple(member.name for member in cls)
+
+ @classmethod
+ def values(cls):
+ """Returns a tuple of all member values.
+
+ :rtype: Tuple
+ """
+ return tuple(member.value for member in cls)
diff --git a/silx/utils/proxy.py b/silx/utils/proxy.py
index 7d7d662..8711799 100644
--- a/silx/utils/proxy.py
+++ b/silx/utils/proxy.py
@@ -1,7 +1,7 @@
# coding: utf-8
# /*##########################################################################
#
-# Copyright (c) 2016-2018 European Synchrotron Radiation Facility
+# Copyright (c) 2016-2019 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -30,6 +30,8 @@ __authors__ = ["V. Valls"]
__license__ = "MIT"
__date__ = "02/10/2017"
+
+import functools
import six
@@ -202,3 +204,38 @@ class Proxy(object):
__irepeat__ = property(lambda self: self.__obj.__irepeat__)
__call__ = property(lambda self: self.__obj.__call__)
+
+
+def _docstring(dest, origin):
+ """Implementation of docstring decorator.
+
+ It patches dest.__doc__.
+ """
+ if not isinstance(dest, type) and isinstance(origin, type):
+ # func is not a class, but origin is, get the method with the same name
+ try:
+ origin = getattr(origin, dest.__name__)
+ except AttributeError:
+ raise ValueError(
+ "origin class has no %s method" % dest.__name__)
+
+ dest.__doc__ = origin.__doc__
+ return dest
+
+
+def docstring(origin):
+ """Decorator to initialize the docstring from another source.
+
+ This is useful to duplicate a docstring for inheritance and composition.
+
+ If origin is a method or a function, it copies its docstring.
+ If origin is a class, the docstring is copied from the method
+ of that class which has the same name as the method/function
+ being decorated.
+
+ :param origin:
+ The method, function or class from which to get the docstring
+ :raises ValueError:
+ If the origin class has not method n case the
+ """
+ return functools.partial(_docstring, origin=origin)
diff --git a/silx/utils/test/__init__.py b/silx/utils/test/__init__.py
index f16cbdc..029523c 100644
--- a/silx/utils/test/__init__.py
+++ b/silx/utils/test/__init__.py
@@ -1,7 +1,7 @@
# coding: utf-8
# /*##########################################################################
#
-# Copyright (c) 2016 European Synchrotron Radiation Facility
+# Copyright (c) 2016-2019 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -24,7 +24,7 @@
# ###########################################################################*/
__authors__ = ["T. Vincent", "P. Knobel"]
__license__ = "MIT"
-__date__ = "24/05/2018"
+__date__ = "08/03/2019"
import unittest
@@ -36,6 +36,8 @@ from . import test_deprecation
from . import test_proxy
from . import test_debug
from . import test_number
+from . import test_external_resources
+from . import test_enum
def suite():
@@ -48,4 +50,6 @@ def suite():
test_suite.addTest(test_proxy.suite())
test_suite.addTest(test_debug.suite())
test_suite.addTest(test_number.suite())
+ test_suite.addTest(test_external_resources.suite())
+ test_suite.addTest(test_enum.suite())
return test_suite
diff --git a/silx/utils/test/test_enum.py b/silx/utils/test/test_enum.py
new file mode 100644
index 0000000..a72da46
--- /dev/null
+++ b/silx/utils/test/test_enum.py
@@ -0,0 +1,96 @@
+# coding: utf-8
+# /*##########################################################################
+#
+# Copyright (c) 2019 European Synchrotron Radiation Facility
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+#
+# ###########################################################################*/
+"""Tests of Enum class with extra class methods"""
+
+from __future__ import absolute_import
+
+__authors__ = ["T. Vincent"]
+__license__ = "MIT"
+__date__ = "29/04/2019"
+
+
+import sys
+import unittest
+
+import enum
+from silx.utils.enum import Enum
+
+
+class TestEnum(unittest.TestCase):
+ """Tests for enum module."""
+
+ def test(self):
+ """Test with Enum"""
+ class Success(Enum):
+ A = 1
+ B = 'B'
+ self._check_enum_content(Success)
+
+ @unittest.skipIf(sys.version_info.major <= 2, 'Python3 only')
+ def test(self):
+ """Test Enum with member redefinition"""
+ with self.assertRaises(TypeError):
+ class Failure(Enum):
+ A = 1
+ A = 'B'
+
+ def test_unique(self):
+ """Test with enum.unique"""
+ with self.assertRaises(ValueError):
+ @enum.unique
+ class Failure(Enum):
+ A = 1
+ B = 1
+
+ @enum.unique
+ class Success(Enum):
+ A = 1
+ B = 'B'
+ self._check_enum_content(Success)
+
+ def _check_enum_content(self, enum_):
+ """Check that the content of an enum is: <A: 1, B: 2>.
+
+ :param Enum enum_:
+ """
+ self.assertEqual(enum_.members(), (enum_.A, enum_.B))
+ self.assertEqual(enum_.names(), ('A', 'B'))
+ self.assertEqual(enum_.values(), (1, 'B'))
+
+ self.assertEqual(enum_.from_value(1), enum_.A)
+ self.assertEqual(enum_.from_value('B'), enum_.B)
+ with self.assertRaises(ValueError):
+ enum_.from_value(3)
+
+
+def suite():
+ test_suite = unittest.TestSuite()
+ loadTests = unittest.defaultTestLoader.loadTestsFromTestCase
+ test_suite.addTest(loadTests(TestEnum))
+ return test_suite
+
+
+if __name__ == '__main__':
+ unittest.main(defaultTest='suite')
diff --git a/silx/utils/test/test_external_resources.py b/silx/utils/test/test_external_resources.py
new file mode 100644
index 0000000..8576029
--- /dev/null
+++ b/silx/utils/test/test_external_resources.py
@@ -0,0 +1,99 @@
+# coding: utf-8
+# /*##########################################################################
+#
+# Copyright (c) 2016-2018 European Synchrotron Radiation Facility
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+#
+# ###########################################################################*/
+"""Test for resource files management."""
+
+__authors__ = ["T. Vincent"]
+__license__ = "MIT"
+__date__ = "08/03/2019"
+
+
+import os
+import unittest
+import shutil
+import socket
+import six
+
+from silx.utils.ExternalResources import ExternalResources
+
+
+def isSilxWebsiteAvailable():
+ try:
+ six.moves.urllib.request.urlopen('http://www.silx.org', timeout=1)
+ return True
+ except six.moves.urllib.error.URLError:
+ return False
+ except socket.timeout:
+ # This exception is still received in Python 2.7
+ return False
+
+
+class TestExternalResources(unittest.TestCase):
+ """This is a test for the ExternalResources"""
+
+ @classmethod
+ def setUpClass(cls):
+ if not isSilxWebsiteAvailable():
+ raise unittest.SkipTest("Network or silx website not available")
+
+ def setUp(self):
+ self.resources = ExternalResources("toto", "http://www.silx.org/pub/silx/")
+
+ def tearDown(self):
+ if self.resources.data_home:
+ shutil.rmtree(self.resources.data_home)
+ self.resources = None
+
+ def test_download(self):
+ "test the download from silx.org"
+ f = self.resources.getfile("lena.png")
+ self.assertTrue(os.path.exists(f))
+ di = self.resources.getdir("source.tar.gz")
+ for fi in di:
+ self.assertTrue(os.path.exists(fi))
+
+ def test_download_all(self):
+ "test the download of all files from silx.org"
+ filename = self.resources.getfile("lena.png")
+ directory = "source.tar.gz"
+ filelist = self.resources.getdir(directory)
+ # download file and remove it to create a json mapping file
+ os.remove(filename)
+ directory_path = os.path.commonprefix(filelist)
+ # Make sure we will rmtree a dangerous path like "/"
+ self.assertIn(self.resources.data_home, directory_path)
+ shutil.rmtree(directory_path)
+ filelist = self.resources.download_all()
+ self.assertGreater(len(filelist), 1, "At least 2 items were downloaded")
+
+
+def suite():
+ loadTests = unittest.defaultTestLoader.loadTestsFromTestCase
+ test_suite = unittest.TestSuite()
+ test_suite.addTest(loadTests(TestExternalResources))
+ return test_suite
+
+
+if __name__ == '__main__':
+ unittest.main(defaultTest='suite')
diff --git a/silx/utils/test/test_number.py b/silx/utils/test/test_number.py
index c900b32..e4f6bd8 100644
--- a/silx/utils/test/test_number.py
+++ b/silx/utils/test/test_number.py
@@ -148,7 +148,8 @@ class TestConversionTypes(testutils.ParametricTestCase):
self.skipIfFloat80NotSupported()
if pkg_resources.parse_version(numpy.version.version) <= pkg_resources.parse_version("1.10.4"):
self.skipTest("numpy > 1.10.4 expected")
- value = "1000000000.00001013332"
+ # value does not fit even in a 128 bits mantissa
+ value = "1.0340282366920938463463374607431768211456"
func = testutils.test_logging(number._logger.name, warning=1)
func = func(number.min_numerical_convertible_type)
dtype = func(value)
diff --git a/silx/utils/test/test_proxy.py b/silx/utils/test/test_proxy.py
index 081d3d4..72b4d21 100644
--- a/silx/utils/test/test_proxy.py
+++ b/silx/utils/test/test_proxy.py
@@ -1,7 +1,7 @@
# coding: utf-8
# /*##########################################################################
#
-# Copyright (c) 2016 European Synchrotron Radiation Facility
+# Copyright (c) 2016-2019 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -32,7 +32,7 @@ __date__ = "02/10/2017"
import unittest
import pickle
import numpy
-from ..proxy import Proxy
+from silx.utils.proxy import Proxy, docstring
class Thing(object):
@@ -282,12 +282,61 @@ class TestPickle(unittest.TestCase):
self.assertEqual(obj.value, obj2.value)
+class TestDocstring(unittest.TestCase):
+ """Test docstring decorator"""
+
+ class Base(object):
+ def method(self):
+ """Docstring"""
+ pass
+
+ def test_inheritance(self):
+ class Derived(TestDocstring.Base):
+ @docstring(TestDocstring.Base)
+ def method(self):
+ pass
+
+ self.assertEqual(Derived.method.__doc__,
+ TestDocstring.Base.method.__doc__)
+
+ def test_composition(self):
+ class Composed(object):
+ def __init__(self):
+ self._base = TestDocstring.Base()
+
+ @docstring(TestDocstring.Base)
+ def method(self):
+ return self._base.method()
+
+ @docstring(TestDocstring.Base.method)
+ def renamed(self):
+ return self._base.method()
+
+ self.assertEqual(Composed.method.__doc__,
+ TestDocstring.Base.method.__doc__)
+
+ self.assertEqual(Composed.renamed.__doc__,
+ TestDocstring.Base.method.__doc__)
+
+ def test_function(self):
+ def f():
+ """Docstring"""
+ pass
+
+ @docstring(f)
+ def g():
+ pass
+
+ self.assertEqual(f.__doc__, g.__doc__)
+
+
def suite():
loadTests = unittest.defaultTestLoader.loadTestsFromTestCase
test_suite = unittest.TestSuite()
test_suite.addTest(loadTests(TestProxy))
test_suite.addTest(loadTests(TestPickle))
test_suite.addTest(loadTests(TestInheritedProxy))
+ test_suite.addTest(loadTests(TestDocstring))
return test_suite
diff --git a/silx/utils/test/test_weakref.py b/silx/utils/test/test_weakref.py
index 16d3cf5..001193d 100644
--- a/silx/utils/test/test_weakref.py
+++ b/silx/utils/test/test_weakref.py
@@ -1,7 +1,7 @@
# coding: utf-8
# /*##########################################################################
#
-# Copyright (c) 2016 European Synchrotron Radiation Facility
+# Copyright (c) 2016-2019 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -304,10 +304,10 @@ class TestWeakList(unittest.TestCase):
self.assertEqual(len(new_list), 1)
def testStr(self):
- self.assertNotEquals(self.list.__str__(), "[]")
+ self.assertNotEqual(self.list.__str__(), "[]")
def testRepr(self):
- self.assertNotEquals(self.list.__repr__(), "[]")
+ self.assertNotEqual(self.list.__repr__(), "[]")
def testSort(self):
# only a coverage
diff --git a/version.py b/version.py
index b53aac2..c05dee5 100644
--- a/version.py
+++ b/version.py
@@ -67,8 +67,8 @@ RELEASE_LEVEL_VALUE = {"dev": 0,
"final": 15}
MAJOR = 0
-MINOR = 10
-MICRO = 1
+MINOR = 11
+MICRO = 0
RELEV = "final" # <16
SERIAL = 0 # <16